diff options
| author | Scott Gasch <[email protected]> | 2026-10-25 09:55:30 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-10-25 09:55:30 -0700 |
| commit | 874ef0478078ef4eb436af7d2b68a353f61f4d70 (patch) | |
| tree | e9954c289393c64d88402beff04637b52732ca73 /src/docs/DEEPER_PRUNING.md | |
| parent | 5f901d737b17c5f99b6e456d6c0c7d5e3c093dc4 (diff) | |
Learned FH% logistic-regression model (alpha full, beta whole-node-only)
Replaces the data.c histogram tables (g_uJointFHThousandths/
g_uBetaFHThousandths and their _NNUE counterparts) with two quantized
logistic regressions as the default FH%-prediction mechanism under
FH_USE_REGRESSION_MODEL=1, trained against real collected search data
(fhcollect.c) per docs/REGRESSION.md.
Alpha side is a full per-move regression, validated against the old
table (0.119pp weighted mean deviation across 10,684 matched cells).
Beta side is whole-node-only (matching the old table's own scope --
no functionality lost), refit on the NO_MOVE population after an
earlier mixed-tier fit saturated and over-pruned; its skip threshold
(FH_BETA_SKIP_THRESHOLD=99000) was confirmed by direct self-play
sweeps, not just ECM solve-count intuition (see docs/REGRESSION.md's
"Category A vs B" discussion).
Gated by an overnight SPRT match (regression vs HEAD tables, same
NNUE eval, sd8): at 4120 games, llr=+2.53 (never dipped negative,
peaked +2.8), score=0.517, candidate reaching comparable depth at
higher nps/ebf than head. Did not cross the H1=+2.94 SPRT bound, but
the trend across the full run is unambiguous and the marginal value of
waiting out the remaining games was judged not worth it.
The data.c tables are left in place as the inactive #else branch of
FH_USE_REGRESSION_MODEL for now; a follow-up commit will flip the
build default and remove them once this commit's head_reference
baseline and ECM numbers are recorded.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Diffstat (limited to 'src/docs/DEEPER_PRUNING.md')
| -rw-r--r-- | src/docs/DEEPER_PRUNING.md | 54 |
1 files changed, 32 insertions, 22 deletions
diff --git a/src/docs/DEEPER_PRUNING.md b/src/docs/DEEPER_PRUNING.md index e71cf21..fbb8599 100644 --- a/src/docs/DEEPER_PRUNING.md +++ b/src/docs/DEEPER_PRUNING.md @@ -320,6 +320,9 @@ if this motivates code changes. by the ~34% exempt-population measurement above: Crafty/Stockfish don't carve out an exempt tier at all, their reduction formulas just naturally taper to near-zero for early/good moves. + + #10 (below) is a precondition to doing this well. + - **#10 -- Apply the existing FH-rate evidence-calibration methodology to the *exempted* population, not just the leftover one.** Unknown whether the ~34% exempt moves are uniformly safe to leave untouched, @@ -327,6 +330,10 @@ if this motivates code changes. as opposed to hash-move/good-capture) would tolerate #9's light reduction without a solve-rate cost. Needs the same per-node exemption-reason tagging #9 depends on before picking a formula. + + We are collecting data for a regression model to predict any move + or whole node's fail high probabilty to enable #9 (above). + - **#11 -- Guard against "deterministic re-pruning" / horizon blindness from repeated reduction across iterative-deepening iterations (Scott, 2026-10-23).** The concern: if a move is @@ -534,6 +541,13 @@ corrected methodology: stay near the existing ~0.4% baseline, or does it jump specifically in the newly-added magnitude band?), then step 3/4. +UPDATE: 2026-10-24: Increased magnitude LMR reductions on fIsLeftoverMove +moves was designed (reduction magnitudes proportional to the predicted +FH% of the move, Wilson bound overriding), play-tested (llr=~+1 over +2k games -- not enough better to prove a 5 elo hypothesis but consistently +positive llr over the entire test and likely not weaker), and committed +and pushed to head_reference today. + ### 2. Reinstate a cheap, unconditional move-level futility skip (EFP) `searchsup.c:1094` documents that EFP ("extended futility pruning," a @@ -551,6 +565,16 @@ this specific population would have had (useful data even though you're accepting it), then step 3/4, then step 5 since this is unambiguously Category B. +Note from Scott: I really do like the cleanliness of using the FH% +table (or, new regression model) to unify LMP and EFP. EFP is only +based on one feature signal: the gap between eval and alpha. Instead +of breaking it back out, we should first look hard at +uLMPStaticMaxPctThousandths[] in ShouldLatePrune. This is designed to +prune liberally at low depths (specifically to replicate the behavior +and pruning rate of the old EFP) and also to prune with high remaining +depth but only when pretty confident that the move is indeed dumb and +useless. + ### 3. Loosen null-move pruning's R factor / depth floor `SelectNullmoveRFactor` and the `NULLMOVE_SKIP_FH_CEILING_THOUSANDTHS` @@ -856,26 +880,12 @@ direction" answer first. ### What's running right now, and what happens next -A self-play match is in flight (`eval_tune/test_vs_head.sh`, two -hand-built wrapper scripts since the script's own `NNUE_WEIGHTS=` -handling only NNUE-wraps the candidate side and this match needs NNUE -on both): `typhoon_baseline_nnue` (git HEAD `69525eb`, unmodified, i.e. -today's starting point, NNUE eval) vs. `typhoon_wilson_nnue` (HEAD + -everything in this section, NNUE eval), `--st 4`, `--elo0 0 --elo1 15`, -2000-game cap, label `nnue_pruning_check`. This answers: given the same -NNUE eval (the actual bottleneck motivating this whole investigation -- -NNUE runs at ~400-500K nps vs HCE's ~1.3M+, and "buy a faster CPU" isn't -an option), does today's more-aggressive reduction win or at least -break even against the pre-session baseline? +The self-play of deeper LMR reductions is finished, was slightly stronger, +got an extra ply deeper, and was committed and pushed to head reference +on 2026-10-24. + +Now a data collection run to train a linear regression model predicting +FH% for ALL moves given several features is being run. This will produce +two models (<alpha and >beta are separate, still) to replace the tables +in data.c and give us the ammunition to reduce non fIsLeftoverMove moves. -If it works out: commit, update `head_reference` (including its NNUE -subtree, which doesn't exist yet -- "we just merged the NNUE branch -today and didn't update head reference" per this session), then a -*second* match (NNUE-with-new-pruning vs. the HCE-at-HEAD reference, -same eval-architecture comparison this project already "knows" HCE -currently wins at `--st 4`) to answer the actual motivating question: -is the node-count saving from today's work enough to close any of the -gap against HCE's raw 3x speed advantage (observed ~3 full plies deeper -at `sd 4`), or at least move the needle. Then: revisit `IS_CAPTURE -(mvHash)`, node type, and the table-vs-correction-factor question above -with a real strength signal in hand instead of suite-solve-counts alone. |
