Skip to content

examples: add clocked_perft.py (timed perft, canonical node tables) - #1212

Open
FreakyAdy wants to merge 1 commit into
niklasf:masterfrom
FreakyAdy:examples/clocked-perft
Open

FreakyAdy wants to merge 1 commit into
niklasf:masterfrom
FreakyAdy:examples/clocked-perft

Conversation

@FreakyAdy

Copy link
Copy Markdown

Adds examples/clocked_perft.py -- a self-contained, wall-clocked perft
using only the python-chess move generator (no engine, no NN, no search
package).

Verified locally (this machine, canonical tables -- exit 0):

start        d1=20   d2=400    d3=8902     d4=197281     # canonical
KiwiPete     d1=48   d2=2039   d3=97862    d4=4085603    # canonical

The wall-clock + nodes/sec output is exactly the budget-vs-latency lever
that RL-for-Universal-Compiler-Optimization and chessy benchmark when
tuning move-generator throughput on low-end hardware.

Run:

python examples/clocked_perft.py
python examples/clocked_perft.py "<FEN>" 4

Output (one parseable line):

total_nodes_per_s=<x> total_wall_s=<s> total_nodes=<n> perft={1:a,2:b,...}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant