Skip to content

PettingZoo multi-agent RL example cleaned up#252

Open
ryanlindeborg wants to merge 4 commits intomasterfrom
petting-zoo-fresh
Open

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

Conversation

@ryanlindeborg
Copy link
Copy Markdown
Collaborator

No description provided.

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

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


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