X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=edeed9c030446a9e015cf99218ce2a5ca402315b;hb=b82d93ece484f833c994b40d9eddd959ba20ef92;hp=99c4743174dfbb9befae87b2fecca958b2450107;hpb=18f2b12cd019212b9c7103cc63e3bf64a5be7c3c;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 99c47431..edeed9c0 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1380,7 +1380,15 @@ 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) * (1 + (PvNode || cutNode))); + { + //Assign extra bonus if current node is PvNode or cutNode + //or fail low was really bad + bool extraBonus = PvNode + || cutNode + || bestValue < alpha - 94 * depth; + + update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * (1 + extraBonus)); + } if (PvNode) bestValue = std::min(bestValue, maxValue);