| This took about a year and a half – a little over a year coding in between experiments and training. It's a chess engine with a primary neural network just like AlphaZero or Leela Chess Zero's, but it adds on a secondary "commentary decoder" network based on Transformer architecture to comment on positions and moves. All of the code and data for training and search is from scratch, although it does use Stockfish code to generate legal moves and manage chess positions. You can watch it play on Lichess here: https://lichess.org/@/PlayChessCoach/tv or challenge it here: https://lichess.org/?user=PlayChessCoach#friend, and see its commentary in spectator chat. It only plays one game at a time, so you may need to wait a little bit. It's fairly strong (~3450 rating, roughly on par with Stockfish 12 or SlowChess Blitz 2.7), but you can set up a position when challenging it so that it's missing a couple pawns or a piece (Variant: From Position). I ended up writing much more about it than I expected. If you're into the technical side of chess or machine learning, beyond the linked overview, there's: High-level explanation: https://chrisbutner.github.io/ChessCoach/high-level-explanat... Technical explanation: https://chrisbutner.github.io/ChessCoach/technical-explanati... (including code pointers) Development process: https://chrisbutner.github.io/ChessCoach/development-process... (including timelines, bugs and failures) Data: https://chrisbutner.github.io/ChessCoach/data.html (including raw measurements and tournament PGN files) And the code is here: https://github.com/chrisbutner/ChessCoach (C++ and Python, GPLv3 or later) Happy to answer any questions! |
I had a nice long conversation with two of the authors of [0] at ACL.
One thing we discussed was the reverse problem. That is, as a player, could I give commands to the model and have the engine figure the moves that would best satisfy them.
This ranges from concrete like "take the black square bishop" (there is still variability like which piece should take it or if it's even possible) to more complex positional stuff like "set up to attack the kingside."
Any thoughts on this line of research?
[0] Automated Chess Commentator Powered by Neural Chess Engine (Zang, Yu & Wan, 2019) https://arxiv.org/pdf/1909.10413.pdf