Skip to content

Commit

Permalink
Fix regression
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisyeh96 committed Sep 11, 2023
1 parent 877986b commit 0c58438
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pettingzoo/test/parallel_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ def parallel_api_test(par_env: ParallelEnv, num_cycles=1000):
agent
), "action_space should return the exact same space object (not a copy) for an agent (ensures that action space seeding works as expected). Consider decorating your action_space(self, agent) method with @functools.lru_cache(maxsize=None)"

for agent in live_agents:
# we make a copy of live_agents because live_agents changes during iteration
for agent in set(live_agents):
if terminated[agent] or truncated[agent]:
live_agents.remove(agent)

Expand Down

0 comments on commit 0c58438

Please sign in to comment.