From 70b2c6d6a062d8a97a67f078d713fa99f77d8e18 Mon Sep 17 00:00:00 2001
From: "Egli Adrian (IT-SCI-API-PFI)" <adrian.egli@sbb.ch>
Date: Sat, 25 May 2019 20:14:13 +0200
Subject: [PATCH] demo.py check wether action==2 is valid, otherwise just
 random action

---
 examples/demo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/demo.py b/examples/demo.py
index 6c02f35..54d7931 100644
--- a/examples/demo.py
+++ b/examples/demo.py
@@ -140,7 +140,7 @@ class Demo:
             # Action
             for iAgent in range(self.env.get_num_agents()):
                 action = 2
-                agent = self.env.agents.copy()[iAgent]
+                agent = self.env.agents.[iAgent]
                 if not self.env.check_action(agent, action)[1]:
                    action = np.random.choice(self.action_size)
                 action_dict.update({iAgent: action})
-- 
GitLab