diff --git a/supersuit/utils/base_aec_wrapper.py b/supersuit/utils/base_aec_wrapper.py index f9773d7..1dd775c 100644 --- a/supersuit/utils/base_aec_wrapper.py +++ b/supersuit/utils/base_aec_wrapper.py @@ -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) diff --git a/test/pettingzoo_env_test.py b/test/pettingzoo_env_test.py new file mode 100644 index 0000000..99b0062 --- /dev/null +++ b/test/pettingzoo_env_test.py @@ -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)