mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
More aggressive post-futility pruning
This commit is contained in:
@@ -643,10 +643,10 @@ namespace {
|
|||||||
&& !ss->skipNullMove
|
&& !ss->skipNullMove
|
||||||
&& depth < 4 * ONE_PLY
|
&& depth < 4 * ONE_PLY
|
||||||
&& !inCheck
|
&& !inCheck
|
||||||
&& eval - FutilityMargins[depth][0] >= beta
|
&& eval - FutilityMargins[depth][(ss-1)->futMc] >= beta
|
||||||
&& abs(beta) < VALUE_MATE_IN_MAX_PLY
|
&& abs(beta) < VALUE_MATE_IN_MAX_PLY
|
||||||
&& pos.non_pawn_material(pos.side_to_move()))
|
&& pos.non_pawn_material(pos.side_to_move()))
|
||||||
return eval - FutilityMargins[depth][0];
|
return eval - FutilityMargins[depth][(ss-1)->futMc];
|
||||||
|
|
||||||
// Step 8. Null move search with verification search (is omitted in PV nodes)
|
// Step 8. Null move search with verification search (is omitted in PV nodes)
|
||||||
if ( !PvNode
|
if ( !PvNode
|
||||||
@@ -852,6 +852,8 @@ split_point_start: // At split points actual search starts from here
|
|||||||
// Update current move (this must be done after singular extension search)
|
// Update current move (this must be done after singular extension search)
|
||||||
newDepth = depth - ONE_PLY + ext;
|
newDepth = depth - ONE_PLY + ext;
|
||||||
|
|
||||||
|
ss->futMc = 0;
|
||||||
|
|
||||||
// Step 13. Futility pruning (is omitted in PV nodes)
|
// Step 13. Futility pruning (is omitted in PV nodes)
|
||||||
if ( !PvNode
|
if ( !PvNode
|
||||||
&& !captureOrPromotion
|
&& !captureOrPromotion
|
||||||
@@ -874,6 +876,8 @@ split_point_start: // At split points actual search starts from here
|
|||||||
// Value based pruning
|
// Value based pruning
|
||||||
// We illogically ignore reduction condition depth >= 3*ONE_PLY for predicted depth,
|
// We illogically ignore reduction condition depth >= 3*ONE_PLY for predicted depth,
|
||||||
// but fixing this made program slightly weaker.
|
// but fixing this made program slightly weaker.
|
||||||
|
ss->futMc = moveCount;
|
||||||
|
|
||||||
Depth predictedDepth = newDepth - reduction<PvNode>(depth, moveCount);
|
Depth predictedDepth = newDepth - reduction<PvNode>(depth, moveCount);
|
||||||
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)];
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ struct Stack {
|
|||||||
Value staticEval;
|
Value staticEval;
|
||||||
Value evalMargin;
|
Value evalMargin;
|
||||||
int skipNullMove;
|
int skipNullMove;
|
||||||
|
int futMc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user