alpha-zero-general icon indicating copy to clipboard operation
alpha-zero-general copied to clipboard

mcts is reset after every episode?

Open tueboesen opened this issue 2 years ago • 2 comments

I am not an expert in mcts at all, but I have been playing around with your code and I noticed that in the learn method the mcts is reset after every single episode. Meaning the mcts is reset after every single game when it is generating data to train on. Hence the mcts never grows beyond the information of a single game, this seems weird to me since I would expect you to want to keep the mcts and continue to evolve it and only reset it once the neural network has been trained on the data generated?

Is this really intended?

tueboesen avatar Jan 10 '23 05:01 tueboesen

If i understand your question correctly, it's what they do in AlphaGoZero too:

The search tree is reused at subsequent time-steps: the child node corresponding to the played action becomes the new root node; the subtree below this child is retained along with all its statistics, while the remainder of the tree is discarded.

so i think it is intended. Have you tried reusing the tree? (I would guess that the memory footprint will be ginormous, though)

arnemileswinter avatar Jan 12 '23 23:01 arnemileswinter

args.numMCTSSims games are played when calling getActionProb for each MCTS.

cyshe avatar Jul 09 '24 18:07 cyshe