You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More of a question than an issue. It seems to me that when the tree is reused, there is no "pruning" of the not-taken branches (i.e. nodes for states and actions that are probably not reachable from the new state). Is that correct?
It seems like it would be difficult to do this pruning in an efficient way because the node information is stored in a central data structure (MCTSTree) and the prunable nodes will have non-contiguous ids. If we had instead stored node information (Q, N, children) within each node data structure, it would be easy to just drop references and the GC would handle that pruning automatically. So I'm curious: are there substantial performance gains to the centralized storage mechanism?
Thanks for helping me understand!
The text was updated successfully, but these errors were encountered:
Yes, there are substantial performance benefits. The issue is that (Q, N, children) would have to be stored in a mutable struct and mutable structs are allocated on the heap, which is much slower. In the centralized structure, new memory for nodes is just allocated at the end of arrays, which tends to be much faster.
In our experience, reusing the tree provides only a small benefit, so it is not a problem to just get rid of the whole tree.
More of a question than an issue. It seems to me that when the tree is reused, there is no "pruning" of the not-taken branches (i.e. nodes for states and actions that are probably not reachable from the new state). Is that correct?
It seems like it would be difficult to do this pruning in an efficient way because the node information is stored in a central data structure (
MCTSTree
) and the prunable nodes will have non-contiguous ids. If we had instead stored node information (Q, N, children) within each node data structure, it would be easy to just drop references and the GC would handle that pruning automatically. So I'm curious: are there substantial performance gains to the centralized storage mechanism?Thanks for helping me understand!
The text was updated successfully, but these errors were encountered: