X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=80ac9b20b26f351b196e8f55cc09c28d9b05c199;hb=8df17204f4469977604695e4ae5d63ae47a575ff;hp=055ee8778be9ac8bfb8beaed1b727b54784bdbbf;hpb=fe72c93141627c8109761da6546014a8d0461450;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 055ee877..80ac9b20 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -643,10 +643,10 @@ namespace { && !ss->skipNullMove && depth < 4 * ONE_PLY && !inCheck - && eval - FutilityMargins[depth][0] >= beta + && eval - FutilityMargins[depth][(ss-1)->futMc] >= beta && abs(beta) < VALUE_MATE_IN_MAX_PLY && 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) if ( !PvNode @@ -852,12 +852,14 @@ split_point_start: // At split points actual search starts from here // Update current move (this must be done after singular extension search) newDepth = depth - ONE_PLY + ext; + ss->futMc = 0; + // Step 13. Futility pruning (is omitted in PV nodes) if ( !PvNode && !captureOrPromotion && !inCheck && !dangerous - && move != ttMove + /* && move != ttMove Already implicit in the next condition */ && bestValue > VALUE_MATED_IN_MAX_PLY) { // Move count based pruning @@ -874,6 +876,8 @@ split_point_start: // At split points actual search starts from here // Value based pruning // We illogically ignore reduction condition depth >= 3*ONE_PLY for predicted depth, // but fixing this made program slightly weaker. + ss->futMc = moveCount; + Depth predictedDepth = newDepth - reduction(depth, moveCount); futilityValue = ss->staticEval + ss->evalMargin + futility_margin(predictedDepth, moveCount) + Gain[pos.piece_moved(move)][to_sq(move)];