From 62cdecbf5c08f45dab0f88f42417bd90db975ff5 Mon Sep 17 00:00:00 2001 From: pandyah5 Date: Fri, 7 Jun 2024 10:33:01 -0700 Subject: [PATCH 1/5] Added radius rescaling to simple env --- pettingzoo/mpe/_mpe_utils/simple_env.py | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/pettingzoo/mpe/_mpe_utils/simple_env.py b/pettingzoo/mpe/_mpe_utils/simple_env.py index af95b64d4..bd61ac66e 100644 --- a/pettingzoo/mpe/_mpe_utils/simple_env.py +++ b/pettingzoo/mpe/_mpe_utils/simple_env.py @@ -12,6 +12,7 @@ from pettingzoo.utils.agent_selector import AgentSelector alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +DYNAMIC_RESCALING = False def make_env(raw_env): @@ -116,6 +117,11 @@ def __init__( dtype=np.float32, ) + # Get the original cam_range + # This will be used to scale the rendering + all_poses = [entity.state.p_pos for entity in self.world.entities] + self.original_cam_range = np.max(np.abs(np.array(all_poses))) + self.steps = 0 self.current_actions = [None] * self.num_agents @@ -295,6 +301,10 @@ def draw(self): all_poses = [entity.state.p_pos for entity in self.world.entities] cam_range = np.max(np.abs(np.array(all_poses))) + # The scaling factor is used for dynamic rescaling of the rendering - a.k.a Zoom In/Zoom Out effect + # The 0.9 is a factor to keep the entities from appearing "too" out-of-bounds + scaling_factor = 0.9 * self.original_cam_range / cam_range + # update geometry and text positions text_line = 0 for e, entity in enumerate(self.world.entities): @@ -309,11 +319,18 @@ def draw(self): y = (y / cam_range) * self.height // 2 * 0.9 x += self.width // 2 y += self.height // 2 + + # 350 is an arbitrary scale factor to get pygame to render similar sizes as pyglet + if DYNAMIC_RESCALING: + radius = entity.size * 350 * scaling_factor + else: + radius = entity.size * 350 + pygame.draw.circle( - self.screen, entity.color * 200, (x, y), entity.size * 350 - ) # 350 is an arbitrary scale factor to get pygame to render similar sizes as pyglet + self.screen, entity.color * 200, (x, y), radius + ) pygame.draw.circle( - self.screen, (0, 0, 0), (x, y), entity.size * 350, 1 + self.screen, (0, 0, 0), (x, y), radius, 1 ) # borders assert ( 0 < x < self.width and 0 < y < self.height From 5b25ee3b5715072096dfae5dd2d794c3264db517 Mon Sep 17 00:00:00 2001 From: pandyah5 Date: Fri, 7 Jun 2024 15:53:29 -0700 Subject: [PATCH 2/5] Turned on dynamic scaling option --- pettingzoo/mpe/_mpe_utils/simple_env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pettingzoo/mpe/_mpe_utils/simple_env.py b/pettingzoo/mpe/_mpe_utils/simple_env.py index bd61ac66e..ab462dc6f 100644 --- a/pettingzoo/mpe/_mpe_utils/simple_env.py +++ b/pettingzoo/mpe/_mpe_utils/simple_env.py @@ -12,7 +12,7 @@ from pettingzoo.utils.agent_selector import AgentSelector alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -DYNAMIC_RESCALING = False +DYNAMIC_RESCALING = True def make_env(raw_env): From 5fddfbd60cea57bb328ea647a657e53011614421 Mon Sep 17 00:00:00 2001 From: pandyah5 Date: Fri, 21 Jun 2024 19:17:30 -0700 Subject: [PATCH 3/5] Added dynamic_rescaling as a default False argument for simple env --- pettingzoo/mpe/_mpe_utils/simple_env.py | 5 +++-- pettingzoo/mpe/simple/simple.py | 3 ++- pettingzoo/mpe/simple_adversary/simple_adversary.py | 3 ++- pettingzoo/mpe/simple_crypto/simple_crypto.py | 3 ++- pettingzoo/mpe/simple_push/simple_push.py | 3 ++- pettingzoo/mpe/simple_reference/simple_reference.py | 3 ++- .../mpe/simple_speaker_listener/simple_speaker_listener.py | 3 ++- pettingzoo/mpe/simple_spread/simple_spread.py | 2 ++ pettingzoo/mpe/simple_tag/simple_tag.py | 2 ++ pettingzoo/mpe/simple_world_comm/simple_world_comm.py | 2 ++ 10 files changed, 21 insertions(+), 8 deletions(-) diff --git a/pettingzoo/mpe/_mpe_utils/simple_env.py b/pettingzoo/mpe/_mpe_utils/simple_env.py index ab462dc6f..8691333ac 100644 --- a/pettingzoo/mpe/_mpe_utils/simple_env.py +++ b/pettingzoo/mpe/_mpe_utils/simple_env.py @@ -12,7 +12,6 @@ from pettingzoo.utils.agent_selector import AgentSelector alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -DYNAMIC_RESCALING = True def make_env(raw_env): @@ -43,6 +42,7 @@ def __init__( render_mode=None, continuous_actions=False, local_ratio=None, + dynamic_rescaling=False, ): super().__init__() @@ -67,6 +67,7 @@ def __init__( self.world = world self.continuous_actions = continuous_actions self.local_ratio = local_ratio + self.dynamic_rescaling = dynamic_rescaling self.scenario.reset_world(self.world, self.np_random) @@ -321,7 +322,7 @@ def draw(self): y += self.height // 2 # 350 is an arbitrary scale factor to get pygame to render similar sizes as pyglet - if DYNAMIC_RESCALING: + if self.dynamic_rescaling: radius = entity.size * 350 * scaling_factor else: radius = entity.size * 350 diff --git a/pettingzoo/mpe/simple/simple.py b/pettingzoo/mpe/simple/simple.py index b9d6f255a..6cce7bb16 100644 --- a/pettingzoo/mpe/simple/simple.py +++ b/pettingzoo/mpe/simple/simple.py @@ -52,7 +52,7 @@ class raw_env(SimpleEnv, EzPickle): - def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None): + def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None, dynamic_rescaling=False): EzPickle.__init__( self, max_cycles=max_cycles, @@ -68,6 +68,7 @@ def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None): render_mode=render_mode, max_cycles=max_cycles, continuous_actions=continuous_actions, + dynamic_rescaling=dynamic_rescaling, ) self.metadata["name"] = "simple_v3" diff --git a/pettingzoo/mpe/simple_adversary/simple_adversary.py b/pettingzoo/mpe/simple_adversary/simple_adversary.py index 674790c38..ac3aaf48c 100644 --- a/pettingzoo/mpe/simple_adversary/simple_adversary.py +++ b/pettingzoo/mpe/simple_adversary/simple_adversary.py @@ -62,7 +62,7 @@ class raw_env(SimpleEnv, EzPickle): - def __init__(self, N=2, max_cycles=25, continuous_actions=False, render_mode=None): + def __init__(self, N=2, max_cycles=25, continuous_actions=False, render_mode=None, dynamic_rescaling=False): EzPickle.__init__( self, N=N, @@ -79,6 +79,7 @@ def __init__(self, N=2, max_cycles=25, continuous_actions=False, render_mode=Non render_mode=render_mode, max_cycles=max_cycles, continuous_actions=continuous_actions, + dynamic_rescaling=dynamic_rescaling, ) self.metadata["name"] = "simple_adversary_v3" diff --git a/pettingzoo/mpe/simple_crypto/simple_crypto.py b/pettingzoo/mpe/simple_crypto/simple_crypto.py index 66a8d2ad1..1e4268611 100644 --- a/pettingzoo/mpe/simple_crypto/simple_crypto.py +++ b/pettingzoo/mpe/simple_crypto/simple_crypto.py @@ -73,7 +73,7 @@ class raw_env(SimpleEnv, EzPickle): - def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None): + def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None, dynamic_rescaling=False): EzPickle.__init__( self, max_cycles=max_cycles, @@ -89,6 +89,7 @@ def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None): render_mode=render_mode, max_cycles=max_cycles, continuous_actions=continuous_actions, + dynamic_rescaling=dynamic_rescaling, ) self.metadata["name"] = "simple_crypto_v3" diff --git a/pettingzoo/mpe/simple_push/simple_push.py b/pettingzoo/mpe/simple_push/simple_push.py index 1a11a98d8..636a9a80a 100644 --- a/pettingzoo/mpe/simple_push/simple_push.py +++ b/pettingzoo/mpe/simple_push/simple_push.py @@ -57,7 +57,7 @@ class raw_env(SimpleEnv, EzPickle): - def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None): + def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None, dynamic_rescaling=False): EzPickle.__init__( self, max_cycles=max_cycles, @@ -73,6 +73,7 @@ def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None): render_mode=render_mode, max_cycles=max_cycles, continuous_actions=continuous_actions, + dynamic_rescaling=dynamic_rescaling, ) self.metadata["name"] = "simple_push_v3" diff --git a/pettingzoo/mpe/simple_reference/simple_reference.py b/pettingzoo/mpe/simple_reference/simple_reference.py index a934b9014..680f09db7 100644 --- a/pettingzoo/mpe/simple_reference/simple_reference.py +++ b/pettingzoo/mpe/simple_reference/simple_reference.py @@ -64,7 +64,7 @@ class raw_env(SimpleEnv, EzPickle): def __init__( - self, local_ratio=0.5, max_cycles=25, continuous_actions=False, render_mode=None + self, local_ratio=0.5, max_cycles=25, continuous_actions=False, render_mode=None, dynamic_rescaling=False ): EzPickle.__init__( self, @@ -86,6 +86,7 @@ def __init__( max_cycles=max_cycles, continuous_actions=continuous_actions, local_ratio=local_ratio, + dynamic_rescaling=dynamic_rescaling, ) self.metadata["name"] = "simple_reference_v3" diff --git a/pettingzoo/mpe/simple_speaker_listener/simple_speaker_listener.py b/pettingzoo/mpe/simple_speaker_listener/simple_speaker_listener.py index fbfbe9c85..184d7a1fd 100644 --- a/pettingzoo/mpe/simple_speaker_listener/simple_speaker_listener.py +++ b/pettingzoo/mpe/simple_speaker_listener/simple_speaker_listener.py @@ -58,7 +58,7 @@ class raw_env(SimpleEnv, EzPickle): - def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None): + def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None, dynamic_rescaling=False): EzPickle.__init__( self, max_cycles=max_cycles, @@ -74,6 +74,7 @@ def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None): render_mode=render_mode, max_cycles=max_cycles, continuous_actions=continuous_actions, + dynamic_rescaling=dynamic_rescaling, ) self.metadata["name"] = "simple_speaker_listener_v4" diff --git a/pettingzoo/mpe/simple_spread/simple_spread.py b/pettingzoo/mpe/simple_spread/simple_spread.py index 83e79e53e..765980ec3 100644 --- a/pettingzoo/mpe/simple_spread/simple_spread.py +++ b/pettingzoo/mpe/simple_spread/simple_spread.py @@ -68,6 +68,7 @@ def __init__( max_cycles=25, continuous_actions=False, render_mode=None, + dynamic_rescaling=False, ): EzPickle.__init__( self, @@ -90,6 +91,7 @@ def __init__( max_cycles=max_cycles, continuous_actions=continuous_actions, local_ratio=local_ratio, + dynamic_rescaling=dynamic_rescaling, ) self.metadata["name"] = "simple_spread_v3" diff --git a/pettingzoo/mpe/simple_tag/simple_tag.py b/pettingzoo/mpe/simple_tag/simple_tag.py index 7727eb425..e18719da5 100644 --- a/pettingzoo/mpe/simple_tag/simple_tag.py +++ b/pettingzoo/mpe/simple_tag/simple_tag.py @@ -80,6 +80,7 @@ def __init__( max_cycles=25, continuous_actions=False, render_mode=None, + dynamic_rescaling=False, ): EzPickle.__init__( self, @@ -99,6 +100,7 @@ def __init__( render_mode=render_mode, max_cycles=max_cycles, continuous_actions=continuous_actions, + dynamic_rescaling=dynamic_rescaling, ) self.metadata["name"] = "simple_tag_v3" diff --git a/pettingzoo/mpe/simple_world_comm/simple_world_comm.py b/pettingzoo/mpe/simple_world_comm/simple_world_comm.py index 598c0d23e..6480c0de9 100644 --- a/pettingzoo/mpe/simple_world_comm/simple_world_comm.py +++ b/pettingzoo/mpe/simple_world_comm/simple_world_comm.py @@ -93,6 +93,7 @@ def __init__( num_forests=2, continuous_actions=False, render_mode=None, + dynamic_rescaling=False, ): EzPickle.__init__( self, @@ -116,6 +117,7 @@ def __init__( render_mode=render_mode, max_cycles=max_cycles, continuous_actions=continuous_actions, + dynamic_rescaling=dynamic_rescaling, ) self.metadata["name"] = "simple_world_comm_v3" From fc23ffcf124f29a32147538346b112d535e59d31 Mon Sep 17 00:00:00 2001 From: pandyah5 Date: Fri, 21 Jun 2024 19:34:23 -0700 Subject: [PATCH 4/5] Edited the documentation to add dynamic_rescaling option --- pettingzoo/mpe/simple/simple.py | 4 +++- pettingzoo/mpe/simple_adversary/simple_adversary.py | 4 +++- pettingzoo/mpe/simple_crypto/simple_crypto.py | 4 +++- pettingzoo/mpe/simple_push/simple_push.py | 5 ++++- pettingzoo/mpe/simple_reference/simple_reference.py | 4 +++- .../mpe/simple_speaker_listener/simple_speaker_listener.py | 4 +++- pettingzoo/mpe/simple_spread/simple_spread.py | 4 +++- pettingzoo/mpe/simple_tag/simple_tag.py | 4 +++- pettingzoo/mpe/simple_world_comm/simple_world_comm.py | 4 +++- 9 files changed, 28 insertions(+), 9 deletions(-) diff --git a/pettingzoo/mpe/simple/simple.py b/pettingzoo/mpe/simple/simple.py index 6cce7bb16..4dcce0e1c 100644 --- a/pettingzoo/mpe/simple/simple.py +++ b/pettingzoo/mpe/simple/simple.py @@ -31,7 +31,7 @@ ### Arguments ``` python -simple_v3.env(max_cycles=25, continuous_actions=False) +simple_v3.env(max_cycles=25, continuous_actions=False, dynamic_rescaling=False) ``` @@ -40,6 +40,8 @@ `continuous_actions`: Whether agent action spaces are discrete(default) or continuous +`dynamic_rescaling`: Whether to rescale the size of agents and landmarks based on the screen size + """ import numpy as np diff --git a/pettingzoo/mpe/simple_adversary/simple_adversary.py b/pettingzoo/mpe/simple_adversary/simple_adversary.py index ac3aaf48c..bc168512f 100644 --- a/pettingzoo/mpe/simple_adversary/simple_adversary.py +++ b/pettingzoo/mpe/simple_adversary/simple_adversary.py @@ -39,7 +39,7 @@ ### Arguments ``` python -simple_adversary_v3.env(N=2, max_cycles=25, continuous_actions=False) +simple_adversary_v3.env(N=2, max_cycles=25, continuous_actions=False, dynamic_rescaling=False) ``` @@ -50,6 +50,8 @@ `continuous_actions`: Whether agent action spaces are discrete(default) or continuous +`dynamic_rescaling`: Whether to rescale the size of agents and landmarks based on the screen size + """ import numpy as np diff --git a/pettingzoo/mpe/simple_crypto/simple_crypto.py b/pettingzoo/mpe/simple_crypto/simple_crypto.py index 1e4268611..6103c59c1 100644 --- a/pettingzoo/mpe/simple_crypto/simple_crypto.py +++ b/pettingzoo/mpe/simple_crypto/simple_crypto.py @@ -45,7 +45,7 @@ ### Arguments ``` python -simple_crypto_v3.env(max_cycles=25, continuous_actions=False) +simple_crypto_v3.env(max_cycles=25, continuous_actions=False, dynamic_rescaling=False) ``` @@ -54,6 +54,8 @@ `continuous_actions`: Whether agent action spaces are discrete(default) or continuous +`dynamic_rescaling`: Whether to rescale the size of agents and landmarks based on the screen size + """ import numpy as np diff --git a/pettingzoo/mpe/simple_push/simple_push.py b/pettingzoo/mpe/simple_push/simple_push.py index 636a9a80a..03b4c29cb 100644 --- a/pettingzoo/mpe/simple_push/simple_push.py +++ b/pettingzoo/mpe/simple_push/simple_push.py @@ -38,13 +38,16 @@ ### Arguments ``` python -simple_push_v3.env(max_cycles=25, continuous_actions=False) +simple_push_v3.env(max_cycles=25, continuous_actions=False, dynamic_rescaling=False) ``` `max_cycles`: number of frames (a step for each agent) until game terminates +`dynamic_rescaling`: Whether to rescale the size of agents and landmarks based on the screen size + + """ import numpy as np diff --git a/pettingzoo/mpe/simple_reference/simple_reference.py b/pettingzoo/mpe/simple_reference/simple_reference.py index 680f09db7..a6df289f3 100644 --- a/pettingzoo/mpe/simple_reference/simple_reference.py +++ b/pettingzoo/mpe/simple_reference/simple_reference.py @@ -40,7 +40,7 @@ ``` python -simple_reference_v3.env(local_ratio=0.5, max_cycles=25, continuous_actions=False) +simple_reference_v3.env(local_ratio=0.5, max_cycles=25, continuous_actions=False, dynamic_rescaling=False) ``` @@ -51,6 +51,8 @@ `continuous_actions`: Whether agent action spaces are discrete(default) or continuous +`dynamic_rescaling`: Whether to rescale the size of agents and landmarks based on the screen size + """ import numpy as np diff --git a/pettingzoo/mpe/simple_speaker_listener/simple_speaker_listener.py b/pettingzoo/mpe/simple_speaker_listener/simple_speaker_listener.py index 184d7a1fd..47b5df128 100644 --- a/pettingzoo/mpe/simple_speaker_listener/simple_speaker_listener.py +++ b/pettingzoo/mpe/simple_speaker_listener/simple_speaker_listener.py @@ -37,7 +37,7 @@ ### Arguments ``` python -simple_speaker_listener_v4.env(max_cycles=25, continuous_actions=False) +simple_speaker_listener_v4.env(max_cycles=25, continuous_actions=False, dynamic_rescaling=False) ``` @@ -46,6 +46,8 @@ `continuous_actions`: Whether agent action spaces are discrete(default) or continuous +`dynamic_rescaling`: Whether to rescale the size of agents and landmarks based on the screen size + """ import numpy as np diff --git a/pettingzoo/mpe/simple_spread/simple_spread.py b/pettingzoo/mpe/simple_spread/simple_spread.py index 765980ec3..4313780ae 100644 --- a/pettingzoo/mpe/simple_spread/simple_spread.py +++ b/pettingzoo/mpe/simple_spread/simple_spread.py @@ -36,7 +36,7 @@ ### Arguments ``` python -simple_spread_v3.env(N=3, local_ratio=0.5, max_cycles=25, continuous_actions=False) +simple_spread_v3.env(N=3, local_ratio=0.5, max_cycles=25, continuous_actions=False, dynamic_rescaling=False) ``` @@ -49,6 +49,8 @@ `continuous_actions`: Whether agent action spaces are discrete(default) or continuous +`dynamic_rescaling`: Whether to rescale the size of agents and landmarks based on the screen size + """ import numpy as np diff --git a/pettingzoo/mpe/simple_tag/simple_tag.py b/pettingzoo/mpe/simple_tag/simple_tag.py index e18719da5..1f6c3b48f 100644 --- a/pettingzoo/mpe/simple_tag/simple_tag.py +++ b/pettingzoo/mpe/simple_tag/simple_tag.py @@ -45,7 +45,7 @@ def bound(x): ### Arguments ``` python -simple_tag_v3.env(num_good=1, num_adversaries=3, num_obstacles=2, max_cycles=25, continuous_actions=False) +simple_tag_v3.env(num_good=1, num_adversaries=3, num_obstacles=2, max_cycles=25, continuous_actions=False, dynamic_rescaling=False) ``` @@ -60,6 +60,8 @@ def bound(x): `continuous_actions`: Whether agent action spaces are discrete(default) or continuous +`dynamic_rescaling`: Whether to rescale the size of agents and landmarks based on the screen size + """ import numpy as np diff --git a/pettingzoo/mpe/simple_world_comm/simple_world_comm.py b/pettingzoo/mpe/simple_world_comm/simple_world_comm.py index 6480c0de9..78a491c47 100644 --- a/pettingzoo/mpe/simple_world_comm/simple_world_comm.py +++ b/pettingzoo/mpe/simple_world_comm/simple_world_comm.py @@ -52,7 +52,7 @@ ``` python simple_world_comm_v3.env(num_good=2, num_adversaries=4, num_obstacles=1, - num_food=2, max_cycles=25, num_forests=2, continuous_actions=False) + num_food=2, max_cycles=25, num_forests=2, continuous_actions=False, dynamic_rescaling=False) ``` @@ -71,6 +71,8 @@ `continuous_actions`: Whether agent action spaces are discrete(default) or continuous +`dynamic_rescaling`: Whether to rescale the size of agents and landmarks based on the screen size + """ import numpy as np From 8b992cca656f5e04077a191478b357fddf63bc50 Mon Sep 17 00:00:00 2001 From: pandyah5 Date: Mon, 24 Jun 2024 14:08:39 -0700 Subject: [PATCH 5/5] Fixing formatting of modified files --- pettingzoo/mpe/_mpe_utils/simple_env.py | 10 +++------- pettingzoo/mpe/simple/simple.py | 8 +++++++- pettingzoo/mpe/simple_adversary/simple_adversary.py | 9 ++++++++- pettingzoo/mpe/simple_crypto/simple_crypto.py | 8 +++++++- pettingzoo/mpe/simple_push/simple_push.py | 8 +++++++- pettingzoo/mpe/simple_reference/simple_reference.py | 7 ++++++- .../simple_speaker_listener/simple_speaker_listener.py | 8 +++++++- 7 files changed, 45 insertions(+), 13 deletions(-) diff --git a/pettingzoo/mpe/_mpe_utils/simple_env.py b/pettingzoo/mpe/_mpe_utils/simple_env.py index 8691333ac..6cc9bb3d2 100644 --- a/pettingzoo/mpe/_mpe_utils/simple_env.py +++ b/pettingzoo/mpe/_mpe_utils/simple_env.py @@ -122,7 +122,7 @@ def __init__( # This will be used to scale the rendering all_poses = [entity.state.p_pos for entity in self.world.entities] self.original_cam_range = np.max(np.abs(np.array(all_poses))) - + self.steps = 0 self.current_actions = [None] * self.num_agents @@ -327,12 +327,8 @@ def draw(self): else: radius = entity.size * 350 - pygame.draw.circle( - self.screen, entity.color * 200, (x, y), radius - ) - pygame.draw.circle( - self.screen, (0, 0, 0), (x, y), radius, 1 - ) # borders + pygame.draw.circle(self.screen, entity.color * 200, (x, y), radius) + pygame.draw.circle(self.screen, (0, 0, 0), (x, y), radius, 1) # borders assert ( 0 < x < self.width and 0 < y < self.height ), f"Coordinates {(x, y)} are out of bounds." diff --git a/pettingzoo/mpe/simple/simple.py b/pettingzoo/mpe/simple/simple.py index 4dcce0e1c..7431c4fb1 100644 --- a/pettingzoo/mpe/simple/simple.py +++ b/pettingzoo/mpe/simple/simple.py @@ -54,7 +54,13 @@ class raw_env(SimpleEnv, EzPickle): - def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None, dynamic_rescaling=False): + def __init__( + self, + max_cycles=25, + continuous_actions=False, + render_mode=None, + dynamic_rescaling=False, + ): EzPickle.__init__( self, max_cycles=max_cycles, diff --git a/pettingzoo/mpe/simple_adversary/simple_adversary.py b/pettingzoo/mpe/simple_adversary/simple_adversary.py index bc168512f..cf7a38499 100644 --- a/pettingzoo/mpe/simple_adversary/simple_adversary.py +++ b/pettingzoo/mpe/simple_adversary/simple_adversary.py @@ -64,7 +64,14 @@ class raw_env(SimpleEnv, EzPickle): - def __init__(self, N=2, max_cycles=25, continuous_actions=False, render_mode=None, dynamic_rescaling=False): + def __init__( + self, + N=2, + max_cycles=25, + continuous_actions=False, + render_mode=None, + dynamic_rescaling=False, + ): EzPickle.__init__( self, N=N, diff --git a/pettingzoo/mpe/simple_crypto/simple_crypto.py b/pettingzoo/mpe/simple_crypto/simple_crypto.py index 6103c59c1..f74b5f0d1 100644 --- a/pettingzoo/mpe/simple_crypto/simple_crypto.py +++ b/pettingzoo/mpe/simple_crypto/simple_crypto.py @@ -75,7 +75,13 @@ class raw_env(SimpleEnv, EzPickle): - def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None, dynamic_rescaling=False): + def __init__( + self, + max_cycles=25, + continuous_actions=False, + render_mode=None, + dynamic_rescaling=False, + ): EzPickle.__init__( self, max_cycles=max_cycles, diff --git a/pettingzoo/mpe/simple_push/simple_push.py b/pettingzoo/mpe/simple_push/simple_push.py index 03b4c29cb..46b352803 100644 --- a/pettingzoo/mpe/simple_push/simple_push.py +++ b/pettingzoo/mpe/simple_push/simple_push.py @@ -60,7 +60,13 @@ class raw_env(SimpleEnv, EzPickle): - def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None, dynamic_rescaling=False): + def __init__( + self, + max_cycles=25, + continuous_actions=False, + render_mode=None, + dynamic_rescaling=False, + ): EzPickle.__init__( self, max_cycles=max_cycles, diff --git a/pettingzoo/mpe/simple_reference/simple_reference.py b/pettingzoo/mpe/simple_reference/simple_reference.py index a6df289f3..d058e7d21 100644 --- a/pettingzoo/mpe/simple_reference/simple_reference.py +++ b/pettingzoo/mpe/simple_reference/simple_reference.py @@ -66,7 +66,12 @@ class raw_env(SimpleEnv, EzPickle): def __init__( - self, local_ratio=0.5, max_cycles=25, continuous_actions=False, render_mode=None, dynamic_rescaling=False + self, + local_ratio=0.5, + max_cycles=25, + continuous_actions=False, + render_mode=None, + dynamic_rescaling=False, ): EzPickle.__init__( self, diff --git a/pettingzoo/mpe/simple_speaker_listener/simple_speaker_listener.py b/pettingzoo/mpe/simple_speaker_listener/simple_speaker_listener.py index 47b5df128..4fc09e6a3 100644 --- a/pettingzoo/mpe/simple_speaker_listener/simple_speaker_listener.py +++ b/pettingzoo/mpe/simple_speaker_listener/simple_speaker_listener.py @@ -60,7 +60,13 @@ class raw_env(SimpleEnv, EzPickle): - def __init__(self, max_cycles=25, continuous_actions=False, render_mode=None, dynamic_rescaling=False): + def __init__( + self, + max_cycles=25, + continuous_actions=False, + render_mode=None, + dynamic_rescaling=False, + ): EzPickle.__init__( self, max_cycles=max_cycles,