X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=66843515e4ddc332ddae523814fd52099d399533;hp=6a63fcaa338910a221d2770374faea8ead35f183;hb=a8e903c33a676decfcf5c721b6b4bfdb4102e5c0;hpb=b19ad4977c0ee427eeff9c11bd7c4da9210cd090 diff --git a/src/search.cpp b/src/search.cpp index 6a63fcaa..66843515 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1185,15 +1185,12 @@ moves_loop: // When in check, search starts from here update_capture_stats(pos, bestMove, capturesSearched, captureCount, stat_bonus(depth + ONE_PLY)); - // Extra penalty for a quiet TT move in previous ply when it gets refuted - if ((ss-1)->moveCount == 1 && !pos.captured_piece()) - update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, -stat_bonus(depth + ONE_PLY)); - - // Extra penalty for killer move in previous ply when it gets refuted - else if ( (ss-1)->killers[0] - && (ss-1)->currentMove == (ss-1)->killers[0] - && !pos.captured_piece()) - update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, -stat_bonus(depth)); + // Extra penalty for a quiet TT or main killer move in previous ply when it gets refuted + if ( (ss-1)->moveCount == 1 + || ((ss-1)->currentMove == (ss-1)->killers[0] && (ss-1)->killers[0])) + if (!pos.captured_piece()) + update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, -stat_bonus(depth + ONE_PLY)); + } // Bonus for prior countermove that caused the fail low else if ( (depth >= 3 * ONE_PLY || PvNode)