Simple Algorithm
Reinforcement Learning · Fixed Point · 28 min

Bellman Operators & Contraction

Fixed points, Banach’s theorem, and why repeated backups converge.

Every planning and learning algorithm in this course applies a Bellman operator over and over, exactly or from samples. This lesson proves why that converges and what the limit guarantees, prices an imperfect value function in lost return, and then goes where the classical proof stops: norms in which the operators do or do not contract, why greedy policies settle long before values do, and what the iterates look like in the geometry of value space.

What you’ll learn

  • Prove that Tπ\mathcal T^\pi and T⋆\mathcal T^\star are monotone and shift constants by γ\gamma, and derive their γ\gamma-contraction from these two properties.
  • State and prove Banach's fixed point theorem with its a priori and a posteriori error bounds, and apply it to policy evaluation and value iteration.
  • Prove that a policy greedy with respect to VV, with ∥V−V⋆∥∞≤ε\norm{V - V^\star}_\infty \le \varepsilon, loses at most 2γε/(1−γ)2\gamma\varepsilon/(1-\gamma), and construct an MDP where the loss reaches the bound.
  • Analyze contraction in the span seminorm and in weighted L2L_2 norms, and show where the optimality operator fails to contract.
  • Locate value-iteration and policy-iteration iterates in the value polytope.

Two operators, two properties

DerivationMonotonicity, constant shift, contraction
  1. V≤W  ⟹  TπV≤TπWandT⋆V≤T⋆WV \le W \;\Longrightarrow\; \mathcal T^\pi V \le \mathcal T^\pi W \quad\text{and}\quad \mathcal T^\star V \le \mathcal T^\star W

    Monotonicity. PπP^\pi has nonnegative entries, so V≤WV \le W implies γPπV≤γPπW\gamma P^\pi V \le \gamma P^\pi W. Each bracket inside the maximum of T⋆\mathcal T^\star is monotone in VV, and a maximum of monotone functions is monotone:

  2. T(V+c 1)=TV+γc 1for T∈{Tπ,T⋆}, c∈R\mathcal T(V + c\,\mathbf 1) = \mathcal T V + \gamma c\,\mathbf 1\qquad\text{for } \mathcal T \in \{\mathcal T^\pi, \mathcal T^\star\},\ c \in \R

    Constant shift. Every row P(⋅∣s,a)P(\cdot \mid s,a) sums to 1, so a constant added in every state comes back multiplied by γ\gamma, in both operators:

  3. TV≤T(W+c 1)=TW+γc 1\mathcal T V \le \mathcal T(W + c\,\mathbf 1) = \mathcal T W + \gamma c\,\mathbf 1

    Contraction. Let c=∥V−W∥∞c = \norm{V - W}_\infty, so that V≤W+c 1V \le W + c\,\mathbf 1. Apply monotonicity, then the shift:

  4. ∥TV−TW∥∞≤γ ∥V−W∥∞\norm{\mathcal T V - \mathcal T W}_\infty \le \gamma\,\norm{V - W}_\infty

    Exchanging VV and WW gives the reverse inequality, and together they bound every coordinate: a contraction of modulus γ\gamma in the max norm. ■\blacksquare

This argument, known as Blackwell's sufficient conditions for a contraction (Blackwell, 1965), never looks inside the maximum. Any operator that is monotone and satisfies T(V+c 1)≤TV+γc 1\mathcal T(V + c\,\mathbf 1) \le \mathcal T V + \gamma c\,\mathbf 1 for c≥0c \ge 0 is a γ\gamma-contraction in the max norm: compositions and mixtures of Bellman operators, the max-min backups of two-player zero-sum stochastic games, and the log-sum-exp backups of entropy-regularized RL all qualify. The modulus cannot be improved in general: with one state and one action that loops back to it, TV=r+γV\mathcal T V = r + \gamma V shrinks every distance by exactly γ\gamma.

Check your understanding

