SEARCH / LABInteractive algorithm notebook
Runs locally in your browser · no model download

Monte Carlo
Tree Search

Watch a search tree learn which Tic-Tac-Toe move is promising. Change the simulation budget, inspect candidate branches, and play against the search.

Playground

Tic-Tac-Toe

Your move

Choose a square to make the first move.

The search plays random rollouts, then backs up each result through the tree.

Search trace

Root move candidates

Waiting for a search
Iterations—
Tree nodes—
Best move—
Each branch is a move from the current board.—
Search tree is emptyRun a search on the computer's turn to compare candidate moves.
Branch inspector

Select a candidate branch to preview the board after that move.

01 Select

Follow promising branches using the UCT exploration score.

02 Expand

Add one unexplored legal move to the search tree.

03 Roll out

Play random legal moves until the game ends.

04 Back up

Update visit counts and values along the path.