-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PettingZoo multi-agent RL example cleaned up #252
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Left a few comments, let me know if you need any help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting really really close, thanks a bunch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ready to approve this, but there's just one last thing that's bothering me, it's the env.env.env.env.(...) somewhere!
@@ -49,6 +50,10 @@ def make_pistonball_env( | |||
gym.register("Sequoia_PistonBall-v4", entry_point=make_pistonball_env) | |||
|
|||
|
|||
class MARLSB3Wrapper(SB3VecEnvWrapper): | |||
def __init__(self, env): | |||
super().__init__(env.env.env.env.env.env.env.venv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch! :P
Getting the venv
attribute doesn't work?
If not, then maybe some kind of while loop, like:
while not isinstance(env, WhateverYouWant) and hasattr(env, "env"):
env = env.env
Let's chat soon, I'd like to better understand what's going on here.
No description provided.