Chess Transformers is an innovative library designed to train transformer models in the art of chess by learning from human gameplay. Whether you're looking to build AI opponents or explore machine learning in games, this library provides the tools and flexibility you need to create and evaluate transformative chess engines.
Chess Transformers offers an advanced library designed specifically for training transformer models to master the game of chess by learning from human gameplay. This powerful tool utilizes a diverse range of datasets, featuring well-documented models and their unique strengths, enabling researchers and developers to create sophisticated chess-playing algorithms.
Features
Models
Chess Transformers currently provides four distinct models, each crafted for specific tasks within chess gameplay:
Model Name | Parameters | Training Data | Architecture | Predictions |
---|---|---|---|---|
CT-E-20 | 20M | LE22ct | Transformer encoder only | Best next half-move (in UCI notation) |
CT-EFT-20 | 20M | LE22ct | Transformer encoder only | Best From and To squares corresponding to the next half-move |
CT-ED-45 | 45M | LE22ct | Transformer encoder and decoder | Sequence of half-moves |
CT-EFT-85 | 85M | LE22c | Transformer encoder only | Best From and To squares corresponding to the next half-move |
These models have been rigorously evaluated against the acclaimed Fairy Stockfish chess engine at various strength levels, showcasing high efficacy at different stages of gameplay.
Datasets
The library incorporates five principal datasets derived from numerous recorded chess matches, allowing the models to learn from a vast selection of human-written moves:
- ML23c: 10,797,366 datapoints
- LE22ct: 13,287,522 datapoints
- GC22c: 26,162,415 datapoints
- LE22c: 127,684,720 datapoints
- ML23d: 144,625,397 datapoints
Playing against the AI
After setting up Chess Transformers, users can engage in matches either against an AI model or through a model-vs-engine setup. The library supports intuitive interaction in both Jupyter notebooks and Python shells. This feature enables easy access to varied gaming experiences while utilizing state-of-the-art AI algorithms to play chess.
Utilizing cutting-edge transformer architecture, Chess Transformers not only educates models on the nuances of chess but also presents users with a comprehensive platform to study different gameplay strategies and improve their chess skills. The flexibility and scalability of this library make it an invaluable asset for AI enthusiasts and chess professionals alike.