File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -643,10 +643,10 @@ namespace {
643643 && !ss->skipNullMove
644644 && depth < 4 * ONE_PLY
645645 && !inCheck
646- && eval - FutilityMargins[depth][0 ] >= beta
646+ && eval - FutilityMargins[depth][(ss- 1 )-> futMc ] >= beta
647647 && abs (beta) < VALUE_MATE_IN_MAX_PLY
648648 && pos.non_pawn_material (pos.side_to_move ()))
649- return eval - FutilityMargins[depth][0 ];
649+ return eval - FutilityMargins[depth][(ss- 1 )-> futMc ];
650650
651651 // Step 8. Null move search with verification search (is omitted in PV nodes)
652652 if ( !PvNode
@@ -852,6 +852,8 @@ namespace {
852852 // Update current move (this must be done after singular extension search)
853853 newDepth = depth - ONE_PLY + ext;
854854
855+ ss->futMc = 0 ;
856+
855857 // Step 13. Futility pruning (is omitted in PV nodes)
856858 if ( !PvNode
857859 && !captureOrPromotion
@@ -874,6 +876,8 @@ namespace {
874876 // Value based pruning
875877 // We illogically ignore reduction condition depth >= 3*ONE_PLY for predicted depth,
876878 // but fixing this made program slightly weaker.
879+ ss->futMc = moveCount;
880+
877881 Depth predictedDepth = newDepth - reduction<PvNode>(depth, moveCount);
878882 futilityValue = ss->staticEval + ss->evalMargin + futility_margin (predictedDepth, moveCount)
879883 + Gain[pos.piece_moved (move)][to_sq (move)];
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ struct Stack {
4747 Value staticEval;
4848 Value evalMargin;
4949 int skipNullMove;
50+ int futMc;
5051};
5152
5253
You can’t perform that action at this time.
0 commit comments