Expand description
atomic-movegen — atomic chess move generation in Rust.
This crate implements legal move generation, FEN parsing, and perft for atomic chess.
§Atomic chess rules implemented
- Blast on capture: capturing (or en passant) destroys all non-pawn pieces in a 3×3 king-move blast zone centered on the capture square, including the capturer itself if it is not a pawn.
- Pawns are blast-immune: pawns are never removed by a blast.
- COMMONER replaces KING: pieces move like kings but are pseudo-royal. Losing all COMMONERs means loss. Adjacent COMMONERs (even own) are illegal (extinction pseudo-royal rule).
- No check/mate in the usual sense: the game ends when a side has no COMMONERs left.
§Example
use atomic_movegen::board::Board;
use atomic_movegen::perft;
let mut board = Board::new();
let nodes = perft(&mut board, 3);
assert_eq!(nodes, 8902);Modules§
- attacks
- bitboard
- board
- magic
- Magic bitboards for sliding piece attacks.
- movegen
- pext
- PEXT-based sliding piece attacks (BMI2 instruction).
- types
Functions§
- perft
- Count the number of legal moves at each node to the given depth (perft).