diff --git a/flatland/envs/rail_env.py b/flatland/envs/rail_env.py index 3cb38c16c3ea1cf223f9b6c32a06e5faf96c0d52..8cbab637d2b14c7f47bec05b743ad3dcc87aeb86 100644 --- a/flatland/envs/rail_env.py +++ b/flatland/envs/rail_env.py @@ -321,7 +321,7 @@ class RailEnv(Environment): # todo change self.agents_static[0] with the refactoring for agents_static -> issue nr. 185 # https://gitlab.aicrowd.com/flatland/flatland/issues/185 - if regenerate_schedule or self.agents_static[0] is None: + if regenerate_schedule or regenerate_rail or self.agents_static[0] is None: agents_hints = None if optionals and 'agents_hints' in optionals: agents_hints = optionals['agents_hints']