这是indexloc提供的服务,不要输入任何密码
Skip to content

Pettingzoo #494

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

Merged
merged 49 commits into from
Feb 15, 2022
Merged

Pettingzoo #494

merged 49 commits into from
Feb 15, 2022

Conversation

mahi97
Copy link
Contributor

@mahi97 mahi97 commented Dec 16, 2021

  • I have marked all applicable categories:
    • exception-raising fix
    • algorithm implementation fix
    • documentation modification
    • new feature
  • I have reformatted the code using make format (required)
  • I have checked the code using make commit-checks (required)
  • If applicable, I have mentioned the relevant/related issue(s)
  • [X]If applicable, I have listed every items in this Pull Request below

Tested with tic-tac-toe, piston ball (discrete and continuous)

@mahi97 mahi97 mentioned this pull request Dec 16, 2021
9 tasks
@mahi97
Copy link
Contributor Author

mahi97 commented Feb 8, 2022

I updated the batch size, it shows a more robust training for me.

@jkterry1
Copy link
Contributor

What's causing all the test failures?

@Trinkle23897 Trinkle23897 linked an issue Feb 10, 2022 that may be closed by this pull request
8 tasks
@mahi97
Copy link
Contributor Author

mahi97 commented Feb 11, 2022

The performance of test scenarios are not same in case of cpu and gpu. I saw the same behavior in my machine ... so currently I have no idea why CI fails exactly.

@mahi97
Copy link
Contributor Author

mahi97 commented Feb 11, 2022

btw can we remove the performance check?

@jkterry1
Copy link
Contributor

@Trinkle23897 could you please look into this?

@Trinkle23897
Copy link
Collaborator

Sure, please wait for me to finish my homework though...

@Trinkle23897
Copy link
Collaborator

Trinkle23897 commented Feb 14, 2022

Is it because of pistonball_v4 vs pistonball_v6? @mahi97
I'm thinking about the dependency issue of both gym and pettingzoo. Maybe we should open another PR to fix that issue (because it breaks many tests such as Pendulum-v0 vs Pendulum-v1)?

@jkterry1
Copy link
Contributor

@Trinkle23897 Can this be merged now since all tests are passing?

@jkterry1
Copy link
Contributor

@mahi97 would you be willing to create a follow up PR to this that bumps the versions of Gym and PettingZoo?

@Trinkle23897 Trinkle23897 merged commit c7e2e56 into thu-ml:master Feb 15, 2022
@Trinkle23897
Copy link
Collaborator

@jkterry1
Copy link
Contributor

That's all just pettingzoo/gym versioning errors if I'm reading correctly. Hopefully @mahi97 would be willing to make a follow up PR addressing this?

@mahi97
Copy link
Contributor Author

mahi97 commented Feb 15, 2022

Sure things, I will continue this on another PR.

@Trinkle23897
Copy link
Collaborator

That's all just pettingzoo/gym versioning errors if I'm reading correctly. Hopefully @mahi97 would be willing to make a follow up PR addressing this?

Hopefully #534 will resolve this issue.

@Trinkle23897
Copy link
Collaborator

Fixed. However, the related documentation of multi-agent is outdated. We should switch the example to Pettingzoo. https://tianshou.readthedocs.io/en/master/tutorials/tictactoe.html

@jkterry1
Copy link
Contributor

@Trinkle23897 @mahi97 we still aren't on the most recent release of PettingZoo though, right?

@Trinkle23897
Copy link
Collaborator

No, it's the newest.

"pettingzoo>=1.15",

However, pettingzoo doesn't have conda channel to publish package, which results in failure of publish tianshou's conda pkg: conda-forge/tianshou-feedstock#13
I'll fix it today by silently import pettingzoo instead of force-install. Or maybe you can add the conda channel for pettingzoo?

@jkterry1
Copy link
Contributor

PettingZoo and Gym both aren't hosted on Conda. Doing this would require a very large amount of work, and for Gym won't actually be possible for awhile until certain dependencies are changed. The Gym version on Conda is not official and I would generally recommend against using it.

@jkterry1
Copy link
Contributor

@mahi97 would you mind replacing the examples and built in environments in tianshou with PettingZoo ones like Jiayi mentioned?

@mahi97
Copy link
Contributor Author

mahi97 commented Feb 25, 2022

Sure things, I'll do it on Monday 👍

@mahi97
Copy link
Contributor Author

mahi97 commented Mar 19, 2022

Sorry for the huge delay. I'm caught up in some tasks with tight deadlines.
Unfortunately, I can't start working on this until May.

@xihuai18
Copy link

How can the pettingzoo wrapper support .state() api for some tasks?

@xihuai18
Copy link

xihuai18 commented Apr 28, 2022

How can the pettingzoo wrapper support .state() api for some tasks?

Firstly I try to implement a new buffer class that stores the global information such as the states separately, but found it incompatible within the collector.collect() function.

Should I just put the global information in the return info dict at the cost of multiple duplications?

@xihuai18 xihuai18 mentioned this pull request Apr 28, 2022
13 tasks
BFAnas pushed a commit to BFAnas/tianshou that referenced this pull request May 5, 2024
Co-authored-by: Rodrigo de Lazcano <r.l.p.v96@gmail.com>
Co-authored-by: J K Terry <justinkterry@gmail.com>
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.

PettingZoo Multiagent RL
6 participants