An optimistic planner adds a fixed bonus b(s,a)≥0b(s,a) \ge 0 to the rewards: (TbV)(s)=max⁡a[r(s,a)+b(s,a)+γ∑s′P(s′∣s,a) V(s′)](\mathcal T_b V)(s) = \max_a\big[r(s,a) + b(s,a) + \gamma\sum_{s'}P(s' \mid s,a)\,V(s')\big]. Is Tb\mathcal T_b a γ\gamma-contraction in the max norm?

  1. No: the bonus inflates the values, so the iterates can grow without bound
  2. Only if every bonus is smaller than 1−γ1-\gamma
  3. Only in a weighted L2L_2 norm
  4. Yes: it is monotone and shifts constants by γ\gamma, so Blackwell's conditions hold; the bonus only moves the fixed point
Show the answer

D. Yes: it is monotone and shifts constants by γ\gamma, so Blackwell's conditions hold; the bonus only moves the fixed point

The bonus is a constant inside the bracket, so it affects neither monotonicity nor the shift property. Tb\mathcal T_b contracts with modulus γ\gamma, and its unique fixed point is the optimal value of the MDP with rewards r+br + b, at most ∥b∥∞/(1−γ)\norm{b}_\infty/(1-\gamma) above V⋆V^\star. Optimistic exploration algorithms plan with exactly such operators (Optimism in MDPs: UCRL2 & UCBVI).

Banach’s fixed point theorem

DerivationProof
  1. d(xj+1,xj)≤γjd(x1,x0)  ⟹  d(xk+m,xk)≤∑j=kk+m−1γjd(x1,x0)≤γk1−γ d(x1,x0)d(x_{j+1}, x_j) \le \gamma^j d(x_1, x_0)\;\Longrightarrow\; d(x_{k+m}, x_k) \le \sum_{j=k}^{k+m-1}\gamma^j d(x_1, x_0) \le \frac{\gamma^k}{1-\gamma}\,d(x_1, x_0)

    Successive steps shrink geometrically, so by the triangle inequality and the geometric series, iterates far apart in time are close:

  2. So (xk)(x_k) is a Cauchy sequence, and completeness gives a limit x⋆x^\star. A contraction is continuous, so letting k→∞k \to \infty in xk+1=Txkx_{k+1} = \mathcal T x_k gives x⋆=Tx⋆x^\star = \mathcal T x^\star. Letting m→∞m \to \infty in the last display gives the second bound.

  3. Uniqueness and rate. If also Ty⋆=y⋆\mathcal T y^\star = y^\star, then d(x⋆,y⋆)=d(Tx⋆,Ty⋆)≤γ d(x⋆,y⋆)d(x^\star, y^\star) = d(\mathcal T x^\star, \mathcal T y^\star) \le \gamma\,d(x^\star, y^\star), which forces d(x⋆,y⋆)=0d(x^\star, y^\star) = 0. The first bound follows by induction from d(xk,x⋆)=d(Txk−1,Tx⋆)≤γ d(xk−1,x⋆)d(x_k, x^\star) = d(\mathcal T x_{k-1}, \mathcal T x^\star) \le \gamma\,d(x_{k-1}, x^\star).

  4. d(xk,x⋆)≤γ1−γ d(xk,xk−1)d(x_k, x^\star) \le \frac{\gamma}{1-\gamma}\,d(x_k, x_{k-1})

    A posteriori bound. By the triangle inequality, d(xk,x⋆)≤d(xk,xk+1)+d(xk+1,x⋆)≤γ d(xk−1,xk)+γ d(xk,x⋆)d(x_k, x^\star) \le d(x_k, x_{k+1}) + d(x_{k+1}, x^\star) \le \gamma\,d(x_{k-1}, x_k) + \gamma\,d(x_k, x^\star). Rearranging gives a bound that can be computed during the run, so it doubles as a stopping rule. ■\blacksquare

For a finite MDP, RS\R^{\mathcal S} with ∥⋅∥∞\norm{\cdot}_\infty is complete, and for infinite state spaces with bounded rewards the bounded functions with the sup norm are too. So the Bellman expectation equation has exactly one bounded solution, VπV^\pi; the optimality equation has exactly one, V⋆V^\star; and iterative policy evaluation and value iteration converge from any start, with ∥Vk−V⋆∥∞≤γk∥V0−V⋆∥∞\norm{V_k - V^\star}_\infty \le \gamma^k\norm{V_0 - V^\star}_\infty. Since ln⁡(1/γ)≥1−γ\ln(1/\gamma) \ge 1-\gamma, reaching accuracy ε\varepsilon takes at most 11−γln⁡∥V0−V⋆∥∞ε\frac{1}{1-\gamma}\ln\frac{\norm{V_0 - V^\star}_\infty}{\varepsilon} iterations, rounded up: the effective horizon times a logarithm.

Predict before you look

Value iteration on the two-state MDP of the value-space widget (γ=0.9\gamma = 0.9) starts at V0=(0,0)V_0 = (0, 0), where ∥V0−V⋆∥∞=20\norm{V_0 - V^\star}_\infty = 20. By the bound ∥Vk−V⋆∥∞≤20⋅0.9k\norm{V_k - V^\star}_\infty \le 20 \cdot 0.9^k, after how many backups is the error guaranteed to be at most 0.01?

Show the answer

73

We need 20⋅0.9k≤0.0120 \cdot 0.9^k \le 0.01, so k≥ln⁡(2000)/ln⁡(1/0.9)=7.60/0.105≈72.1k \ge \ln(2000)/\ln(1/0.9) = 7.60/0.105 \approx 72.1: 73 backups. On this MDP the bound is exact: from (0,0)(0, 0) the error shrinks by exactly 0.9 per backup, and the widget reports 73 as the first backup within 0.01.

What an imperfect value function costs

DerivationProof
  1. ∥V⋆−Vπ∥∞=∥T⋆V⋆−TπVπ∥∞≤∥T⋆V⋆−T⋆V∥∞+∥TπV−TπVπ∥∞\norm{V^\star - V^\pi}_\infty = \norm{\mathcal T^\star V^\star - \mathcal T^\pi V^\pi}_\infty \le \norm{\mathcal T^\star V^\star - \mathcal T^\star V}_\infty + \norm{\mathcal T^\pi V - \mathcal T^\pi V^\pi}_\infty

    Use both fixed-point equations and insert TπV=T⋆V\mathcal T^\pi V = \mathcal T^\star V:

  2. ∥V⋆−Vπ∥∞≤γε+γ(ε+∥V⋆−Vπ∥∞)⟹∥V⋆−Vπ∥∞≤2γε1−γ\norm{V^\star - V^\pi}_\infty \le \gamma\varepsilon + \gamma\big(\varepsilon + \norm{V^\star - V^\pi}_\infty\big)\quad\Longrightarrow\quad \norm{V^\star - V^\pi}_\infty \le \frac{2\gamma\varepsilon}{1-\gamma}

    Both operators are γ\gamma-contractions, and ∥V−Vπ∥∞≤ε+∥V⋆−Vπ∥∞\norm{V - V^\pi}_\infty \le \varepsilon + \norm{V^\star - V^\pi}_\infty:

  3. ∥V⋆−Vπ∥∞≤2ε+γ∥V⋆−Vπ∥∞⟹∥V⋆−Vπ∥∞≤2ε1−γ\norm{V^\star - V^\pi}_\infty \le 2\varepsilon + \gamma\norm{V^\star - V^\pi}_\infty\quad\Longrightarrow\quad \norm{V^\star - V^\pi}_\infty \le \frac{2\varepsilon}{1-\gamma}

    For action values, greediness gives, for every action aa, Q⋆(s,π(s))≥Q(s,π(s))−ε≥Q(s,a)−ε≥Q⋆(s,a)−2εQ^\star(s,\pi(s)) \ge Q(s,\pi(s)) - \varepsilon \ge Q(s,a) - \varepsilon \ge Q^\star(s,a) - 2\varepsilon. So each step of π\pi gives up at most 2ε2\varepsilon against V⋆V^\star, and V⋆−Vπ=(V⋆−Q⋆(⋅,π))+γPπ(V⋆−Vπ)V^\star - V^\pi = \big(V^\star - Q^\star(\cdot,\pi)\big) + \gamma P^\pi(V^\star - V^\pi) adds these losses up over the horizon. ■\blacksquare

Two consequences follow.

  • A stopping rule. If ∥Vk+1−Vk∥∞<ε(1−γ)/(2γ)\norm{V_{k+1} - V_k}_\infty < \varepsilon(1-\gamma)/(2\gamma), the greedy policy π\pi of Vk+1V_{k+1} is ε\varepsilon-optimal (Puterman, 1994, Thm 6.3.1). Plugging the a posteriori bound into the theorem above gives only γε/(1−γ)\gamma\varepsilon/(1-\gamma); the sharper proof applies the a posteriori argument twice, to ∥Vk+1−V⋆∥∞\norm{V_{k+1} - V^\star}_\infty and to ∥Vπ−Vk+1∥∞\norm{V^\pi - V_{k+1}}_\infty, each below ε/2\varepsilon/2. Error Bounds & Stopping Rules works through it.
  • The policy converges in finitely many steps. A finite MDP has finitely many deterministic policies, so every suboptimal one falls short by at least some gap δ>0\delta > 0 in some state. Once 2γεk/(1−γ)<δ2\gamma\varepsilon_k/(1-\gamma) < \delta, every greedy policy is optimal, although the values converge only in the limit. On the two-state MDP δ=8\delta = 8, and the bound promises an optimal greedy policy from backup 37. In fact it is optimal from backup 2. The next step explains the gap.

Why greedy policies settle early: the span

DerivationProof for the optimality operator
  1. γ∑jP(j∣s,bs) D(j)  ≤  (T⋆V−T⋆W)(s)  ≤  γ∑jP(j∣s,as) D(j)\gamma\sum_j P(j \mid s, b_s)\,D(j) \;\le\; (\mathcal T^\star V - \mathcal T^\star W)(s) \;\le\; \gamma\sum_j P(j \mid s, a_s)\,D(j)

    Let D=V−WD = V - W, let asa_s be greedy for VV and bsb_s greedy for WW in state ss. Using the other function's greedy action as a suboptimal choice bounds the difference from both sides:

  2. ∑j(pj−qj) D(j)≤τ(p,q)(max⁡jD(j)−min⁡jD(j))=τ(p,q)sp⁡(D)\sum_j (p_j - q_j)\,D(j) \le \tau(p,q)\Big(\max_j D(j) - \min_j D(j)\Big) = \tau(p,q)\operatorname{sp}(D)

    So the difference between the values at two states ss and uu is at most γ∑j(pj−qj)D(j)\gamma\sum_j(p_j - q_j)D(j) for two rows p=P(⋅∣s,as)p = P(\cdot \mid s, a_s) and q=P(⋅∣u,bu)q = P(\cdot \mid u, b_u). Write p−q=(p−m)−(q−m)p - q = (p - m) - (q - m) with m=min⁡(p,q)m = \min(p, q) entrywise: both parts are nonnegative with the same total mass τ(p,q)\tau(p,q), so the first contributes at most τmax⁡jD(j)\tau\max_j D(j) and the second at least τmin⁡jD(j)\tau\min_j D(j):

  3. Maximize over the two states. For Tπ\mathcal T^\pi the same steps run with the rows of PπP^\pi. ■\blacksquare

The two MDPs of the value-space widget show what this buys. In slippery, every row is (0.8,0.2)(0.8, 0.2) or (0.2,0.8)(0.2, 0.8), so τ⋆=0.6\tau^\star = 0.6, and at γ=0.9\gamma = 0.9 the span of value iteration's error must shrink by a factor of at least 0.540.54 per backup. From V0=0V_0 = 0 it is 2, 1, 0.46, 0.17, 0.011 and then exactly 0, while the max-norm error shrinks by a factor of 0.88 to 0.90 per backup. In default the moves are deterministic, τ⋆=1\tau^\star = 1, and the theorem promises nothing beyond γ\gamma; yet the span of the error is 2, 1, 0.1 and then 0 from backup 3. The reason is the optimal policy: once the greedy policy is (go, stay), both states move to s2s_2, PπP^\pi has two equal rows, τπ=0\tau^\pi = 0, and the remaining error is the constant vector Vk−V⋆=−20⋅0.9k 1V_k - V^\star = -20 \cdot 0.9^k\,\mathbf 1. The values still have far to go, but no greedy choice can see the difference.

That last observation belongs to the geometry of value space. Dadashi, Taïga, Le Roux, Schuurmans and Bellemare (2019) showed that the set {Vπ}\{V^\pi\} of values of all stationary policies is a polytope, in general not convex, whose vertices are values of deterministic policies, and that policies agreeing in all states but one have values on a single line segment (their line theorem). On the default MDP at γ=0.9\gamma = 0.9 the value polytope is a bowtie: two triangles touching at (10,11.11)(10, 11.11). The operators move through this picture in different ways. Each Tπ\mathcal T^\pi is an affine map pulling the whole plane toward one corner. Policy iteration jumps from corner to corner, at most ASA^S times and in practice very few. Value iteration travels through the plane, often outside the polytope, and its greedy policy changes only when the point crosses a stripe boundary.

Weighted norms, and where the optimality operator fails

The max norm is not the only one that matters.

  • Weighted max norms. Without discounting the max-norm argument fails, but in a stochastic shortest-path problem in which every stationary policy reaches the terminal state with probability 1, T⋆\mathcal T^\star and every Tπ\mathcal T^\pi are contractions in a weighted max norm ∥V∥ξ=max⁡s∣V(s)∣/ξ(s)\norm{V}_\xi = \max_s\abs{V(s)}/\xi(s), with weights ξ\xi built from expected times to termination (Bertsekas & Tsitsiklis, 1996). States far from the end are allowed larger errors.
  • Weighted L2L_2 norms. With function approximation, values are projected onto a space of features in a weighted norm ∥V∥d=(∑sd(s)V(s)2)1/2\norm{V}_d = \big(\sum_s d(s)V(s)^2\big)^{1/2}. A projection is a non-expansion in its own L2L_2 norm but not in the max norm, so the stability of approximate methods turns on contraction in norms like ∥⋅∥d\norm{\cdot}_d.
DerivationA policy’s operator contracts in the norm of its own occupancy
  1. γ d⊤Pπ≤d⊤\gamma\,d^\top P^\pi \le d^\top

    Let d=dμπd = d^\pi_\mu be the normalized discounted state distribution of π\pi (Occupancy Measures & the Dual View). Its flow constraints, d⊤=(1−γ)μ⊤+γ d⊤Pπd^\top = (1-\gamma)\mu^\top + \gamma\,d^\top P^\pi, give an entrywise inequality:

  2. ∥γPπV∥d2=γ2∑sd(s)(∑s′Pπ(s,s′) V(s′))2≤γ∑s′(γ∑sd(s) Pπ(s,s′))V(s′)2≤γ ∥V∥d2\norm{\gamma P^\pi V}_d^2 = \gamma^2\sum_s d(s)\Big(\sum_{s'}P^\pi(s,s')\,V(s')\Big)^2 \le \gamma\sum_{s'}\Big(\gamma\sum_s d(s)\,P^\pi(s,s')\Big)V(s')^2 \le \gamma\,\norm{V}_d^2

    Apply Jensen's inequality inside each row of PπP^\pi, then that inequality:

  3. So ∥TπV−TπW∥d≤γ ∥V−W∥d\norm{\mathcal T^\pi V - \mathcal T^\pi W}_d \le \sqrt\gamma\,\norm{V - W}_d. The bound is tight: for (go, stay) started in s1s_1, d=(0.1,0.9)d = (0.1, 0.9), and the difference (0,1)(0, 1) is stretched by exactly 0.9\sqrt{0.9}. With a stationary distribution of PπP^\pi in place of dd, the same steps give modulus γ\gamma (Tsitsiklis & Van Roy, 1997), the fact behind the convergence of on-policy linear TD (The Projected Bellman Equation & LSTD). ■\blacksquare

No such norm need exist for T⋆\mathcal T^\star. Take the default MDP with γ>1/2\gamma > 1/\sqrt2 and any weights d1+d2=1d_1 + d_2 = 1. Where (go, stay) is greedy for both points, in the stripe V(s2)−V(s1)>1/γV(s_2) - V(s_1) > 1/\gamma, the optimality operator acts as T(go, stay)\mathcal T^{(\text{go, stay})} and maps a difference (0,δ)(0, \delta) to (γδ,γδ)(\gamma\delta, \gamma\delta), stretching its weighted norm by γ/d2\gamma/\sqrt{d_2}. Where (stay, go) is greedy, it maps (δ,0)(\delta, 0) to (γδ,γδ)(\gamma\delta, \gamma\delta), a stretch of γ/d1\gamma/\sqrt{d_1}. One of d1,d2d_1, d_2 is at most ½, so one stretch is at least γ2≈1.27\gamma\sqrt2 \approx 1.27 at γ=0.9\gamma = 0.9. Concretely, U=(0,10)U = (0, 10) and W=(0,2)W = (0, 2) are 8 apart in the unweighted Euclidean norm, while T⋆U=(9,11)\mathcal T^\star U = (9, 11) and T⋆W=(1.8,3.8)\mathcal T^\star W = (1.8, 3.8) are 7.22≈10.27.2\sqrt2 \approx 10.2 apart. Each Tπ\mathcal T^\pi contracts in a norm tuned to π\pi, but the maximum inside T⋆\mathcal T^\star switches between policies that need incompatible weights: one root of the instability of approximate value iteration and Q-learning with function approximation (The Deadly Triad).

Check your understanding

On-policy linear TD converges; Q-learning with linear features can diverge. Which operator fact lies behind the difference?

  1. T⋆\mathcal T^\star is not a contraction in the max norm
  2. Linear features cannot represent Q⋆Q^\star
  3. Each Tπ\mathcal T^\pi contracts in an L2L_2 norm weighted by its own state distribution, but T⋆\mathcal T^\star acts like a different Tπ\mathcal T^\pi in each region of value space, and no single weighting need work for all of them
  4. Tπ\mathcal T^\pi is linear and T⋆\mathcal T^\star is not, and nonlinear maps never contract
Show the answer

C. Each Tπ\mathcal T^\pi contracts in an L2L_2 norm weighted by its own state distribution, but T⋆\mathcal T^\star acts like a different Tπ\mathcal T^\pi in each region of value space, and no single weighting need work for all of them

Projection onto features is a non-expansion only in a weighted L2L_2 norm. Tπ\mathcal T^\pi contracts in the norm weighted by its own stationary or discounted distribution, so projected policy evaluation is stable on-policy. T⋆\mathcal T^\star is piecewise equal to different Tπ\mathcal T^\pi, and on the two-state MDP no weighting makes all of them non-expansive once γ>1/2\gamma > 1/\sqrt2.

Key takeaways

  • Monotonicity and the constant shift T(V+c 1)=TV+γc 1\mathcal T(V + c\,\mathbf 1) = \mathcal T V + \gamma c\,\mathbf 1 make every Bellman-type operator a γ\gamma-contraction in the max norm (Blackwell's conditions).
  • Banach's theorem gives unique fixed points VπV^\pi and V⋆V^\star, convergence from any start at rate γk\gamma^k, and the computable bound γ1−γ∥Vk−Vk−1∥∞\frac{\gamma}{1-\gamma}\norm{V_k - V_{k-1}}_\infty on the remaining error.
  • A greedy policy built from an ε\varepsilon-accurate VV loses at most 2γε/(1−γ)2\gamma\varepsilon/(1-\gamma) (at most 2ε/(1−γ)2\varepsilon/(1-\gamma) from an ε\varepsilon-accurate QQ), and some MDPs attain this.
  • Greedy policies see values only up to an additive constant. The span of the error contracts with modulus γτ\gamma\tau, where τ\tau measures how little transition rows overlap, and it can vanish long before the max-norm error does.
  • Tπ\mathcal T^\pi contracts in L2L_2 norms weighted by its own state distribution (γ\sqrt\gamma for the discounted occupancy, γ\gamma for the stationary one), while T⋆\mathcal T^\star can fail to be a non-expansion in every weighted L2L_2 norm: one root of instability under function approximation.

Check yourself

In the interactive lesson these are scored with your confidence, and what you miss comes back for review.

Question 1

Value iteration with γ=0.9\gamma = 0.9 reports ∥Vk−Vk−1∥∞=0.1\norm{V_k - V_{k-1}}_\infty = 0.1. What does Banach's a posteriori bound guarantee about ∥Vk−V⋆∥∞\norm{V_k - V^\star}_\infty?

  1. At most 0.09
  2. At most 0.1
  3. At most 0.9
  4. At most 1.0
Show the answer

C. At most 0.9

γ1−γ∥Vk−Vk−1∥∞=9×0.1=0.9\frac{\gamma}{1-\gamma}\norm{V_k - V_{k-1}}_\infty = 9 \times 0.1 = 0.9. A small last step does not mean a small error: the remaining steps can each be up to γ\gamma times the previous one, and they add up to γ/(1−γ)\gamma/(1-\gamma) times the last.

Question 2

An agent's value estimates satisfy ∥V−V⋆∥∞≤0.5\norm{V - V^\star}_\infty \le 0.5, with γ=0.99\gamma = 0.99. In the worst case, how much can its greedy policy lose in some state?

  1. 0.5
  2. 1
  3. 9
  4. 99
Show the answer

D. 99

2γε/(1−γ)=2⋅0.99⋅0.5/0.01=992\gamma\varepsilon/(1-\gamma) = 2 \cdot 0.99 \cdot 0.5/0.01 = 99, and the example of the looping agent shows that such losses are attainable: a misjudgment of size about 2ε2\varepsilon per step, paid over an effective horizon of 100 steps.

Question 3

Which two properties of T⋆\mathcal T^\star suffice to prove that it is a γ\gamma-contraction in the max norm?

  1. Monotonicity, and T⋆(V+c 1)=T⋆V+γc 1\mathcal T^\star(V + c\,\mathbf 1) = \mathcal T^\star V + \gamma c\,\mathbf 1 for constants cc
  2. Linearity and boundedness
  3. Continuity and convexity
  4. Uniqueness of the fixed point and existence of a greedy policy
Show the answer

A. Monotonicity, and T⋆(V+c 1)=T⋆V+γc 1\mathcal T^\star(V + c\,\mathbf 1) = \mathcal T^\star V + \gamma c\,\mathbf 1 for constants cc

Blackwell's conditions: from V≤W+∥V−W∥∞1V \le W + \norm{V - W}_\infty\mathbf 1, monotonicity and the shift give T⋆V≤T⋆W+γ∥V−W∥∞1\mathcal T^\star V \le \mathcal T^\star W + \gamma\norm{V - W}_\infty\mathbf 1, and symmetrically. Nothing about the maximum itself is used.

Question 4

From some backup on, value iteration's error is a constant vector: Vk−V⋆=−ck1V_k - V^\star = -c_k\mathbf 1 with ck>0c_k > 0. What can you conclude?

  1. Nothing until ckc_k falls below δ(1−γ)/(2γ)\delta(1-\gamma)/(2\gamma), as the greedy-loss bound requires
  2. The greedy policy of VkV_k is optimal, although ∥Vk−V⋆∥∞=ck\norm{V_k - V^\star}_\infty = c_k may still be large
  3. The greedy policy is optimal only once ck=0c_k = 0
  4. The iteration has stalled and must be restarted
Show the answer

B. The greedy policy of VkV_k is optimal, although ∥Vk−V⋆∥∞=ck\norm{V_k - V^\star}_\infty = c_k may still be large

Greedy choices are invariant to adding a constant to VV: every action's lookahead shifts by the same γck\gamma c_k. So VkV_k and V⋆V^\star have the same greedy policies, which are optimal. The span of the error is 0 while its max norm is ckc_k: the situation of the default two-state MDP from backup 3.

Further reading

  • D. Blackwell, "Discounted dynamic programming," Annals of Mathematical Statistics 36(1), 226–235 (1965).
  • S. P. Singh & R. C. Yee, "An upper bound on the loss from approximate optimal-value functions," Machine Learning 16(3), 227–233 (1994).
  • R. Dadashi, A. A. Taïga, N. Le Roux, D. Schuurmans & M. G. Bellemare, "The value function polytope in reinforcement learning," ICML, PMLR 97, 1486–1495 (2019).
  • M. L. Puterman, Markov Decision Processes: Discrete Stochastic Dynamic Programming, ch. 6 (Wiley, 1994).
  • D. P. Bertsekas & J. N. Tsitsiklis, Neuro-Dynamic Programming, ch. 2 (Athena Scientific, 1996).