Search and Belief-Space Planning › Belief Trees and Information Gathering
World Models HandbookAll chapters Search and Belief-Space Planning › Belief Trees and Information GatheringOne section · Sections in this chapter5 / 13 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
We now know that the right information state for planning is the belief. A belief tree can be indexed by action-observation histories, with the posterior at each node stored explicitly or reconstructed from the root belief and model. POMCP uses the history-indexed form and represents those node beliefs with particles rather than dense vectors.
A history and root belief determine the corresponding posterior under a known model, so an algorithm need not store a dense belief vector at every node. POMCP goes further: it indexes nodes by histories and represents their beliefs through the latent-state particles delivered by simulations. The history alone is not a numerical belief; the root belief and the model, together with the filtering or particle procedure, supply the probabilities.
The Belief Tree
A belief tree alternates action edges and observation edges. A node is a history
where is the action taken at step , is the resulting observation, and is the history length in action-observation pairs. The belief at that node is , the posterior obtained by starting from root belief and applying the Bayes filter once per pair. From , an action edge labeled leads to a chance node; from there, an observation edge labeled leads to the new history .
The alternation of action edges and observation edges is the structural feature that separates a belief tree from a fully observed state tree. At a belief decision node there are up to action choices, and each action can lead to up to observation histories. Thus a complete action-observation layer can grow by at most before reachability and probability-zero branches are removed. A fully observed stochastic tree instead branches on successor states. Neither representation is uniformly smaller; the effective branching factor depends on the model and current support.
Two structural differences from the MDP tree change how the algorithm is implemented.
The first is that branching is on observations, not directly on latent next states. A fully observed state tree branches wherever the dynamics are stochastic. A belief tree branches when one action can produce different observations across states in the current belief. In our deterministic maze there are seven signatures globally. From the initial eight-cell signature-12 belief, left or right can produce three distinct next signatures, while up and down produce one. The corresponding fully observed transition from a known cell has one successor. Partial observability can therefore introduce observation branching even when physical dynamics and sensing are deterministic.
The second is that the same physical state can appear at many history nodes because the agent's information can differ. Before reachability pruning, a horizon of action-observation pairs permits at most histories. This is a worst-case count: zero-probability observations, merged beliefs, and sparse dynamics can reduce it sharply. Partial observability adds a curse of history to the continuous belief-state representation, which is why practical solvers sample, prune, merge, or restrict the histories they represent.
Information Gathering and the Value of Information
With the belief tree defined, information-gathering behavior becomes understandable. Consider a node and two actions and with identical expected immediate reward. The action values in the belief tree are
where:
- : the expected immediate reward at belief
- : the probability of observing after taking from belief
- : the value of the successor history obtained by taking and observing
An action that produces informative observations can create successor beliefs on which the agent chooses better continuation actions. Informativeness alone does not guarantee higher task value: the sensing cost, delay, state transition, and decision relevance of the observation all matter. When the expected improvement in later decisions exceeds those costs, the informative action wins without requiring a separate exploration bonus.
The continuation value depends on the posterior used for later decisions. An observation is valuable when it separates hypotheses that call for different continuation actions. Posterior concentration by itself is not enough: learning a task-irrelevant detail can reduce entropy without changing the maximizing action or its value. In the exact belief-MDP backup, task-directed information value enters through observation-contingent continuation choices rather than through a separate generic information bonus. QMDP omits this mechanism because it assumes full observability after the current action.
For a fixed sensing action , the expected value of sample information compares choosing a continuation action after seeing its observation with committing to one continuation action beforehand:
where evaluates the downstream action after the sensing transition. Both terms use the same observation distribution. The first permits to depend on ; the second requires one before is known. Their difference is non-negative because an observation-contingent decision rule includes every constant decision rule as a special case. It is zero when some fixed continuation action is optimal for all observations with positive probability (allowing ties). The net value of sensing must additionally subtract the sensing action's reward cost and account for its state transition. This subtraction is what makes information gathering a tradeoff rather than a free win: an informative action that costs too much reward or moves you into a bad region will lose to a less informative but cheaper alternative.
Because an exact value-of-information calculation requires the downstream backup, some online planners use a cheaper proxy: the expected reduction in belief entropy, . Adding a weighted information-gain bonus to the action value,
where:
- : the Shannon entropy of belief , measuring how uncertain the agent is
- : a hyperparameter weighting the information-gain bonus against reward
- : the posterior belief after taking and observing
encourages branches expected to reduce entropy. This heuristic has the same shape as intrinsic information-gain rewards discussed in Active Perception, Dual Control, and Exploration, but it is not generally equivalent to task value: entropy can fall for distinctions that do not affect the decision. The weight is a task-dependent hyperparameter, not a quantity supplied by the exact belief-MDP backup. When using this heuristic, remember that it is a shortcut: entropy can fall dramatically on an observation that is irrelevant to the task, and the bonus will reward it, which can lead to agents that obsess over any observation that changes the belief at all.
Worked Example: The Tiger Problem
The tiger problem, presented as a benchmark by Kaelbling, Littman, and Cassandra (1998), gives a compact demonstration of information gathering. You face two doors. Behind one is a tiger; behind the other is a reward of . Opening the tiger door gives . You cannot tell the doors apart, but you can listen for a cost of ; the growl indicates the tiger's side with probability . The classic continuing formulation resets the hidden tiger after a door is opened. For a compact calculation, this chapter uses an episodic variant in which opening either door terminates the episode.
With two latent states and two observation symbols, the tiger belief space is one-dimensional, so the episodic value function can be plotted directly. The useful qualitative feature is a region of beliefs in which paying for another observation improves the later door choice. Larger POMDPs can contain analogous information-gathering regions, but their geometry and even their existence depend on the task.
Let denote the belief that the tiger is on the left, and let denote the belief that the tiger is on the right. The belief space is one-dimensional, so we can approximate the belief-MDP value on a dense grid and look at the whole curve at once. The interpolation and stopping tolerance make this a numerical solution rather than a symbolic exact one, but its symmetry and convergence can be checked directly.
TIGER_GAMMA = 0.95
LISTEN_COST = -1.0
ACC = 0.85 # P(growl on the tiger's side | tiger's side)
p_grid = np.linspace(1e-6, 1 - 1e-6, 4001)
def open_left_value(p):
return p * (-100.0) + (1.0 - p) * 10.0
def open_right_value(p):
return p * 10.0 + (1.0 - p) * (-100.0)
def listen_value(p, V):
q_left = ACC * p + (1 - ACC) * (1 - p) # P(hear "left")
q_right = 1.0 - q_left
p_after_left = ACC * p / q_left # posterior after hearing "left"
p_after_right = (1 - ACC) * p / q_right # posterior after hearing "right"
continuation = q_left * np.interp(
p_after_left, p_grid, V
) + q_right * np.interp(p_after_right, p_grid, V)
return LISTEN_COST + TIGER_GAMMA * continuation
V_tiger = np.maximum(open_left_value(p_grid), open_right_value(p_grid))
for _ in range(3000):
updated = np.maximum(V_tiger, listen_value(p_grid, V_tiger))
if np.max(np.abs(updated - V_tiger)) < 1e-10:
V_tiger = updated
break
V_tiger = updated
listen_vals = listen_value(p_grid, V_tiger)
open_l_vals = open_left_value(p_grid)
open_r_vals = open_right_value(p_grid)
stacked = np.vstack([listen_vals, open_l_vals, open_r_vals])
best_action = np.argmax(stacked, axis=0)
listen_region = p_grid[best_action == 0]
listen_lo, listen_hi = float(listen_region.min()), float(listen_region.max())Listen is optimal for beliefs between p = 0.0240 and p = 0.9760 Below the band the optimal action is open left; above it the other door. Value at p = 0.5 (maximally uncertain): 3.7702 Value at p = 0.0 (certainty): 9.9999
The answer has the expected shape. At maximal uncertainty, listening is worth much more than opening because either door has a one-half chance of the large loss. As the belief approaches certainty, the value of another observation falls and the agent opens the safe door. With symmetric door rewards and a symmetric sensor, the listening band is symmetric about up to grid discretization; swapping left and right maps to without changing the problem. This symmetry is a good sanity check on the implementation: any asymmetry in the displayed listen band is numerical, not structural.


