17.1 Sequential Decision Problems
An MDP specifies states, actions, transition probabilities, rewards, and a discount factor. A policy maps states to actions to maximize long-run return.
AI · SEQUENTIAL DECISIONS
Sequential decisions require planning across time. Markov decision processes model state transitions and rewards; partial observability requires tracking beliefs about hidden states.
An MDP specifies states, actions, transition probabilities, rewards, and a discount factor. A policy maps states to actions to maximize long-run return.
Value iteration repeatedly applies the Bellman optimality update; policy iteration alternates policy evaluation and improvement.
A bandit agent repeatedly chooses among uncertain reward sources, balancing exploration to learn with exploitation of the best-known option.
A POMDP adds hidden states and observations. The belief state—the probability distribution over possible states—summarizes useful history.
POMDP methods plan over belief states, using exact or approximate value functions to account for both actions and future observations.
Synchronous update in this grid
for each nonterminal state s:
Vnext[s] = max_a { reward(s,a,s') + 0.9 V[s'] }
(walls clamp movement; terminal goal/pit values remain 0)Trace: from state 2 (row 0, column 2), moving right enters goal state 3 and yields +1 immediately. A move to an ordinary state yields −0.04 + 0.9V(s′). The maximum wins; updates read the previous V array, not partially updated values.
MDP value iteration
Deterministic 4×4 grid, discount γ = 0.9, step reward −0.04; goal +1 and pit −1 are terminal.
Policy progress
Iterations: 0
Agent: start (3, 0)
Arrows show the greedy action under current state values. Click step to update all states.
Ready to compute a policy.
Let S be the number of grid states and A the number of actions. One synchronous value-iteration click evaluates every action in every nonterminal state: O(SA) time; the copied next-value array uses O(S) auxiliary space. Here S=16 and A=4. Rendering computes up to four greedy actions per cell, also O(SA), and creates O(S) visualization cells. The policy walk additionally does at most 20 update rounds at startup and 22 movement ticks, so it remains bounded for this grid; this is not a general convergence-time guarantee.