Revised working edition
Lecture 20: Value Iteration and Q-learning
EE290: Theory of
Multi-armed Bandits and Reinforcement Learning
Original lecture: 1 April 2021
Editorial revision for author review: 9 October 2026
Contents
Can a learner estimate a good policy without storing an estimate of the entire transition model? This lecture compares plug-in value iteration with synchronous Q-learning in a finite-horizon problem. It then examines how a particular learning rate controls the accumulation of sampling error.
Editorial status. This source preserves the original setup, both algorithms, the theorem claim, the weight identities, the proof outline, the appendix lemma, and all four references. Review notes identify assumptions and gaps that remain unresolved. Routine index and function-domain corrections are made explicitly; the original theorem is not presented as independently verified.
1 Recap: plug-in estimates
The preceding lecture introduced estimates of transition and reward functions for offline learning. Its main comparison was between the value of a policy in the true model and in the estimated, or plug-in, model. Small transition and reward errors can yield small value-function errors under suitable bounds. Here the focus shifts to learning action values directly.
2 Introduction
We study a finite-horizon setting with time-dependent transitions and rewards. The data access in the algorithms below permits fresh samples for each state, action, and time step. This is stronger than access to an arbitrary fixed batch of trajectories: it is a generative-model sampling assumption. The source’s use of “offline” should be read in that specified sense. Additional discussion appears in the Princeton lecture notes [1].
3 Setting
Let and be finite state and action spaces, with cardinalities and , and let be the horizon. At time , transitions follow The augmented state space separates different times into disjoint layers . A time-dependent process can then be represented by At the final layer, a terminal layer or absorbing terminal state is required; the displayed formula describes transitions between nonterminal layers. We use zero terminal values at .
4 Algorithms for time-dependent finite-horizon problems
4.1 Plug-in value iteration
For clarity, assume rewards are known and deterministic, The original motivation is that estimating an entire transition distribution can be more demanding than estimating a scalar mean reward. Uniform coverage is implemented here by drawing independent samples from every .
For each , let be those samples and define Starting from , compute backward in time: This is finite-horizon dynamic programming in the estimated model [2]. If the transition model is known exactly, the same recursion recovers the optimal action values. Performance guarantees for the estimated-model procedure are discussed in [3].
4.2 Q-learning
Q-learning stores action values instead of a transition table. At each iteration, it samples a successor state for every state-action-time triple and updates its value estimate. This reduces the storage associated with explicitly representing ; it does not eliminate the need for adequate sampling.
Initialize for and keep for all . For each iteration and each :
Draw a fresh .
Update Equation (1)
Set .
The source loops through . Because the right-hand side uses iteration , this is a synchronous update even when implemented in that order. The value function has argument , not ; the latter was a notation error in the original pseudocode.
4.3 Expanding the recursion
Define Unrolling equation (1) gives In general, . The source’s identity holds when , as it does for both learning-rate choices considered below. With that condition, Equation (2) For , every weight is . Other schedules change the relative contribution of early and recent iterates. The analysis studies which equals at and exceeds it for when .
4.4 The theorem as stated in the original notes
For the learning rate above, the source claims that, with probability at least , Equation (3) Here is the optimal action-value function of the actual system.
Mathematical review note. The statement does not specify whether it holds for a fixed or simultaneously over all , suppresses the dependence on , and states a unit constant although the proof uses unspecified constants. Its averaging argument also needs to account for the initial iterate and time-uniform concentration. Equation equation (3) is retained as the original lecture claim, not adopted here as a corrected theorem. A rigorous revision requires an explicit probability event and a completed finite-sample argument.
4.5 Weight identities
The following bounds are taken from Lemma 4.1 of [4], as cited in the original lecture:
Lemma 1 (Weight bounds used in the proof outline). For ,
The first controls the squared weights in a concentration bound. The second limits the total contribution of one historical iterate to later updates. These are different roles; neither is simply an unqualified statement that all individual weights decay rapidly.
4.6 Proof outline and its remaining obligations
Subtracting the Bellman equation for from equation (2), and inserting , gives Let denote the second sum. For fixed , it is a weighted sum of centered independent random variables under the stated sampling model. Since , a Hoeffding bound has scale Universal factors are suppressed in this display. A union bound over the state-action-time triples gives a factor involving ; controlling every iterate used by the subsequent sum also requires a justified allocation of the failure probability across .
Write and let be a nonnegative uniform bound on . The appendix lemma yields Summing over and interchanging the finite sums gives This repairs the source’s mixed indices without changing the intended summation. The sum of terms has order , so the intended sampling contribution is of order , up to logarithms.
The original notes then propagate the recursion through layers and write This is the source’s scaling argument, with rewards implicitly normalized and logarithms omitted. The terms require separate accounting when the sums are compared across layers. Finally, convexity of the norm gives Thus an appropriate bound on the sum of errors would imply a bound for the averaged iterate. The argument explains the intended scale; it leaves the exact statement in equation (3) unresolved.
5 The maximum operator is nonexpansive
Lemma 2. Let be real-valued functions on a finite state-action space. Define and . Then
Proof. For every , Taking maxima yields Swap and to obtain the same inequality with the opposite difference. Hence Taking the maximum over proves the claim. ◻
The original notes impose nonnegative -values. The proof does not use that restriction; it is valid for arbitrary real values. This observation is an explicit correction of an unnecessary assumption, not a new claim about Q-learning convergence.
References
- [1]
-
C. Jin, B. Wang, Y. Yan, and Z. Li. ELE524: Foundations of Reinforcement Learning, Lecture 6. Princeton University, Spring 2020.
- [2]
-
M. L. Puterman. Markov Decision Processes: Discrete Stochastic Dynamic Programming. John Wiley & Sons, 2014.
- [3]
-
C. Jin, B. Wang, Y. Yan, and Z. Li. ELE524: Foundations of Reinforcement Learning, Lecture 5. Princeton University, Spring 2020.
- [4]
-
C. Jin, Z. Allen-Zhu, S. Bubeck, and M. I. Jordan. Is Q-Learning Provably Efficient? Advances in Neural Information Processing Systems, 31, 2018.