summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2026-10-05 22:20:58 -0700
committerScott Gasch <[email protected]>2026-10-05 22:20:58 -0700
commitc03e7de56b316f83592ec39ce098a204628009cf (patch)
tree2b71cb13ad2c15b4cd995ae8349ab6bfe8e9cf6c
parent36b6628fc7a7c481b3d00c3141a800d869c63dca (diff)
Remove dead ValueOfMaterialInTroubleAfterNull
Declared in chess.h, defined in dynamic.c, documented as the nullmove-pruning safety-net sibling of ValueOfMaterialInTroubleDespiteMove -- but it had zero call sites anywhere in the tree, only a comment in search.c describing what it was conceptually meant to catch. Nothing ever wired it in. Co-Authored-By: Claude Sonnet 5 <[email protected]>
-rwxr-xr-xsrc/chess.h3
-rw-r--r--src/dynamic.c39
-rw-r--r--src/search.c4
3 files changed, 2 insertions, 44 deletions
diff --git a/src/chess.h b/src/chess.h
index fde5c6f..b0be749 100755
--- a/src/chess.h
+++ b/src/chess.h
@@ -4006,9 +4006,6 @@ FindEnprisePiece(SEARCHER_THREAD_CONTEXT *ctx, ULONG uSide);
ULONG
ValueOfMaterialInTroubleDespiteMove(SEARCHER_THREAD_CONTEXT *ctx, ULONG uSide);
-ULONG
-ValueOfMaterialInTroubleAfterNull(SEARCHER_THREAD_CONTEXT *ctx, ULONG uSide);
-
//
// pawnhash.c
//
diff --git a/src/dynamic.c b/src/dynamic.c
index 2451fa6..b0bad91 100644
--- a/src/dynamic.c
+++ b/src/dynamic.c
@@ -665,45 +665,6 @@ Return value:
}
-ULONG
-ValueOfMaterialInTroubleAfterNull(SEARCHER_THREAD_CONTEXT *ctx, ULONG uSide)
-/**
-
-Routine description:
-
- Nullmove-pruning safety net: same as ValueOfMaterialInTroubleDespiteMove
- but with a looser threshold (any valid en prise hint counts, not
- just two) since this is guarding a cheaper, more speculative prune.
-
-Parameters:
-
- SEARCHER_THREAD_CONTEXT *ctx,
- ULONG uSide
-
-Return value:
-
- ULONG : material value in trouble, or 0
-
-**/
-{
- ULONG uPly = ctx->uPly;
- ULONG u = 0;
- COOR c;
-
- if (_EnpriseSlotValid(ctx, 0, uSide))
- {
- c = ctx->cEnprise[uPly][0];
- u = PIECE_VALUE(ctx->sPosition.rgSquare[c].pPiece);
- }
- if (_TrappedSlotValid(ctx, uSide))
- {
- c = ctx->cTrapped[uPly];
- u = MAXU(u, PIECE_VALUE(ctx->sPosition.rgSquare[c].pPiece));
- }
- return u;
-}
-
-
static void
_IncrementMoveHistoryCounter(MOVE mv,
ULONG uDepth)
diff --git a/src/search.c b/src/search.c
index e6249b0..c434f48 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2131,8 +2131,8 @@ Search(IN SEARCHER_THREAD_CONTEXT *ctx,
// number of example FENs per bucket (same "capped FEN
// sampler" idea as eval.c's MARGINSAFETY_EXCEEDED logging)
// so these can be inspected by hand for genuine zugzwang
- // our TotalNonPawnCount/ValueOfMaterialInTroubleAfterNull
- // safety net is missing, vs. ordinary search noise.
+ // our TotalNonPawnCount safety net is missing, vs. ordinary
+ // search noise.
static ULONG uFalsePositiveFenSamples[NC_TOTAL_BUCKETS];
if (uFalsePositiveFenSamples[uNullCalibBucket] < 5)
{