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

When will Chess be supported for AlphaZero/MuZero? #264

Open
TianrenWang opened this issue Aug 13, 2024 · 7 comments
Open

When will Chess be supported for AlphaZero/MuZero? #264

TianrenWang opened this issue Aug 13, 2024 · 7 comments
Labels
config New or improved configuration environment New or improved environment

Comments

@TianrenWang
Copy link

Or are you guys working on it on a branch somewhere? I don't even need it to be performant, I just want it to be implemented correctly so if I use your repo to write a paper, no reviewers will request me to prove that my code is bug-free.

@puyuan1996 puyuan1996 added the environment New or improved environment label Aug 15, 2024
@puyuan1996
Copy link
Collaborator

Hello, we currently have the chess environment available here. However, we have not yet provided the corresponding runtime configuration. We plan to release a runnable configuration by next week, though please note that performance tuning might be necessary following its release. Best wishes!

@TianrenWang
Copy link
Author

TianrenWang commented Aug 16, 2024

@puyuan1996 thank you for the heads up. Do you have a projection on the performance that can be attained using this config, the amount of time it takes to reach such performance, and the compute power needed?

@puyuan1996
Copy link
Collaborator

Since we haven't previously tested on chess, we can only offer a preliminary estimate at this stage. Typically, using a single GPU for approximately one day should enable the system to surpass a random policy. For further enhancements in performance, we will need to complete our tests in the coming weeks to provide a more precise evaluation.

@TianrenWang
Copy link
Author

@puyuan1996 don't mean to pressure or anything, but has there been any progress on the runnable chess config?

@puyuan1996 puyuan1996 added the config New or improved configuration label Aug 26, 2024
@puyuan1996
Copy link
Collaborator

Hello, we have optimized the existing LightZero chess module in this pull request. The update includes the addition of an initial version of a rule-based bot, along with two new configuration files: chess_alphazero_bot_mode_config.py and chess_alphazero_sp_mode_config.py.

At present, the enhanced pipeline is fully operational, though we do not yet guarantee its performance. Further optimizations will be implemented in the future. This chess pipeline is built on top of the PettingZoo and python-chess libraries.

Please note that due to potential bugs in the PettingZoo library, you will need to modify the chess_utils.py file. Specifically, change the line result[AUX_OFF + 5] = all_squares if board.halfmove_clock // 2 > 0 else chess.SquareSet(chess.BB_EMPTY) to ensure the configuration files function correctly.

@TianrenWang
Copy link
Author

Good stuff! Thank you for putting this together in a timely fashion. Everything seems to work, and the temporary bug fix was also relevant. The only thing that I might add to make things more clear is to add a comment at the import of chess environments that says you need to manually install petting zoo and python chess, and that those two libraries not being in the requirement is not a mistake or something along that line.

@puyuan1996
Copy link
Collaborator

Hello, we have included the dependency requirements in the description at #272 and plan to add them to the requirements file after the entire pipeline optimization is completed. Thank you very much for your suggestion. If you have any insights on the initial training results of this pipeline and subsequent improvements, we can further discuss them here. Thank you again for your attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config New or improved configuration environment New or improved environment
Projects
None yet
Development

No branches or pull requests

2 participants