Skip to content
Snippets Groups Projects
Commit cb4f78c3 authored by Erik Nygren's avatar Erik Nygren :bullettrain_front:
Browse files

minor changes

parent ad579f7d
No related branches found
No related tags found
No related merge requests found
...@@ -32,8 +32,8 @@ speed_ration_map = {1.: 0.25, # Fast passenger train ...@@ -32,8 +32,8 @@ speed_ration_map = {1.: 0.25, # Fast passenger train
env = RailEnv(width=50, env = RailEnv(width=50,
height=50, height=50,
rail_generator=sparse_rail_generator(num_cities=50, # Number of cities in map (where train stations are) rail_generator=sparse_rail_generator(num_cities=10, # Number of cities in map (where train stations are)
seed=0, # Random seed seed=1, # Random seed
grid_mode=False, grid_mode=False,
max_inter_city_rails=2, max_inter_city_rails=2,
max_tracks_in_city=4, max_tracks_in_city=4,
......
...@@ -248,6 +248,7 @@ class RailEnv(Environment): ...@@ -248,6 +248,7 @@ class RailEnv(Environment):
rc_pos = (r, c) rc_pos = (r, c)
check = self.rail.cell_neighbours_valid(rc_pos, True) check = self.rail.cell_neighbours_valid(rc_pos, True)
if not check: if not check:
print(self.rail.grid[rc_pos])
warnings.warn("Invalid grid at {} -> {}".format(rc_pos, check)) warnings.warn("Invalid grid at {} -> {}".format(rc_pos, check))
# TODO https://gitlab.aicrowd.com/flatland/flatland/issues/172 # TODO https://gitlab.aicrowd.com/flatland/flatland/issues/172
# hacky: we must re-compute the distance map and not use the initial distance_map loaded from file by # hacky: we must re-compute the distance map and not use the initial distance_map loaded from file by
......
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