From: mckx00 Date: Mon, 14 Sep 2020 02:28:32 +0000 (-0700) Subject: Simplify StatSCore Initialization X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=35ab8254b70f62a4e0138c475fad0c77dcc0af2d;hp=0405f3540366cc16245d51531881c55d3726c8b5 Simplify StatSCore Initialization No need to initialize StatScore at rootNode. Current Logic is redundant because at subsequent levels the grandchildren statScore is initialized to zero. closes https://github.com/official-stockfish/Stockfish/pull/3122 Non functional change. --- diff --git a/src/search.cpp b/src/search.cpp index 4aeadc28..07c491b6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -654,9 +654,7 @@ namespace { // starts with statScore = 0. Later grandchildren start with the last calculated // statScore of the previous grandchild. This influences the reduction rules in // LMR which are based on the statScore of parent position. - if (rootNode) - (ss+4)->statScore = 0; - else + if (!rootNode) (ss+2)->statScore = 0; // Step 4. Transposition table lookup. We don't want the score of a partial