Skip to main content

MAX_MOVES

Constant MAX_MOVES 

Source
pub const MAX_MOVES: usize = 256;
Expand description

Maximum number of moves that can be generated for any atomic chess position.

The absolute upper bound is well below 256:

  • At most 64 squares with attackers
  • Perft at depth 1 on the most complex legal positions yields < 150 moves
  • 256 provides a comfortable safety margin.