Skip to content
Snippets Groups Projects
Commit 70b2c6d6 authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files

demo.py check wether action==2 is valid, otherwise just random action

parent 2a500b3a
No related branches found
No related tags found
No related merge requests found
...@@ -140,7 +140,7 @@ class Demo: ...@@ -140,7 +140,7 @@ class Demo:
# Action # Action
for iAgent in range(self.env.get_num_agents()): for iAgent in range(self.env.get_num_agents()):
action = 2 action = 2
agent = self.env.agents.copy()[iAgent] agent = self.env.agents.[iAgent]
if not self.env.check_action(agent, action)[1]: if not self.env.check_action(agent, action)[1]:
action = np.random.choice(self.action_size) action = np.random.choice(self.action_size)
action_dict.update({iAgent: action}) action_dict.update({iAgent: action})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment