Open killerducky opened 5 years ago
I quickly scanned some PRs and tagged those that I guess might have a problem.
See https://github.com/LeelaChessZero/lc0/pull/619 for original PR for this code.
Tilps just pointed out Node::FinalizeScoreUpdate() invalidates best_childcached. That's why the code can assume Q does not change because it's only valid during batch gathering.
Having this kind of test would indeed be helpful; currently, the first sign usually is a serious nps drop. Any news on this?
This is a gotcha for people changing the PUCT formula. It would be nice to have a gtest for this logic, that would detect when someone changes the main PUCT formula but doesn't realize it breaks this caching logic. I think a majority of those PRs have this bug, like #746
Here are a few code snippets of how the caching works:
Node* possible_shortcut_child = node->GetCachedBestChild();