Skip to content

Add isolated Stockfish labels with consistent training target scaling - #6

Draft
arhancanli wants to merge 2 commits into
engine/macbook-continuous-20261005from
engine/teacher-labels-20261005
Draft

arhancanli wants to merge 2 commits into
engine/macbook-continuous-20261005from
engine/teacher-labels-20261005

Conversation

@arhancanli

@arhancanli arhancanli commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Self-play search targets can repeat the engine's tactical blind spots, but directly inserting Stockfish's normalized centipawns would also change the trainer's score calibration. Add an isolated teacher-label tool with explicit raw-cp audit and wdl expected-points modes. WDL encodes win plus half a draw through the inverse of the existing sigmoid400 target scale, while retaining raw scores for audit.

The legacy records omit castling, en-passant and repetition state. Uniform fresh-prefix sampling therefore admits only unambiguous irreversible-move positions. Each independent single-thread Stockfish search uses full strength and fresh root state. Labels keep score, WDL, depth, nodes and legal PV from one completed unbounded UCI iteration; interrupted final bounds remain separately auditable. Paired files preserve every byte except the White-relative score and remain outside live self-play. No model, engine default or champion is changed.

Validation: 53 controller and teacher tests pass, including 11 regressions covering omitted state, corrupt records, score/side conversion, bounds, interrupted iterations and WDL scaling. A supervised 18-core pilot labelled 4,096 frozen positions at 100k nodes each. Independent Rust decoding and real trainer decoding agree; 1,558 interrupted roots were recovered without resampling or changing the previous 2,538 exact labels. WDL reanalysis of all 4,096 boards reproduced every raw score exactly. The expected-points encoding agrees with real trainer decoding, with maximum target rounding error 0.000309. A selected one-million-node follow-up covered 59 positions: all 27 mating evaluations remained, eight best moves changed and three expected scores changed by at least 0.1. The 4,480-game strength checkpoint remained unchanged during the reserved 18-core run, and the normal supervisor resumed. GitHub CI passed c67449c, including release workspace/perft/SPRT calibration, WebAssembly and all 52 Python tests. The sampler follow-up 7795cd2 removes the eager candidate-index allocation, rejects duplicate accepted offsets and passes CI with 53 Python tests; teacher scoring and WDL conversion are unchanged.

This is a conditional data-quality experiment, not proof of playing strength. WDL models Stockfish self-play under its reference conditions. Before model comparison, use grouped held-out board/side splits and identical training rows/resources, then require a fresh prescribed strength gate. The existing larger-network experiment, search queue and 14-opponent milestone remain in place.

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