10-15-2022, 01:23 PM
For our built-in MCTS, this issue is now fixed in this commit to our dev branch: https://github.com/Ludeme/Ludii/commit/3...89e947c030
The core tree reuse code that you've probably seen close to the start of the selectAction() method (approx around lines 477-540ish) was already correct. However, at the end of the method, I also already did a little bit of traversing (of just the action that we're planning to take, but not opponents' actions yet since they didn't move yet) to be able to clean up a small amount of memory (around lines 799-818). There, I was using the "returnMove" instead of a Move object extracted from a Trial (because we are traversing the move that we are planning to play, rather than one already played), and that one was in a different format (with consequents still in Ludeme-rule-format instead of having been converted into concrete Actions).
The core tree reuse code that you've probably seen close to the start of the selectAction() method (approx around lines 477-540ish) was already correct. However, at the end of the method, I also already did a little bit of traversing (of just the action that we're planning to take, but not opponents' actions yet since they didn't move yet) to be able to clean up a small amount of memory (around lines 799-818). There, I was using the "returnMove" instead of a Move object extracted from a Trial (because we are traversing the move that we are planning to play, rather than one already played), and that one was in a different format (with consequents still in Ludeme-rule-format instead of having been converted into concrete Actions).