From f77c4c1fbdd543d7bf2eb1b4aee0f1bcf2893cab Mon Sep 17 00:00:00 2001 From: rektdie Date: Thu, 1 Oct 2026 22:47:27 +0200 Subject: [PATCH] when moveseen = 0, returning alpha in case of excluded move | bench 1293332 --- source/search.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/search.cpp b/source/search.cpp index efb434a..c04003e 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -798,11 +798,8 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC } if (moveSeen == 0) { - if (inCheck) { // checkmate - return -MATE_SCORE + ply; - } else { // stalemate - return 0; - } + if (ctx->excluded) return alpha; + return inCheck ? -MATE_SCORE + ply : 0; } if (searchStopped.load(std::memory_order_relaxed)) return 0; -- 2.47.3