Commit 13ebd009 authored by spiglerg's avatar spiglerg
Browse files

fixed temporary_example

parent 98906167
Pipeline #307 failed with stage
in 2 minutes and 4 seconds
......@@ -27,7 +27,7 @@ transition_probability = [1.0, # empty cell - Case 0
0.1, # Case 5 - double slip
0.2, # Case 6 - symmetrical
0.01] # Case 7 - dead end
"""
# Example generate a random rail
env = RailEnv(width=20,
height=20,
......@@ -43,6 +43,7 @@ env_renderer.renderEnv(show=True)
specs = [[(0, 0), (0, 0), (0, 0), (0, 0), (7, 0), (0, 0)],
[(7, 270), (1, 90), (1, 90), (1, 90), (2, 90), (7, 90)]]
"""
env = RailEnv(width=6,
height=2,
rail_generator=rail_from_manual_specifications_generator(specs),
......@@ -55,16 +56,16 @@ env.agents_target[0] = [1, 1]
env.agents_direction[0] = 1
# TODO: watch out: if these variables are overridden, the obs_builder object has to be reset, too!
env.obs_builder.reset()
"""
#"""
env = RailEnv(width=7,
height=7,
rail_generator=random_rail_generator(cell_type_relative_proportion=transition_probability),
number_of_agents=1)
number_of_agents=2)
# TODO: delete next line
for i in range(4):
print(env.obs_builder.distance_map[0, :, :, i])
#for i in range(4):
# print(env.obs_builder.distance_map[0, :, :, i])
obs, all_rewards, done, _ = env.step({0:0})
for i in range(env.number_of_agents):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment