Skip to content

Commit

Permalink
Fix truncations logic error in base_aec_wrapper.py (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottower authored Mar 13, 2024
1 parent 6e1f348 commit ed2641e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion supersuit/utils/base_aec_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def observe(self, agent):

def step(self, action):
agent = self.env.agent_selection
if not self.terminations[agent] or self.truncations[agent]:
if not (self.terminations[agent] or self.truncations[agent]):
action = self._modify_action(agent, action)

super().step(action)
Expand Down
11 changes: 11 additions & 0 deletions test/pettingzoo_env_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from pettingzoo.mpe import simple_spread_v3
from pettingzoo.test import parallel_api_test

from supersuit.multiagent_wrappers import pad_action_space_v0


def test_pad_actuon_space():
env = simple_spread_v3.parallel_env(max_cycles=25, continuous_actions=True)
env = pad_action_space_v0(env)

parallel_api_test(env, num_cycles=100)

0 comments on commit ed2641e

Please sign in to comment.