You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perft (Performance Test) is a function that measures the number of possible legal moves from a given position to a certain depth. It is a crucial test for chess engines to verify the correctness of their move generation.
Using a Teacher-Student model, AutoPerft employs a strong reference engine (teacher) to verify the moves generated by a weaker engine (student) for a given set of positions. This approach reduces the time taken to pinpoint bugs by bisecting the moves where the engines differ, highlighting missing and extra moves generated by the student engine.
You can customize output parsing for specific engines by modifying the customize function. This function is called after loading the engines and allows you to set specific commands or regular expressions.
Example customization:
defcustomize(teacher, student):
ifstudent.get_name() =="Chess by Soham":
student.PERFT_CMD="perft {depth}"student.NODE_COUNT_REGEX=r"Nodes: (\d+)"
Output
Whether the perft results match between the teacher and student engines.
If there is a mismatch, it bisects and highlights the specific moves causing the difference.
Provides a link to Lichess for visual analysis of the position.
Exits with a non-zero status code if any test fails.