0

I'm not sure whether this question should go on stackoverflow or cs.stackexchange.com, so please let me know if I should move it.

I'm trying to find the time complexity of Monte Carlo Tree Search (MCTS). Googling doesn't help, so I'm trying to see how far I get calculating it myself.

It does four steps for n iterations, or before the time runs out. So we'll have

O(n*(selection+expansion+simulation+backpropagation))

Expansion just adds a child to the currently selected node. Assuming you're not using a singly linked list or something like that to store tree children, this can happen in constant time, so we can exclude it:

O(n*(selection+simulation+backpropagation))

Given the branching factor b, and t total number of nodes in the tree, I'm assuming the selection phase runs in O(b*logb t), because the depth of the tree is logb t, and at every depth, we go over b children.

So our time complexity becomes

O(n*(b*logbt+simulation+backpropagation))

Backpropagation takes time proportional to the depth of the tree as well, so that becomes:

O(n*(b*logbt+simulation+b*logbt))

But now I'm not sure how to add the simulation phase to this.

bigblind
  • 12,539
  • 14
  • 68
  • 123

1 Answers1

0

After we have selected a node to expand, we expand the node into m random children rather than a single child. Furthermore, rather than simulating out the child state only once, we simulate each child state k times.

  • m is number of children of a node
  • k is number of simulations of a child

The runtime of the algorithm can be simply be computed as O(mkI/C) where m and k are the same as before, and I is the number of iterations and C is the number of cores available.

Reference:

http://stanford.edu/~rezab/dao/projects/montecarlo_search_tree_report.pdf

Abhijit Annaldas
  • 669
  • 4
  • 12