Quirky is a simple chess engine, supporting UCI protocol. Approximate CCRL 40/15 rating is around 3350.
The engine requires AVX2/BMI2 support to run, so make sure your processor supports these instruction sets.
The project uses CMake as a build system. You will also need a C++20-compatible compiler.
To build the engine, do the following:
$ mkdir build
$ cd build
$ cmake ..
$ make -j8
Quirky is based on alpha-beta pruning with various well-known heuristics and NNUE evaluation. It doesn't use autotuning of search constants, and aims to use as few complex and obscure heuristics as possible.
NNUE architecture is (768 -> 256) x2 -> 16 -> 32 -> 1. It was trained in the following way:
- Numerous self-play games were played. The time control was set to 20ms per move. From this games we randomly sampled positions that were evaluated during search.
- For Quirky 2.0 we used Quirky 1.0 as engine generating positions.
- For Quirky 2.1 we used six slightly different Quirky 1.0 variants as engines generating positions.
- From each game, we randomly selected 32 positions evaluated with the first engine, and 32 positions evaluated with the second engine.
- We filtered out positions that were in check and positions where a simple quiescence search was able to find a winning capture.
- We then used Stockfish with WDL scores to analyze each position for 100 ms.
- Each entry for model learning consisted of a FEN string and a result (loss, draw, or win) sampled according to the WDL scores.
Quirky 1.0 NNUE was trained using a third-party dataset.
Dataset used for Quirky 1.0 NNUE
Dataset used for Quirky 2.0 NNUE
Dataset used for Quirky 2.1 NNUE
- Chess Programming Wiki, for many useful articles and descriptions of various useful heuristics.
- alex65536 for providing useful chess engine tools.
Some code logic and architecture are derived from:
Other engines used for inspiration: