X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=0e68178147c7b2cbba34845c89e57218e6ea9b86;hp=1fe895d3cf576e66e622a3767decd3eceac138a5;hb=289a767ab3a683a6f2aed74b738ceb87bb632466;hpb=4381ea23feb33831ebe889e30645e10cf7032530 diff --git a/src/search.cpp b/src/search.cpp index 1fe895d3..0e681781 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 - futility_margin(depth, (ss-1)->futilityMoveCount) >= beta && abs(beta) < VALUE_MATE_IN_MAX_PLY && pos.non_pawn_material(pos.side_to_move())) - return eval - FutilityMargins[depth][0]; + return eval - futility_margin(depth, (ss-1)->futilityMoveCount); // Step 8. Null move search with verification search (is omitted in PV nodes) if ( !PvNode @@ -806,6 +806,7 @@ split_point_start: // At split points actual search starts from here << " currmovenumber " << moveCount + PVIdx << sync_endl; } + ss->futilityMoveCount = 0; ext = DEPTH_ZERO; captureOrPromotion = pos.is_capture_or_promotion(move); givesCheck = pos.move_gives_check(move, ci); @@ -900,6 +901,10 @@ split_point_start: // At split points actual search starts from here continue; } + + // We have not pruned the move that will be searched, but remember how + // far in the move list we are to be more aggressive in the child node. + ss->futilityMoveCount = moveCount; } // Check for legality only before to do the move