Commit graph

8 commits

Author SHA1 Message Date
0f5a538f0a [explorer, perft, position] Move node count into a new PerftCounters struct 2025-06-19 11:34:59 -07:00
f3b31d5514 [perft] Print the fen string of the board position 2025-06-17 16:42:35 -07:00
d73630c85e [perft, position] Print moves and nodes counted at first level
At the first level of depth, print the move and the number of nodes counted in
the tree underneath that node. This behavior imitates Stockfish, and helps with
debugging.

Clean up the output of the Perft binary, and update the check-positions script
to compensate.
2025-06-17 16:17:46 -07:00
45037d6fc1 [explorer, moves, perft] A few rustfmt changes that reorder imports 2025-06-16 13:49:29 -07:00
7744dd06f0 [position, perft] Move Perft into the position crate
Move the Perft trait into the position crate, and let the perft binary call into
that.

Amend Position::make_move to return a bool in the Ok case that indicates whether
the position has been seen before. Use this to decide whether to continue
recursing during the Perft run. I haven't seen that this makes a difference in
the counts returned by Perft yet.
2025-06-16 09:01:58 -07:00
fb182e7ac0 [perft] Print the depth of the position being checked in check-positions 2025-06-15 16:24:19 -07:00
3c31f900ea [perft] A script that checks a list of positions against known node counts
A small Python script that reads a JSON list of positions and their known Perft
node counts to a certain depth, then invokes the Perft program for each position
and validates the output.

Peter Ellis Jones shared such a JSON list on GitHub. Import that file.
2025-06-11 08:16:59 -07:00
0167794346 [perft] A small Perft program 2025-06-08 17:19:00 -07:00