X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=ed5dd6c2c7ad5aab3e39b26cb038833c3a6b58d2;hb=b7b6b4ba18bc9d291c2c2fd300c22a3e008dcbb2;hp=a487ed1305b1ccdc8aabe5b42858ec71799b5895;hpb=939ffe454d28556ee7653af4d3322b8c8ba470be;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index a487ed13..ed5dd6c2 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1018,9 +1018,10 @@ moves_loop: // When in check, search starts here else { // Continuation history based pruning (~20 Elo) - if ( lmrDepth < 5 - && (*contHist[0])[movedPiece][to_sq(move)] < 23 - 23 * depth * depth - && (*contHist[1])[movedPiece][to_sq(move)] < 23 - 23 * depth * depth) + if (lmrDepth < 5 + && (*contHist[0])[movedPiece][to_sq(move)] + + (*contHist[1])[movedPiece][to_sq(move)] + + (*contHist[3])[movedPiece][to_sq(move)] < -3000 * depth + 3000) continue; // Futility pruning: parent node (~5 Elo) @@ -1093,6 +1094,14 @@ moves_loop: // When in check, search starts here return beta; } } + + // Capture extensions for PvNodes and cutNodes + else if ( (PvNode || cutNode) + && captureOrPromotion + && moveCount != 1) + extension = 1; + + // Check extensions else if ( givesCheck && depth > 6 && abs(ss->staticEval) > Value(100)) @@ -1316,7 +1325,7 @@ moves_loop: // When in check, search starts here // Bonus for prior countermove that caused the fail low else if ( (depth >= 3 || PvNode) && !priorCapture) - update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth)); + update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * (1 + (PvNode || cutNode))); if (PvNode) bestValue = std::min(bestValue, maxValue);