⚡ Zig chess engine ⚡
- Fancy Magic Bitboards
- Staged Move Generation
- Fancy Magic Bitboards For Sliders
- Transposition Table Move Ordering
- Principal Variation Move Ordering
- MVV-LVA
- Chess960 support
- Principal Variation Search
- Alpha-Beta Pruning
- Aspiration Window
- Late Move Reductions
- Null Move Pruning
- Reverse Futility Pruning
- Quiescence Search
- Threefold Repetition
- Time Management
- Tuned Piece-square Tables
- AlphaZero Average Piece Values
- Tapered Evaluation
- Transposition Table Evaluation
- Endgame Heuristics
- Pawn Structures Heuristics
- Mobility Bonus
Time control: 120+1
CCRL blitz benchmark.
Rank | Name | CCRL | Elo | +/- | Games | Score | Draw |
---|---|---|---|---|---|---|---|
1 | radiance_4.0 | 323 | 28 | 1056 | 86.5% | 7.7% | |
2 | radiance_3.5 | 88 | 20 | 1060 | 62.5% | 15.3% | |
3 | radiance_3.4 | 1302 | 85 | 20 | 1058 | 62.1% | 14.8% |
4 | radiance_3.2 | 14 | 19 | 1056 | 52.1% | 16.3% | |
5 | radiance_3.3 | 13 | 19 | 1056 | 51.8% | 15.2% | |
6 | radiance_3.1.1 | 1118 | -151 | 22 | 1058 | 29.5% | 7.8% |
7 | radiance_3.0.1 | -489 | 40 | 1060 | 5.7% | 5.5% | |
radiance_2.3 | 866 |
export CXX=g++-12
export CC=gcc-12
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
./radiance
go
stop
Name | Type | Default value | Valid values | Description |
---|---|---|---|---|
Hash |
spin | 256 | [1, 6 700E 5535] | Memory allocated to the transposition table (in MB). |
Threads |
spin | 1 | [1, 1] | Number of threads used to search. |
Evaluation |
combo | "PSQ" | ["PSQ", "Shannon", "Materialist"] | Type of evaluation function. |
Search |
combo | "NegamaxAlphaBeta" | ["NegamaxAlphaBeta", "Random"] | Type of search function. |
UCI_Chess960 |
check | false | ["true", "false"] |
uci
isready
setoption name <id> [value <x>]
position [fen <string> | startpos | kiwi | lasker] [moves <string>...]
eval
go [movetime <int> | [wtime <int>] [btime <int>] [winc <int>] [binc <int>] | depth <int> | infinite | perft <int>]
bench
stop
quit
ucinewgame
d
This project was originaly written in C++ before 4.0 version and archived under the name radiance_archived.
- Avalanche engine is a great example of how a zig project should be coded. Radiance engine still uses its pseudo random number generator (MIT License - Copyright (c) 2023 Yinuo Huang).
- Stockfish with its aggressive pruning methods.
- Chess Programming Wiki.
I'm radiant!