From: pb00067 Date: Sun, 26 Feb 2023 08:59:35 +0000 (+0100) Subject: Use common_parent_position hint also at PVNodes TT hits. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=728b963614a765f5cb64c44a078169cca977750f;p=stockfish Use common_parent_position hint also at PVNodes TT hits. Credits to Stefan Geschwentner (locutus2) showing that the hint is useful on PvNodes. In contrast to his test, this version avoids to use the hint when in check. I believe checking positions aren't good candidates for the hint because: - evasion moves are rather few, so a checking pos. has much less childs than a normal position - if the king has to move the NNUE eval can't use incremental updates, so the child nodes have to do a full refresh anyway. Passed STC: https://tests.stockfishchess.org/tests/view/63f9c5b1e74a12625bcdf585 LLR: 2.95 (-2.94,2.94) <0.00,2.00> Total: 124472 W: 33268 L: 32846 D: 58358 Ptnml(0-2): 350, 12986, 35170, 13352, 378 closes https://github.com/official-stockfish/Stockfish/pull/4410 no functional change --- diff --git a/src/search.cpp b/src/search.cpp index 6ccc70cc..206779ed 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -744,7 +744,11 @@ namespace { if (eval == VALUE_NONE) ss->staticEval = eval = evaluate(pos, &complexity); else // Fall back to (semi)classical complexity for TT hits, the NNUE complexity is lost + { complexity = abs(ss->staticEval - pos.psq_eg_stm()); + if (PvNode) + Eval::NNUE::hint_common_parent_position(pos); + } // ttValue can be used as a better position evaluation (~7 Elo) if ( ttValue != VALUE_NONE