From cb4f78c335de158401f5136d390aeeecd12a9b70 Mon Sep 17 00:00:00 2001 From: MLErik <baerenjesus@gmail.com> Date: Mon, 30 Sep 2019 16:55:26 -0400 Subject: [PATCH] minor changes --- examples/flatland_2_0_example.py | 4 ++-- flatland/envs/rail_env.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/flatland_2_0_example.py b/examples/flatland_2_0_example.py index 57e99ffb..6396f412 100644 --- a/examples/flatland_2_0_example.py +++ b/examples/flatland_2_0_example.py @@ -32,8 +32,8 @@ speed_ration_map = {1.: 0.25, # Fast passenger train env = RailEnv(width=50, height=50, - rail_generator=sparse_rail_generator(num_cities=50, # Number of cities in map (where train stations are) - seed=0, # Random seed + rail_generator=sparse_rail_generator(num_cities=10, # Number of cities in map (where train stations are) + seed=1, # Random seed grid_mode=False, max_inter_city_rails=2, max_tracks_in_city=4, diff --git a/flatland/envs/rail_env.py b/flatland/envs/rail_env.py index b5bc44f2..901f318c 100644 --- a/flatland/envs/rail_env.py +++ b/flatland/envs/rail_env.py @@ -248,6 +248,7 @@ class RailEnv(Environment): rc_pos = (r, c) check = self.rail.cell_neighbours_valid(rc_pos, True) if not check: + print(self.rail.grid[rc_pos]) warnings.warn("Invalid grid at {} -> {}".format(rc_pos, check)) # 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 -- GitLab