From: Dubslow Date: Sat, 24 Dec 2022 15:43:22 +0000 (-0600) Subject: Late countermove bonus: remove "extraBonus &&" X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ea0f34120fbc1ab7aa8047a1319714b87a1f3b87;p=stockfish Late countermove bonus: remove "extraBonus &&" passed stc: https://tests.stockfishchess.org/tests/view/63a71e409c0589b83751dc25 LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 432480 W: 113846 L: 114055 D: 204579 Ptnml(0-2): 1164, 48205, 117701, 48016, 1154 passed ltc: https://tests.stockfishchess.org/tests/view/63aba66639af998100ce1aa9 LLR: 2.95 (-2.94,2.94) <-1.75,0.25> Total: 245344 W: 65309 L: 65317 D: 114718 Ptnml(0-2): 117, 24257, 73903, 24307, 88 closes https://github.com/official-stockfish/Stockfish/pull/4322 bench 4379218 --- diff --git a/src/search.cpp b/src/search.cpp index d27b21d2..55af6aba 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1359,14 +1359,9 @@ moves_loop: // When in check, search starts here else if ( (depth >= 5 || PvNode || bestValue < alpha - 65 * depth) && !priorCapture) { - //Assign extra bonus if current node is PvNode or cutNode - //or fail low was really bad - bool extraBonus = PvNode - || cutNode; - - bool doubleExtraBonus = extraBonus && bestValue < alpha - 88 * depth; - - update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * (1 + extraBonus + doubleExtraBonus)); + // Extra bonuses for PV/Cut nodes or bad fail lows + int bonus = 1 + (PvNode || cutNode) + (bestValue < alpha - 88 * depth); + update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * bonus); } if (PvNode)