Contents · Reinforcement Learning Theory
Part 0 · MDPs
Part 1 · Bellman & Value Iteration
- Bellman Operators and Value Iteration
Part 2 · Policy Gradients
Part 3 · Trust Regions
Part 4 · Actor-Critic
Part 1 · Bellman & Value Iteration
Bellman Operators and Value Iteration
Reinforcement learning and dynamic programming both rest on a single idea: apply one operator to a value function over and over, and the iterates converge. The reason they converge is not luck. The operator is a contraction, and its contraction rate is exactly the discount factor . That one fact powers value iteration, policy iteration, and every temporal-difference method that approximates a Bellman backup.
The Bellman optimality operator
Fix a finite Markov decision process with . A value function is just a vector in . The Bellman optimality operator maps a value function to a new one by taking the best one-step lookahead:
The optimal value function is characterized as the fixed point of this operator, the Bellman optimality equation .1 Value iteration simply applies the operator repeatedly from any start, , and hopes to land on .
A gamma-contraction in the sup-norm
Measure value functions in the sup-norm . The claim is that shrinks distances by at least :
The proof is two lines. Start from the elementary inequality . Applying it at a fixed state and cancelling the reward and transition-probability terms, which do not depend on the value function,
Each inner sum is a convex combination of the differences , so it is bounded by . The same bound holds with and swapped, giving for every , and taking the max over finishes it.2 The discount factor is the entire budget for how much the operator can fail to contract.
Banach gives geometric convergence
The space is complete, and is a contraction with modulus . The Banach fixed-point theorem then delivers three facts at once: has a unique fixed point , the iterates converge to it from any starting , and the convergence is geometric,
To reach accuracy takes on the order of iterations, which blows up as : long-horizon problems are genuinely harder to solve, and the contraction rate says exactly how much.
A two-state worked example
Take two states and . In the only move pays reward and stays in ; in the agent chooses between waiting (reward , stay in ) and going (reward , move to ). Both transitions are deterministic, so the operator is
Apply to two different value functions,
Then and , so
The bound is met with equality, so is the tightest possible constant. The fixed point solves , giving and . Running value iteration from makes the geometric law exact rather than merely an upper bound:
Each sweep multiplies the error by precisely , so on a log axis the error falls along a straight line of slope .
Value iteration in a gridworld
The demo runs the same operator on a stochastic gridworld. An action succeeds with probability and otherwise slips to a perpendicular cell; the goal pays and the pit pays . Stepping fills in the value heatmap and the greedy policy arrows converge. The second panel plots against on a log axis, with the bound overlaid.
- iteration k
- 0
- ‖V_k − V*‖∞
- 8.81e+0
- measured rate
- n/a
- contraction γ
- 0.90
The measured decay rate equals no matter how large the grid is, how much noise the slip injects, or where the rewards sit. That invariance is the practical payoff of the contraction: the same geometric guarantee that makes this tiny gridworld converge is what lets approximate value iteration scale to problems with billions of states.
Footnotes
-
Sutton & Barto, Reinforcement Learning: An Introduction (2018). ↩
-
Bertsekas, Dynamic Programming and Optimal Control. ↩