summaryrefslogtreecommitdiff
path: root/src/eval_tune/extract_king_features.py
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2026-09-15 13:31:36 -0700
committerScott Gasch <[email protected]>2026-09-15 13:31:36 -0700
commit390e675849ff42c8b7e1806f75552de988741fff (patch)
tree17b8792aeaf74373bbaef3bac6b71bb5c0d74c69 /src/eval_tune/extract_king_features.py
parentca73728f7dbf01c4b39c7496729f81b1fbffa00b (diff)
Rewrite _EvalKing as a linear ring-scan and promote its terms to DNA-tunable constants; retune via mate-mining regression, ElasticNet/Ridge, and logistic-vs-material refits.
Splits _EvalKing's own king-location table from CountKingSafetyDefects' search-gate copy so future eval retunes can't silently perturb extension/reduction gate frequency. Bumps KING_BACK_FLIGHT_BONUS (+1 -> +3) and reorders/nudges the ring-scan sub-terms (minor/pawn/xray/undefended) to match relative rankings that replicated across three independent calibration methods, while leaving KING_QUEEN_PROXIMITY_DANGER and KING_MISSING_ONE_CASTLE_OPTION untouched pending further discussion. Self-play (640 games) is roughly even (score 0.509, llr=+0.17, far from either SPRT bound) but consistently faster (nps candidate=1362140 vs head=1333682) at equal average depth -- landing as a wash/speed-neutral checkpoint, not a confirmed tactical improvement, for further tuning to build on. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Diffstat (limited to 'src/eval_tune/extract_king_features.py')
-rw-r--r--src/eval_tune/extract_king_features.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eval_tune/extract_king_features.py b/src/eval_tune/extract_king_features.py
index 509f823..08d39fa 100644
--- a/src/eval_tune/extract_king_features.py
+++ b/src/eval_tune/extract_king_features.py
@@ -167,7 +167,7 @@ def main():
print(f"All shards done in {time.time() - t0:.1f}s", file=sys.stderr)
- base_cols = ["label", "mated_color_or_sampled_color", "n_back",
+ base_cols = ["fen", "label", "mated_color_or_sampled_color", "n_back",
"game_index", "control_source"]
fieldnames = base_cols + FEATURE_KEYS