From ce93dcd8dafb3081c835a71c1a745cb2f2d3a4ff Mon Sep 17 00:00:00 2001 From: Elliot Tower Date: Wed, 13 Mar 2024 12:22:17 -0400 Subject: [PATCH 1/3] Fix truncations logic error in base_aec_wrapper.py --- supersuit/utils/base_aec_wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From fcc2ff2e7180ca847ba407400ff0a1d140e2c4d8 Mon Sep 17 00:00:00 2001 From: Elliot Tower Date: Wed, 13 Mar 2024 12:28:46 -0400 Subject: [PATCH 2/3] Create real_pettingzoo_env_test.py --- real_pettingzoo_env_test.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 real_pettingzoo_env_test.py diff --git a/real_pettingzoo_env_test.py b/real_pettingzoo_env_test.py new file mode 100644 index 0000000..c81128c --- /dev/null +++ b/real_pettingzoo_env_test.py @@ -0,0 +1,9 @@ +import pytest +from pettingzoo.test import parallel_api_test +from pettingzoo.mpe import simple_spread_v3 + +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) From 345ced200f7731d5534b59a60d50dbdb41887730 Mon Sep 17 00:00:00 2001 From: elliottower Date: Wed, 13 Mar 2024 14:12:18 -0400 Subject: [PATCH 3/3] Pre-commit and rename files --- real_pettingzoo_env_test.py => test/pettingzoo_env_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) rename real_pettingzoo_env_test.py => test/pettingzoo_env_test.py (81%) diff --git a/real_pettingzoo_env_test.py b/test/pettingzoo_env_test.py similarity index 81% rename from real_pettingzoo_env_test.py rename to test/pettingzoo_env_test.py index c81128c..99b0062 100644 --- a/real_pettingzoo_env_test.py +++ b/test/pettingzoo_env_test.py @@ -1,6 +1,8 @@ -import pytest -from pettingzoo.test import parallel_api_test 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)