Anodos is a UCI-compatible chess engine written in Rust. Built from scratch with bitboard-based move generation and alpha-beta optimised search.
- Move generation
- Bitboards for pseudo-legal move generation
- Fancy magic sliding piece attacks
- Search
- Iterative deepening
- Aspiration windows
- Negamax with alpha/beta pruning
- Null-move pruning
- Extended/reverse futility pruning
- Late move pruning/reductions
- Internal iterative reductions
- Principal variation search
- Quiescence search with SEE/delta pruning
- Check extension
- Transposition table with Zobrist keys
- Move ordering
- TT move
- SEE + MVV/LVA
- Killer moves
- History heuristic
- Handcrafted evaluation
- Game-phase tapering
- Material counting
- Piece-square tables
- Piece mobility
- King safety with pawn-shield scoring
- Doubled, isolated and passed pawns
- Open and half-open files for rooks
- Insufficient material draw detection
- Time management
- Soft limits based on PV stability and eval volatility
- Universal Chess Interface
- Play via any UCI-compatible GUI (e.g. Cute Chess, En Croissant)
- Search
- Mate distance pruning
- Counter-move heuristic
- Reductions for late/bad captures
- Staged move generation
- Singular extensions
- TT eval caching
- TT bucketing
- TT prefetching
- Multi-threading / Lazy SMP
- Evaluation
- Pawn hash table
- Syzygy tablebase support
- Replace HCE with NNUE
- Time management
- Soft limits based on search tree node distribution
Supported commands:
uci
isready
ucinewgame
position startpos [moves ...]
position fen <fen> [moves ...]
go [infinite]
go depth <n>
go mate <n>
go nodes <n>
go movetime <ms>
go wtime <ms> btime <ms> [winc <ms>] [binc <ms>]
setoption name Hash value <MB>
stop
quit
Beyond the UCI protocol, the engine supports these debugging/utility commands:
| Command | Description |
|---|---|
perft <depth> |
Run perft to validate move generation |
printboard |
Display the current position |
printfen |
Output the current position as a FEN string |
domove <move> |
Make a move on the current position (e.g., domove e2e4) |
This project uses Rust edition 2024, so you'll need Rust 1.85+ (stable).
For the best performance, always use release mode:
cargo build --release
./target/release/anodosAlternatively, you can run in release mode directly:
cargo run --releaseTo enable debug assertions (useful during development for catching bugs), use:
cargo runOnly use debug mode for testing and development; release mode is strongly recommended for actual games or benchmarks.
Binaries published on the Releases page are built with PGO (see .github/workflows/release.yml).
To run a local PGO build:
rustup component add llvm-tools-preview
cargo install cargo-pgo
# Build an instrumented binary
cargo pgo build
# Collect profiles by running the benchmark command
cargo pgo run -- bench
# Build the optimised (PGO) binary
cargo pgo optimizeRun the test suite:
cargo testThis includes a shallow perft check from the starting position (depth 5).
To run the deeper perft test suite (ignored by default), include ignored tests and use release mode:
cargo test --release -- --include-ignoredTo measure the engine's nodes-per-second performance, run the binary as follows:
./anodos bench [--depth <DEPTH>] [--tt-mb <MB>]--depth(default: 13) sets the search depth for each position--tt-mb(default: 64) sets the transposition table size in MB
