PitchHut
Log in / Sign up
chess-transformers
48 views
Teaching transformers to play chess with human game insights.
Pitch

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.

Description

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 NameParametersTraining DataArchitecturePredictions
CT-E-2020MLE22ctTransformer encoder onlyBest next half-move (in UCI notation)
CT-EFT-2020MLE22ctTransformer encoder onlyBest From and To squares corresponding to the next half-move
CT-ED-4545MLE22ctTransformer encoder and decoderSequence of half-moves
CT-EFT-8585MLE22cTransformer encoder onlyBest 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.