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.