From 0c8e8312e0916fbe95bf5a349fb0b323b325cc0f Mon Sep 17 00:00:00 2001
From: Erik Nygren <erik.nygren@sbb.ch>
Date: Tue, 23 Apr 2019 09:35:07 +0200
Subject: [PATCH] minor bugfixes, still looking for infinite loop

---
 examples/training_navigation.py | 3 ++-
 flatland/envs/rail_env.py       | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/examples/training_navigation.py b/examples/training_navigation.py
index 60dc1adb..975d33fb 100644
--- a/examples/training_navigation.py
+++ b/examples/training_navigation.py
@@ -54,7 +54,8 @@ for trials in range(1, n_trials + 1):
 
     # Run episode
     for step in range(100):
-        #env_renderer.renderEnv(show=True)
+        if trials >= 114:
+            env_renderer.renderEnv(show=True)
 
         # Action
         for a in range(env.number_of_agents):
diff --git a/flatland/envs/rail_env.py b/flatland/envs/rail_env.py
index 22c072a8..36040d5c 100644
--- a/flatland/envs/rail_env.py
+++ b/flatland/envs/rail_env.py
@@ -547,7 +547,7 @@ class RailEnv(Environment):
         global_reward = 1 * beta
 
         # Reset the step rewards
-        self.rewards_dict = {}
+        self.rewards_dict = dict()
         for handle in self.agents_handles:
             self.rewards_dict[handle] = 0
 
-- 
GitLab