summaryrefslogtreecommitdiff
path: root/src/chess.h
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2026-08-28 21:31:52 -0700
committerScott Gasch <[email protected]>2026-08-28 21:31:52 -0700
commitbc8a3fddb01a3708be54e1b5453cbd13c7afaaeb (patch)
tree654a568490f19ebf0f3c14bb272ef374f2197d3f /src/chess.h
parentbb07fbd8612dbf2cfb6f257e8cba47b95c83c867 (diff)
Replace SEARCH_SORT_LIMIT's ply-indexed leftover-selection budget with
NumLeftoverMovesToSelect, indexed by remaining depth; make EFP's leftover-only scope explicit. SEARCH_SORT_LIMIT[ply] was a poor proxy for what actually matters here -- how large the remaining subtree below this node is. Distance from root only correlates with that when total search depth is roughly fixed; it says nothing once extensions/reductions/iterative-deepening are in play. NumLeftoverMovesToSelect(ctx, uDepth) uses remaining depth instead, only ever consulted once every high-performer move (winning/ even capture, killer, killer-mate -- anything >= GOOD_MOVE) has already been exhausted; this never limits how many of *those* get selected, only how much further care to spend on the ordinary/leftover tail. Table values carried over verbatim from the old one as an untuned starting point, just reindexed. Also adds an explicit (TRUE == fInLeftovers) gate to EFP's per-move checklist (landed last commit) -- every high-performer move was already excluded as a side effect of the capture/check/killer exemptions, but this makes "EFP only ever touches leftovers" a real, direct condition rather than an emergent property of unrelated checks. Verified against HEAD (commit bb07fbd) at sd10: ecm_ringers: 9/11 -> 10/11 (+1 solve), ~flat nodes (-0.04%) ecm_confident_quick: 88/90 -> 88/90 (even), +0.43% nodes ecm_hard_quick: 15/90 -> 18/90 (+3 solves), +4.4% nodes Net +4 solves across 269 positions for a negligible node-count cost.
Diffstat (limited to 'src/chess.h')
-rwxr-xr-xsrc/chess.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/chess.h b/src/chess.h
index 9722414..6cd2d7a 100755
--- a/src/chess.h
+++ b/src/chess.h
@@ -1900,7 +1900,6 @@ extern VECTOR_DELTA g_VectorDelta[256];
extern VECTOR_DELTA *g_pVectorDelta;
extern CHAR g_SwapTable[14][32][32];
extern SCORE _PSQT[14][128];
-extern ULONG g_uSearchSortLimits[];
extern MOVE NULLMOVE;
extern MOVE HASHMOVE;
extern MOVE RECOGNMOVE;
@@ -1931,17 +1930,8 @@ InitializeSwapTable(void);
void
InitializeDistanceTable(void);
-void
-InitializeSearchDepthArray(void);
-
ULONG
-GetSearchSortLimit(ULONG);
-
-#ifdef DEBUG
-#define SEARCH_SORT_LIMIT(x) (GetSearchSortLimit((x)))
-#else
-#define SEARCH_SORT_LIMIT(x) (g_uSearchSortLimits[(x)])
-#endif
+NumLeftoverMovesToSelect(SEARCHER_THREAD_CONTEXT *ctx, ULONG uDepth);
#ifdef DEBUG
ULONG CheckVectorWithIndex(int i, ULONG uColor);