atomic-movegen 0.2.0

Legal move generation for atomic chess.
Documentation
  • Coverage
  • 30.96%
    100 out of 323 items documented1 out of 80 items with examples
  • Size
  • Source code size: 154.23 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.85 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • golmman/atomic_movegen
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • golmman

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 atomic_movegen::board::Board;
use atomic_movegen::perft;

let mut board = Board::new();
let nodes = perft(&mut board, 3);
assert_eq!(nodes, 8902);

Usage (CLI perft)

cargo run --example perft "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" 4

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)
cargo run --example verify_perft 3

# Full verification at depth 6 — use --release for acceptable runtime
cargo run --example verify_perft --release

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