diff options
| author | Scott Gasch <[email protected]> | 2026-09-15 23:17:33 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-09-15 23:17:33 -0700 |
| commit | c0ac3d7845f60c7f6f2c3bfc306ceb0e4ac045ba (patch) | |
| tree | e2b7427e212bd5b557f15131b815517a86b20486 /src/generate.c | |
| parent | 0bb4ae3052cb8ff9ffcf951b3ef0e6f50a7efdfa (diff) | |
Rework check/pawn-push/recapture extension gating on real SEE (GetMoveSee, generalized from GetCheckSee), restrict LMR to leftover moves only, and tighten recapture's window back to 1x after measuring a 6.8x node blowup from sharing the wider window.
Head-to-head match at 1170 games confirms parity with the prior head (score=0.510, LLR still between bounds) -- landing as a neutral-or-better baseline rather than a regression.
Diffstat (limited to 'src/generate.c')
| -rw-r--r-- | src/generate.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/generate.c b/src/generate.c index a04b4c6..e3db067 100644 --- a/src/generate.c +++ b/src/generate.c @@ -4171,6 +4171,21 @@ Return value: pStack->mvf[u].bvFlags |= MVF_SEE_KNOWN | ((s >= 0) ? MVF_SEE_NONNEGATIVE : 0); } + else + { + // s > 0 here: the captured piece is worth strictly + // more than the piece making the capture. The real + // SEE(pos, mv) is mathematically guaranteed >= this + // material floor (the side to move can always stop + // the exchange right after this capture), so its + // sign is already known to be nonnegative without + // paying for the actual exchange walk -- avoids a + // later GetMoveSee() cache miss (and a redundant + // SEE() call) on exactly the most common "good + // capture" case. + pStack->mvf[u].bvFlags |= MVF_SEE_KNOWN | + MVF_SEE_NONNEGATIVE; + } if (s >= 0) { @@ -4384,7 +4399,15 @@ Return value: pStack->mvf[u].bvFlags |= MVF_SEE_KNOWN | ((s >= 0) ? MVF_SEE_NONNEGATIVE : 0); } - + else + { + // Same reasoning as _ScoreAllMoves' identical + // shortcut: s > 0 here is a guaranteed floor on the + // real SEE, so its sign is already known. + pStack->mvf[u].bvFlags |= MVF_SEE_KNOWN | + MVF_SEE_NONNEGATIVE; + } + if (s > 0) { // Winning captures: take with pieces before with king |
