I've been recently trying to play with MCTS implementation for simple board game. I'd like to make AI play with itself to gather some sample playthroughs. I'd figure out I could make them use the same MCTS tree (for better performance). Or so it looks like.
But would that be valid ? Or I need 2 separate trees for both AI with separate win/plays data to behave correctly ?
If you are doing self-play and building the tree exactly the same for both players there won't be any bias inherent in the tree - you can re-use it for both players. But, if the players build the MCTS tree in a way that is specific to a particular player, then you'll need to rebuild the tree. In this case you'd need to keep two trees, one for each player, and each player could re-use their own tree but nothing else.
Some things to analyze if you're trying to figure this out:
If none of these are true, you can likely re-use the tree.