1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-01 09:13:08 +00:00

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
This commit is contained in:
pb00067 2023-02-26 09:59:35 +01:00 committed by Joost VandeVondele
parent 98dafda6c8
commit 728b963614

View file

@ -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