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

Mixture of Experts MCTS (MoE MCTS) #216

Merged
merged 57 commits into from
May 3, 2024

Conversation

QueensGambit
Copy link
Owner

@QueensGambit QueensGambit commented May 2, 2024

This PR allows the training and loading of multiple expert models for MCTS.
The expert models are based on game phases (opening, middle game, endgame) according to the Lichess phase definition.
The code was written during the course of a master thesis by @HelpstoneX .

- adjusted initial Dockerfile
- minor changes to convert_pgn_to_planes.ipynb and pgn_to_planes_converter.py
… have been used

- added counter for games without positions for current phase
# Conflicts:
#	engine/src/rl/Dockerfile
- added analyse_game_phases.py to analyse game phase distribution and other information
- minor changes
… phase

- board->get_phase now expects the total amount of phases as an argument
- phaseCountMap is now immediately filled
- added sample weighting to losses pytorch training files
- load_pgn_dataset() now returns a dict
- added file for easily generating normalized cutechess-cli commands
- added file to generate plots based on cutechess results
…ss through the trainer agent

- you can now pass a phase to load_pgn_dataset to load a non default dataset
- added printing total positions in dataset when loading
- adjusted cutechess run file to support 960 matches
@Belzedar94
Copy link

I'd love to read that thesis! Do you have any available benchmarks on how the moe version performs vs the traditional arch?

@QueensGambit
Copy link
Owner Author

@Belzedar94 A preprint of the work is available on arXiV:
https://arxiv.org/abs/2401.16852
and his thesis ca be found here:
https://ml-research.github.io/papers/helfenstein2024game.pdf

@QueensGambit QueensGambit merged commit ce12a9c into QueensGambit:master May 3, 2024
2 of 3 checks passed
QueensGambit added a commit that referenced this pull request May 6, 2024
@QueensGambit QueensGambit mentioned this pull request Sep 6, 2024
QueensGambit added a commit that referenced this pull request Oct 6, 2024
- return 0 if no phases is enabled

Set Game_Phase_Definition default to "lichess"
QueensGambit added a commit that referenced this pull request Oct 6, 2024
Only use phase selection for nets.size() > 1
QueensGambit added a commit that referenced this pull request Oct 6, 2024
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.

3 participants