Infinite-Horizon Discounted Dynamic Programming: Bellman Contraction, Value and Policy Iteration
Anchor (Master): Bertsekas 2017 Dynamic Programming and Optimal Control 4e (Athena Scientific) Vol. 2 Ch. 1-2 (the complete discounted theory: contraction and monotonicity of , existence/uniqueness of , value iteration error bounds, policy iteration with its finite termination for finite MDPs, the modified/optimistic variants, and the linear-programming formulation); Puterman 1994 Markov Decision Processes (Wiley) Ch. 6 (discounted MDPs) and Ch. 8 (the average-cost criterion and the vanishing-discount limit)
Intuition Beginner
The previous unit planned over a fixed number of stages by working backward from a known end. But many decision problems have no end in sight: a power company balancing a reservoir forever, a robot wandering a warehouse indefinitely, an investor reinvesting without a final date. There is no last stage to start the backward sweep from. Infinite-horizon dynamic programming is the method for these never-ending problems, and the surprise is that endlessness can make the problem cleaner, not messier.
The first issue is that adding up costs over infinitely many stages could give an infinite total, which would make every plan look equally bad. The fix is discounting: a cost paid one stage from now counts a little less than a cost paid right now, two stages out counts less still, and so on, each future stage shrunk by a factor smaller than one. Distant costs fade toward nothing, so the whole infinite sum settles on a finite number. This matches how people and companies actually value the future, and it is what keeps the mathematics finite.
Because the problem looks the same at every stage — the same options, the same rule for what happens next — the best plan does not depend on what stage you are at. You can describe the optimal behavior by a single rule that says, for each situation, what to do, used forever. And the value of each situation satisfies one self-referential equation: the value of being here equals the best immediate cost plus the discounted value of wherever you land next. That single equation, applied to itself, is the whole story.
The payoff is a method that finds those values by repetition. Start with any guess for the value of every situation, apply the one-stage rule once to update them all, and repeat. The guesses march steadily toward the true values, and because future costs are discounted, they march fast.
Visual Beginner
Picture one update of the value table. You hold a current guess for the value of every situation. To improve the guess for a single situation, you look one step ahead: for each available action, add its immediate cost to the discounted current guess at wherever that action sends you, then keep the smallest such total. Do this for every situation at once, and you have a new, better table. Repeat.
The discount factor, a number between and , multiplies the next-step value before you add it on. A factor near means you barely care about the future, so the table settles almost instantly. A factor near means the future matters a lot, so the table takes more sweeps to settle but still settles.
| discount factor | how much the future counts | how fast the table settles |
|---|---|---|
| close to | almost not at all | settles in a few sweeps |
| middling, like | the near future counts a lot | settles steadily |
| close to | nearly as much as the present | settles slowly but surely |
Each sweep shrinks the gap between your table and the true values by the discount factor, so the error falls by that fixed proportion every time.
Worked example Beginner
A machine is either up or down each day. Each morning, if it is up you may leave it (cost ) or inspect it (cost ); if it is down you must repair it (cost ). Leaving an up machine, it stays up the next day; here, to keep arithmetic clean, assume inspecting an up machine also keeps it up, and repairing a down machine makes it up the next day. We want the cheapest long-run discounted cost with discount factor .
This setup makes leaving always at least as cheap as inspecting from the up state, so we expect "leave" to win there. Let us find the values by repeated updates. Write and for the current guesses, and start both at .
Sweep 1. From up, the cheapest action is "leave": cost plus times next value , total . From down, the only action is "repair": cost plus , total . New table: , .
Sweep 2. From up, leave: . From down, repair: . New table: , .
The table did not change, so we have reached the true values: and . An always-up machine you simply leave alone costs nothing in the long run; a machine that starts down costs once to fix and then nothing.
What this tells us: the same one-step rule, applied over and over, drove the value table to a place where one more application changes nothing. That unmoving table is the solution, and the rule "leave when up, repair when down" is the optimal forever-policy read off from it.
Check your understanding Beginner
Formal definition Intermediate+
A stationary discounted controlled problem is specified by a state space , a control space , a nonempty admissible-control set for each , a disturbance space , a system map , a disturbance law on depending only on — the controlled-Markov structure of 37.05.01 — a bounded stage cost , and a discount factor . Nothing depends on the stage index; this is the infinite-horizon stationary counterpart of the finite-horizon problem 44.08.01. A stationary policy is a single map with used at every stage; the expected discounted cost of from is
which converges because gives . The optimal cost is , the infimum over (in general, history-dependent) policies; under discounting it is attained within stationary policies.
Let denote the space of bounded functions with the supremum norm , a Banach space (a complete normed space; the metric/completeness substrate is 02.01.05). Define the Bellman (dynamic-programming) operator and the policy operator by
the expectations over . Both map into itself: boundedness of and keep the outputs within . The discounted Bellman equation is the fixed-point equation , and the policy-evaluation equation is . A stationary policy is greedy with respect to if , i.e. attains the infimum defining for every . The symbols (Bellman operator), (policy operator), (optimal cost), (policy cost), (discount factor), and (sup-norm) are recorded in _meta/NOTATION.md.
Counterexamples to common slips Intermediate+
"The optimal policy depends on the stage, as in the finite-horizon problem." It does not. Stationarity of the data plus discounting make the problem identical at every stage, so the optimal behavior is one stage-independent map used forever. The finite-horizon varied with only because the remaining horizon shrank; an infinite remaining horizon is the same from every stage.
"Without a terminal stage there is no backward recursion, so dynamic programming cannot apply." The backward recursion is replaced by iteration of the same operator: from any start converges to . The finite-horizon are exactly the iterates ; removing the horizon turns a finite backward sweep into an infinite forward iteration of one operator.
"Any bounded function solving might fail to be the optimal cost." Under the operator has a unique fixed point in , and that fixed point is . Uniqueness is what makes "solve Bellman's equation" a complete method: there is no spurious second solution to rule out.
"Policy iteration could cycle or improve forever without stopping." For a finite-state, finite-action MDP each improvement step strictly lowers the cost of at least one state unless the policy is already optimal, and there are only finitely many stationary policies, so the process terminates at an optimal policy in finitely many steps. The discount-induced monotonicity forbids cycling.
Key theorem with proof Intermediate+
The signature result is that the Bellman operator is a sup-norm contraction of modulus , from which existence, uniqueness, value-iteration convergence, and greedy optimality all follow by the Banach fixed-point theorem 02.01.05. It is the single statement that converts an infinite-stage optimization into the search for one operator's fixed point.
Theorem (Bellman contraction and the discounted optimality equation). On with the sup-norm, both and every are contractions of modulus :
Consequently has a unique fixed point , which equals the optimal cost; value iteration from any converges geometrically, ; each has a unique fixed point ; and a stationary policy is optimal if and only if it is greedy with respect to , i.e. .
Proof. Fix and . For each admissible , the disturbance integrand satisfies , bounded in absolute value by since pointwise and the expectation is an average. Hence for every ,
Taking the infimum over on both sides (the constant survives the infimum) gives ; the symmetric argument gives the reverse, so for all , which is the contraction bound for . The same estimate without the infimum (a single fixed control ) yields it for .
Because is complete and , the Banach fixed-point theorem 02.01.05 gives a unique fixed point , the convergence with the geometric a-priori estimate (specialize the metric bound to ), and a unique for each .
That the fixed point equals the optimal cost: for any stationary , pointwise (the infimum is any particular control), and monotonicity of (if then , since the integrand is increasing in and ) iterated gives ; thus . Conversely, choose greedy for (so , meaning is the fixed point of , i.e. by uniqueness); then . The two inequalities give , the optimal cost, attained by . Finally, if is optimal then , and applying to its own fixed point, , so is greedy for ; the converse was just shown.
Bridge. This theorem is the foundational reason infinite-horizon control reduces to solving a single equation: the -contraction collapses the limit over infinitely many stages into the unique fixed point of one operator, and the geometric estimate is exactly the rate at which value iteration homes in. The central insight is that the discount factor is the contraction modulus — the same that keeps the infinite cost sum finite is the number that shrinks the error each sweep — so convergence speed and well-posedness have one common cause. This is exactly the structure of the finite-horizon backward recursion 44.08.01 run to its limit: the there are the iterates here, and the stage-wise monotonicity used in that optimality proof is the same monotonicity of used here. It generalises the Banach fixed-point theorem 02.01.05 from an abstract metric space to the concrete sup-norm space of value functions, and it builds toward the Markov decision process 44.08.03, where becomes the optimality operator over actions and transition kernels. Putting these together, value iteration, policy iteration, and the linear-programming formulation are three algorithms for one fixed point, and the bridge is that the greedy operator both certifies optimality and reads off the optimal stationary policy; this appears again in the Hamilton–Jacobi–Bellman equation 44.07.02, the continuous-time, undiscounted-limit shadow of the same fixed-point principle.
Exercises Intermediate+
Advanced results Master
The discounted theory extends in four directions: the policy-iteration algorithm with its monotone convergence and finite termination for finite models, the error bounds that make approximate value iteration usable, the linear-programming reformulation of the optimality equation, and the average-cost criterion recovered from the discounted one as .
Theorem 1 (policy iteration: monotone improvement and finite termination). Policy iteration generates a sequence of stationary policies by alternating exact policy evaluation — solve , the unique fixed point of the -contraction (a linear system for finite models) — with policy improvement — let be greedy for , i.e. . Then pointwise, with strict decrease at some state unless is optimal. For a finite-state, finite-action MDP there are finitely many stationary policies and the cost strictly decreases until optimality, so policy iteration terminates with an optimal policy in finitely many iterations; in fact it converges at least as fast as value iteration and typically far faster, since each step performs an exact infinite-horizon evaluation [Bertsekas Vol. 2 Ch. 1].
Theorem 2 (value-iteration error bounds and approximate DP). For value iteration , the contraction gives the a-priori bound and the computable a-posteriori bound , and the greedy policy extracted from is near-optimal: . When each iterate carries an approximation error (the regime of approximate dynamic programming and reinforcement learning with function approximation), the errors accumulate to a controlled steady state , and the greedy-policy loss is bounded by . The factor , the effective horizon, governs how approximation error inflates [Bertsekas Vol. 2 Ch. 2].
Theorem 3 (linear-programming formulation). For a finite discounted MDP, is the unique solution of the Bellman equation, and the inequalities for all characterize the functions , which (by monotonicity, ) lie below . Hence solves the linear program subject to those linear constraints, for any strictly positive weights . The dual program ranges over discounted state-action occupation measures, giving an exact LP route to the optimal cost and policy and connecting discounted DP to polyhedral optimization [Puterman Ch. 6].
Theorem 4 (average cost via the vanishing-discount limit). When future costs are not discounted, the relevant objective is the long-run average cost . Under suitable recurrence (e.g. a unichain finite MDP), the optimal average cost is a constant (the gain) solving the average-cost optimality equation for a bias function unique up to an additive constant. This equation is the limit of the discounted equation: , so the discounted value blows up at rate while its state-dependent part converges to the bias. The contraction modulus degenerates, which is why the average-cost theory requires the separate recurrence hypotheses that discounting otherwise renders unnecessary [Puterman Ch. 8].
Synthesis. The foundational reason infinite-horizon discounted control is solvable is that the discount factor is simultaneously what renders the infinite cost sum finite and the contraction modulus that makes the Bellman operator have a unique fixed point — these are one fact, not two. The central insight is the interchange this licenses: an optimization over all policies over all stages becomes the search for , and the optimal stationary policy is read off as the greedy policy . This is exactly the finite-horizon backward recursion 44.08.01 carried to its limit — the there are the iterates here, and value iteration is that recursion run forward forever. Value iteration (geometric rate ), policy iteration (the Newton-like step, finitely terminating for finite models), and the linear program () are three algorithms for the same fixed point. The framework generalises the Banach fixed-point theorem 02.01.05 to the sup-norm space of value functions, is dual to the Pontryagin co-state sweep through the Hamilton–Jacobi–Bellman equation 44.07.02, and builds toward the Markov decision process 44.08.03 and the average-cost criterion whose vanishing-discount limit reattaches the discounted value to a gain-plus-bias decomposition. Putting these together, the same algebraic move that powered the finite-horizon method — collapsing a sum over all futures into a one-step optimization against a stored value summary — appears again as the engine of approximate dynamic programming and value-function-based reinforcement learning, where the effective horizon measures the difficulty.
Full proof set Master
Proposition 1 (contraction of and ). On , and for all .
Proof. For fixed , , the last step because for every and expectation preserves this bound. Therefore for each . For the single control gives the bound directly. For , take the infimum over : for a constant , so ; swapping gives the reverse, hence for all , and the supremum over is the claim.
Proposition 2 (existence, uniqueness, and value-iteration convergence). has a unique fixed point , and for any , .
Proof. with the sup-norm is a Banach space, in particular a complete metric space under 02.01.05. By Proposition 1, is an -contraction with . The Banach fixed-point theorem gives a unique fixed point and the geometric estimate , which is the stated bound; forces convergence.
Proposition 3 (monotonicity and ). and each are monotone: and . The fixed point equals the optimal cost , attained by any policy greedy for .
Proof. Monotonicity: if then pointwise; multiplying by , adding , and taking expectation (order-preserving) gives ; the infimum over preserves the inequality, so , and the single-control case gives . Now for any , ; applying repeatedly and using its monotonicity, for all , and (Proposition 2 for ), so ; thus . Let be greedy for : , so is the fixed point of , i.e. by uniqueness, whence . Therefore .
Proposition 4 (greedy optimality criterion). A stationary policy is optimal () if and only if (i.e. is greedy with respect to ).
Proof. If , then is a fixed point of , so by uniqueness (Proposition 2 applied to ): is optimal. Conversely, if , then applying to its fixed point , , so is greedy for .
Proposition 5 (policy improvement). If is greedy for (), then , with strict inequality somewhere unless is optimal.
Proof. (infimum the particular control , and is policy evaluation). Applying the monotone repeatedly, , a nonincreasing sequence; by Proposition 2 for it converges to , so . If everywhere, then , so solves Bellman's equation and by uniqueness; hence strict improvement somewhere holds whenever is not optimal.
Proposition 6 (finite termination of policy iteration for finite MDPs). For a finite-state, finite-action MDP, policy iteration terminates at an optimal policy in finitely many iterations.
Proof. By Proposition 5 each improvement step gives with strict decrease at some state unless is optimal. The costs are thus strictly decreasing in the (componentwise) partial order until optimality, so no policy repeats before termination. There are at most stationary policies, so the process cannot improve indefinitely; it reaches a with , i.e. (Proposition 4), an optimal policy, after finitely many steps.
Connections Master
The finite-horizon dynamic programming of
44.08.01is the truncated, non-stationary precursor of this unit: its cost-to-go functions are exactly the value-iteration iterates of the operator defined here (in the stationary, discounted case), so removing the horizon converts the finite backward recursion into infinite forward iteration of one operator. The stage-wise monotonicity that drove the finite-horizon optimality proof is the same monotonicity of that proves and powers policy improvement here; the present unit is what the finite-horizon method becomes when the number of stages is sent to infinity and a discount stabilizes the limit.The Markov decision process
44.08.03is this unit's discounted problem with the controlled-Markov disturbance37.05.01promoted to the primitive object: states, actions, a transition kernel , and stage rewards/costs, with the Bellman operator becoming the MDP optimality operator and the greedy stationary policy becoming the optimal decision rule. The contraction, value iteration, and policy iteration proved here are the discounted-MDP solution methods; reinforcement learning replaces the exact expectation in with sampled estimates, inheriting the effective-horizon factor as its sample-complexity scale.The Banach fixed-point theorem
02.01.05is the abstract existence-uniqueness-and-rate engine on which the entire unit rests: this unit is its concrete instantiation on the Banach space of bounded value functions under the sup-norm, with the discount factor supplying the contraction modulus. The same fixed-point principle underlies Picard–Lindelöf existence for ODEs and the fixed-point iterations of numerical analysis43.02.02, so discounted dynamic programming is the optimal-control reading of one of analysis's most reused theorems.The Hamilton–Jacobi–Bellman equation appearing in the linear-quadratic regulator
44.07.02is the continuous-time counterpart of the discrete Bellman equation : where the discrete operator iterates to a fixed point, the continuous problem yields a first-order partial differential equation for the value function whose stationary solution plays the role of . The discounted discrete-time contraction is the well-posedness mechanism that the continuous HJB problem must replace with viscosity-solution or verification arguments, the discount factor reappearing as a zeroth-order term that makes the HJB operator coercive.
Historical & philosophical context Master
The discounted infinite-horizon formulation grew out of Richard Bellman's dynamic-programming program of the 1950s [Bertsekas Vol. 2 Ch. 1], with the operator-theoretic treatment — the Bellman operator as a contraction on a function space — crystallizing through the work of Ronald Howard, whose 1960 monograph introduced policy iteration as an algorithm distinct from successive approximation (value iteration), and David Blackwell, whose 1965 analysis placed discounted dynamic programming on rigorous measure-theoretic footing and proved the optimality of stationary policies. The recognition that the discount factor furnishes a contraction modulus, reducing the existence and uniqueness of the optimal value function to the Banach fixed-point theorem, is the structural fact that organizes the modern theory and is the anchor of this unit's central proof.
The systematic operator formulation with and on bounded functions, the contraction and monotonicity lemmas, the value-iteration error bounds, and the approximate dynamic-programming extensions are developed by Dimitri Bertsekas in Dynamic Programming and Optimal Control Volume 2 [Bertsekas Vol. 2 Ch. 2], the anchor for this unit. The discounted and average-cost Markov decision process theory, including Howard's policy iteration with its finite-termination proof, the linear-programming formulation, and the vanishing-discount limit relating the discounted value to the average-cost gain and bias, receives its standard reference treatment in Martin Puterman's 1994 monograph [Puterman Ch. 6]. The same contraction framework became the theoretical backbone of reinforcement learning, where temporal-difference and Q-learning methods are stochastic approximations of value iteration on the Bellman operator.
Bibliography Master
@book{bertsekas2012dpvol2,
author = {Bertsekas, Dimitri P.},
title = {Dynamic Programming and Optimal Control, Volume 2: Approximate Dynamic Programming},
edition = {4},
publisher = {Athena Scientific},
year = {2012}
}
@book{puterman1994mdp,
author = {Puterman, Martin L.},
title = {Markov Decision Processes: Discrete Stochastic Dynamic Programming},
publisher = {John Wiley \& Sons},
year = {1994}
}
@book{howard1960dp,
author = {Howard, Ronald A.},
title = {Dynamic Programming and Markov Processes},
publisher = {MIT Press},
year = {1960}
}
@article{blackwell1965discounted,
author = {Blackwell, David},
title = {Discounted Dynamic Programming},
journal = {The Annals of Mathematical Statistics},
volume = {36},
number = {1},
year = {1965},
pages = {226--235}
}
@book{suttonbarto2018,
author = {Sutton, Richard S. and Barto, Andrew G.},
title = {Reinforcement Learning: An Introduction},
edition = {2},
publisher = {MIT Press},
year = {2018}
}
@book{bertsekas2017dpvol1,
author = {Bertsekas, Dimitri P.},
title = {Dynamic Programming and Optimal Control, Volume 1},
edition = {4},
publisher = {Athena Scientific},
year = {2017}
}