X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=95b14021c4e51bc7f7d8ad3d89686fd4ee8739c2;hp=a9a62dbf8477926c2a53ae2759eee4f4cb4a0f56;hb=ca6ce6398b1bd21ff2ac29b2dc27d7c25abbb509;hpb=49a1fdd3fe894d170a2c2781238c0f0f907c08cc diff --git a/src/search.cpp b/src/search.cpp index a9a62dbf..95b14021 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -632,9 +632,8 @@ namespace { if (!pos.capture_or_promotion(ttMove)) update_quiet_stats(pos, ss, ttMove, nullptr, 0, 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]) - && !pos.captured_piece()) + // Extra penalty for early quiet moves of the previous ply + if ((ss-1)->moveCount <= 2 && !pos.captured_piece()) update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, -stat_bonus(depth + ONE_PLY)); } // Penalty for a quiet ttMove that fails low @@ -942,6 +941,12 @@ moves_loop: // When in check, search starts from here else if (type_of(move) == CASTLING) extension = ONE_PLY; + // Passed pawn extension + else if ( move == ss->killers[0] + && pos.advanced_pawn_push(move) + && pos.pawn_passed(us, to_sq(move))) + extension = ONE_PLY; + // Calculate new depth for this move newDepth = depth - ONE_PLY + extension; @@ -1234,8 +1239,7 @@ moves_loop: // When in check, search starts from here Thread* thisThread = pos.this_thread(); (ss+1)->ply = ss->ply + 1; - ss->currentMove = bestMove = MOVE_NONE; - ss->continuationHistory = &thisThread->continuationHistory[NO_PIECE][0]; + bestMove = MOVE_NONE; inCheck = pos.checkers(); moveCount = 0;