X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=6bdf255c3dafee03b8b2fff95536cc7a7405fba7;hp=438c2d6fe858d85e1c72f1ed37c0ec73b74f48ce;hb=156635749bfc9fc8e71aa8c44d7bd2cfe7a78457;hpb=2ef53ee368683d5aa62b028377b94efe961f18ac diff --git a/src/search.cpp b/src/search.cpp index 438c2d6f..6bdf255c 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -523,6 +523,7 @@ namespace { bestValue = -VALUE_INFINITE; ss->currentMove = threatMove = (ss+1)->excludedMove = bestMove = MOVE_NONE; ss->ply = (ss-1)->ply + 1; + ss->futilityMoveCount = 0; (ss+1)->skipNullMove = false; (ss+1)->reduction = DEPTH_ZERO; (ss+2)->killers[0] = (ss+2)->killers[1] = MOVE_NONE; @@ -645,6 +646,7 @@ namespace { && !inCheck && eval - futility_margin(depth, (ss-1)->futilityMoveCount) >= beta && abs(beta) < VALUE_MATE_IN_MAX_PLY + && abs(eval) < VALUE_KNOWN_WIN && pos.non_pawn_material(pos.side_to_move())) return eval - futility_margin(depth, (ss-1)->futilityMoveCount); @@ -806,7 +808,6 @@ 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); @@ -906,6 +907,8 @@ split_point_start: // At split points actual search starts from here // far in the move list we are to be more aggressive in the child node. ss->futilityMoveCount = moveCount; } + else + ss->futilityMoveCount = 0; // Check for legality only before to do the move if (!RootNode && !SpNode && !pos.pl_move_is_legal(move, ci.pinned))