From af7412e58a4ce374b5035d9bb1e8c47a108ff352 Mon Sep 17 00:00:00 2001 From: Joost VandeVondele Date: Sun, 25 Dec 2016 10:34:48 +0100 Subject: [PATCH] Explicitly use alpha+1 for beta in NonPV search (#939) Fixes the only exception, in razoring. The code already does assert(PvNode || (alpha == beta - 1)), and it can be verified by studying the program flow that this is indeed the case, also for the modified line. No functional change. --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index a17a7506..8089130e 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -721,7 +721,7 @@ namespace { && eval + razor_margin[depth / ONE_PLY] <= alpha) { if (depth <= ONE_PLY) - return qsearch(pos, ss, alpha, beta); + return qsearch(pos, ss, alpha, alpha+1); Value ralpha = alpha - razor_margin[depth / ONE_PLY]; Value v = qsearch(pos, ss, ralpha, ralpha+1); -- 2.39.2