From 254c74bd82cdb43f153d60547971632741ed3387 Mon Sep 17 00:00:00 2001 From: Erik Nygren <erik.nygren@sbb.ch> Date: Fri, 19 Jul 2019 10:09:25 -0400 Subject: [PATCH] Agent.moving = False when agent reaches target destination. Updated potential conflict detection. Agents now get warned about conflicts when other agents have reached their target and are in the way. --- flatland/envs/rail_env.py | 1 + 1 file changed, 1 insertion(+) diff --git a/flatland/envs/rail_env.py b/flatland/envs/rail_env.py index 2af0d8b9..abe623ae 100644 --- a/flatland/envs/rail_env.py +++ b/flatland/envs/rail_env.py @@ -334,6 +334,7 @@ class RailEnv(Environment): if np.equal(agent.position, agent.target).all(): self.dones[i_agent] = True + agent.moving = False else: self.rewards_dict[i_agent] += step_penalty * agent.speed_data['speed'] -- GitLab