mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53: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:
parent
1ceaea701b
commit
af7412e58a
1 changed files with 1 additions and 1 deletions
|
@ -721,7 +721,7 @@ namespace {
|
||||||
&& eval + razor_margin[depth / ONE_PLY] <= alpha)
|
&& eval + razor_margin[depth / ONE_PLY] <= alpha)
|
||||||
{
|
{
|
||||||
if (depth <= ONE_PLY)
|
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 ralpha = alpha - razor_margin[depth / ONE_PLY];
|
||||||
Value v = qsearch<NonPV, false>(pos, ss, ralpha, ralpha+1);
|
Value v = qsearch<NonPV, false>(pos, ss, ralpha, ralpha+1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue