In qsearch we should update the bestValue as we do
in case of futilityValue < beta, also when pruning
moves with non-positive see.
Spotted by Lucas Braesch
Bench:
5695710
if (futilityValue < beta)
{
if (futilityValue < beta)
{
- if (futilityValue > bestValue)
- bestValue = futilityValue;
-
+ bestValue = std::max(bestValue, futilityValue);
if ( futilityBase < beta
&& depth < DEPTH_ZERO
&& pos.see(move) <= 0)
if ( futilityBase < beta
&& depth < DEPTH_ZERO
&& pos.see(move) <= 0)
+ {
+ bestValue = std::max(bestValue, futilityBase);
}
// Detect non-capture evasions that are candidate to be pruned
}
// Detect non-capture evasions that are candidate to be pruned