Skip to main content

Module dataset

Module dataset 

Source
Expand description

Shared, versioned position dataset for cross-engine benchmarks.

Port of benchmarks/dataset.py. Artifacts are JSON with a sha256 checksum over the canonical (sorted-key, compact-separator) encoding of the payload minus the checksum field — byte-compatible with the Python implementation, so datasets interoperate across languages. RNG streams differ from CPython, so generate with the same seed produces a different but equally valid dataset; the committed artifact is the shared one.

Constants§

GENERATOR
PHASES
Phase buckets by pieces placed (== plies from the empty board).
SCHEMA_VERSION

Functions§

checksum
sha256 over canonical JSON excluding the checksum field.
generate
Generate a deterministic benchmark dataset for requested phase counts.
load
Load a dataset artifact and verify its checksum.
phase_of
Return the phase bucket for a piece count.
save
Write a checksum-bearing JSON dataset artifact and return its checksum.