neural_network_chess
alpha-zero-boosted
neural_network_chess | alpha-zero-boosted | |
---|---|---|
14 | 2 | |
266 | 79 | |
- | - | |
2.4 | 3.2 | |
12 months ago | almost 4 years ago | |
Python | Python | |
- | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
neural_network_chess
-
A question about training chess engines
Basically, MCTS is used in combination with reinforcement learning. This ensures that we get better evaluations for non terminal positions in training games. You might want to have a look at my free book @ https://github.com/asdfjkl/neural_network_chess
-
Why does the compiler *partially* vectorize my code?
So consider instead keeping a running score of the position, rather than recalculating it in full every time. One of the main tricks behind Stockfish NNUE, the current top chess engine, is a clever way of not needing to fully recalculate the full neural net every time, but to do a delta update for each move for a substantial part of the network. I forget the main paper about that, but you can read about it in https://github.com/asdfjkl/neural_network_chess.
-
Resources for learning and implementing a NNUE for a chess engine?
My book https://github.com/asdfjkl/neural_network_chess covers some of these topics...
-
[D] Machine Learning - WAYR (What Are You Reading) - Week 122
Neural Networks For Chess
- [R] Neural Networks For Chess
- Neural Networks For Chess
-
Book about AlphaZero, Stockfish NNUE and neural networks in chess
Shameless self-plug: I wrote a book about neural networks in chess and you can get a free PDF here https://github.com/asdfjkl/neural_network_chess (no ads, no fremium)
- Neural Networks for Chess
alpha-zero-boosted
-
DeepMind has open-sourced the heart of AlphaGo and AlphaZero
> I came up with a nifty implementation in Python that outperforms the naive impl by 30x, allowing a pure python MCTS/NN interop implementation. See https://www.moderndescartes.com/essays/deep_dive_mcts/
Great post!
Chasing pointers in the MCTS tree is definitely a slow approach. Although typically there are < 900 "considerations" per move for alphazero. I've found getting value/policy predictions from a neural network (or GBDT[1]) for the node expansions during those considerations is at least an order of magnitude slower than the MCTS tree-hopping logic.
[1] https://github.com/cgreer/alpha-zero-boosted
-
MuZero: Mastering Go, chess, shogi and Atari without rules
What you can do is checkout the algorithm at a particular stages of development. AlphaZero&Friends start out not being very good at the game, then over time they learn and become super human. You typically checkpoint the weights for the model at various stages. So early on, the algo would be like a 600 elo player for chess and then eventually get to superhuman elo levels. So if you wanted to train you can gradually play against versions of the algo until you can beat them by loading up the weights at various difficulty stages.
I implemented AlphaZero (but not Mu yet) using GBDTs instead of NNs here if you're curious about how it would work: https://github.com/cgreer/alpha-zero-boosted. Instead of saving the "weights" for a GBDT, you save the splitpoints for the value/policy models, but the concept is the same.
What are some alternatives?
python-chess - A chess library for Python, with move generation and validation, PGN parsing and writing, Polyglot opening book reading, Gaviota tablebase probing, Syzygy tablebase probing, and UCI/XBoard engine communication
KataGo - GTP engine and self-play learning in Go
maia-chess - Maia is a human-like neural network chess engine trained on millions of human games.
katrain - Improve your Baduk skills by training with KataGo!
lichess-bot - A bridge between Lichess API and chess engines
adversarial-robustness-toolbox - Adversarial Robustness Toolbox (ART) - Python Library for Machine Learning Security - Evasion, Poisoning, Extraction, Inference - Red and Blue Teams
nnue-pytorch - Stockfish NNUE (Chess evaluation) trainer in Pytorch
leela-zero - Go engine with no human-provided knowledge, modeled after the AlphaGo Zero paper.
boardlaw - Scaling scaling laws with board games.
mars - Mars is a tensor-based unified framework for large-scale data computation which scales numpy, pandas, scikit-learn and Python functions.
chess - Program for playing chess in the console against AI or human opponents
mctx - Monte Carlo tree search in JAX