Skip to content
Snippets Groups Projects
Commit c91bc6ab authored by nilabha's avatar nilabha
Browse files

updated Michel's wrapper integrated into pettingzoo

parent d162772f
No related branches found
No related tags found
No related merge requests found
......@@ -224,10 +224,10 @@ def _after_step(self, observation, reward, done, info):
def perc_completion(env):
tasks_finished = 0
if isinstance(env, RailEnv):
agent_data = env.agents
else:
if hasattr(env, "agents_data"):
agent_data = env.agents_data
else:
agent_data = env.agents
for current_agent in agent_data:
if current_agent.status == RailAgentStatus.DONE:
tasks_finished += 1
......
This diff is collapsed.
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