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

demo cleaned up

parent 47958991
No related branches found
No related tags found
No related merge requests found
...@@ -71,7 +71,7 @@ class Scenario_Generator: ...@@ -71,7 +71,7 @@ class Scenario_Generator:
print("File does not exist:", filename, " Working directory: ", os.getcwd()) print("File does not exist:", filename, " Working directory: ", os.getcwd())
return env return env
class Demo: class Demo:
def __init__(self, env): def __init__(self, env):
...@@ -106,6 +106,8 @@ class Demo: ...@@ -106,6 +106,8 @@ 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
if False: if False:
...@@ -125,9 +127,10 @@ class Demo: ...@@ -125,9 +127,10 @@ class Demo:
trial += 1 trial += 1
if trial > 10: if trial > 10:
break break
action_dict.update({iAgent: action}) action_dict.update({iAgent: action})
self.renderer.renderEnv(show=True, action_dict=action_dict) self.renderer.renderEnv(show=True)
# Environment step # Environment step
next_obs, all_rewards, done, _ = self.env.step(action_dict) next_obs, all_rewards, done, _ = self.env.step(action_dict)
......
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