Skip to content

Commit

Permalink
Bench: 28437178
Browse files Browse the repository at this point in the history
  • Loading branch information
TerjeKir committed Dec 27, 2024
1 parent 7608ca3 commit d878a2c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ static int AlphaBeta(Thread *thread, Stack *ss, int alpha, int beta, Depth depth
if (!isTerminal(ttScore) && TTScoreIsMoreInformative(ttBound, ttScore, eval))
eval = ttScore;

int evalCorrection = inCheck ? 0 : abs(eval - unadjustedEval);

// Improving if not in check, and current eval is higher than 2 plies ago
bool improving = !inCheck && eval > (ss-2)->staticEval;

Expand Down Expand Up @@ -550,6 +552,8 @@ static int AlphaBeta(Thread *thread, Stack *ss, int alpha, int beta, Depth depth
// Reduce more in cut nodes
r += 2 * cutnode;

r -= MIN(2, evalCorrection / 128);

// Depth after reductions, avoiding going straight to quiescence as well as extending
Depth lmrDepth = CLAMP(newDepth - r, 1, newDepth);

Expand Down

0 comments on commit d878a2c

Please sign in to comment.