1
0
Fork 0

Update bestValue when futility pruning

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
sf_3_base
Marco Costalba 2012-11-26 16:13:36 +01:00
parent 55df3fa2d7
commit 5af8179647
1 changed files with 4 additions and 3 deletions

View File

@ -1217,9 +1217,7 @@ split_point_start: // At split points actual search starts from here
if (futilityValue < beta)
{
if (futilityValue > bestValue)
bestValue = futilityValue;
bestValue = std::max(bestValue, futilityValue);
continue;
}
@ -1227,7 +1225,10 @@ split_point_start: // At split points actual search starts from here
if ( futilityBase < beta
&& depth < DEPTH_ZERO
&& pos.see(move) <= 0)
{
bestValue = std::max(bestValue, futilityBase);
continue;
}
}
// Detect non-capture evasions that are candidate to be pruned