diff options
| author | Scott Gasch <[email protected]> | 2026-09-04 01:03:00 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-09-04 01:03:00 -0700 |
| commit | 5c8d794782d3be6368dbba613ef129b11d878d97 (patch) | |
| tree | bd43bd7c72aa32a4c99001147416e503142a7590 /src/searchsup.c | |
| parent | dddcaa09ad12f1972a3128748b5d90d22f9a9326 (diff) | |
Fix passed-pawn bitboard bit-clear bug, LMR gate coupling, inline hot bitboard helpers
- bitboard.c: CoorFromBitBoardRank1ToRank8 cleared the lowest set bit
unconditionally instead of the reported (highest) one, silently
mis-walking doubled-pawn files in eval.c's passed-pawn detection.
- search.c/searchsup.c: move GetLMRReduction's precondition checks from
inside the function to the caller in search.c (pre-existing work),
finishing the split with a matching gate in split.c's HelpSearch --
the parallel-search call site had no gate at all, letting it call
GetLMRReduction unconditionally (including for checking moves),
reachable only under real multithreading (--cpus > 1) and the
intermittent root cause of assertion crashes seen under --cpus 4.
- eval.c: redirect CountBits/CoorFromBitBoardRank8ToRank1/
CoorFromBitBoardRank1ToRank8 to inline compiler-builtin versions
(gated !CROUTINES) instead of the real out-of-line asm calls, on
eval.c's ~20 existing production call sites. CountBits' asm body
isn't O(1) popcnt, it's a Kernighan bit-clearing loop plus call
overhead, paid on every Eval() call.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Jntky4yGUTyQVaGCXms4F2
Diffstat (limited to 'src/searchsup.c')
| -rw-r--r-- | src/searchsup.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/searchsup.c b/src/searchsup.c index b79db3a..4e6a0ed 100644 --- a/src/searchsup.c +++ b/src/searchsup.c @@ -219,14 +219,7 @@ Return value: ASSERT(mv.uMove); ASSERT((uMoveNum > 0) || (uLegalMoves == 0)); - if ((uRemainingDepth >= TWO_PLY) && - (FALSE == ctx->sPlyInfo[ctx->uPly - 1].fPvNode) && - (uLegalMoves > 5) && - (0 == iExtend) && - (!IS_ESCAPING_CHECK(mv)) && - (!IS_CAPTURE_OR_PROMOTION(mv)) && - (!IS_CHECKING_MOVE(mv)) && - (!IS_SAME_MOVE(mv, ctx->mvKiller[ctx->uPly-1][0])) && + if ((!IS_SAME_MOVE(mv, ctx->mvKiller[ctx->uPly-1][0])) && (!IS_SAME_MOVE(mv, ctx->mvKiller[ctx->uPly-1][1])) && ((ctx->uPly < 3) || (!IS_SAME_MOVE(mv, ctx->mvKiller[ctx->uPly-3][0]) && @@ -234,9 +227,6 @@ Return value: (GetMoveFailHighPercentage(mv, NULL) <= 10)) { ASSERT(!InCheck(&ctx->sPosition, ctx->sPosition.uToMove)); - if (iImprovement <= 40) { - return(-(ONE_PLY + QUARTER_PLY)); - } return(-ONE_PLY); } return(0); |
