Seeing that Cake had recently been released on GitHub motivated me to finally wrap up this project and upload it as well. I originally started working seriously on my checkers engine during the COVID pandemic, but sometime afterwards I gradually lost interest in programming, and the project ended up sitting unfinished. At that point the engine itself was essentially complete—I think only parts of the CheckerBoard GUI interface were still missing.
The author of Cake apologized for the state of his repository, saying he wasn't a proper software engineer and didn't "speak Git well." I can definitely relate to that sentiment. I'm not a software engineer either, so please don't judge the code too harshly—I only ask that you judge the engine instead.
The source code is available here:
https://github.com/CheckersGuy/DarkHorse
The precompiled DLL for CheckerBoard (place it in the CheckerBoard engines folder) can be downloaded from the release page https://github.com/CheckersGuy/DarkHors ... eleaseV1.0. At the bottom of the release page, you'll find the DLL. Only the DLL itself is required in the engine folder, since the network weights are already included inside the binary using incbin https://github.com/graphitemaster/incbin.
At the moment only an AVX2 build is available. It should run on virtually any processor released since 2013.
As far as I know, GUINN (https://github.com/jonkr2/GuiNN_Checkers) is currently the only other publicly available checkers engine using a neural network. Here are some of the engine's main features that are different compared to GUINN:
- The engine uses three neural networks:
- a large evaluation network for position evaluation,
- a policy network for move ordering,
- and a much smaller network that is activated in winning positions to estimate the number of plies until a win or loss. - Quantized inference to improve evaluation speed. The input layer uses 16-bit weights and 32-bit biases, while all remaining layers use 8-bit weights and 16-bit biases. As far as I know, GUINN does not currently use 8-bit weights in its quantized network.
- Fast inference by exploiting activation sparsity after the input layer. Most activations become zero after the first layer, allowing many computations to be skipped. An excellent description of this technique can be found in the Stockfish team's NNUE documentation:
https://github.com/official-stockfish/n ... cs/nnue.md - Bucketed weights. Beyond the input layer, the network's weights are split into buckets indexed by piece count, so the engine effectively uses a different set of learned weights depending on how many pieces remain on the board
- The evaluation network is considerably larger than the one used by GUINN, with about 1.3 million parameters. I mainly experimented to see how large I could make the network while retaining most of its playing strength. The architecture is probably not optimal, but training these networks takes a significant amount of time—and a fair bit of "alchemy"—so I never explored the design space systematically. I even trained a version with roughly three times as many parameters, and surprisingly it wasn't dramatically weaker even at bullet time controls (100 ms per move).
Match Results against KingsRow 1.19e (11-move ballots)
DarkHorse AVX2 v1.0 vs KingsRow 1.19e
224 wins, 61 losses, 3955 draws
GUI = CheckerBoard 1.77
Opening Book = None
Hashtable = 128 MB
Endgame Database = 2048 MB
Allscores = Off
Solve Mode = Off
Database = 8-piece WLD
Threads = 1
Time = 0.1 seconds per move
The match was played on an AMD Ryzen 7 9800X3D.
I hope someone finds it interesting, and perhaps useful as a reference for other neural-network-based checkers/draughts engines. If you decide to give it a try, I'd be happy to hear any feedback.
There are still a few features missing compared to KingsRow or Cake. For example, DarkHorse currently does not support an opening book, multithreading, or DTW/MTC endgame databases. Training the neural networks takes quite a bit of time, so if I ever get around to training a new one, I may release another version of the engine. If I do, I'll most likely include support for the missing features as well.

