Reckless is a UCI chess engine written in Rust as a personal project.
Guided by the insights from the chess programming community, it fearlessly combines established concepts, as the name suggests.
- Bitboards with Little-Endian Rank-File Mapping
- Magic Bitboards for sliding piece attacks
- Copy-Make approach
- Pseudo legal move generator
- Pre-calculated attack maps using Fancy Magic Bitboards
- Magic numbers are pre-generated using Reckless Magics
- Compile time generation of move maps using a build script
- Fail-Soft Alpha-Beta
- Principle Variation Search
- Quiescence Search
- Iterative Deepening
- Aspiration Windows
- Lockless Transposition Table
- Lazy SMP (Shared-Memory Parallel)
- Reverse Futility Pruning
- Null Move Pruning
- Razoring
- Futility Pruning
- Late Move Pruning
- Delta Pruning
- Static Exchange Evaluation Pruning
- Mate Distance Pruning
- Fractional Late Move Reductions
- Internal Iterative Reductions
- Check Extensions
- Hash Move
- Killer Move Heuristic
- SEE with MVV-LVA as a tiebreaker for captures
- History Heuristic for quiet moves
- Butterfly History
- Counter Move History
- Follow-Up History
- NNUE
- Architecture:
(768 -> 384)x2 -> 1
- Activation Function:
SCReLU
(Squared Clipped Rectified Linear Unit) - Quantization:
i16
(256
/64
) - Trained on original data generated entirely through self-play
- Handwritten SIMD for AVX2 instructions
- Soft and hard bounds
- Best move stability
- Distribution of root nodes
Version | CCRL Blitz | CCRL 40/15 | Release Date |
---|---|---|---|
Reckless v0.6.0 | 3387 +/- 23 [#73] | 3311 +/- 21 [#78] | Mar 22, 2024 |
Reckless v0.5.0 | 3243 +/- 19 [#94] | 3213 +/- 21 [#94] | Feb 4, 2024 |
Reckless v0.4.0 | 2933 +/- 19 [#151] | 2929 +/- 21 [#158] | Dec 13, 2023 |
Reckless v0.3.0 | 2617 +/- 20 [#229] | 2615 +/- 21 [#251] | Nov 6, 2023 |
Reckless v0.2.0 | 2358 +/- 19 [#333] | Oct 7, 2023 | |
Reckless v0.1.0 | 2020 +/- 20 [#471] | May 16, 2023 |
You can download precompiled builds from the GitHub Releases page.
x86_64-v1
: Slowest, compatible with any x86-64 CPU.x86_64-v2
: Faster, requires support forPOPCNT
,SEE3
, etc.x86_64-v3
: Even faster, requires support forAVX2
, etc.x86_64-v4
: Fastest, requires support forAVX512
.
For detailed information on the specific features needed for each level, refer to the x86-64 microarchitecture levels Wikipedia page.
To build the engine from source, make sure you have Rust 1.65
or a later version installed.
If you don't have Rust, follow the official Rust installation guide.
The source code doesn't include an NNUE model to keep the repository lightweight. Instead, models are stored in the Reckless Networks repository.
You can download the latest model using the fetch-nnue.sh
(or fetch-nnue.ps1
on Windows) script,
which will be placed in the networks
directory and automatically detected during the build.
Alternatively, you can specify the path to the model file using the EVALFILE
variable:
# Build the engine with a `./networks/model.nnue` model
make
# Build the engine with a specific model
make EVALFILE=networks/model.nnue
Keep in mind that older models may be incompatible with the current version of the engine.
Reckless is not a standalone chess program but a chess engine designed for use with UCI-compatible GUIs, such as Cute Chess or ChessBase.
Alternatively, you can communicate with the engine directly using the UCI protocol.
Along with the standard UCI commands, Reckless supports additional commands for testing and debugging:
Command | Description |
---|---|
perft <depth> |
Run a perft test to count the number of leaf nodes at a given depth. |
bench <depth> |
Run a benchmark on a set of positions to measure the engine's performance. |
eval |
Print the static evaluation of the current position from white's perspective. |
- OpenBench is the primary testing framework powered by Cute Chess.
- Open source chess engines, like Stockfish, Ethereal, Berserk, and numerous others, for serving as inspiration and providing ideas that fuel development.
- Stockfish Discord server for providing relevant insights and feedback.
- Chess Programming Wiki for contributing to the project's foundation.
- Many thanks to the CCRL team and all chess engine testers for their valuable contributions.
This project is licensed with the MIT license.