atomic-movegen 0.1.0

Legal move generation for atomic chess.
docs.rs failed to build atomic-movegen-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: atomic-movegen-0.2.0

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