Markov decision processes
MDPs, returns, Bellman equations, value and policy iteration, beliefs in POMDPs.
From plan to policy
Search returned a fixed action sequence. When a step can slip — as in the Russell–Norvig grid, where each move succeeds with probability and slips sideways with — a blind plan fails. The plan N,N,E,E,E reaches the goal with probability only and expected return about ; a reactive policy is worth from the same start.
MDP, return and values
An MDP is with the Markov property: the next state depends only on the current state and action. The return is
Discount keeps the sum finite, prefers sooner reward, and reads as a chance the process stops. Values: V^\\pi(s)=\\mathbb E_\\pi[G_t\\mid S_t=s], Q^\\pi(s,a)=\\mathbb E_\\pi[G_t\\mid S_t=s,A_t=a]; optima V^\\star, Q^\\star.
Bellman expectation equation
From , linearity and the Markov property:
V^\\pi(s)=\\sum_a \\pi(a\\mid s)\\sum_{s'} P(s'\\mid s,a)\\big(R(s,a,s')+\\gamma V^\\pi(s')\\big).In matrix form V^\\pi = R_\\pi + \\gamma P_\\pi V^\\pi, so V^\\pi=(I-\\gamma P_\\pi)^{-1}R_\\pi: evaluating a known policy is a linear solve.
Optimality and value iteration
Key idea. The best action maximizes immediate expected reward plus discounted best continuation:
V^\\star(s)=\\max_a \\sum_{s'} P(s'\\mid s,a)\\big(R(s,a,s')+\\gamma V^\\star(s')\\big).Value iteration iterates the backup . is a -contraction in \\|\\cdot\\|_\\infty, so it converges geometrically to the unique fixed point V^\\star from any start. In the grid, Q^\\star((3,3),\\mathrm{E})\\approx 0.928=V^\\star(3,3).
Policy iteration
Policy iteration alternates exact evaluation of V^\\pi with greedy improvement \\pi'(s)=\\arg\\max_a Q^\\pi(s,a). The policy-improvement theorem gives V^{\\pi'}\\ge V^\\pi; with finitely many deterministic policies the loop stops at an optimum. From “always north” ( at the start) three rounds reach .
POMDPs and next
If the state is hidden, act on a belief updated by Bayes’ rule. A dirt sensor with prior and accuracy that reports “dirty” yields posterior . The belief MDP is exact but continuous and hard; agents approximate it (filters, recurrent state, or an LM context).
Value iteration needs known and a sweep over all states. When part of the environment is an adversary and the state space is too large to list, search forward from the current position — next: games and Monte Carlo tree search.
Check your understanding
The same questions as in Pulse. Answers are shared between modes.
Go deeper — optional
Code and labs do not count toward the main percentage or the certificate.
- One Bellman backup for an MDPoptional
Compute V'(s) = max_a Σ p(s'|s,a)[r + γV(s')] on a tiny MDP; match the table.
~25 min · easier on a computer · The matching course topic has been read.
Self-check in the notebook — not part of mastery or the certificate.
Answers are saved on the server and tied to this browser until you sign in.