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

[Bug Report] n_coop attribute doesn't seem to have any effect #1162

Open
1 task done
marimeireles opened this issue Jan 22, 2024 · 4 comments
Open
1 task done

[Bug Report] n_coop attribute doesn't seem to have any effect #1162

marimeireles opened this issue Jan 22, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@marimeireles
Copy link

Describe the bug

When using the n_coop attribute in the Waterworld game one is supposed to see a clustering of "n" pursuers to be able to catch an evader.
What I'm seeing with the code example that I'll post next is that even with n_coop=2 one lonely pursuer can still catch an evader.

Code example

from pettingzoo.sisl import waterworld_v4
env = waterworld_v4.env(render_mode='human', n_coop=2, n_pursuers=4)

env.reset()
for agent in env.agent_iter():
    observation, reward, termination, truncation, info = env.last()

    if termination or truncation:
        action = None
    else:
        action = env.action_space(agent).sample() # this is where you would insert your policy

    env.step(action)
env.close()

System info

Pettingzoo version == master
Built from source

Additional context

No response

Checklist

  • I have checked that there is no similar issue in the repo
@marimeireles marimeireles added the bug Something isn't working label Jan 22, 2024
@dm-ackerman
Copy link
Contributor

dm-ackerman commented Jan 22, 2024

There is a bug in waterworld related to multiple pursuers. I have a fixed version locally but I haven't had a chance to push it yet. I'll try to do that this week. It may fix the behaviour you are seeing.

@elliottower
Copy link
Member

Appreciate the help guys, will take a look and try to get these things merged as soon as possible.

@marimeireles
Copy link
Author

Hey @dm-ackerman that's cool!
I'll be happy to help you merge by fixing any compatibility issues, if you're interested in just submitting your PR.
Thanks Elliot! :)

@jkterry1
Copy link
Member

jkterry1 commented Aug 6, 2024

Hey guys,

Is this bug still live, or was a PR for this created?

@jkterry1 jkterry1 closed this as completed Aug 6, 2024
@jkterry1 jkterry1 reopened this Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants