2 min readfrom Machine Learning

Trained transformer-based chess models to play like humans (including thinking time) [P]

Our take

I trained a series of deep learning transformer-based chess models designed to mimic human play, taking inspiration from MAIA and Grandmaster Chess Without Search. Each model corresponds to a specific 100-point rating range, from approximately 800 to 2500+. Utilizing nearly a year of Lichess data, this project includes three models per rating: a move model, a thinking time model, and a win/draw model. Notably, despite their compact size of just 9 million parameters, the move models outperform MAIA-2 and closely match MAIA-3.

The development of transformer-based chess models that can emulate human-like decision-making processes presents a significant advancement in the intersection of artificial intelligence and strategic games. The work described in the article showcases a comprehensive approach to training models across various player ratings, from novice to expert, utilizing a staggering amount of data—over one billion games from Lichess. This meticulous effort not only reflects a commitment to enhancing machine understanding of chess but also aligns with the broader trend of leveraging AI to transform traditional domains, akin to innovations seen in financial modeling with tools like Build AI Financial Models in Sourcetable or ETF analysis through ETF Analysis with AI: Compare Funds and Find the Best Investments.

One of the most compelling aspects of this endeavor is the introduction of thinking time models. This innovative approach acknowledges that chess is not merely a game of moves but also a contest of mental endurance and strategy, where time pressure can significantly influence outcomes. By integrating player ratings, clock times, and even the psychological factors associated with decision-making under pressure, these models provide a more nuanced representation of human play. These insights could lead to improved training tools for aspiring chess players, creating a bridge between human intuition and machine learning that empowers users to refine their strategies.

Moreover, the model's performance against benchmarks like MAIA-2 and MAIA-3 indicates a promising trajectory for AI in competitive environments. While the current models excel in accuracy, particularly in lower rating ranges, they fall short of deeper calculations at higher levels. This limitation opens a discussion about the scalability of model complexity in AI and how future iterations could further enhance their capabilities. As chess enthusiasts and players continue to seek innovative ways to analyze and improve their game, advancements like these will play a crucial role in shaping their approach to learning and competition.

Looking ahead, the implications of such advancements extend beyond chess. As we witness AI systems becoming increasingly integrated into various aspects of daily life, the evolution of models that can think and adapt like humans invites us to consider the ethical and practical dimensions of AI's role in society. Will these developments encourage a broader acceptance of AI-driven tools in other areas, such as education or personal productivity? The potential for AI to augment human capabilities is vast, but it also necessitates a thoughtful examination of how we engage with these technologies.

In conclusion, the journey of training transformer-based models to understand and play chess like humans serves as a microcosm for the transformative power of AI across industries. As developers continue to innovate and refine these systems, the chess community—and beyond—stands to benefit from a deeper understanding of both the game and the technology that supports it. The question remains: how will we harness these advancements to not only enhance our experiences but also to foster a future where AI complements human intelligence in meaningful ways?

I trained a set of deep learning (transformer-based) chess models to play like humans (inspired by MAIA and Grandmaster Chess Without Search).

There's a separate model for each 100-point rating bucket from ~800 to 2500+. I started with training a mid-strength model from scratch on a 8xH100 cluster, then fine-tuned models for the other rating ranges on my local 5090 GPU. The total training size was nearly a year of Lichess data, about 1B total games.

Each rating range actually has 3 models: A move model, a thinking time model, and a white win / draw / black win model. Despite being quite small (only 9MM parameters!) the move models achieve better accuracy than MAIA-2 and are approximately on par with MAIA-3 (see here for MAIA-2 comparison).

AFAIK this is the only attempt to train on thinking times in chess, so I don't have a benchmark to compare against for that.

Likely because of the network size, at high ratings the models aren't quite as good as they could be. They see short tactical motifs but can't do deep calculation - probably a bigger model would help here.

The move and win models take into account player ratings and clock times. For instance, under extreme time pressure a much stronger player has a lower win prob even if their opponent is weaker. The models blunder more under time pressure as well.

The data pipeline is C++ via nanobind, then training with Pytorch. Getting this right was actually the thing I spent the most time on. Pre-shuffling the dataset and then being able to read the shuffled dataset sequentially at training time kept the GPU utilization high. Without this it spent a huge percentage of time on I/O while the GPU sat idle. Happy to answer questions about the rating-conditioning, the clock model, or the data pipeline.

Code (including training code and model weights) is at https://github.com/thomasj02/1e4_ai/. A demo is at https://1e4.ai/ but all the frontend code is also in the repo if you want to self-host.

submitted by /u/hazard02
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article

Related Articles

Tagged with

#real-time data collaboration#generative AI for data analysis#Excel alternatives for data analysis#real-time collaboration#natural language processing for spreadsheets#rows.com#big data management in spreadsheets#conversational data analysis#financial modeling with spreadsheets#intelligent data visualization#no-code spreadsheet solutions#data visualization tools#enterprise data management#big data performance#data analysis tools#data cleaning solutions#large dataset processing#cloud-based spreadsheet applications#self-service analytics tools#machine learning in spreadsheet applications