From be9982eb754fecea69c721b7dc6516742b5af538 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 28 Sep 2026 19:13:14 +0200 Subject: [PATCH] corrhist update on fail high | bench 1202015 --- source/search.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/search.cpp b/source/search.cpp index 5457a64..22901da 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -780,6 +780,12 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC UpdateCaptHist(seenCaptures[i], -captHistoryMalus); } + // Corrhist update on fail high + if (!ctx->excluded && !inCheck && currMove.IsQuiet() && score > staticEval) { + int corrHistBonus = std::clamp(score - staticEval, -CORRHIST_LIMIT, CORRHIST_LIMIT); + ctx->corrhist.UpdateAll(board, depth, corrHistBonus); + } + if (!ctx->excluded) ctx->TT->WriteEntry(board.hashKey, depth, score, CutNode, currMove, ttpv); return score; -- 2.47.3