diff options
| author | Scott Gasch <[email protected]> | 2026-10-14 12:19:02 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-10-14 12:19:02 -0700 |
| commit | 78a5ea00ec507164e1cfc7fd12846e1b05d78e7e (patch) | |
| tree | 4c35bc24c59fdc5f30389db371b732da3b376d70 /src/search.c | |
| parent | ac5cc078b71e94b21a8a843628045c745022aa75 (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]>
Diffstat (limited to 'src/search.c')
| -rw-r--r-- | src/search.c | 53 |
1 files changed, 0 insertions, 53 deletions
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 |
