Skip to content
Permalink
Browse files

Enable futility pruning for PV nodes in qsearch

STC:

LLR: 4.20 (-2.94,2.94) [-3.00,1.00]
Total: 85573 W: 17195 L: 17125 D: 51253

LTC:

LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 43385 W: 7298 L: 7214 D: 28873

Bench: 8080602

Resolves official-stockfish#206
  • Loading branch information...
lucasart authored and zamar committed Jan 14, 2015
1 parent 4abe333 commit ab276357d7dea388a81ea75f9b7d89670cf4fcf0
Showing with 4 additions and 6 deletions.
  1. +4 −6 src/search.cpp
@@ -1209,8 +1209,7 @@ namespace {
: pos.gives_check(move, ci);

// Futility pruning
if ( !PvNode
&& !InCheck
if ( !InCheck
&& !givesCheck
&& futilityBase > -VALUE_KNOWN_WIN
&& !pos.advanced_pawn_push(move))
@@ -1219,13 +1218,13 @@ namespace {

futilityValue = futilityBase + PieceValue[EG][pos.piece_on(to_sq(move))];

if (futilityValue < beta)
if (futilityValue <= alpha)
{
bestValue = std::max(bestValue, futilityValue);
continue;
}

if (futilityBase < beta && pos.see(move) <= VALUE_ZERO)
if (futilityBase <= alpha && pos.see(move) <= VALUE_ZERO)
{
bestValue = std::max(bestValue, futilityBase);
continue;
@@ -1239,8 +1238,7 @@ namespace {
&& !pos.can_castle(pos.side_to_move());

// Don't search moves with negative SEE values
if ( !PvNode
&& (!InCheck || evasionPrunable)
if ( (!InCheck || evasionPrunable)
&& type_of(move) != PROMOTION
&& pos.see_sign(move) < VALUE_ZERO)
continue;

0 comments on commit ab27635

Please sign in to comment.
You can’t perform that action at this time.