Function alcibiades::utils::perft
[−]
[src]
pub fn perft<T: MoveGenerator>(position: &mut T, depth: Depth) -> u64
Performs move path enumeration.
perft
is a debugging function to walk the move generation tree
of strictly legal moves and count all the leaf nodes of a certain
depth, which can be compared to predetermined values and used to
isolate bugs. In perft, nodes are only counted at the end after
the last do_move
. Thus "higher" terminal nodes (e.g. mate or
stalemate) are not counted. Perft ignores draws by repetition, by
the fifty-move rule and by insufficient material. By recording the
amount of time taken for each iteration, it's possible to compare
the performance of different move generators or the same generator
on different machines.