From 20169a43e82fefc2011596f3243be7d8595b4b0c Mon Sep 17 00:00:00 2001 From: Michael Chaly Date: Fri, 29 Mar 2024 00:17:37 +0300 Subject: [PATCH] bench 1772608 --- src/search.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index e1508a7f06d..6cc804e8a14 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -991,12 +991,18 @@ Value Search::Worker::search( lmrDepth += history / 5637; + Value futilityValue = ss->staticEval + (bestValue < ss->staticEval - 59 ? 141 : 58) + + 125 * lmrDepth; + // Futility pruning: parent node (~13 Elo) if (!ss->inCheck && lmrDepth < 15 - && ss->staticEval + (bestValue < ss->staticEval - 59 ? 141 : 58) - + 125 * lmrDepth + && futilityValue <= alpha) + { + if (bestValue <= futilityValue && abs(bestValue) < VALUE_TB_WIN_IN_MAX_PLY && futilityValue < VALUE_TB_WIN_IN_MAX_PLY) + bestValue = (bestValue + futilityValue * 3) / 4; continue; + } lmrDepth = std::max(lmrDepth, 0);