1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

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.
This commit is contained in:
Joost VandeVondele 2016-12-25 10:34:48 +01:00 committed by Marco Costalba
parent 1ceaea701b
commit af7412e58a

View file

@ -721,7 +721,7 @@ namespace {
&& eval + razor_margin[depth / ONE_PLY] <= alpha)
{
if (depth <= ONE_PLY)
return qsearch<NonPV, false>(pos, ss, alpha, beta);
return qsearch<NonPV, false>(pos, ss, alpha, alpha+1);
Value ralpha = alpha - razor_margin[depth / ONE_PLY];
Value v = qsearch<NonPV, false>(pos, ss, ralpha, ralpha+1);