https://github.com/znxftw/rudim
UCI-compliant chess engine written in Rust
https://github.com/znxftw/rudim
chess chessengine rust rust-lang
Last synced: 11 days ago
JSON representation
UCI-compliant chess engine written in Rust
- Host: GitHub
- URL: https://github.com/znxftw/rudim
- Owner: znxftw
- License: gpl-3.0
- Created: 2021-07-15T21:45:43.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2026-06-04T05:43:58.000Z (13 days ago)
- Last Synced: 2026-06-04T07:20:10.828Z (13 days ago)
- Topics: chess, chessengine, rust, rust-lang
- Language: Rust
- Homepage: https://lichess.org/@/rudim-bot
- Size: 656 KB
- Stars: 12
- Watchers: 4
- Forks: 4
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rudim
[](https://github.com/znxftw/rudim/actions/workflows/pipeline.yml)
Rudim is a chess engine written in Rust.
You can play against Rudim on lichess: [rudim-bot](https://lichess.org/@/rudim-bot). (Hosted version: v2.2.1)
Series of blog posts on how I wrote rudim : [vishnubhagyanath.dev](https://vishnubhagyanath.dev/tags/rudim/) (these reference the older C# implementation, rudim was rewritten in rust)
## Architecture Overview
Rudim currently implements these core engine capabilities:
Board Representation
- Bitboards, Magic Bitboards
- Phased Pseudo-Legal Move Generation
- Zobrist Hashing
Search
- Iterative Deepening with Aspiration Windows
- Negamax + Alpha-Beta Pruning
- Principal Variation Search
- Quiescence Search
- Two-tiered Transposition Table
- Move Ordering (SEE, MVV-LVA, Killer, History, Hash, PV)
- Null Move Pruning
- Late Move Reductions
- Futility Pruning
- Reverse Futility Pruning
Evaluation
- [NNUE](https://github.com/znxftw/rudim-networks) Architecture: (768 -> 32) x 2 -> 1
Other
- UCI Protocol support
## Prerequisites
- Rust stable toolchain (`rustup` + `cargo`)
## Build and Run
- 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`
## Quality Checks
- Tests: `cargo test`
- Lint (Clippy): `cargo clippy --all-targets --all-features`
- Format: `cargo fmt --all`
## Benchmarks
Rudim uses Criterion benchmarks to validate how some sample position searches are performing
- Run all benches: `cargo bench`
- Main benchmark suite (`find_best_move` at depth 6-7 on standard positions) lives in `benches/search_benchmark.rs`.
## Acknowledgements
- [maksimKorzh](https://github.com/maksimKorzh) for his YouTube series on on bitboard chess engines
- [bullet](https://github.com/jw1912/bullet) - used for training the NNUE
- [Reckless](https://github.com/codedeliveryservice/Reckless), [Viridithas](https://github.com/cosmobobak/viridithas), [Hobbes](https://github.com/kelseyde/hobbes-chess-engine) - took some references for Rust optimizations they did
- ChessProgramming wiki, TalkChess, Engine Programming Discord Server
## Contributing
PRs are welcome.
Before opening a PR, please run:
- `cargo fmt --all -- --check`
- `cargo clippy --all-targets --all-features`
- `cargo test`
If your change affects search strength, run a tournament/regression check as well.