Skip to content
Snippets Groups Projects
Commit 530db333 authored by spiglerg's avatar spiglerg
Browse files

fixed temporary example

parent a7129610
No related branches found
No related tags found
No related merge requests found
...@@ -55,6 +55,8 @@ env.obs_builder.reset() ...@@ -55,6 +55,8 @@ env.obs_builder.reset()
""" """
"""
# INFINITE-LOOP TEST
specs = [[(0, 0), (0, 0), (0, 0), (0, 0), (7, 0), (0, 0)], specs = [[(0, 0), (0, 0), (0, 0), (0, 0), (7, 0), (0, 0)],
[(7, 270), (1, 90), (1, 90), (2, 270), (2, 0), (0, 0)], [(7, 270), (1, 90), (1, 90), (2, 270), (2, 0), (0, 0)],
[(0, 0), (0, 0), (0, 0), (2, 180), (2, 90), (7, 90)], [(0, 0), (0, 0), (0, 0), (2, 180), (2, 90), (7, 90)],
...@@ -72,15 +74,12 @@ env.agents_target[0] = [1, 1] ...@@ -72,15 +74,12 @@ env.agents_target[0] = [1, 1]
env.agents_direction[0] = 1 env.agents_direction[0] = 1
# TODO: watch out: if these variables are overridden, the obs_builder object has to be reset, too! # TODO: watch out: if these variables are overridden, the obs_builder object has to be reset, too!
env.obs_builder.reset() env.obs_builder.reset()
""" """
env = RailEnv(width=7, env = RailEnv(width=7,
height=7, height=7,
rail_generator=random_rail_generator(cell_type_relative_proportion=transition_probability), rail_generator=random_rail_generator(cell_type_relative_proportion=transition_probability),
number_of_agents=2) number_of_agents=2)
"""
# Print the distance map of each cell to the target of the first agent # Print the distance map of each cell to the target of the first agent
# for i in range(4): # for i in range(4):
# print(env.obs_builder.distance_map[0, :, :, i]) # print(env.obs_builder.distance_map[0, :, :, i])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment