From: Joost VandeVondele Date: Sun, 25 Dec 2016 09:34:48 +0000 (+0100) Subject: Explicitly use alpha+1 for beta in NonPV search (#939) X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=af7412e58a4ce374b5035d9bb1e8c47a108ff352;hp=1ceaea701baaa79f378b0842ff0fb5d2a1f53ef7 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. --- 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);