summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2026-10-14 12:19:02 -0700
committerScott Gasch <[email protected]>2026-10-14 12:19:02 -0700
commit78a5ea00ec507164e1cfc7fd12846e1b05d78e7e (patch)
tree4c35bc24c59fdc5f30389db371b732da3b376d70
parentac5cc078b71e94b21a8a843628045c745022aa75 (diff)
Remove PRUNE_LIVE -- never wired to anything, and separately broken
PRUNE_LIVE=<K> was meant to actually prune moves below a predicted-FH threshold for branching-factor measurement, but PruneLivePredict (the macro alias for search.c's PruneVerifyPredict) was never called from anywhere -- confirmed by grep: its only two references in the file are its own #define and declaration. The wiring to make PRUNE_LIVE=<K> actually prune a move was never written, so this flag has done nothing even in builds where it compiled. It also didn't compile on its own: PruneVerifyPredict returns g_uJointFHThousandths[...]'s element as ULONG, but that array is declared USHORT in data.c (confirmed pre-existing in the prior PRUNE_VERIFY-removal commit, unrelated to that change). Removed the entire #ifdef PRUNE_LIVE block in search.c (verified every symbol inside it -- ShipDepthBucketPublic, JOINT_TABLE_SENTINEL_PUBLIC, ShipLateBucketPublic, PruneVerifyPredict, PRUNE_LIVE_SENTINEL, PruneLivePredict -- has no consumer anywhere outside that block) and GNUmakefile's flag wiring, leaving an explanatory comment. Verified: standard profile builds clean, precommit_check.sh passes. Co-Authored-By: Claude Sonnet 5 <[email protected]>
-rw-r--r--src/GNUmakefile23
-rw-r--r--src/search.c53
2 files changed, 10 insertions, 66 deletions
diff --git a/src/GNUmakefile b/src/GNUmakefile
index c625fa6..49582a5 100644
--- a/src/GNUmakefile
+++ b/src/GNUmakefile
@@ -253,15 +253,16 @@ endif
# removed rather than fixed since reconstructing its intended semantics
# from scratch would be inventing behavior, not restoring it.
-# 2026-10-03: PRUNE_LIVE=<K> -- actually prune any gate-1-eligible move
-# whose 4D-table predicted FH% (Wilson upper bound, see data.c) is <= K
-# thousandths of a percent. Measurement vehicle for "what does pruning
-# N% of moves do to the branching factor", used with the C/r sweep in
-# /tmp/typhoon/cr_measure. NOT a shipping mechanism: it has none of the
-# agreed safety furniture (no dynamic per-move-identity veto, no
-# ShouldLatePrune move-count floor, no shadow verification) -- those are
-# what a real deep-prune gate needs. Measure with it, do not play with
-# it.
+# 2026-10-03: PRUNE_LIVE=<K> was removed (2026-10-14): PruneLivePredict/
+# PRUNE_LIVE_SENTINEL (search.c) were never actually called from
+# anywhere, under any flag -- the wiring to make PRUNE_LIVE=<K> actually
+# prune a move was never written, so this flag has never done anything
+# even when it compiled. It also didn't compile: PruneVerifyPredict
+# (the function PruneLivePredict aliased to) returns
+# g_uJointFHThousandths[...]'s element as ULONG, but that array is
+# declared USHORT in data.c -- confirmed pre-existing, unrelated to
+# PRUNE_VERIFY's own removal above. Dead on every axis; removed rather
+# than fixed for the same reason as PRUNE_VERIFY.
# 2026-10-03: DISABLE_LMR -- GetLMRReduction returns 0 unconditionally,
# so no move is ever reduced. Exists for ONE experiment: what is LMR
# actually worth in this engine? The time-odds calibration established
@@ -279,10 +280,6 @@ ifdef DISABLE_LMR
PROFILE += -DDISABLE_LMR
endif
-ifdef PRUNE_LIVE
-PROFILE += -DPRUNE_LIVE=$(PRUNE_LIVE)
-endif
-
# 2026-10-13: override search.c's NULLMOVE_SKIP_FH_CEILING_THOUSANDTHS
# default (300, validated -- see search.c's own comment) from the
# command line for sweeping, e.g. `gmake ... NULLMOVE_SKIP_CEILING=1000`
diff --git a/src/search.c b/src/search.c
index 7c623fe..2d87035 100644
--- a/src/search.c
+++ b/src/search.c
@@ -108,59 +108,6 @@ extern FLAG g_fCanSplit[MAX_PLY_PER_SEARCH];
// from here unchanged in behavior, just by their new (un-underscored)
// public names.
-#ifdef PRUNE_LIVE
-// Mirror of searchsup.c's file-static _ShipDepthBucket. Duplicated
-// rather than exported because this is calibration-only code that
-// should leave no trace in a normal build; if PRUNE_LIVE ever
-// graduates to something permanent, hoist the real one into chess.h
-// instead of keeping two copies.
-static ULONG
-ShipDepthBucketPublic(ULONG uRawDepthBucket)
-{
- if (uRawDepthBucket <= 9) return uRawDepthBucket;
- if (uRawDepthBucket <= 13) return 10;
- return 11;
-}
-#define JOINT_TABLE_SENTINEL_PUBLIC (0xFFFF)
-
-static ULONG
-ShipLateBucketPublic(ULONG uRawLateBucket)
-{
- if ((uRawLateBucket >= 2) && (uRawLateBucket <= 13)) return uRawLateBucket - 2;
- if (uRawLateBucket <= 21) return 12;
- if (uRawLateBucket <= 31) return 13;
- return 14;
-}
-
-// _JointTablePredictedFHThousandths (searchsup.c, declared in chess.h)
-// is called directly from this file's hoisted per-move lookup block
-// below -- no local mirror, unlike ShipDepthBucketPublic/
-// ShipLateBucketPublic above, which really do need file-local
-// standalone copies (see that function's own note on why).
-
-#define PRUNE_LIVE_SENTINEL JOINT_TABLE_SENTINEL_PUBLIC
-#define PruneLivePredict PruneVerifyPredict
-static ULONG
-PruneVerifyPredict(IN SEARCHER_THREAD_CONTEXT *ctx, IN MOVE mv,
- IN ULONG uMoveNum, IN ULONG uLegalMoves,
- IN SCORE iAlpha, IN SCORE iEval, IN ULONG uDepth,
- IN BITBOARD bbMinor[2], IN BITBOARD bbRook[2],
- OUT ULONG *puShipDepth)
-{
- SCORE iHangCp = EstimateHangingMaterialCp(ctx, mv, uMoveNum, bbMinor, bbRook);
- ULONG uDumb = HangCpBucket(iHangCp);
- ULONG uShipD = ShipDepthBucketPublic(DepthBucket(uDepth / ONE_PLY));
-
- *puShipDepth = uShipD;
- if (1 == uDumb)
- {
- return JOINT_TABLE_SENTINEL_PUBLIC;
- }
- return g_uJointFHThousandths[uShipD][uDumb]
- [GapCpBucket((SCORE)(iAlpha - iEval))]
- [ShipLateBucketPublic(MoveNumBucket(uLegalMoves))];
-}
-#endif
#ifdef JOINT_EXTRA_VERIFY
// 2026-09-28: buckets the FULLY (base + extra) reduced search's actual