From 40d67d101710631fd236d8b246ee10707d990c36 Mon Sep 17 00:00:00 2001 From: rektdie Date: Fri, 23 May 2025 14:49:22 +0200 Subject: [PATCH] fix in LMR | bench 5251927 --- source/search.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/search.cpp b/source/search.cpp index 84fa15e..4012606 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -342,7 +342,11 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC // First move (suspected PV node) if (!moveSeen) { // Full search - score = -PVS(copy, newDepth, -beta, -alpha, ply + 1, ctx, false).score; + if constexpr (isPV) { + score = -PVS(copy, newDepth, -beta, -alpha, ply + 1, ctx, false).score; + } else { + score = -PVS(copy, newDepth, -beta, -alpha, ply + 1, ctx, !cutnode).score; + } } else if (reductions) { // Null-window search with reductions score = -PVS(copy, newDepth - reductions, -alpha-1, -alpha, ply + 1, ctx, true).score;