-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backward analysis does not retain any tree info. #517
Comments
While being useful for analysis, the suggested behavior from this issue is incompatible with the Lc0 MCTS and would systematically distort search results. This isn't true for MCTS-minimax-hybrids like #963 though; so while the current situation can only rely on the NN cache and external GUIs like Nibbler, introducing the option of not throwing away the tree when moving backwards would be useful for "use at your own risk" with |
There are approaches to do that, and it's surely useful (and it's the most requested feature from top GMs). |
As #963 now is functional, implementing an Steps needed:
|
In contrast to standard hash-tables in a/b engines, leela currently does not allow "backward" analysis while retaining information from previous searches. Forward analysis is possible as the tree is retained, but on going backward the tree is trimmed. The following is a scheme which might allow to use information of previous searches when going backward in a tree, while ensuring visit consistency in a tree (parent visits = sum of all child visits + 1).
If we go backward in a tree, we convert all visit distributions to new policy distributions for the nodes in the tree and update all cached NN evals to reflect the new policy. This idea rests on:
(1) visit distributions after search representing a more accurate policy value compared to initial policy
(2) all visits can safely be reset as the information is now converted to new policies.
(3) search can commence as ususal using the new policies for cached nodes.
If NN cache is not large enough some information will be lost, but one could prefer new policies for nodes along the "old" main line and or other schemes. As new policy is more accurate than old policy, even if only partially available it should still yield better analysis results than trimming the tree.
The text was updated successfully, but these errors were encountered: