# How do multiple branches from one node occur with the Monte Carlo Tree Search?

I think I understand the Monte Carlo Tree search. It goes through the tree until it reaches a leaf node, where it branches (creates a child node). However, the branching only occurs at the leaf nodes (right?). So, a branch never comes out from a non-leaf node. So how could one node have multiple branches (multiple child nodes) coming out of it? Here's a picture, for clarity:

So wouldn't that process just keep getting repeated? It's not a leaf node, so the algorithm won't branch (create another child node)... so it has to pick the next node. And since it only has one option, it must pick that one. It just continues down, until it reaches the end. What's the point of that?

I'm probably missing something big here, but all the pages I've look at don't really explain this. It just magically repeats selection, expansion, simulation, and back-propagation, until it constructs a nice tree at the end. How?

EDIT: I figured it usually creates only one child node because of this taken of this source:

In its simplest and most memory efficient implementation, MCTS will add one child node per iteration.

Also, even if you create just two or three, would that really be enough to cover all the possible moves, especially if the branching factor is large? How would one determine how many child nodes to create?

• What do you mean by "branches"? Have you read basic descriptions of MCTS? See, e.g., en.wikipedia.org/wiki/Monte_Carlo_tree_search. That description doesn't use the terminology "branches". Can you edit to clarify? – D.W. Feb 29 '16 at 6:33
• However, the branching only occurs at the leaf nodes (right?). So, a branch never comes out from a non-leaf node. - FWIW, that sounds backwards to me. – 500 - Internal Server Error Feb 29 '16 at 17:11
• @D.W. OK, added some stuff in paranthesis – APCoding Feb 29 '16 at 23:50
• Thanks for the edit. That helps. Now, how did you conclude that you never create a child node of a non-leaf node ("a branch never comes out from a non-leaf node")? What source did you read, and where are you concluding that from? That sounds like a faulty conclusion to me, so to answer your question it seems like you're going to need to edit the question to explain why you drew that conclusion from the resources you were reading. For instance, that doesn't match the Wikipedia description, which says "create one or more child nodes" (emphasis added). – D.W. Mar 1 '16 at 1:25
• @D.W. Thanks for the feedback! I added the source I looked at. Hope that makes it more clear. – APCoding Mar 1 '16 at 4:28