Skip to content

PettingZoo multi-agent RL example cleaned up - #252

Open
ryanlindeborg wants to merge 4 commits into
masterfrom
petting-zoo-fresh
Open

PettingZoo multi-agent RL example cleaned up#252
ryanlindeborg wants to merge 4 commits into
masterfrom
petting-zoo-fresh

Conversation

@ryanlindeborg

Copy link
Copy Markdown
Collaborator

No description provided.

@lebrice lebrice left a comment

Copy link
Copy Markdown
Owner

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.

Comment thread examples/basic/multi_agent_rl_example.py
Comment thread sequoia/settings/assumptions/continual.py Outdated
Comment thread sequoia/settings/rl/continual/setting.py
Comment thread sequoia/settings/rl/incremental/setting.py Outdated
Comment thread examples/basic/multi_agent_rl_example.py Outdated
Comment thread examples/basic/multi_agent_rl_example.py Outdated
Comment thread examples/basic/multi_agent_rl_example.py Outdated
Comment thread sequoia/settings/assumptions/continual.py Outdated

@lebrice lebrice left a comment

Copy link
Copy Markdown
Owner

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!

@lebrice lebrice left a comment

Copy link
Copy Markdown
Owner

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!


class MARLSB3Wrapper(SB3VecEnvWrapper):
def __init__(self, env):
super().__init__(env.env.env.env.env.env.env.venv)

Copy link
Copy Markdown
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.

2 participants