mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08: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:
committed by
Marco Costalba
parent
1ceaea701b
commit
af7412e58a
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user