Monte Carlo Tree Search (MCTS) is the algorithm behind modern game-playing engines like AlphaGo. Instead of exhaustively searching every possible move, it builds a search tree incrementally, spending more effort exploring promising branches while still occasionally checking on weaker-looking ones. Each node here is a hypothetical game state; its size reflects how many times it has been visited and its colour reflects its estimated win-rate.
UCB1 = winRate + C × sqrt(ln(parentVisits) / childVisits). The
first term favours moves that have performed well (exploitation); the second
term favours moves that have barely been tried (exploration). The
exploration constant C tunes that balance — low C hugs the
best-known line, high C spreads search wider across the tree.
MCTS needs no hand-crafted evaluation function — it only needs to know how to play random moves to the end of a game and see who won. That made it possible to master games like Go, where writing a good heuristic evaluator by hand had defeated researchers for decades.
A 3D game-decision tree grows outward from a purple root node, one Monte Carlo Tree Search iteration at a time — watch selection, expansion, simulation and backpropagation update node sizes and colours live.
Each iteration walks down the tree using the UCB1 formula to balance exploring untried moves against exploiting known-good ones, adds one new node, runs random rollouts, and carries the result back up every visited node.
Adjust the exploration constant, rollout count and branching factor, then press Step to watch a single iteration unfold, or set an auto-play speed to let the tree grow on its own. Node size tracks visit count; colour tracks win-rate.
MCTS powers DeepMind's AlphaGo and AlphaZero, letting them search game trees far too large to explore exhaustively by focusing computation on the branches most likely to matter.