Riptide is a UCI-compatible chess engine and the successor to ChessSlayer. It started as a straight port of ChessSlayer from Go to Zig, but is becoming a more performant and advanced engine over time.
- Board representation: bitboard
- Move generation: pseudo-legal generation followed by legality check. 100% correct on Perft tests.
- Search: negamax with alpha-beta pruning
Riptide requires a UCI client to use as the frontend during games. It's tested against Scid vs. PC; your mileage may vary with other clients.
Currently, the following UCI features are unimplemented:
- specifying a list of moves when using the
position
command - the
nodes
,movestogo
, andmate
arguments to thego
command - ponder mode
- Install Zig version 0.10.
- Clone the repository with
git clone --recurse-submodules https://github.com/kdelwat/riptide-engine.git
- Run
cd riptide-engine && zig build
- The
riptide
binary will be created inzig-cache/bin
; point your GUI client to this binary.
Run unit tests with:
zig build test
Run perft correctness tests with:
zig build perft
Run node-per-second benchmarks with:
zig build nps
zig build
valgrind --tool=callgrind zig-cache/bin/riptide
ucinewgame
position startpos
go infinite
Then run kcachegrind
to analyse.
I couldn't have written this engine without the invaluable help of the Chess programming wiki and the Mediocre chess blog by Jonatan Pettersson.