The belief space is one-dimensional here, which lets us draw the whole episodic solution. In a larger problem, information-gathering actions can be optimal on more complicated belief regions. The middle band in this example has a precise interpretation: listening leaves the physical state unchanged but produces an observation that can change the later door choice. Repeated sensing or motion in another task should be called information gathering only after checking the same counterfactual, not merely because the behavior looks hesitant.
POMCP: Monte Carlo Tree Search in Belief Space
We now need an algorithm that can search a belief tree without enumerating it. POMCP, introduced by Silver and Veness (2010), adapts MCTS to partially observable domains using a generative model and sampled latent states. Its central idea is worth stating on its own.
Instead of representing the belief explicitly, sample a state from it.
That is the core idea. POMCP maintains a tree whose nodes are indexed by action-observation histories. At the root, each simulation begins by sampling a single state from the current belief. From there the simulation proceeds like MCTS: select an action by UCB, sample a successor state from the model, sample an observation, and descend to the child indexed by that observation rather than by the latent state. Because different simulations sample different states, they can reach the same history node through different latent trajectories, and the node's accumulated statistics integrate over those sampled possibilities.
For a fixed policy and finite-variance return, independent Monte Carlo standard error scales as . POMCP uses root-state and transition-observation samples to approximate belief-space action values, but its tree policy adapts across simulations, so this elementary rate is not a finite-budget error guarantee for the full algorithm. Histories index the tree, while the sampled latent states reaching a history form its particle approximation.
The reasons this works are worth making explicit:
- The root particles are a belief sample. Each root simulation draws . For a fixed rollout policy and finite horizon, a sample return is an unbiased Monte Carlo estimate under the generative model. Adaptive tree selection changes which policies are sampled, so finite-budget POMCP value estimates need not themselves be unbiased.
- The tree's history structure handles the observation branching automatically. You never have to enumerate observations; you sample one per simulation and let the tree grow where the samples land.
- The transition model is used as a generative model, not as an explicit matrix. You only need to be able to sample and . This makes POMCP applicable when a neural or other simulator can generate those samples even though its transition density is unavailable or inconvenient to evaluate.
The action-value update is a running mean of the returns observed when that action was taken from that node:
where:
- : the running mean return for taking action at history node
- : the discounted return obtained along the current simulated path
- : the number of simulations in which action was taken at history
This is the incremental sample-mean update used in POMCP. The exact belief-MDP backup sums observation branches with weights , whereas POMCP samples them from a generative model. Silver and Veness prove convergence in probability of their value estimate to an -optimal value under the finite-POMDP, bounded-reward, UCT-exploration, and correct-simulator conditions stated in the paper. At small budgets, rare observation branches can remain noisy or unvisited. Model correctness includes both transition and observation behavior; an observation-model error can distort the root belief update as well as simulated continuation values.
Let us implement it. Because our transitions are deterministic, sampling from is a lookup; but the code is written as if were a general distribution, which is how you would write it for a learned model.
class POMCPNode:
__slots__ = ("N", "Na", "Qa", "children")
def __init__(self):
self.N = 0
self.Na = np.zeros(N_ACTIONS)
self.Qa = np.zeros(N_ACTIONS)
self.children = {} # (action, observation) -> POMCPNode
def pomcp_select(node, c, rng):
"""UCB1 over actions at a history node."""
log_n = math.log(max(node.N, 1))
scores = np.empty(N_ACTIONS)
for a in range(N_ACTIONS):
if node.Na[a] == 0:
scores[a] = 1e9 + rng.random()
else:
scores[a] = node.Qa[a] + c * math.sqrt(log_n / node.Na[a])
return int(np.argmax(scores))
def pomcp_rollout(s_idx, rng, remaining, gamma):
"""Cheap default policy from a sampled state, using the BFS shortcut."""
total, disc = 0.0, 1.0
for _ in range(remaining):
if FREE[s_idx] == GOAL:
break
a = guided_action(FREE[s_idx], rng)
s_idx = int(rng.choice(N_CELLS, p=T[a, s_idx]))
if FREE[s_idx] == GOAL:
total += disc * GOAL_REWARD
break
total += disc * STEP_COST
disc *= gamma
return total
def pomcp_simulate(s_idx, node, rng, depth, gamma, c, max_depth):
if depth >= max_depth or FREE[s_idx] == GOAL:
return 0.0
a = pomcp_select(node, c, rng)
s2_idx = int(rng.choice(N_CELLS, p=T[a, s_idx]))
if FREE[s2_idx] == GOAL:
R = GOAL_REWARD
else:
obs = int(rng.choice(16, p=O[:, s2_idx]))
child = node.children.get((a, obs))
if child is None:
child = POMCPNode()
node.children[(a, obs)] = child
R = STEP_COST + gamma * pomcp_rollout(
s2_idx, rng, max_depth - depth - 1, gamma
)
else:
R = STEP_COST + gamma * pomcp_simulate(
s2_idx, child, rng, depth + 1, gamma, c, max_depth
)
node.N += 1
node.Na[a] += 1
node.Qa[a] += (R - node.Qa[a]) / node.Na[a]
return R
def pomcp_plan(belief, n_sims, gamma=GAMMA, c=1.2, max_depth=20, seed=0):
"""Plan from a belief by sampling states from it at the root."""
rng = np.random.default_rng(seed)
root = POMCPNode()
for _ in range(n_sims):
s_idx = int(rng.choice(N_CELLS, p=belief))
pomcp_simulate(s_idx, root, rng, 0, gamma, c, max_depth)
return rootTwo implementation notes. The rollout policy uses the BFS shortcut, which is a fully observed heuristic over the sampled latent state. It does not reason about uncertainty; the history tree above it aggregates sampled returns across latent states. Second, each (a, obs) key names one history child even though many latent successor states can produce that observation. Branching for an action equals the number of positive-probability observations reachable from the current history belief. The maze has seven signatures globally and at most three immediately reachable from one action at the initial signature-12 belief.
For clarity, this compact implementation does not persist a particle bag at every history node. It samples from an externally filtered root belief for each simulation and carries one latent state down the tree. Standard POMCP implementations can retain the states that reach a history as its particle approximation and use particle-based root updating; the exact Bayes filter used here keeps the example's filtering error separate from its search error.
The progressive contraction of the belief support in the demo above shows the mechanism the search exploits. Let us now put the planner inside the maze and let it act.