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

[RLlib] Add connect four self-play example with pettingzo #33481

Closed

Conversation

elliottower
Copy link

Why are these changes needed?

I closed the other PR as there was an unsigned commit in it. #32492

I made this because I feel it's important to have examples using pettingzoo with selfplay. I can adapt it to another example if that is preferred, I figured it may be helpful to see the differences between it and the openspiel example it's based off. The main difference is that this game uses pygame rendering, and could be extended to take interactive user input, for example (Farama-Foundation/PettingZoo#905)

From old PR:

This PR mirrors functionality from self_play_with_open_spiel.py (PR), but uses the PettingZoo implementation of connect four, rather than OpenSpiel.

I used SuperSuit wrappers rather than writing my own wrapper as it is cleaner and less error prone versus writing my own wrapper, and is more flexible.

Related issue number

I already closed my own issue (link) related to this as I got the implementation working for myself, but I figure it will be a good resource for anyone who wants to use PettingZoo with RLlib in the future. The tutorials using RLlib from PettingZoo's wiki are currently marked as outdated and I couldn't find any resources, so this would be a helpful step forward.

Checks

This is my first PR so I wasn't sure if I needed to add documentation elsewhere. I couldn't find any for the example I was basing it off so I figure it is okay. I also could not find tests for other examples so I figured that is fine as well. I tried running the ci tests locally but wasn't able to figure them out.

As a side note, I've updated my branch to the latest master, and there seem to be linting ssues in other files which I don't want to change, so I've forced the commits using no-verify. I can change them as well but I figured it would be cleaner to only change this single file, and let the linting issues be handled by somebody else. This is the return when I run ci linting tests:

Skipped 1 files
All done! ✨ 🍰 ✨
1 file left unchanged.
Checking docstyle...
Reformatted changed files. Please review and stage the changes.
Files updated:

doc/source/ray-air/examples/analyze_tuning_results.ipynb
doc/source/ray-air/examples/batch_forecasting.ipynb
doc/source/ray-air/examples/serving_guide.ipynb
doc/source/ray-air/examples/torch_image_example.ipynb
doc/source/ray-air/examples/torch_incremental_learning.ipynb
doc/source/ray-contribute/docs.ipynb
doc/source/tune/examples/tune-xgboost.ipynb

Linting changes failed.
Please make sure 'ci/lint/format.sh' runs with no errors before pushing.
If you want to ignore this and push anyways, re-run with '--no-verify'.
error: failed to push some refs to 'github.com:elliottower/ray.git'
  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@elliottower
Copy link
Author

elliottower commented Mar 20, 2023

As I commented in the other PR (#33470), I don't know how to debug the errors I'm getting in these PR pipelines, so any help with that would be appreciated. Would really like to contribute this and potentially other RLlib pettingzoo examples, but if nobody is willing to help I can just put them in PettingZoo's repo instead.

@stale
Copy link

stale bot commented Apr 25, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

  • If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@stale stale bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Apr 25, 2023
@stale
Copy link

stale bot commented May 12, 2023

Hi again! The issue will be closed because there has been no more activity in the 14 days since the last message.

Please feel free to reopen or open a new issue if you'd still like it to be addressed.

Again, you can always ask for help on our discussion forum or Ray's public slack channel.

Thanks again for opening the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale The issue is stale. It will be closed within 7 days unless there are further conversation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant