X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=0c8377d01ed6712630efaa665adf4aeb645906c4;hb=64656f8583dde88d558d5367b4cf8fc136c3214a;hp=77d23ac2f4157a5d3b57ef65d7e9e3a08763b00e;hpb=b2bd8699eccc149cdda1f7bf6e1eed42088ec827;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 77d23ac2..0c8377d0 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1353,16 +1353,17 @@ moves_loop: // When in check, search starts here quietsSearched, quietCount, capturesSearched, captureCount, depth); // Bonus for prior countermove that caused the fail low - else if ( (depth >= 5 || PvNode) + else if ( (depth >= 5 || PvNode || bestValue < alpha - 62 * depth) && !priorCapture) { //Assign extra bonus if current node is PvNode or cutNode //or fail low was really bad bool extraBonus = PvNode - || cutNode - || bestValue < alpha - 62 * depth; + || cutNode; - update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * (1 + extraBonus)); + bool doubleExtraBonus = extraBonus && bestValue < alpha - 85 * depth; + + update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * (1 + extraBonus + doubleExtraBonus)); } if (PvNode)