Merge Lucas's "SEE pruning at PV nodes"
bench: 4922272
This commit is contained in:
commit
57b6df4874
|
@ -857,16 +857,14 @@ split_point_start: // At split points actual search starts from here
|
||||||
newDepth = depth - ONE_PLY + ext;
|
newDepth = depth - ONE_PLY + ext;
|
||||||
|
|
||||||
// Step 13. Futility pruning (is omitted in PV nodes)
|
// Step 13. Futility pruning (is omitted in PV nodes)
|
||||||
if ( !PvNode
|
if ( !captureOrPromotion
|
||||||
&& !captureOrPromotion
|
|
||||||
&& !inCheck
|
&& !inCheck
|
||||||
&& !dangerous
|
&& !dangerous
|
||||||
&& move != ttMove
|
&& move != ttMove)
|
||||||
&& (bestValue > VALUE_MATED_IN_MAX_PLY || ( bestValue == -VALUE_INFINITE
|
|
||||||
&& alpha > VALUE_MATED_IN_MAX_PLY)))
|
|
||||||
{
|
{
|
||||||
// Move count based pruning
|
// Move count based pruning
|
||||||
if ( depth < 16 * ONE_PLY
|
if ( !PvNode
|
||||||
|
&& depth < 16 * ONE_PLY
|
||||||
&& moveCount >= FutilityMoveCounts[depth]
|
&& moveCount >= FutilityMoveCounts[depth]
|
||||||
&& (!threatMove || !refutes(pos, move, threatMove)))
|
&& (!threatMove || !refutes(pos, move, threatMove)))
|
||||||
{
|
{
|
||||||
|
@ -883,7 +881,7 @@ split_point_start: // At split points actual search starts from here
|
||||||
futilityValue = ss->staticEval + ss->evalMargin + futility_margin(predictedDepth, moveCount)
|
futilityValue = ss->staticEval + ss->evalMargin + futility_margin(predictedDepth, moveCount)
|
||||||
+ Gain[pos.piece_moved(move)][to_sq(move)];
|
+ Gain[pos.piece_moved(move)][to_sq(move)];
|
||||||
|
|
||||||
if (futilityValue < beta)
|
if (!PvNode && futilityValue < beta)
|
||||||
{
|
{
|
||||||
if (SpNode)
|
if (SpNode)
|
||||||
sp->mutex.lock();
|
sp->mutex.lock();
|
||||||
|
|
Loading…
Reference in a new issue