mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 01:27:16 +08:00
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 #206
This commit is contained in:
@@ -1209,8 +1209,7 @@ moves_loop: // When in check and at SpNode search starts from here
|
|||||||
: pos.gives_check(move, ci);
|
: pos.gives_check(move, ci);
|
||||||
|
|
||||||
// Futility pruning
|
// Futility pruning
|
||||||
if ( !PvNode
|
if ( !InCheck
|
||||||
&& !InCheck
|
|
||||||
&& !givesCheck
|
&& !givesCheck
|
||||||
&& futilityBase > -VALUE_KNOWN_WIN
|
&& futilityBase > -VALUE_KNOWN_WIN
|
||||||
&& !pos.advanced_pawn_push(move))
|
&& !pos.advanced_pawn_push(move))
|
||||||
@@ -1219,13 +1218,13 @@ moves_loop: // When in check and at SpNode search starts from here
|
|||||||
|
|
||||||
futilityValue = futilityBase + PieceValue[EG][pos.piece_on(to_sq(move))];
|
futilityValue = futilityBase + PieceValue[EG][pos.piece_on(to_sq(move))];
|
||||||
|
|
||||||
if (futilityValue < beta)
|
if (futilityValue <= alpha)
|
||||||
{
|
{
|
||||||
bestValue = std::max(bestValue, futilityValue);
|
bestValue = std::max(bestValue, futilityValue);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (futilityBase < beta && pos.see(move) <= VALUE_ZERO)
|
if (futilityBase <= alpha && pos.see(move) <= VALUE_ZERO)
|
||||||
{
|
{
|
||||||
bestValue = std::max(bestValue, futilityBase);
|
bestValue = std::max(bestValue, futilityBase);
|
||||||
continue;
|
continue;
|
||||||
@@ -1239,8 +1238,7 @@ moves_loop: // When in check and at SpNode search starts from here
|
|||||||
&& !pos.can_castle(pos.side_to_move());
|
&& !pos.can_castle(pos.side_to_move());
|
||||||
|
|
||||||
// Don't search moves with negative SEE values
|
// Don't search moves with negative SEE values
|
||||||
if ( !PvNode
|
if ( (!InCheck || evasionPrunable)
|
||||||
&& (!InCheck || evasionPrunable)
|
|
||||||
&& type_of(move) != PROMOTION
|
&& type_of(move) != PROMOTION
|
||||||
&& pos.see_sign(move) < VALUE_ZERO)
|
&& pos.see_sign(move) < VALUE_ZERO)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user