atomic-movegen
A Rust library for legal move generation in atomic chess.
Features
- Legal move generation (pseudo-legal + legality filtering)
- FEN parsing and output
- Perft (performance test) recursion
- Blast-on-capture, COMMONER pseudo-royalty, pawn blast immunity
Usage (library)
use Board;
use perft;
let mut board = new;
let nodes = perft;
assert_eq!;
Usage (CLI perft)
Output: 197326
Verify against known perft values
The repository ships with 41 test positions and their expected node counts at
depths 1–6 in perft_values.md. Use the
verify_perft example to run all of them:
# Quick check at depth 3 (~5 s)
# Full verification at depth 6 — use --release for acceptable runtime
The tool exits with status 0 if every position matches, or 1 on any mismatch.
Depth 6 traverses billions of nodes; the --release flag is essential for a
timely result at that depth.
License
MIT