Skip to main content

Module head_to_head

Module head_to_head 

Source
Expand description

Paired, side-balanced head-to-head games from shared positions.

Port of benchmarks/head_to_head.py: for every sampled position and seed, two games are played — engine A as the side already to move, then engine B as the side to move. Results are attributed to the actual engine/color mapping because sampled positions can have either player to move.

Functions§

aggregate_head_to_head
Aggregate totals, as-mover splits, and per-phase splits.
h2h_key
play_game
Play from bb; mover is the side already to move. Returns (winner adapter name, plies played, move action indices).
run_head_to_head
Play both engine orientations per position and seed.

Type Aliases§

H2hKey
Identity of one head-to-head game — (position_id, mover, responder, seed), matching Python’s checkpoint.h2h_key tuple order.