diff options
| author | Scott Gasch <[email protected]> | 2026-09-13 23:18:07 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-09-13 23:18:07 -0700 |
| commit | 4ff9170fd96e3da049c747bf5215e908a94ff145 (patch) | |
| tree | 6c8e6f846b42518d84357bb3b83014feddc83202 /src/eval_tune/test_vs_head.sh | |
| parent | 78d1889fe38db1fd45b58509c8b3bd535ce691b7 (diff) | |
Add king-safety mate-mining regression pipeline; retune file-storm/
queen-proximity king-safety weights and add a back-flight bonus from it.
Mines real human-game checkmates and matched sound-draw controls
(eval_tune/mine_king_mates.py, shard_mine.py, extract_king_features.py,
match_controls.py, train_king_safety_model.py), then fits a logistic
regression against _EvalKing's raw per-defect breakdown (engine-side
support: chess.h's KING_DEFECT_DUMP_INFO, eval.c's KING_DEFECT_DUMP
instrumentation, command.c's evalkingdump command, all gated behind the
KING_DEFECT_DUMP=1 build flag) to see which defects actually predict
getting mated. See eval_tune/king_safety_data/HANDOFF.md for the full
methodology and findings.
Two rounds of retuning landed from this data so far, both validated via
sd10 curated-suite comparison plus per-position Crafty corroboration
(tests/ECM.md) and gated self-play:
- KingFileDefects/KingStormingPawnDefects (_ComputeFileStormDefects)
bumped ~1.75-2x relative to the rest of the ring-scan defects -- the
regression's most dominant, most stable tier-1 predictors, previously
weighted the same as every other hand-picked defect.
- KING_QUEEN_PROXIMITY_DANGER rescaled from -8/count to -32/count, and
a new KING_BACK_FLIGHT_BONUS (+1/square) term added for empty,
unattacked ring squares on the side of the king away from the
attacker -- a real, non-collinear protective signal the current
EmptyUnattackedSquare table didn't credit at all. Both calibrated by
unstandardizing the regression's coefficients and anchoring against
KING_MISSING_ONE_CASTLE_OPTION's already-live -23 value (same
direct-EVAL_TERM unit family).
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01P9EDZVcqu6E2bNRm4zDrTf
Diffstat (limited to 'src/eval_tune/test_vs_head.sh')
| -rwxr-xr-x | src/eval_tune/test_vs_head.sh | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/eval_tune/test_vs_head.sh b/src/eval_tune/test_vs_head.sh index d5d8006..871b801 100755 --- a/src/eval_tune/test_vs_head.sh +++ b/src/eval_tune/test_vs_head.sh @@ -1,11 +1,19 @@ #!/usr/bin/env bash -python3 ./match_play.py ../../head_reference/typhoon ../typhoon \ - --pgn ../../pgn/twic_filtered.pgn \ - --games 20000 \ - --workers 12 \ - --st 1 \ - --sprt --elo0 0 --elo1 5 \ - --scratch /usr/local/tmp/typhoon_match_overnight \ - --log overnight_match.log \ - --pgn-out ../self_play_games.pgn +set -e + +CANDIDATE=/tmp/typhoon/typhoon_match_play_candidate +HEAD=../../head_reference/typhoon + +cp -f ../typhoon ${CANDIDATE} +python3 ./match_play.py \ + ${HEAD} \ + ${CANDIDATE} \ + --pgn ../../pgn/twic_filtered.pgn \ + --games 20000 \ + --workers 12 \ + --st 1 \ + --sprt --elo0 0 --elo1 5 \ + --scratch /usr/local/tmp/typhoon_match_overnight \ + --log overnight_match.log \ + --pgn-out ../self_play_games.pgn |
