Rudim is a chess engine written in Rust.
You can play against Rudim on lichess: rudim-bot.
Rudim currently implements these core engine capabilities:
- Bitboard-based board representation & Magic bitboards
- Incremental make/unmake move pipeline with board history with a pseudo-legal move generator
- Draw detection (including repetition and fifty-move rule handling)
- Zobrist hashing and transposition table integration
- Iterative deepening search
- Negamax with alpha-beta pruning and principal variation search
- Quiescence search
- Move ordering heuristics (MVV-LVA, killer moves, history heuristic)
- Null-move pruning
- UCI protocol command handling (
uci,isready,position,go,stop,ucinewgame,debug,quit) - Rofchade Piece Square Tables and Simple Pawn Structure Evaluations
- Rust stable toolchain (
rustup+cargo)
- Build:
cargo build - Release build:
cargo build --release - Run engine (UCI loop):
cargo run - Run perft suite:
cargo run -- --perft - Generate magic numbers:
cargo run -- --generate-magics
- Tests:
cargo test - Lint (Clippy):
cargo clippy --all-targets --all-features - Format:
cargo fmt --all - Format check:
cargo fmt --all -- --check
Rudim uses Criterion benchmarks.
- Run all benches:
cargo bench - Main benchmark suite (
find_best_moveat depth 6-7 on standard positions) lives inbenches/search_benchmark.rs.
PRs are welcome.
Before opening a PR, please run:
cargo fmt --all -- --checkcargo clippy --all-targets --all-featurescargo test
If your change affects search strength, run a tournament/regression check as well.