AI Glossary / Graphs and symbolic AI / Intermediate

Monte Carlo tree search

Definition

Monte Carlo tree search, or MCTS, is a search method that grows a decision tree through repeated sampled simulations and uses their results to guide further exploration. It concentrates effort on promising actions while continuing to investigate uncertain alternatives. The search usually returns a recommended action when its time or simulation budget is exhausted.

What it means

A full decision tree can be far too large to explore. MCTS builds only the portions reached by its search and stores information such as visit counts and estimated returns. Later simulations use that information to choose where to investigate next.
The method is associated with game playing but also applies to other sequential decision problems with suitable models. Random sampling need not mean that every action is selected uniformly. Search policies, rollout policies, and learned evaluations can guide different parts of the process. MCTS is a family of methods rather than one fixed scoring formula.

How it works

A common iteration has four stages. Selection follows existing tree branches using a search policy. Expansion adds a new node when appropriate. Simulation or evaluation estimates the outcome beyond that point. Backup updates statistics along the visited path.
UCT is a well-known selection approach that combines estimated value with an exploration bonus related to visit counts. Less-tested actions can receive additional attention. The rule used to choose the next simulation need not be the rule used to select the final action. In adversarial games, value perspectives must also be handled correctly so that an opponent is not modeled as cooperating with the root player.

Three practical examples

  • A game agent can compare legal moves by repeatedly simulating continuations and updating the most relevant parts of its search tree.
  • A planning prototype can explore sequences of task assignments when a simulator supplies their consequences and rewards.
  • A research system can combine a learned state evaluator with tree search, using evaluation estimates where complete rollouts would be costly.

Think of it this way

Think of exploring a branching maze while keeping notes at each junction about previous trips. Good-looking paths attract more visits, but poorly explored paths still get attention. The analogy is limited because MCTS often estimates expected returns rather than finding one physical exit, and simulated opponents or random events can change what the branches mean.

Worked example

Consider an invented selection step with two already-visited root actions. Action A has 15 visits and 10 wins, giving mean reward 10/15, approximately 0.667. Action B has five visits and two wins, giving mean reward 0.4. The root has 20 visits.
For illustration, use score = mean reward + square root of [ln(parent visits)/action visits]. This specifies an exploration coefficient of one; other conventions use different coefficients. A's bonus is square root of (ln20/15), approximately 0.447, so its score is approximately 1.114. B's bonus is square root of (ln20/5), approximately 0.774, giving score approximately 1.174.
The selection rule chooses B for the next simulation despite its lower observed win rate. If that simulation returns reward one, B's statistics become three wins in six visits, with mean 0.5, and the root count becomes 21. These are search statistics, not proof of the best move. An unvisited action requires a separate initialization convention because the displayed formula divides by its visit count.

Illustrative case study

In a fictional puzzle-game prototype, a developer uses MCTS with a fixed computation budget per turn. Early tests show that some apparently strong moves fail when the opponent has one sharp response. The rollout policy rarely finds that response, so the average result looks overly optimistic.
The team improves opponent modeling, adds targeted tactical tests, and compares results across multiple seeds and search budgets. It keeps the evaluation dataset separate from examples used to tune search settings. The case illustrates why search quality depends on more than simulation count; it does not report real tournament performance or guarantee optimal play.

Common misconceptions and mistakes

Do not assume that the action with the highest exploration score should be played immediately. The exploration bonus helps allocate computation; final action selection may instead use visit count or estimated value according to the algorithm.
More simulations do not guarantee that a finite run finds a decisive rare branch. Nor do theoretical convergence results apply without their assumptions. Avoid backing up values from inconsistent player perspectives, treating rollout outcomes as independent real-world observations, or confusing a learned evaluation with an exact result. Large or continuous action spaces and hidden information often require adaptations to basic tree-search designs.

Business use

MCTS can be useful when a decision is sequential, exhaustive search is too costly, and simulated evaluation is available. It offers a practical way to trade computation time against search effort. Its usefulness depends on the model, evaluation signal, legal-action handling, and the available response time.
For a business planning application, define the reward carefully and test delayed consequences, rare failures, and sensitivity to the budget. Compare against a simpler planning baseline. A high simulated reward is not a sufficient deployment criterion if the search can violate hard constraints or if the simulator omits important operating conditions.

People also ask

Does MCTS require a neural network?

No. Basic versions can use rollouts and simple statistics, while other versions incorporate learned policies or value estimates.

Is UCT another name for all MCTS?

No. UCT is a particular approach to selection within the broader family.

Does backup mean training a neural network?

Not necessarily. In basic MCTS it means updating tree statistics along the sampled path; this differs from neural-network backpropagation.

Check your understanding

Why was B selected in the worked step even though A had the higher mean reward?

Answer: B's lower visit count gave it a larger exploration bonus. Its combined selection score exceeded A's, so the algorithm allocated another simulation to B. That choice gathers information; it does not establish that B is the best final action.

Related terms

  • Monte Carlo planning
  • UCT
  • Upper confidence bound
  • Backup
  • rollout
  • tree policy
  • default policy
  • exploration and exploitation
  • value function
  • game-tree search

Learn next

Recalculate the example using an exploration coefficient of zero. Selection then follows observed mean reward and chooses A. Next increase the coefficient and explain why B becomes more attractive for investigation. Finally, distinguish this experimental selection decision from a chosen final-action rule.

More in Graphs and symbolic AI

  • Monotonic preference - A monotonic preference is a preference that moves consistently in a specified direction as an attribute increases, with other relevant conditions held fixed.
  • Monotonicity - In logical reasoning, monotonicity is the property that adding premises cannot remove conclusions already entailed by the original premises.
  • Monte Carlo - Monte Carlo refers to a family of computational methods that use random sampling to estimate quantities or study the behavior of a model.
  • Mosaic effect - The mosaic effect occurs when combining separate pieces of information reveals something that the pieces did not clearly reveal on their own.
  • Most general unifier - A most general unifier, or MGU, is a substitution that makes two symbolic expressions identical while imposing no unnecessary restrictions on their variables.
  • Most likely state - The most likely state is a state assigned the greatest probability by an agent's current probability distribution over possible states.

Work in finance? Get the free CFO AI Prompt Pack: 7 prompts for finance leaders.

Sources

Sources: Kocsis and Szepesvári, Bandit based Monte-Carlo Planning, original rollout-tree and UCB development: https://aima.cs.berkeley.edu/~russell/classes/cs294/s11/readings/Kocsis%2BSzepesvari%3A2006.pdf . Gelly and colleagues, The grand challenge of computer Go, original researchers' publication abstract: https://research.google/pubs/the-grand-challenge-of-computer-go-monte-carlo-tree-search-and-extensions/ . The selection arithmetic and puzzle case are original illustrations.

Previous: Monte Carlo simulation Next: Moral graph

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer