Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ryanlindeborg
Copy link
Collaborator

No description provided.

Copy link
Owner

@lebrice lebrice left a 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.

examples/basic/multi_agent_rl_example.py Show resolved Hide resolved
sequoia/settings/assumptions/continual.py Outdated Show resolved Hide resolved
sequoia/settings/rl/continual/setting.py Outdated Show resolved Hide resolved
sequoia/settings/rl/incremental/setting.py Outdated Show resolved Hide resolved
examples/basic/multi_agent_rl_example.py Outdated Show resolved Hide resolved
examples/basic/multi_agent_rl_example.py Outdated Show resolved Hide resolved
examples/basic/multi_agent_rl_example.py Outdated Show resolved Hide resolved
sequoia/settings/assumptions/continual.py Outdated Show resolved Hide resolved
Copy link
Owner

@lebrice lebrice left a 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!

Copy link
Owner

@lebrice lebrice left a 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)
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants