How is Monte Carlo Tree Search Implemented

57 Views Asked by At

I am trying to understand how MCTS is actually implemented if I were trying to use it to win a game like TicTacToe against an opponent. I understand how the algorithm creates the search tree through Selection, Expansion, Simulation and Backpropagation, what I don't understand is how this is implemented during a game, let's say of TicTacToe.

Let's say I want to use the MCTS algo to win a game of TicTacToe against an opponent, do I start off by using my starting position (whether first or second) as the root node, build a sufficiently deep/large tree, and then just use that tree for the rest of the game? Or do I build the tree a little bit at every turn, and switching my root node to whatever actual game state we are in in the current turn?

In short, is the tree pre-built and then utilized during gameplay, or is it built as the game is being played?

0

There are 0 best solutions below