For Chess Players: Your Self-Sovereign, Open-Source, Neural-Net AI Bot Sparring PartnerFor Chess Players: Your Self-Sovereign, Open-Source, Neural-Net AI Bot Sparring Partner
As an adult-improver chess player, one of the tools I have found useful is playing the Maia bots on Lichess (link), after learning about the project from Ben Johnson's Perpetual Chess and Perpetual Chess Improvement.
For those unaware, Maia is a project out of the University of Toronto, which seeks to create a bot that plays like a human. Historically, a very hard problem. Most people who have played chess know that bots and humans play very differently. Maia, in my experience, is different. It really does feel like a human opponent. I believe it has something to do with being a neural net, and training on millions of human games. I am not fully up-to-date on the details, but for those interested, you can find their research papers here: https://www.maiachess.com/
If you play around on that site, you can play against a Maia bot tuned to your rating level. It uses the Lichess ratings (slightly inflated compared to Chess.com at lower ELOs). Beware, though, because the lower ELO bots actually play higher than their ELO would suggest. I have heard it explained that this is because it is like facing a committee of, say, 1100 ELO players. So it is less likely to play blunders common at that rating level, and more likely to find the strongest move. A bit like “the wisdom of crowds.” The 1100 ELO bot (Maia-1) plays at about 1500-1600 ELO strength in the pool at Lichess, for example.
One of my dreams was to be able to access Maia in a self-sovereign way, with it running offline on my own computer. This would allow me to play Maia on a long flight. And, I just love the idea of tinkering with these things on my own device. With that said, it was always just a little bit too complex to figure out how to do it. So I set up a project to use AI and try and get Maia working on my local machine.
The result is documented here: https://github.com/Dash1971/maia2-local-stack.This is the first time for me to share code on GitHub. This was all generated by AI, although I have reviewed and tested and got the stack working on my own machine. The repo is simply a couple of scripts and how-to guides that will help you download a fully open-source chess AI stack to a Linux or Mac box:
- The Maia2 engine
- The Stockfish engine (for objective game analysis)
- En Croissant (a Lichess-like GUI)
- A script that will download Lichess games and use them to generate an opening book using opening data from a given rating range. This is important because without an opening book Maia plays weird moves at the start. With an opening book generated from human games in your target ELO, Maia will open the game in a far more natural and familiar and useful way.
With this stack, you can play Maia, and also use Maia for game analysis, in conjunction with Stockfish. You can see it in the below image.
You are able to compare Stockfish best moves with human moves most likely to be played at a given rating level. Again, important to note here is that Maia does not play the best move. It seeks simply to play the move that a given rating band would most likely play at a given level.
This allows you to better understand what a human would likely play in a given position. You can compare what a weak player would likely play vs. a strong player, for example. You can use it to understand common errors certain ELO ranges make.
Even if you don’t want to run it locally, I highly recommend chess-playing stackers check out https://www.maiachess.com/. There you can do a lot that you can’t do with a local stack. For example, drill openings and endgames. They also have an interesting puzzles section where you can solve puzzles that have been curated based on common errors at given rating brackets. This is fascinating, because it shows that there are certain positions where being higher ELO (up to a point) can actually make it more likely for you to make a mistake. (It’s like the mid wit meme in real life.)
I hope the chess players of Stacker News will find this useful.