Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Fitted Value Methods

The previous chapter studied function iteration with a known model: when a fit preserves the contraction of the Bellman operator, and how far the iteration ends from v∗v^* when each fit is accurate. This chapter turns that iteration into a learning algorithm. Three things change. The fit becomes any regressor, a tree ensemble or a neural network, which turns function iteration into fitted value iteration, a sequence of regression problems whose targets are Bellman backups. The expectations in those targets become averages over sampled successors, because a simulator or a log of transitions is often all there is. And the values of states become values of actions, so that acting needs no model. Run on a fixed log of transitions, the result is fitted Q-iteration, the batch algorithm behind tree-based FQI and NFQ, and the starting point of DQN in the next chapter. Replacing exact expectations by samples is what turns approximate dynamic programming into what the operations research community calls simulation-based dynamic programming and the machine learning community calls reinforcement learning.

Sampling has two costs that the chapter makes explicit. The error of a sample average is random rather than systematic; its rate does not depend on the dimension of the state, and it adds to the per-iteration error that the previous chapter bounded. And the maximum over noisy estimates is biased upward, even though each estimate is unbiased, so the targets of every sampled Bellman update overestimate. Between the two, temporal-difference learning solves the Galerkin system of the previous chapter one transition at a time, and shows how sampling with the wrong weighting can make a well-posed equation diverge. The chapter ends with fitted Q-iteration on two logs, one from an inference-serving scheduler and one of the collision warnings that ESA received for its satellites.

Fitted Value Iteration with an Arbitrary Regressor

The averager condition is a property of how a fit maps targets to a function, not of a basis: kernel smoothers and fixed-partition trees satisfy it without one. The error bound of Error Bounds When Every Fit Is Accurate below needs even less, only that each fit be accurate. Nothing ties function iteration to a basis, then, and the fit can be any regression procedure, including the tree ensembles and neural networks of the chapters ahead.

Value iteration computes Lvk\Bellman v_k at every state and stores the result. With a parametric function we can do neither, but we can do two things that together play the same role. We can evaluate the Bellman operator at finitely many states s1,…,sms_1, \ldots, s_m,

yi=(Lvk)(si)=max⁡a∈Asi{r(si,a)+γ∑s′∈Sp(s′∣si,a) v(s′;θk)},y_i = (\Bellman v_k)(s_i) = \max_{a \in \mathcal{A}_{s_i}} \Big\{ r(s_i,a) + \gamma \sum_{s' \in \mathcal{S}} p(s'|s_i,a)\, v(s';\theta_k) \Big\},

and we can choose θk+1\theta_{k+1} so that v(⋅;θk+1)v(\cdot;\theta_{k+1}) fits the pairs (si,yi)(s_i, y_i). The first step needs the model and the current function. The second is a supervised learning problem that knows nothing about Bellman equations.

Write P\Proj for the map that takes a function, through its values at s1,…,sms_1, \ldots, s_m, to the fitted function. Then fitted value iteration is

vk+1=PLvk,v_{k+1} = \Proj \Bellman v_k,

the projected value iteration (25) of the chapter on parametric value functions, with P\Proj now any fitting rule. Two choices define the algorithm: where the targets are computed, and how the function is fitted to them. Nothing depends on the max. Replacing L\Bellman by the policy evaluation operator Lπ\BellmanPi gives fitted policy evaluation, and replacing it by the smooth operator Lβ\mathrm{L}_\beta of Regularized Bellman Operators gives fitted smooth value iteration.

The algorithm is two nested loops. The outer loop is successive approximation: it computes Bellman targets from the current function and holds them fixed. The inner loop is an optimization: it fits the function to those targets, in closed form for a linear basis, by building trees for a tree ensemble, or by gradient steps for a neural network. We call every algorithm with this structure a fitted value method. Gordon (1995) gave the first analysis of when it converges. The fitted Q-iteration of Ernst et al. (2005) is one instance, with extremely randomized trees as the fit and action values in place of state values; NFQ Riedmiller (2005) is another, with a neural network. The algorithms of the coming chapters differ mainly in how far the inner loop is run before the targets are recomputed.

The two fits of the chapter on parametric value functions mark the ends of a range. Collocation computes targets at exactly nn states, as many as there are basis functions, and interpolates them: P\Proj is the interpolation operator, and with piecewise-linear cardinal functions on a grid the algorithm is the stationary version of the interpolated backward recursion (16) of the finite-horizon chapter. Galerkin projection computes targets at as many states as the quadrature needs and fits the basis to them by weighted least squares: P\Proj is the ww-orthogonal projection onto the span of the basis, and when the states are sampled from ww the fit is an ordinary regression. Collocation computes few targets and matches them exactly; regression computes many and matches them on average. Regression is what scales, because it decouples the number of targets from the number of parameters, and because it applies unchanged to any model that can be fitted to data.

Fitting a Neural Network: Fixed Targets and the Semi-Gradient

For a model v(⋅;θ)v(\cdot;\boldsymbol\theta) that is nonlinear in its parameters, such as a neural network, the fit is

θk+1∈arg⁡min⁡θ∑i=1m(v(si;θ)−yi)2,yi=(Lvk)(si),\boldsymbol{\theta}_{k+1} \in \arg\min_{\boldsymbol{\theta}} \sum_{i=1}^m \big(v(s_i;\boldsymbol{\theta}) - y_i\big)^2, \qquad y_i = (\Bellman v_k)(s_i),

solved by gradient descent. Its first-order condition is again an orthogonality condition, with test functions that move with the parameters:

∑i=1m(v(si;θ)−yi)∂v(si;θ)∂θj=0for all j.\sum_{i=1}^m \big(v(s_i;\boldsymbol{\theta}) - y_i\big) \frac{\partial v(s_i;\boldsymbol{\theta})}{\partial \theta_j} = 0 \quad \text{for all } j.

The derivatives ∂v/∂θj\partial v/\partial\theta_j span the tangent space of the model at the current parameters. For a linear model they are the basis functions, and the condition is the sampled Galerkin condition. The targets yiy_i are held fixed during the fit, so the gradient differentiates only v(si;θ)v(s_i;\boldsymbol\theta) and never the operator. This is the semi-gradient of temporal difference learning. The least-squares criterion of Step 3: Impose nn Conditions on the Residual, Bellman residual minimization, would instead minimize ∑i(v(si;θ)−(Lv(⋅;θ))(si))2\sum_i \big(v(s_i;\boldsymbol\theta) - (\Bellman v(\cdot;\boldsymbol\theta))(s_i)\big)^2 with the same parameters on both sides. Its test functions, ∂v/∂θj−∂(Lv)/∂θj\partial v/\partial\theta_j - \partial(\Bellman v)/\partial\theta_j, form the full gradient, and computing them requires differentiating through the max, by the envelope theorem (Theorem 1), or through the log-sum-exp of the smooth Bellman operator. The two criteria have different solutions. Every algorithm in the chapters ahead, from NFQ to NFQCA, fits to fixed targets, and the next chapter studies what happens when the fit is warm-started and stopped after a few gradient steps instead of run to convergence.

Error Bounds When Every Fit Is Accurate

Every fit is only approximately right. The averagers of the previous chapter keep the iteration a contraction, but a tree ensemble whose splits follow the targets, or a neural network, is not an averager. This section bounds how far from v∗v^* fitted value iteration ends with any fit, and how good the returned policy is, assuming only that each fit is accurate.

The finite-horizon chapter answered this for backward recursion with interpolation: with nonnegative weights, the error of the stored values is at most the sum of the interpolation errors of the later stages (Proposition 1). Over an infinite horizon the sum becomes a geometric series.

The value function is an instrument. What we use is the greedy policy, and its loss is bounded by the error of the value function it is greedy for Singh & Yee (1994).

Combining the two, the greedy policies of fitted value iteration are eventually within 2γε/(1−γ)22\gamma\varepsilon/(1-\gamma)^2 of optimal. The bound asks nothing of the fit except accuracy: no linearity, no particular basis, no structure at all. This is what licenses a tree ensemble or a neural network in place of a table. It also says where the difficulty lies, in three places that the rest of this chapter and the next ones take up.

  1. The error is measured in the sup norm, at every state. A regression controls an average error over the states where targets were computed, and nothing at the states it never saw. The analysis of fitted value iteration by Munos (2007) and Munos & Szepesvári (2008) replaces the sup norm by weighted norms. The price is a concentrability coefficient, which measures how far the state distributions that policies reach can be from the distribution of the data. It is the theoretical form of the coverage problem of batch and offline reinforcement learning.

  2. The fit must be achievable. The bound needs some θ\theta with v(⋅;θ)v(\cdot;\theta) close to Lvk\Bellman v_k for every vkv_k the algorithm produces. The function class must therefore be nearly closed under the Bellman operator, not merely able to represent v∗v^*.

  3. The error must stay bounded. The theorem assumes one ε\varepsilon for all iterations. If the fit error grows with vkv_k, the bound says nothing, and the two-state example of the previous chapter shows that this happens.

Example: Checking the Bounds on Duck-Hunting Regulations

The bounds can be tested on a problem that a government agency solves every year. Each summer, the U.S. Fish and Wildlife Service chooses the duck-hunting regulations for the Mississippi and Central Flyways from four packages: a closed season, or a restrictive, moderate or liberal one, which differ in season length and bag limit. Since 1995 the choice for mallards has come from a policy computed by stochastic dynamic programming, a program called adaptive harvest management Johnson et al. (1997). The state is two numbers from the May survey: the breeding population NN of midcontinent mallards and the number PP of ponds in Prairie Canada, both in millions. Ponds follow an autoregressive process driven by the weather. The population responds to ponds and to the harvest under four models. They disagree on whether hunting deaths add to natural deaths or replace them, and on how strongly reproduction falls as the population grows, and the Service weights them by how well each has predicted past surveys. The reward is the harvest, devalued in proportion when the population is expected to fall below the goal of 8.5 million birds, and the season must close below 4.75 million. We take these equations and numbers from the Service’s report for the 2012 season U.S. Fish and Wildlife Service (2012) and discount future harvests by γ=0.98\gamma = 0.98. The model module lists the few details that the report leaves open.

The Service solves this problem the way the finite-horizon chapter solved the reservoir: on a grid of states, with interpolation between the nodes. We do the same with steps of 0.1 million birds and ponds, 12,231 nodes, and bilinear interpolation. Bilinear interpolation is an averager, so value iteration on the grid converges (Theorem 1), and doubling the step changes the values by less than 0.05. Figure 1 compares the result with the table that the Service published for 2012. The two policies prescribe the same package in 126 of the 150 cells of the table and differ by one package in the others. The published policy reacts more strongly to ponds than ours.

Regulation packages as a function of May ponds and breeding population.
(a) The table published by the U.S. Fish and Wildlife Service for 2012.
(b) The greedy policy of our reference solution, on a grid with steps of 0.1.
(c) The greedy policy of fitted value iteration with a neural network
trained on 2,000 sampled states. Below the dotted line the season must close.

Figure 1:Regulation packages as a function of May ponds and breeding population. (a) The table published by the U.S. Fish and Wildlife Service for 2012. (b) The greedy policy of our reference solution, on a grid with steps of 0.1. (c) The greedy policy of fitted value iteration with a neural network trained on 2,000 sampled states. Below the dotted line the season must close.

The reference solution lets us check Theorem 1 and Proposition 1 against what actually happens. We run fitted value iteration for 400 iterations with five fits. Three are bilinear interpolation on coarser grids, with steps of 2, 1 and 0.5. The other two are regressors trained, at each iteration, on targets at the same 2,000 states drawn uniformly at random: extra trees, which are averagers, and a network with two hidden layers of 64 units, warm-started from the previous iteration. For each fit we measure ε\varepsilon, the largest fitting error ∣vk+1(s)−(Lvk)(s)∣|v_{k+1}(s) - (\Bellman v_k)(s)| over the reference grid in the last iterations, and compare both bounds with the value error and the policy loss that we compute against the reference.

FitTargets per iterationFit error ε\varepsilonBound ε/(1−γ)\varepsilon/(1-\gamma)Value errorBound 2γε/(1−γ)22\gamma\varepsilon/(1-\gamma)^2Policy lossSame package
Bilinear grid, step 2450.79402.243,8840.09896.5%
Bilinear grid, step 11440.33160.721,6100.01599.1%
Bilinear grid, step 0.55270.0940.184200.00599.5%
Extra trees2,0000.76381.773,7440.25893.6%
Neural network2,0001.47740.637,2270.02898.2%

Fitted value iteration for 400 iterations with γ = 0.98. The fit error is the largest ∣vk+1−Lvk∣|v_{k+1} - \mathrm{L} v_k| over the 12,231 states of the reference grid in the last 20 iterations. Value error and policy loss are measured against the reference solution, in millions of birds of discounted harvest; the optimal value ranges from about 30 to 51. Same package is the share of reference states where the greedy policy picks the reference package.

The table supports three observations.

  1. Both bounds hold, and both are loose. The value error is 18 to 118 times smaller than ε/(1−γ)\varepsilon/(1-\gamma), and the policy loss is four to five orders of magnitude below 2γε/(1−γ)22\gamma\varepsilon/(1-\gamma)^2. The bounds charge every iteration’s error at its worst state and let the errors add up in the same direction for 1/(1−γ)=501/(1-\gamma) = 50 years. Neither happens here.

  2. The policy is much more accurate than the value function. The coarsest grid has 45 nodes and a value error of 2.2 million birds, yet it picks the reference package in 96.5% of the states, and its worst policy loss is 0.10 million birds, about a quarter of a percent of the value. A decision depends on the differences between the values of the packages, and much of the fitting error is shared by all four packages, because their successor states are close.

  3. The regressors do about as well as the coarsest grid. With 2,000 targets per iteration, the trees and the network have fitting errors of 0.76 and 1.47, of the same order as the 0.79 of the 45-node grid. The network’s greedy policy reproduces the reference map (panel (c)): it picks the reference package in 98% of the states and loses at most 0.03. The trees lose more, 0.26 at worst. Their fit is piecewise constant, so it is flat where the value has a slope, and the greedy choice between two packages depends on that slope.

With two state variables the Service’s grid is the right tool, and the regressors bring nothing. They become necessary when the state has many dimensions, or when there is no model at all to compute targets from. This chapter has an example of each: the eight-dimensional stopping problem of Example: A Stopping Problem in Eight Dimensions and the satellite collision warnings of Example: Collision Avoidance Learned from Logged Warnings.

Two Expectations in Every Fitted Update

Integrals appear in two places in a fitted Bellman update. The first is inside the operator: the transition expectation ∫v(s′) p(ds′∣s,a)\int v(s')\,p(ds'|s,a) that every target contains. The second is over the states: Galerkin and least-squares conditions integrate the residual against test functions, and a regression averages the fitting error over the states where targets were computed. Collocation has only the first integral, which is one reason it was the simplest case.

Write L~\BellmanQuad for the Bellman operator with the transition expectation replaced by a numerical rule, deterministic or random, and let fitted value iteration run with it, vk+1=P L~vkv_{k+1} = \Proj\,\BellmanQuad v_k. The error after one iteration splits into three pieces by the triangle inequality. With v⋆=Lv⋆v^\star = \Bellman v^\star,

∥v⋆−vk+1∥=∥v⋆−PL~vk∥≤∥v⋆−PLv⋆∥⏟best approximation+∥PLv⋆−PLvk∥⏟contraction of the current error+∥PLvk−PL~vk∥⏟integration error.\begin{aligned} \|v^\star - v_{k+1}\| &= \|v^\star - \Proj \BellmanQuad v_k\| \\ &\le \underbrace{\|v^\star - \Proj \Bellman v^\star\|}_{\text{best approximation}} + \underbrace{\|\Proj \Bellman v^\star - \Proj \Bellman v_k\|}_{\text{contraction of the current error}} + \underbrace{\|\Proj \Bellman v_k - \Proj \BellmanQuad v_k\|}_{\text{integration error}} . \end{aligned}

The first term is the best the basis can do, the second shrinks with the iterations when PL\Proj\Bellman is a contraction, and the third is the error of the integration rule, which does not shrink as the iterations proceed. In the language of Theorem 1, the integration error is one more contribution to the per-iteration error ε\varepsilon, and it is amplified by the same 1/(1−γ)1/(1-\gamma). This is why the accuracy of the integration rule should match the accuracy of the basis. A degree-10 Chebyshev basis represents a smooth value function to about 10-8, but with a rectangle rule for the expectation the integration error, of order h2h^2, dominates the sum, and the basis is wasted.

For low-dimensional problems with a smooth, explicit transition density, deterministic quadrature is the right tool, and the rule is chosen to match the basis: Gauss–Chebyshev nodes with Chebyshev polynomials, Gauss–Legendre with Legendre, Gauss–Hermite with Hermite polynomials and Gaussian shocks, midpoint or trapezoidal rules with piecewise-constant or piecewise-linear elements. With orthogonal collocation the nodes of the basis double as the nodes of the quadrature, and the expectations of the basis functions at the successors of each node can be precomputed once into a matrix, so that each iteration costs a matrix product and a maximization. The fishery used Gauss–Hermite quadrature over its log-normal shock in this way. The same pairing principle governed continuous-time trajectory optimization, where the cost integral and the dynamics were discretized on the same nodes.

Deterministic quadrature needs three things: a state of low dimension, a density that can be evaluated at the nodes, and a cheap model. The problems this part of the book is heading for have none of them. The state of the eight-dimensional stopping problem later in this section needs N8N^8 quadrature nodes for a product rule with NN nodes per axis. A simulator provides draws of s′s' and no density. And a logged transition provides exactly one draw, which cannot be chosen. Monte Carlo integration handles all three.

Estimating Bellman Targets by Monte Carlo

Monte Carlo integration approximates an expectation by the average of independent draws. For J=E[f(X)]J = \mathbb{E}[f(X)] with X∼pX \sim p, draw X(1),…,X(N)∼pX^{(1)}, \ldots, X^{(N)} \sim p and form

J^N=1N∑n=1Nf(X(n)).\hat{J}_N = \frac{1}{N}\sum_{n=1}^N f\big(X^{(n)}\big).

Two properties of this estimator carry the whole chapter. It is unbiased, E[J^N]=J\mathbb{E}[\hat{J}_N] = J, by linearity of expectation. And its variance is σ2/N\sigma^2/N with σ2=Var[f(X)]\sigma^2 = \mathrm{Var}[f(X)], by independence of the draws, so by the central limit theorem

N (J^N−J)⟹N(0,σ2),\sqrt{N}\,(\hat{J}_N - J) \Longrightarrow \mathcal{N}(0,\sigma^2),

and the error decays as N−1/2N^{-1/2}. The rate is slow next to high-order quadrature in one dimension, and it is the same in every dimension: Monte Carlo pays in variance, never in an exponential number of nodes. It is also a quadrature rule, with random nodes and equal weights 1/N1/N. Importance sampling changes the distribution of the nodes and compensates with unequal weights, and the view of Monte Carlo as randomized quadrature covers it too.

The cell below checks both properties on a Gaussian with mean 2 and standard deviation 3, with 4,000 repetitions for each sample size. Before looking at the figure, predict what multiplying NN by four does to the root mean squared error.

Source
import sys
from pathlib import Path

import matplotlib.pyplot as plt
import numpy as np

code_directory = Path.cwd() / "code"
if str(code_directory) not in sys.path:
    sys.path.insert(0, str(code_directory))
from book_figure_theme import INK, MUTED, PALETTE, figure_style, show

rng = np.random.default_rng(2026)
true_mean, sigma, trials = 2.0, 3.0, 4000
sample_sizes = 2 ** np.arange(0, 11)
means, rmse = [], []
for n in sample_sizes:
    estimates = rng.normal(true_mean, sigma, size=(trials, n)).mean(axis=1)
    means.append(estimates.mean())
    rmse.append(np.sqrt(np.mean((estimates - true_mean) ** 2)))

with figure_style():
    fig, (ax, bx) = plt.subplots(1, 2, figsize=(7.0, 2.4))
    ax.axhline(true_mean, color=MUTED, lw=.8, ls="--")
    ax.plot(sample_sizes, means, "o-", color=PALETTE["blue"], ms=3.5, lw=1)
    ax.text(1.2, true_mean + .045, "true mean", color=MUTED, fontsize=8.5)
    ax.set_xscale("log", base=2)
    ax.set_xticks([1, 4, 16, 64, 256, 1024], ["1", "4", "16", "64", "256", "1024"])
    ax.set_ylim(true_mean - .15, true_mean + .15)
    ax.set_xlabel("draws $N$")
    ax.set_ylabel("average estimate")
    ax.set_title("(a) No bias at any $N$")

    bx.plot(sample_sizes, sigma / np.sqrt(sample_sizes), color=INK, lw=1)
    bx.plot(sample_sizes, rmse, "o", color=PALETTE["blue"], ms=3.5)
    bx.text(40, 1.0, r"$\sigma/\sqrt{N}$", color=INK, fontsize=9)
    bx.set_xscale("log", base=2)
    bx.set_yscale("log")
    bx.set_xticks([1, 4, 16, 64, 256, 1024], ["1", "4", "16", "64", "256", "1024"])
    bx.set_xlabel("draws $N$")
    bx.set_ylabel("root mean squared error")
    bx.set_title(r"(b) Error falls as $N^{-1/2}$")
    fig.tight_layout(w_pad=2)
show(fig)

Figure 2:The sample mean of NN draws from a Gaussian with mean 2 and standard deviation 3, over 4,000 repetitions for each NN. (a) The average estimate stays at the true mean whatever NN: the estimator is unbiased. (b) Its root mean squared error (dots) follows σ/N\sigma/\sqrt{N} (line), a slope of −1/2-1/2 in log-log axes, so four times as many draws halve the error.

Loading...

The Sampled Bellman Operator

For a fixed value function vv and a state-action pair (s,a)(s,a), the transition part of the Bellman operator is the expectation E[v(S′)∣S=s,A=a]\mathbb{E}[v(S') \mid S = s, A = a]. If next states S′(1),…,S′(N)S'^{(1)}, \ldots, S'^{(N)} can be drawn from p(⋅∣s,a)p(\cdot \mid s,a), by calling a simulator or by acting in the real system, the sample average estimates it. When the reward is random as well, the draws are pairs (r(n),S′(n))(r^{(n)}, S'^{(n)}), and the one-step return is estimated by

G^N(s,a)=1N∑n=1N[r(n)+γ v(S′(n))],\widehat{G}_N(s,a) = \frac{1}{N}\sum_{n=1}^N \Big[r^{(n)} + \gamma\, v\big(S'^{(n)}\big)\Big],

which is unbiased for E[r+γv(S′)∣s,a]\mathbb{E}[r + \gamma v(S') \mid s, a] as long as vv is fixed. Substituting it into the operator gives the Monte Carlo Bellman operator

(L^Nv)(s)=max⁡a∈AsG^N(s,a).(\widehat{\Bellman}_N v)(s) = \max_{a \in \mathcal{A}_s} \widehat{G}_N(s,a).

Nothing about approximation or projection has entered yet. For a fixed vv, Monte Carlo provides unbiased, noisy evaluations of (Lv)(s)(\Bellman v)(s) at any state, from draws alone. The maximum over the noisy estimates, however, is not unbiased, and the last section of the chapter is about that.

Choosing the States at Which Targets Are Computed

The second expectation, over the states, is estimated the same way. Galerkin and least-squares conditions have the form ∫R(s;θ) pi(s) ξ(ds)=0\int R(s;\theta)\, p_i(s)\, \xi(ds) = 0 for a distribution ξ\xi over states, and the weighted norm of the residual is ∫R(s;θ)2 ξ(ds)\int R(s;\theta)^2\,\xi(ds). The weight ww of the previous chapters could be any positive function; for sampling it must be a probability distribution that can be drawn from, which is ξ\xi after normalization, or any other distribution with importance weights w/ξw/\xi. If states S(1),…,S(M)S^{(1)}, \ldots, S^{(M)} are drawn from ξ\xi, each condition becomes a sample average,

∫R(s;θ) pi(s) ξ(ds)≈1M∑m=1MR(S(m);θ) pi(S(m)),\int R(s;\theta)\, p_i(s)\, \xi(ds) \approx \frac{1}{M}\sum_{m=1}^M R\big(S^{(m)};\theta\big)\, p_i\big(S^{(m)}\big),

and the least-squares objective becomes the empirical risk 1M∑mR(S(m);θ)2\frac{1}{M}\sum_m R(S^{(m)};\theta)^2. This is the regression of Fitted Value Iteration with an Arbitrary Regressor: targets at sampled states, and a fit that minimizes the average error over them. In reinforcement learning ξ\xi is rarely chosen; it is the distribution of the states that the data happen to contain, which the previous chapter showed to matter for convergence and the batch experiments of Fitted Q-Iteration on a Fixed Batch of Transitions show to matter for coverage.

With both expectations sampled, the fitted update is

vk+1=PM L^N vk,v_{k+1} = \Proj_M\, \widehat{\Bellman}_N\, v_k,

a fit at MM sampled states of targets that each average NN sampled successors. It needs no transition density and no state distribution in closed form, only the ability to draw from them. In the typical reinforcement-learning setting N=1N = 1: each recorded transition (si,ai,ri,si′)(s_i, a_i, r_i, s'_i) supplies one successor, and the target ri+γv(si′)r_i + \gamma v(s'_i) has the full variance of a single draw. The variance is then reduced by the fit, which pools information across neighboring states, and by the number of transitions rather than by averaging at a fixed (s,a)(s,a). The section after next returns to this choice.

Example: A Stopping Problem in Eight Dimensions

The fishery of the earlier chapters has one state variable, and a grid of a few thousand nodes solves it exactly enough to serve as a reference. To see why the choice of fit matters, consider a state with DD coordinates. An agent watches an index s∈[0,1]Ds \in [0,1]^D, for instance the prices of DD assets. Stopping pays the average of the coordinates, sˉ=1D∑ℓsℓ\bar{s} = \frac{1}{D}\sum_\ell s_\ell, and ends the problem. Continuing pays nothing, and each coordinate then moves toward a fresh uniform draw, sℓ′=ρsℓ+(1−ρ)ξℓs'_\ell = \rho s_\ell + (1-\rho)\xi_\ell with ξℓ∼U[0,1]\xi_\ell \sim U[0,1] independent and ρ=0.7\rho = 0.7. The Bellman equation is

v∗(s)=max⁡{sˉ,  γ E[v∗(ρs+(1−ρ)ξ)]},γ=0.9.v^*(s) = \max\Big\{ \bar{s},\; \gamma\, \mathbb{E}\big[v^*(\rho s + (1-\rho)\xi)\big] \Big\}, \qquad \gamma = 0.9.

The average sˉ\bar s is itself a Markov chain, sˉ′=ρsˉ+(1−ρ)ξˉ\bar{s}' = \rho\bar{s} + (1-\rho)\bar{\xi}, so v∗v^* depends on ss only through sˉ\bar s and can be computed exactly by one-dimensional value iteration. The algorithm does not know this. A grid with 11 nodes per axis has 11D11^D nodes: 121 for D=2D = 2, 14,641 for D=4D = 4, and 2.1×1082.1 \times 10^8 for D=8D = 8, each needing an expectation over a DD-dimensional successor at every iteration. Fitted value iteration instead computes targets at 2,000 states drawn uniformly from the cube, whatever DD is, and fits them with an ensemble of extremely randomized trees Ernst et al. (2005) or with a neural network of two hidden layers. All three methods approximate the expectation by the average over the same 32 draws of ξ\xi, so they solve the same sample-average problem; the sampled Bellman operator above is this approximation. The errors are measured against the exact v∗v^* at 5,000 fresh states.

Source
import sys
from pathlib import Path

import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import RegularGridInterpolator
from sklearn.ensemble import ExtraTreesRegressor
from sklearn.neural_network import MLPRegressor

gamma, rho = 0.9, 0.7       # discount, persistence of each coordinate
N, M, K = 2000, 32, 40      # sampled states, successor draws, iterations

def exact_value(D, rng):
    """v* depends on s only through the mean of its coordinates: 1-D value iteration."""
    m = np.linspace(0, 1, 1001)
    eta = rng.uniform(size=(400, D)).mean(axis=1)          # mean of the shocks
    m_next = rho * m[:, None] + (1 - rho) * eta[None, :]
    w = m.copy()
    for _ in range(500):
        w = np.maximum(m, gamma * np.interp(m_next, m, w).mean(axis=1))
    return lambda S: np.interp(S.mean(axis=1), m, w)

def fitted_value_iteration(fit, S, xi):
    """Targets max{stop, gamma * E v(s')} at the states S, then a fit."""
    D = S.shape[1]
    S_next = (rho * S[:, None, :] + (1 - rho) * xi[None, :, :]).reshape(-1, D)
    v = lambda X: np.zeros(len(X))
    for _ in range(K):
        continuation = v(S_next).reshape(len(S), -1).mean(axis=1)
        y = np.maximum(S.mean(axis=1), gamma * continuation)
        v = fit(S, y)
    return v

def fit_grid(nodes):
    def fit(S, y):            # S is the grid itself, y the values at its nodes
        D = S.shape[1]
        table = RegularGridInterpolator([nodes] * D, y.reshape([len(nodes)] * D))
        return lambda X: table(np.clip(X, 0, 1))
    return fit

def fit_trees(S, y):
    model = ExtraTreesRegressor(n_estimators=20, min_samples_leaf=3, random_state=0)
    return model.fit(S, y).predict

def fit_network(S, y):
    model = MLPRegressor(hidden_layer_sizes=(64, 64), max_iter=300, random_state=0)
    return model.fit(S, y).predict

rng = np.random.default_rng(0)
nodes = np.linspace(0, 1, 11)
rows = []
for D in [2, 4, 8]:
    v_star = exact_value(D, rng)
    test = rng.uniform(size=(5000, D))
    xi = rng.uniform(size=(M, D))
    S = rng.uniform(size=(N, D))
    errors = {}
    if len(nodes)**D <= 20000:
        grid = np.stack(np.meshgrid(*[nodes] * D, indexing="ij"), axis=-1).reshape(-1, D)
        v = fitted_value_iteration(fit_grid(nodes), grid, xi)
        errors["grid"] = np.abs(v(test) - v_star(test))
    for name, fit in [("trees", fit_trees), ("network", fit_network)]:
        v = fitted_value_iteration(fit, S, xi)
        errors[name] = np.abs(v(test) - v_star(test))
        if D == 8 and name == "network":
            scatter = (test.mean(axis=1), v(test), v_star(test))
    rows.append((D, len(nodes)**D, errors))

print("Mean absolute error (maximum in parentheses) against the exact value")
print(f"{'D':>2} {'grid nodes':>12}  {'grid':^16} {'trees, 2000 states':^20} {'network, 2000 states':^20}")
for D, n_nodes, e in rows:
    cell = lambda key: f"{e[key].mean():.3f} ({e[key].max():.3f})" if key in e else "out of reach"
    print(f"{D:>2} {n_nodes:>12,}  {cell('grid'):^16} {cell('trees'):^20} {cell('network'):^20}")

if str(Path.cwd() / "code") not in sys.path:
    sys.path.insert(0, str(Path.cwd() / "code"))
from book_figure_theme import INK, PALETTE, figure_style, show

mean_s, v_hat, v_true = scatter
order = np.argsort(mean_s)
with figure_style():
    fig, ax = plt.subplots(figsize=(4.6, 2.8))
    ax.scatter(mean_s, v_hat, s=4, alpha=0.25, color=PALETTE["blue"], edgecolor="none")
    ax.plot(mean_s[order], v_true[order], color=INK, lw=1.4)
    ax.text(0.2, 0.74, "network, $D = 8$", color=PALETTE["blue"], fontsize=8.5)
    ax.text(0.72, 0.6, "exact $v^*$", color=INK, fontsize=8.5)
    ax.set_xlabel(r"average of the coordinates, $\bar s$")
    ax.set_ylabel("value")
show(fig)

Figure 3:Fitted value iteration on the stopping problem with an eight-dimensional state. Each dot is a test state, placed by the average of its coordinates and the value the network assigns to it; the black curve is the exact value function, which depends on the state only through that average. The network was never told so. It was fitted at 2,000 sampled states, while a grid with 11 nodes per axis would have 2.1×1082.1 \times 10^8.

Mean absolute error (maximum in parentheses) against the exact value
 D   grid nodes        grid        trees, 2000 states  network, 2000 states
 2          121   0.005 (0.024)      0.008 (0.029)        0.015 (0.086)    
 4       14,641   0.000 (0.004)      0.015 (0.097)        0.009 (0.056)    
 8  214,358,881    out of reach      0.031 (0.151)        0.013 (0.103)    
Loading...

The grid is the most accurate method while it fits in memory, and it is out of reach at D=8D = 8. The trees and the network use the same 2,000 states in every dimension. The average error of the trees roughly doubles each time DD doubles, while that of the network stays near 0.01; the figure shows that the network has found the one direction along which the value changes. Both have maximum errors several times their average, at the corners of the cube, where few of the sampled states lie. That gap is a first glimpse of the issue that dominates the analysis below and the batch methods of Fitted Q-Iteration on a Fixed Batch of Transitions: a fit is controlled where there are data, and only there.

Action Values: Acting Without a Model

The greedy policy of a value function vv is

π(s)=arg⁡max⁡a∈As{r(s,a)+γ∫v(s′) p(ds′∣s,a)},\pi(s) = \arg\max_{a \in \mathcal{A}_s} \Big\{ r(s,a) + \gamma \int v(s')\,p(ds'|s,a) \Big\},

one transition expectation per action at every decision. With a model and a quadrature rule this is a computation; with a simulator it is a Monte Carlo estimate per action, repeated each time the state is visited; with a log it is impossible, because no new successors can be drawn at decision time. The expectation can instead be computed once, during training, and stored. The action-value function of vv,

q(s,a)=r(s,a)+γ∫v(s′) p(ds′∣s,a),q(s,a) = r(s,a) + \gamma \int v(s')\,p(ds'|s,a),

caches the backup of every action, and the greedy policy becomes π(s)=arg⁡max⁡aq(s,a)\pi(s) = \arg\max_{a} q(s,a), a maximization over stored values with no integral and no model. The optimal action-value function q⋆q^\star satisfies its own Bellman equation, obtained by substituting v⋆(s′)=max⁡a′q⋆(s′,a′)v^\star(s') = \max_{a'} q^\star(s',a'):

q⋆(s,a)=r(s,a)+γ∫p(ds′∣s,a) max⁡a′∈As′q⋆(s′,a′).q^\star(s,a) = r(s,a) + \gamma \int p(ds'|s,a)\, \max_{a' \in \mathcal{A}_{s'}} q^\star(s',a').

The right-hand side defines the Bellman operator on action-value functions, (Lq)(s,a)=r(s,a)+γ E[max⁡a′q(s′,a′)∣s,a](\Bellman q)(s,a) = r(s,a) + \gamma\,\mathbb{E}[\max_{a'} q(s',a') \mid s,a], and it is a γ\gamma-contraction in the sup norm by the same argument as for vv: the maximum over a′a' does not increase sup-norm distances, and the expectation does not either. Everything in the previous chapter transfers. Fitted value iteration on qq is fitted Q-iteration, its error bounds hold with (s,a)(s,a) in place of ss, averagers remain safe, and the function class now takes the action as an input or has one output per action. What changes is the cost accounting: the expectations are evaluated during the iterations, at the state-action pairs where targets are computed, and acting afterwards is cheap.

The expectation in the target can be computed by quadrature when the model allows it, or estimated by NN draws of the successor from p(⋅∣s,a)p(\cdot|s,a), averaging max⁡a′q(si′,a′)\max_{a'} q(s'_i, a') over them. The fitting step is the one of Fitted Value Iteration with an Arbitrary Regressor, with its initialization θinit\boldsymbol\theta_{\text{init}} and its optimization budget KK written out because the next chapter varies both.

One Sampled Successor per Target

Most reinforcement learning algorithms do not draw NN successors per state-action pair. They work with a data set of transition tuples D={(si,ai,ri,si′)}i=1M\mathcal{D} = \{(s_i, a_i, r_i, s'_i)\}_{i=1}^M, each recording the one successor that was observed when aia_i was executed in sis_i, and the target of a tuple is yi=ri+γmax⁡a′q(si′,a′)y_i = r_i + \gamma \max_{a'} q(s'_i, a'), with N=1N = 1.

This design has two origins. In some settings it is a constraint. A robot that executes an action observes one outcome and cannot rewind to the same state to sample another; the same holds for a clinical trial, a manufacturing process, or any interaction that costs something. Many settings in which reinforcement learning is applied have no such constraint. Game emulators save and restore states, physics simulators reset to any configuration, and software environments are cloned for free. The second origin is historical. Reinforcement learning grew out of models of animal learning, in which an organism experiences one consequence per action and learns from a stream of experience, and temporal-difference learning, Q-learning and the actor-critic methods were designed for that stream.

The convention persisted where the constraint did not, and it shaped the algorithms. They store and manipulate tuples rather than state-action pairs with several successors. They reduce variance through the function approximator, which pools targets from nearby states, and through the number of transitions, rather than by averaging at a fixed (s,a)(s,a). And they treat the two expectations asymmetrically: the outer one, over states, is sampled with whatever budget is convenient, a whole data set, a replay buffer of a million transitions, or one transition per step, while the inner one is sampled once. In a domain with a cheap, resettable simulator and high-variance targets, averaging several successors per (s,a)(s,a) is a direct variance reduction that current practice rarely uses.

Temporal-Difference Learning: One Transition per Update

The sampled fitted update above draws a batch of transitions, computes targets, and fits. Temporal-difference learning takes the opposite extreme, one transition at a time, with a gradient step in place of the fit. For policy evaluation with linear features v(s;θ)=ϕ(s)⊤θv(s;\theta) = \boldsymbol\phi(s)^\top\theta, its target is the Galerkin system (20) of the previous chapter, Aθ=b\mathbf{A}\theta = \mathbf{b} with A=Φ⊤Ξ(I−γPπ)Φ\mathbf{A} = \boldsymbol\Phi^\top\boldsymbol\Xi(\mathbf{I} - \gamma\mathbf{P}_\pi)\boldsymbol\Phi and b=Φ⊤Ξ rπ\mathbf{b} = \boldsymbol\Phi^\top\boldsymbol\Xi\,\mathbf{r}_\pi, whose solution is the fixed point of the projected Bellman equation v=PLπvv = \Proj\BellmanPi v. Both A\mathbf{A} and b\mathbf{b} are expectations over a state drawn from ξ\xi and a successor drawn from Pπ\mathbf{P}_\pi, the two expectations of Two Expectations in Every Fitted Update, so each transition gives an unbiased estimate of them.

TD(0) draws a state ss from ξ\xi, a successor s′s' from Pπ\mathbf{P}_\pi and the reward rr, and moves the parameters along the temporal difference,

θ←θ+α ϕ(s)(r+γϕ(s′)⊤θ−ϕ(s)⊤θ).\theta \leftarrow \theta + \alpha\, \boldsymbol\phi(s)\big(r + \gamma\boldsymbol\phi(s')^\top\theta - \boldsymbol\phi(s)^\top\theta\big).

The expected increment is α(b−Aθ)\alpha(\mathbf{b} - \mathbf{A}\theta), the residual of (20). The theory of stochastic approximation Kushner & Yin (2003) says that, with step sizes that decrease suitably, the iterates follow the ordinary differential equation θ˙=b−Aθ\dot\theta = \mathbf{b} - \mathbf{A}\theta, which converges to the solution of (20) from every start if and only if every eigenvalue of A\mathbf{A} has a positive real part. Fitted policy evaluation in the same coordinates is θk+1=θk+(Φ⊤ΞΦ)−1(b−Aθk)\theta_{k+1} = \theta_k + (\boldsymbol\Phi^\top\boldsymbol\Xi\boldsymbol\Phi)^{-1}(\mathbf{b} - \mathbf{A}\theta_k), one step of the same expected update with the step size replaced by the inverse of the mass matrix. The two algorithms share their fixed point and their matrix, and differ in how they step toward it. LSTD (Solving the Galerkin System Directly: LSTD) does not step at all: it estimates A\mathbf{A} and b\mathbf{b} from the transitions and solves the system.

Proposition 2 of the previous chapter showed that on-policy, with ξ\xi the stationary distribution of Pπ\mathbf{P}_\pi, A\mathbf{A} is positive definite. Its eigenvalues then have positive real parts, and TD(0) converges to the solution of the projected Bellman equation Tsitsiklis & Van Roy (1997). The same inequality makes fitted evaluation a contraction and the LSTD system uniquely solvable: on-policy, the three solvers are stable for the same reason.

The analysis extends to TD(λ\lambda), which bootstraps from a geometric mixture of multi-step returns. Its fixed point solves v=PLπ(λ)vv = \Proj\BellmanPi^{(\lambda)}v with the multi-step operator Lπ(λ)=(1−λ)∑k≥0λkLπk+1\BellmanPi^{(\lambda)} = (1-\lambda)\sum_{k \geq 0}\lambda^k\BellmanPi^{k+1}, which is a contraction in ∥⋅∥ξ\|\cdot\|_\xi with modulus αλ=γ(1−λ)/(1−γλ)\alpha_\lambda = \gamma(1-\lambda)/(1-\gamma\lambda), and the fixed point satisfies ∥vλ−vπ∥ξ≤(1−αλ2)−1/2∥Pvπ−vπ∥ξ\|v_\lambda - v_\pi\|_\xi \leq (1 - \alpha_\lambda^2)^{-1/2}\|\Proj v_\pi - v_\pi\|_\xi Bertsekas & Tsitsiklis (1996)Bertsekas (2011). At λ=1\lambda = 1 the modulus is zero, the targets are Monte Carlo returns, and the fixed point is the best approximation Pvπ\Proj v_\pi; at λ=0\lambda = 0 the constant is the (1−γ2)−1/2(1-\gamma^2)^{-1/2} of the previous chapter. Bertsekas and Yu developed this projected-equation view into a general method for large linear systems, with error bounds that are sharper than the contraction argument because they use the data to estimate how P\Proj and Pπ\mathbf{P}_\pi interact Bertsekas & Yu (2009)Yu & Bertsekas (2010)Bertsekas (2011).

The two conditions, A\mathbf{A} with eigenvalues in the right half plane for TD and a spectral radius of γPPπ\gamma\Proj\mathbf{P}_\pi below one for fitted evaluation, are different conditions on the same matrices. In the two-state counterexample of the previous chapter they coincide. There is one feature, so A\mathbf{A} is the scalar ξ1(1−2γ)+4ξ2(1−γ)\xi_1(1 - 2\gamma) + 4\xi_2(1-\gamma), and the fitted iteration multiplies θ\theta by 1−A/(ξ1+4ξ2)1 - \mathbf{A}/(\xi_1 + 4\xi_2), which is the factor 6γ/56\gamma/5 of the previous chapter when ξ1=ξ2=1/2\xi_1 = \xi_2 = 1/2. Both fail when A<0\mathbf{A} < 0. With uniform weights that happens for γ>5/6\gamma > 5/6, and with the stationary weighting ξ=(0,1)\xi = (0, 1) it never happens. The code below runs sampled TD(0) on the example with γ=0.9\gamma = 0.9 and three weightings.

Source
import sys
from pathlib import Path

sys.path.insert(0, str(Path.cwd() / "code"))
import projection_stability as ps

print(f"{'weight of state 1':>18} {'fitted factor':>14} {'A':>8} {'TD theta after 400 steps':>26}")
for xi1 in (0.5, 0.2, 0.0):
    factor, A = ps.two_state(xi1, gamma=0.9)
    print(f"{xi1:>18.1f} {factor:>14.3f} {A:>8.3f} {ps.two_state_td(xi1, gamma=0.9):>26.3g}")
 weight of state 1  fitted factor        A   TD theta after 400 steps
               0.5          1.080   -0.200                       16.3
               0.2          0.953    0.160                     0.0381
               0.0          0.900    0.400                   0.000309

TD started at θ=1\theta = 1. Under uniform weighting it has grown by a factor of about sixteen after 400 updates, and with the weight of state 1 reduced to 0.2 or to the stationary value 0 it has shrunk toward the solution θ=0\theta = 0. The sign of A\mathbf{A} predicts both outcomes.

Off-Policy Evaluation and Its Repairs

When the states are weighted by a distribution ξ\xi that is not stationary for Pπ\mathbf{P}_\pi, which is the situation of learning about one policy from the data of another, the Jensen step of the on-policy argument fails, and with it Proposition 2. The previous chapter noted that the fixed point itself can then be far from vπv_\pi Kolter (2011). The solver can fail as well: TD(0) can diverge even when the projected equation is perfectly well posed.

The classical example is Baird’s star Baird (1995), in the form given by Sutton & Barto (2018). There are seven states and eight weights: state i≤6i \leq 6 has value 2θi+θ82\theta_i + \theta_8, and state 7 has value θ7+2θ8\theta_7 + 2\theta_8. The target policy moves every state to state 7, the behavior policy moves to a uniformly chosen state, all rewards are zero, and γ=0.99\gamma = 0.99. The features span all of R7\mathbb{R}^7, so P\Proj is the identity, PLπ=Lπ\Proj\BellmanPi = \BellmanPi is a contraction, and fitted policy evaluation converges in any norm. The difficulty lies entirely in the solver. The cell below iterates the expected updates of three methods from Sutton and Barto’s starting point, with the states weighted uniformly as the behavior policy visits them, and reports the largest ∣v(s;θ)∣|v(s;\theta)| along the way; the true value is zero.

Source
out = ps.baird_table()
print(f"rank of the features: {out['rank of Phi']}")
print(f"xi-norm of gamma P_pi under uniform weights: {out['xi-norm of gamma P_pi']:.2f}")
print(f"smallest real part of an eigenvalue, TD matrix:       {out['td']['min Re eig']:.3f}")
print(f"smallest real part of an eigenvalue, emphatic matrix: {abs(out['emphatic']['min Re eig']):.3f}")
print(f"{'method':<10} {'max |v| at 0':>14} {'at 500':>12} {'at 2000':>12}")
for m in ("td", "tdc", "emphatic"):
    v0, v500, v2000 = out[m]["max |v| at 0, 500, 2000"]
    print(f"{m:<10} {v0:>14.3g} {v500:>12.3g} {v2000:>12.3g}")
rank of the features: 7
xi-norm of gamma P_pi under uniform weights: 2.62
smallest real part of an eigenvalue, TD matrix:       -0.239
smallest real part of an eigenvalue, emphatic matrix: 0.000
method       max |v| at 0       at 500      at 2000
td                     12          163     8.07e+03
tdc                    12         1.95         1.95
emphatic               12     8.89e-05     2.61e-11

Under the uniform weighting, γPπ\gamma\mathbf{P}_\pi has ξ\xi-norm about 2.6, so it is not a contraction in that norm, and the TD matrix has an eigenvalue with negative real part. Expected TD(0) diverges, and its values reach the thousands after 2000 updates although every quantity in the problem is bounded. This is the first leg of the deadly triad, with no maximum and no neural network: linear features, bootstrapping, and off-policy weighting suffice.

Three families of repairs keep the projected equation and change the solver or the weighting.

  1. Importance sampling reweights each update by the ratio of the target and behavior probabilities of the action taken Precup et al. (2001). This makes the expected update use the target policy’s transitions, but not the target policy’s state distribution, so the matrix A\mathbf{A} above, which already uses Pπ\mathbf{P}_\pi, is unchanged; ratios over whole trajectories correct the distribution too, at the price of a variance that can grow exponentially with the horizon.

  2. Gradient TD methods minimize the mean squared projected Bellman error ∥P(Lπvθ−vθ)∥ξ2\|\Proj(\BellmanPi v_\theta - v_\theta)\|_\xi^2, which is zero exactly when the Galerkin conditions hold, by true stochastic gradient descent with a second set of weights that estimates P(Lπvθ−vθ)\Proj(\BellmanPi v_\theta - v_\theta) Sutton et al. (2009). The objective has the TD fixed point as its minimizer for any weighting, and gradient descent on it is stable. In the cell, TDC, the variant called TD with gradient correction in that paper, brings the values down from 12 to about 2 within 500 updates and then stalls there: its stability is bought with slow progress, a common observation with these methods.

  3. Emphatic TD reweights the update at each state by a follow-on trace, which on average replaces ξ\xi in A\mathbf{A} by the emphasis f=(I−γPπ⊤)−1ξf = (\mathbf{I} - \gamma\mathbf{P}_\pi^\top)^{-1}\xi Sutton et al. (2016). The resulting matrix Φ⊤F(I−γPπ)Φ\boldsymbol\Phi^\top\mathbf{F}(\mathbf{I} - \gamma\mathbf{P}_\pi)\boldsymbol\Phi with F=diag(f)\mathbf{F} = \text{diag}(f) is positive definite for any behavior when the features are independent, by an argument close to that of Proposition 2, and the method converges Yu (2015). Baird’s features are not independent, and the matrix is only semidefinite, which the zero printed in the cell reflects. In the cell, its values go to zero. The fixed point is the solution of a projected equation with the emphasis weighting, not with ξ\xi, so it is a different approximation of vπv_\pi.

LSTD avoids the stability question altogether, because it solves Aθ=b\mathbf{A}\theta = \mathbf{b} directly. Off-policy, it computes the same fixed point as TD, with the same possible loss of accuracy, whenever A\mathbf{A} is invertible Bertsekas & Yu (2009).

The Deadly Triad, and What Is Known with the Maximum

Sutton & Barto (2018) call the combination of function approximation, bootstrapping (targets built from the current estimate) and off-policy data the deadly triad: any two are manageable, all three can diverge. Baird’s star has all three, without a maximum. Q-learning adds the maximum, and with it a target policy that changes with the parameters. What is known for sampled updates with the maximum follows the two routes of the previous chapter.

On the sup-norm route, the averager argument survives sampling. Q-learning with soft state aggregation Singh et al. (1995) and Q-learning on action values interpolated from a finite set of states Szepesvári & Smart (2004) converge, under the same sign condition on the weights as in the deterministic case.

On the weighted route, the results are special cases or weaker conclusions.

Error bounds for fitted iterations on sampled data add a statistical error to the bounds of Error Bounds When Every Fit Is Accurate, as in the finite-sample analysis of fitted value iteration by Munos & Szepesvári (2008). They need the function class to be closed, or nearly closed, under the Bellman operator, a condition called Bellman completeness Chen & Jiang (2019). The design choices that keep neural fitted Q-iteration stable in practice, target networks among them, are the subject of the next chapter.

Maximization Bias in Sampled Targets

Each estimate G^N(s,a)\widehat{G}_N(s,a) is unbiased, and the maximum over them is not. Fix a state ss and a value function vv, and write the true continuation value and its estimate as

μ(s,a)=∫v(s′) p(ds′∣s,a),μ^N(s,a)=1N∑i=1Nv(si′),si′∼p(⋅∣s,a),\mu(s,a) = \int v(s')\,p(ds' \mid s,a), \qquad \hat{\mu}_N(s,a) = \frac{1}{N}\sum_{i=1}^N v(s'_i), \quad s'_i \sim p(\cdot|s,a),

so that (L^Nv)(s)=max⁡a{r(s,a)+γμ^N(s,a)}(\widehat{\Bellman}_N v)(s) = \max_a \{r(s,a) + \gamma \hat{\mu}_N(s,a)\}. Let a⋆a^\star be the action that maximizes the true backup. The maximum of a collection is at least as large as any of its members, so

E[max⁡a{r(s,a)+γμ^N(s,a)}]≥E[r(s,a⋆)+γμ^N(s,a⋆)]=r(s,a⋆)+γμ(s,a⋆)=(Lv)(s).\mathbb{E}\big[\max_a \{r(s,a) + \gamma \hat{\mu}_N(s,a)\}\big] \ge \mathbb{E}\big[r(s,a^\star) + \gamma \hat{\mu}_N(s,a^\star)\big] = r(s,a^\star) + \gamma \mu(s,a^\star) = (\Bellman v)(s).

The inequality is strict whenever more than one action has a nonzero variance: the maximization picks whichever action received a positive noise, and that inflated estimate becomes the target. This is Jensen’s inequality for the maximum, E[max⁡aYa]≥max⁡aE[Ya]\mathbb{E}[\max_a Y_a] \ge \max_a \mathbb{E}[Y_a], since the maximum is convex. The same inequality is the reason that deterministic policies are optimal in MDPs (Theorem 2), where it says that randomizing over actions cannot beat the best one; here it says that maximizing over noisy estimates cannot be unbiased.

The bias does not average out with more draws of the same estimate, and it compounds. Monte Carlo value iteration vk+1=L^Nvkv_{k+1} = \widehat{\Bellman}_N v_k builds its targets at iteration k+1k+1 from a vkv_k that is already biased upward, so E[vk]≥E[vk−1]≥⋯≥v⋆\mathbb{E}[v_k] \ge \mathbb{E}[v_{k-1}] \ge \cdots \ge v^\star, and the inflated values feed back into the next maximization. The cell below holds every true action value at zero, draws five noisy samples per action, and measures the bias of the maximum as the number of actions grows, next to the estimator of the next subsection.

Source
rng = np.random.default_rng(2026)
replications, samples_per_action = 6000, 5
action_counts = [2, 4, 8, 16, 32]
bias = {"maximum": [], "double": []}
se = {"maximum": [], "double": []}
for actions in action_counts:
    selection = rng.normal(size=(replications, actions, samples_per_action)).mean(axis=2)
    evaluation = rng.normal(size=(replications, actions, samples_per_action)).mean(axis=2)
    chosen = selection.argmax(axis=1)
    for name, values in (("maximum", selection.max(axis=1)),
                         ("double", evaluation[np.arange(replications), chosen])):
        bias[name].append(values.mean())
        se[name].append(values.std(ddof=1) / np.sqrt(replications))

with figure_style():
    fig, ax = plt.subplots(figsize=(4.6, 2.7))
    ax.axhline(0, color=MUTED, lw=.8)
    for name, color in (("maximum", PALETTE["vermilion"]), ("double", PALETTE["blue"])):
        ax.errorbar(action_counts, bias[name], yerr=2 * np.array(se[name]), fmt="o-", color=color,
                    ms=3.5, lw=1, capsize=0, elinewidth=1)
    ax.text(32, bias["maximum"][-1] - .06, "maximum of the\nestimates", color=PALETTE["vermilion"],
            fontsize=8.5, ha="right", va="top")
    ax.text(32, .06, "select with one estimate,\nevaluate with the other", color=PALETTE["blue"],
            fontsize=8.5, ha="right", va="bottom")
    ax.set_xscale("log", base=2)
    ax.set_xticks(action_counts, [str(a) for a in action_counts])
    ax.set_xlabel("number of actions")
    ax.set_ylabel("bias")
show(fig)

Figure 4:Bias of two estimators of max⁡aμa\max_a \mu_a when every true action value μa\mu_a is zero and each is estimated from five standard Gaussian draws, over 6,000 repetitions. The maximum of the estimates (vermilion) is biased upward, and more so with more actions. Selecting the action with one set of draws and evaluating it with an independent set (blue) removes the bias in this case, where all actions are equally good. Two standard errors of each estimate are smaller than the dots.

Loading...

Double Estimators: Separating Selection from Evaluation

The bias comes from using one noisy estimate for two jobs. Decompose the estimate into its mean and its noise, μ^N(s,a)=μ(s,a)+εa\hat{\mu}_N(s,a) = \mu(s,a) + \varepsilon_a with E[εa]=0\mathbb{E}[\varepsilon_a] = 0. The standard target is

Y=r(s,a^)+γμ(s,a^)+γεa^,a^=arg⁡max⁡a{r(s,a)+γμ(s,a)+γεa},Y = r(s,\hat a) + \gamma \mu(s,\hat a) + \gamma \varepsilon_{\hat a}, \qquad \hat a = \arg\max_a \{r(s,a) + \gamma \mu(s,a) + \gamma \varepsilon_a\},

and the same εa^\varepsilon_{\hat a} that made a^\hat a win is added to its value. Double Q-learning Van Hasselt et al. (2016) breaks this coupling with two independent estimates of every action, μ^N(1)(s,a)=μ(s,a)+εa(1)\hat{\mu}^{(1)}_N(s,a) = \mu(s,a) + \varepsilon^{(1)}_a and μ^N(2)(s,a)=μ(s,a)+εa(2)\hat{\mu}^{(2)}_N(s,a) = \mu(s,a) + \varepsilon^{(2)}_a, with ε(1)\varepsilon^{(1)} and ε(2)\varepsilon^{(2)} independent. The first selects and the second evaluates:

a^=arg⁡max⁡a{r(s,a)+γμ^N(1)(s,a)},Y=r(s,a^)+γμ^N(2)(s,a^).\hat a = \arg\max_{a} \big\{r(s,a) + \gamma \hat{\mu}^{(1)}_N(s,a)\big\}, \qquad Y = r(s,\hat a) + \gamma \hat{\mu}^{(2)}_N(s,\hat a).

The selected action a^\hat a is random, a function of ε(1)\varepsilon^{(1)} alone. Conditioning on it,

E[Y]=Eε(1)[Eε(2)[r(s,a^)+γμ(s,a^)+γεa^(2)∣a^]]=Eε(1)[r(s,a^)+γμ(s,a^)],\mathbb{E}[Y] = \mathbb{E}_{\varepsilon^{(1)}}\Big[\mathbb{E}_{\varepsilon^{(2)}}\big[r(s,\hat a) + \gamma \mu(s,\hat a) + \gamma \varepsilon^{(2)}_{\hat a} \mid \hat a\big]\Big] = \mathbb{E}_{\varepsilon^{(1)}}\big[r(s,\hat a) + \gamma \mu(s,\hat a)\big],

because ε(2)\varepsilon^{(2)} is independent of a^\hat a, so that E[εa^(2)∣a^]=E[εa^(2)]=0\mathbb{E}[\varepsilon^{(2)}_{\hat a} \mid \hat a] = \mathbb{E}[\varepsilon^{(2)}_{\hat a}] = 0. The evaluation noise contributes nothing on average. What remains is the selection bias: a^\hat a is more often an action whose ε(1)\varepsilon^{(1)} was positive than one whose true value is highest, so E[μ(s,a^)]≤max⁡aμ(s,a)\mathbb{E}[\mu(s,\hat a)] \le \max_a \mu(s,a), and the double estimator is biased downward. In Figure 4 the maximum estimator grows more optimistic as the number of actions grows, while the double estimator has no bias: every action has the same true value there, so selecting the wrong one costs nothing and the selection bias is zero. When the true values differ, the double estimator is biased downward instead, by much less than the maximum is biased upward. Removing the evaluation bias, the reuse of the winning noise, removes most of the overestimation.

Remark 1 (Two Q-functions instead of two sets of draws)

The argument assumes two independent sets of draws from p(⋅∣s,a)p(\cdot|s,a) for every state-action pair, which a log never provides and a simulator provides only by resetting. The practical implementation keeps two Q-functions instead, trained on different data or updated at different times, for instance an online network and a slowly updated copy of it. Their errors are then less correlated than the errors of a single network used twice, which gives part of the independence that the argument needs. This is Double DQN, in the next chapter (Double DQN).

The algorithm below writes the principle out with Monte Carlo targets. Two Q-functions alternate roles: at line 9 the first selects the action and at line 12 the second evaluates it, and lines 10 and 13 do the same with the roles exchanged. The mechanism is the same whether the Q-functions are tables or fitted functions, and with single-sample data (N=1N = 1) the two Q-functions are trained on different subsets or at different frequencies to approximate the independence.

Other Corrections

Three other approaches keep a single estimate and correct the maximum itself. They differ in how much they assume about the noise.

The correction can be learned. Keane & Wolpin (1994) treated the bias δ(s)=E[(L^Nv)(s)]−(Lv)(s)≥0\delta(s) = \mathbb{E}[(\widehat{\Bellman}_N v)(s)] - (\Bellman v)(s) \ge 0 as a quantity to estimate and subtract. It cannot be computed directly, but it depends on observable features of the state: the number of actions, the sample size, and the spread of the action values, since the bias is large when several actions are close and small when one dominates. At a small set of states, they ran both a high-fidelity evaluation of the backup, with many draws, and the NN-draw estimate used by the iteration, and regressed the gap on those features; during value iteration the predicted bias is subtracted from the raw maximum. The template, simulate on a subset and interpolate everywhere, is common in econometric dynamic programming. It has seen little use in reinforcement learning, because the high-fidelity evaluations are expensive and a misspecified regression feeds its own error back into the values.

The correction can be derived, under a distributional assumption. Lee et al. (2013)Lee & Powell (2019) assumed Gaussian noise of standard deviation σ\sigma on the estimates of MM actions, in which case the expected maximum of the noises follows from extreme value theory,

E[max⁡aεa]≈σ(CEbM+bM),bM=2log⁡M−log⁡log⁡M−log⁡4π,\mathbb{E}\Big[\max_{a} \varepsilon_a\Big] \approx \sigma \left(\frac{C_{\mathrm{E}}}{b_M} + b_M\right), \qquad b_M = \sqrt{2\log M - \log\log M - \log 4\pi},

with CE≈0.5772C_{\mathrm{E}} \approx 0.5772 the Euler–Mascheroni constant, and the target is corrected by subtracting this amount with σ\sigma estimated from repeated rewards at the same (s,a)(s,a). The formula is exact for a single-state problem whose only noise is in the rewards, and it is a first-order correction otherwise; with heavier tails than Gaussian it undercorrects. It replaces the regression of the learned correction by a closed form, at the price of the Gaussian assumption.

The maximum can be replaced. D'Eramo et al. (2016) weight each action by the probability that it is the best one under a Gaussian model of the estimates, wa=P(a∈arg⁡max⁡a′μ^a′)w_a = \mathbb{P}\big(a \in \arg\max_{a'} \hat{\mu}_{a'}\big), and use ∑awaμ^a\sum_a w_a \hat{\mu}_a in place of max⁡aμ^a\max_a \hat{\mu}_a. The weighted estimator sits between the optimism of the maximum and the pessimism of the double estimator, and adapts to the gaps between actions: when one action dominates its weight is near one and the estimator is the maximum, and when several are close their estimates are averaged. It needs a variance estimate per action and one integral per action, which limits it to small action sets. The smooth Bellman operator of the regularized chapter also replaces the hard maximum by an average, with weights set by a temperature rather than by estimated uncertainty. A last option changes neither the target nor the operator but the loss of the fit, so that overestimates are penalized more than underestimates; the next chapter takes it up with Gumbel regression.

Fitted Q-Iteration on a Fixed Batch of Transitions

The Bellman operator on action values contains an expectation under the transition law, which we write PP over transitions τ=(s,a,r,s′)\tau = (s, a, r, s'):

(Lq)(s,a)=r(s,a)+γ∫max⁡a′q(s′,a′) P(ds′∣s,a).(\Bellman q)(s,a) = r(s,a) + \gamma \int \max_{a'} q(s',a')\, P(ds' \mid s,a).

A batch algorithm never sees PP. It receives a data set D={(si,ai,ri,si′)}i=1N\mathcal{D} = \{(s_i, a_i, r_i, s'_i)\}_{i=1}^N and works with the empirical distribution

P^D=1N∑τ∈Dδτ,\hat{P}_{\mathcal{D}} = \frac{1}{N} \sum_{\tau \in \mathcal{D}} \delta_\tau,

where δτ\delta_\tau is a point mass at the transition τ\tau. Sampling from P^D\hat{P}_{\mathcal{D}} means picking a recorded transition uniformly at random, and the expectation of any function of a transition under PP is estimated by its average over the data set, the sample-average estimator of this chapter applied to transitions. Fitted Q-iteration on a batch is value iteration under this empirical law. The target of a transition is yi=ri+γmax⁡a′q(si′,a′)y_i = r_i + \gamma \max_{a'} q(s'_i, a'), with the one successor that was recorded, and the fit averages the error of the targets over the transitions in the data set. In the language of statistics this is a plug-in estimate: where the algorithm needs the unknown PP, it substitutes P^D\hat{P}_{\mathcal{D}}.

Remark 2 (The empirical distribution as a probability measure)

The empirical distribution P^D=1N∑τ∈Dδτ\hat{P}_{\mathcal{D}} = \frac{1}{N}\sum_{\tau \in \mathcal{D}} \delta_{\tau} is a discrete probability measure over NN points, whether the state and action spaces are continuous or discrete. For any measurable set A⊆S×A×R×SA \subseteq \mathcal{S} \times \mathcal{A} \times \mathbb{R} \times \mathcal{S},

P^D(A)=1N∑τ∈D1[τ∈A]=∣{τ∈D:τ∈A}∣N,\hat{P}_{\mathcal{D}}(A) = \frac{1}{N}\sum_{\tau \in \mathcal{D}} \mathbb{1}[\tau \in A] = \frac{|\{\tau \in \mathcal{D} : \tau \in A\}|}{N},

so it assigns probability 1/N1/N to each recorded tuple and zero elsewhere. A transition that never occurred has no weight, which is the formal statement of the coverage problem that the two experiments below exhibit.

The state-action pairs X(n)X^{(n)} are the same at every iteration; only the targets change, because they are computed with the current Q-function. The fit operation in line 10 minimizes ∑iℓ(q(si,ai;θ),yi(n))\sum_i \ell(q(s_i, a_i; \boldsymbol{\theta}), y_i^{(n)}) for a loss ℓ\ell, by whatever procedure the function class calls for, from an initialization θinit\boldsymbol{\theta}_{\text{init}} and with an optimization budget KK. Supervised learning would initialize at random and run to convergence. The two original batch algorithms differ in exactly these choices.

Ernst et al. (2005) instantiated the template with extremely randomized trees, an ensemble whose prediction is the average of the targets in a leaf. Each fit grows the trees from scratch, a cold start, and runs to completion, since tree construction has no incremental form. A tree with a fixed partition is an averager, so the convergence theorem of the previous chapter applies once the partitions stop changing, and trees take high-dimensional inputs without feature design. Riedmiller (2005) replaced the ensemble by a neural network q(s,a;θ)q(s,a;\boldsymbol\theta), which interpolates smoothly across the state-action space, and fitted it by gradient descent (RProp, chosen for its insensitivity to hyperparameters) until the loss stopped decreasing. The network is warm-started: each fit begins from the parameters of the previous iteration, which is natural for a gradient method and is the first of the choices that the next chapter turns into DQN.

Remark 3 (Goal states in neural fitted Q-iteration)

For episodic tasks with goal states S+S^+ and forbidden states S−S^-, Riedmiller modified the targets:

yi(n)={c(si,ai,si′)if si′∈S+ (goal reached)C−if si′∈S− (forbidden state, typically C−=1)c(si,ai,si′)+γmax⁡a′q(si′,a′;θn)otherwise,y_i^{(n)} = \begin{cases} c(s_i, a_i, s'_i) & \text{if } s'_i \in S^+ \text{ (goal reached)} \\ C^- & \text{if } s'_i \in S^- \text{ (forbidden state, typically } C^- = 1\text{)} \\ c(s_i, a_i, s'_i) + \gamma \max_{a'} q(s'_i, a'; \boldsymbol{\theta}_n) & \text{otherwise,} \end{cases}

where c(s,a,s′)c(s, a, s') is the immediate cost. A goal state has no future cost and no bootstrapped term, a forbidden state carries a fixed penalty, and every other state uses the Bellman backup. The hint-to-goal heuristic adds synthetic transitions from goal states with target zero, which pins the Q-function to zero in the goal region and encodes the boundary condition explicitly.

Experiment: Scheduling from Logged Transitions

The reduced inference-scheduling MDP in Infinite-Horizon MDPs has an exact value-iteration solution because its transition matrix is known. Suppose instead that only a fixed table of transitions is retained. Each row contains a reduced state (p,d)(p,d), a scheduling action, the cost cc, and the next reduced state. The generic reward-maximizing form above becomes a cost-minimizing form after a sign change. FQI can reuse those rows, but it receives no direct evidence for a state-action region that the behavior policy never visits. Any prediction there comes from the regressor’s inductive bias.

Each transition row is sampled from the finite MDP, not logged directly from vLLM. Its arrival model comes from the normalized Azure trace, while its phase rates and powers come from one NVIDIA L4 measurement run of Qwen/Qwen2.5-7B-Instruct served by vLLM 0.28.0. The data sets therefore inherit a measured hardware calibration and all of the reduced model’s aggregation assumptions.

Two sampling procedures produce matched data sets of 50,000 transitions. The broad data set draws a reduced state uniformly and then draws uniformly among its feasible actions. The narrow data set follows trajectories from the empty system under a decode-priority heuristic and selects a random feasible action with probability 0.05. Both use seed 0 and the same MDP. Their different state-action sampling distributions are the controlled change.

Each fitted-Q sweep constructs targets

yi(n)=ci+0.99min⁡u′∈A(si′)qn(si′,u′)y_i^{(n)}=c_i+0.99\min_{u'\in\mathcal A(s_i')} q_n(s_i',u')

and fits a joint state-action Extra-Trees regressor. The ensemble contains 200 trees with maximum depth 12 and minimum leaf size 2. The random seed is 0; successive tree fits use the deterministic seeds 0 through 49 across 50 fitted-Q sweeps. The three scheduling actions enter as a one-hot input, matching the joint state-action representation in the generic batch algorithm above. Before each fit, rows with the same state and action are merged into one point whose target is their average and whose weight is their count. The minimum leaf size of 1 therefore counts distinct state-action pairs, not rows: a larger value would force every leaf to average the targets of at least two different pairs, which blurs the small differences between actions in the same state.

Changing only the sampling distribution tests how coverage affects an otherwise identical FQI procedure. The exact dynamic-programming policy and both fitted policies are evaluated on the same 2,000 seeded episodes, each 300 steps long. Return and policy disagreement measure agreement with the reduced MDP objective and its exact solution. Mean waiting time, dropped arrivals, and observed state-action coverage locate operational differences. Decode stalls count periods in which decode jobs were active but the policy did something else. In this model they are not errors: the exact policy stalls decode on purpose while it prefills to grow the batch.

Figure 5:Extra-Trees FQI on two fixed 50,000-transition data sets sampled from the same measured-L4-calibrated scheduling MDP. These are model transitions, not vLLM logs. The broad data set samples states and feasible actions uniformly; the narrow data set follows decode priority with 5 percent random actions. Each policy table covers all 49 states and marks whether the displayed action occurs in that policy’s training buffer.

Loading...
Static comparison of exact value iteration with fitted Q policies learned from broad and narrow transition data.

Figure 6:Policy tables over all 49 states. At each state, a white circle marks that the buffer contains visits to the action selected by the displayed policy. The interactive version adds playback, stepping, and scrubbing through a queue trajectory sampled from the reduced transition model rather than observed directly from vLLM.

Exact dynamic programming and the two fitted-Q policies use the same 2,000 seeded episodes of 300 steps. Coverage is computed from the feasible state-action pairs present in each fixed transition buffer.

Loading...

Download every fitted-Q metric (CSV)

The broad buffer covers every feasible state-action pair, and its fitted policy disagrees with the exact policy in 6 of the 49 states (12.24 percent). All six lie next to the switching curve, where the exact policy prefills and the fitted policy decodes. Each of these state-action pairs appears about 340 times in the buffer, so the errors do not come from missing data. In those states the exact action values of prefill and decode differ by at most 1.24, while the values themselves range from 254 to 891. A regressor that is accurate to a fraction of a percent can still rank two actions this close in the wrong order. The broad policy’s mean discounted return is -242.25, compared with -230.04 for the exact policy, and its mean waiting time is 5.76 seconds rather than 5.24.

The narrow buffer covers 41.73 percent of feasible pairs and disagrees with the exact policy in 19 states (38.78 percent). In 15 of those states the buffer contains no visit to the action that the fitted policy selects. The log follows decode priority, which never prefills while a request is decoding, so the regressor has no data on the batching decisions that the exact policy makes. Its choices there are extrapolations: it idles in several states with six requests decoding, and it prefills past the point where the exact policy decodes. Its mean discounted return is -286.08, its mean waiting time is 11.20 seconds, and it drops 1.40 arrivals per episode against 0.20 for the exact policy. Return is the negative of discounted cost, so higher values are better.

The two data sets have equal size, so the difference between their policies cannot be attributed to the number of transition rows. The broad buffer’s errors come from approximation where the action gap is small; the narrow buffer’s errors come from coverage, where the behavior policy never took the action in question. These are the first and the third difficulty named after the error bound of Error Bounds When Every Fit Is Accurate: a fit is accurate on average, not at the states where two actions are nearly tied, and it is controlled only where there are data.

The hardware calibration is measured, while training and evaluation remain inside the stated 49-state MDP. These results concern offline coverage under that abstraction. They are not a benchmark of vLLM scheduling or of NVIDIA L4 hardware across deployments.

Inspect the fitted-Q experiment
inference_control.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
def fit_fqi(
    mdp: SchedulingMDP,
    dataset: TransitionDataset | None = None,
    *,
    behavior: Literal["uniform", "decode_priority"] = "uniform",
    number_transitions: int = 50_000,
    sweeps: int = 50,
    number_trees: int = 200,
    maximum_depth: int = 12,
    minimum_leaf_size: int = 1,
    exploration_probability: float = 0.05,
    random_seed: int = 0,
    reference_policy: np.ndarray | None = None,
) -> FQISolution:
    """Fit a joint state-action Extra-Trees approximation of the cost-to-go."""

    mdp.validate()
    if sweeps <= 0 or number_trees <= 0:
        raise ValueError("sweeps and number_trees must be positive")
    samples = dataset or generate_transition_dataset(
        mdp,
        behavior=behavior,
        number_transitions=number_transitions,
        exploration_probability=exploration_probability,
        random_seed=random_seed,
    )
    sample_features = _features(mdp, samples.state, samples.action)
    pair_id = samples.state * 3 + samples.action
    unique_pair, inverse = np.unique(pair_id, return_inverse=True)
    unique_states = unique_pair // 3
    unique_actions = unique_pair % 3
    unique_features = _features(mdp, unique_states, unique_actions)
    counts = np.bincount(inverse).astype(float)
    model: ExtraTreesRegressor | None = None
    target = samples.cost.copy()

    all_states = np.repeat(np.arange(mdp.states.shape[0]), 3)
    all_actions = np.tile(np.arange(3), mdp.states.shape[0])
    all_features = _features(mdp, all_states, all_actions)
    for sweep in range(sweeps):
        aggregated_target = np.bincount(inverse, weights=target) / counts
        model = ExtraTreesRegressor(
            n_estimators=number_trees,
            max_depth=maximum_depth,
            min_samples_leaf=minimum_leaf_size,
            random_state=random_seed + sweep,
            n_jobs=1,
        )
        model.fit(unique_features, aggregated_target, sample_weight=counts)
        predicted = model.predict(all_features).reshape(mdp.states.shape[0], 3)
        predicted = np.where(mdp.valid_actions, predicted, np.inf)
        next_minimum = np.min(predicted[samples.next_state], axis=1)
        target = samples.cost + mdp.gamma * next_minimum
    assert model is not None
    q_values = model.predict(all_features).reshape(mdp.states.shape[0], 3)
    q_values = np.where(mdp.valid_actions, q_values, np.inf)
    policy = np.argmin(q_values, axis=1).astype(int)
    labels = tuple(SCHEDULING_ACTIONS[int(action)] for action in policy)
    disagreement = None
    if reference_policy is not None:
        reference = np.asarray(reference_policy, dtype=int)
        if reference.shape != policy.shape:
            raise ValueError("reference_policy has an incompatible shape")
        disagreement = float(np.mean(policy != reference))
    return FQISolution(
        model=model,
        q_values=q_values,
        policy=policy,
        policy_labels=labels,
        dataset=samples,
        sweeps=sweeps,
        random_seed=random_seed,
        policy_disagreement_fraction=disagreement,
    )

Download the complete inference-control implementation

Example: Collision Avoidance Learned from Logged Warnings

This example has no model, only a log. When a satellite and another object, most often a piece of debris, are predicted to pass close to each other, the operator receives about three conjunction data messages per day over the week before the time of closest approach. Each message gives a collision probability estimated from the latest tracking. The operator can plan an avoidance maneuver or wait for the next message. Waiting buys information, because most alarms go away as the tracking improves. It also makes the maneuver more expensive: closer to the encounter, a larger change of velocity is needed for the same miss distance, and there is less time to plan. ESA plans its maneuvers at least two days before closest approach, and its missions in low orbit react to collision probabilities between 10-5 and 10-4 Uriot et al. (2022). ESA released the messages of 13,154 conjunctions of its satellites for a machine-learning competition Uriot et al. (2022), and we use them as the log.

We pose an optimal stopping problem on these sequences. A decision is taken at each message received at least two days before closest approach, and once more at the two-day deadline with the latest message. A maneuver tt days before closest approach costs c(t)=(1+2/t)/2c(t) = (1 + 2/t)/2, in units of a maneuver two days out. An event without a maneuver costs C=105C = 10^5 times the collision probability of its last message, the best estimate available, so that a maneuver at the deadline breaks even at a probability of 10-5. The state is what the operator knows at a decision: the time tt to closest approach, the latest log-probability ρ\rho, and the age of that message. The costs are teaching choices, and ESA’s analysts look at much more than one number.

Two features of the problem let fitted Q-iteration work from the log alone. A maneuver ends the problem at a known cost, so q(s,maneuver)=c(t)q(s, \text{maneuver}) = c(t) needs no learning. And waiting does not change which messages arrive: the released sequences contain no maneuvers, so each one shows what follows “wait”. Fitted Q-iteration only has to learn W(s)=q(s,wait)W(s) = q(s, \text{wait}), by regression on the logged transitions (si,si′)(s_i, s_i') with targets

yi={C pfinalif si is the deadline,min⁡{c(ti′), Wk(si′)}otherwise,Wk+1=fit⁡({(si,yi)}).y_i = \begin{cases} C\, p_{\text{final}} & \text{if } s_i \text{ is the deadline,} \\ \min\{c(t_i'),\, W_k(s_i')\} & \text{otherwise,} \end{cases} \qquad W_{k+1} = \operatorname{fit}\big(\{(s_i, y_i)\}\big).

The minimum over the two actions is the max⁡\max of the Bellman operator for costs. There is no expectation to compute: each logged successor is one draw of s′s', the one-successor targets of Action Values: Acting Without a Model. We fit extra trees, the averager of tree-based FQI Ernst et al. (2005), on the logged decision epochs, and judge every policy out of sample: each event is decided by a policy fitted without it.

Collision avoidance from ESA’s conjunction messages. (a) The collision
probability of the 742 events whose estimate crossed the break-even
probability, about 10^{-5} (dashed), before the deadline. The 59 in color
ended above it. Messages below 10^{-8}, half of which report a probability of 10^{-30}, leave the panel. (b) Total cost of each policy over all events, split into the
cost of maneuvers and of expected collisions. Never maneuvering costs 2,668.
(c) The policy learned by fitted Q-iteration on all events, at a message that
has just arrived. Above the blue boundary it maneuvers. The dashed line is the
break-even probability of the message taken at face value.

Figure 7:Collision avoidance from ESA’s conjunction messages. (a) The collision probability of the 742 events whose estimate crossed the break-even probability, about 10-5 (dashed), before the deadline. The 59 in color ended above it. Messages below 10-8, half of which report a probability of 10-30, leave the panel. (b) Total cost of each policy over all events, split into the cost of maneuvers and of expected collisions. Never maneuvering costs 2,668. (c) The policy learned by fitted Q-iteration on all events, at a message that has just arrived. Above the blue boundary it maneuvers. The dashed line is the break-even probability of the message taken at face value.

PolicyManeuversManeuver costExpected collision costTotalMissed
Never maneuver002668266862 of 62
Maneuver at the first alarm742513896033 of 62
Decide at the deadline1571571342916 of 62
Fitted Q-iteration, relative target16513817531320 of 62
Fitted Q-iteration, raw target374356854418 of 62
Hindsight (knows the final estimate)8860871470 of 62

Totals over the 11,942 conjunctions with a message at least 2 days before closest approach, in units of a maneuver two days out. The expected collision cost of an event without a maneuver is 1e+05 times the collision probability of its last message. Missed counts the events whose last message exceeds the break-even probability of 10-5 and that received no maneuver. The fitted Q-iteration rows are out of sample: each event is decided by a policy fitted without it (5-fold cross-validation by event), averaged over three random splits.

Maneuvering at the first alarm is safe but wasteful: it makes 742 maneuvers for 62 events that needed one, because 92 of every 100 alarms resolve (Figure 7, panel (a)). Waiting until the deadline and then acting on the latest message halves the cost. This rule is what an operator would write by hand. Fitted Q-iteration was told neither that waiting pays nor at what probability to act, and it comes within about 7% of the hand rule, 313 against 291. Its learned rule (panel (c)) waits through a new alarm more than three days out unless the probability is twenty to forty-five times the break-even value, in which case it maneuvers early, while a maneuver is still cheap. The bar comes down as the deadline nears, but at the deadline it still asks for about three times the break-even probability, a bet that later messages will come down, and that bet misses more of the events that needed a maneuver, 20 against 6 for the hand rule. Two choices decide whether fitted Q-iteration works here at all, and both follow from the error analysis of the previous chapters.

  1. The fit must fit the right thing. The raw target C pfinalC\, p_{\text{final}} is heavy-tailed. One event in the log ends at a probability of 2% and costs about 2,070 if nothing is done, more than three times the cost of all other events together. Extra trees predict the average of the targets in a leaf, so this one cost is shared by every state in the leaves where its epochs fall, and those states look dangerous. Fitted on all events, the raw-target policy makes 342 maneuvers; fitted without that single event, 141. Out of sample it makes 374 maneuvers and costs 441, half again as much as the hand rule. The second version fits the ratio yi/(C 10ρi)y_i / (C\, 10^{\rho_i}), the cost relative to what the current message alone predicts, and multiplies the fit back. The regressor then learns a correction factor to the operator’s own estimate. For the dangerous event this factor stays between 0.7 and 7, an ordinary value, and the policy makes 166 maneuvers with the event in the data and 175 without it.

  2. The fit is only as good as the data where decisions are made. Five in six of the 123,882 decision epochs have probabilities below 10-7, where waiting is plainly right, and we leave them out of the fit. Only 62 events needed a maneuver. This is the coverage problem behind the concentrability coefficients of Error Bounds When Every Fit Is Accurate: the regression error that matters is the one at the few states where the two actions are close, and no amount of data elsewhere reduces it. The hindsight policy, at 147, is not a target: it knows the estimate of the messages that arrive after the deadline, which no policy can use.

What Remains: Online Data and Continuous Actions

Fitted Q-iteration on a fixed log, as this chapter leaves it, still differs from NFQCA in two ways.

First, its data are fixed, and each fit runs to completion before the targets change. Online reinforcement learning works from a buffer that changes as the agent acts, and a neural fit is warm-started and stopped after a few gradient steps. The next chapter merges the fit with the outer loop, which produces the target network and the replay buffer of DQN.

Second, it maximizes over a finite set of actions. Every target contains max⁡a′q(s′,a′;θ)\max_{a'} q(s',a';\theta). When the action is continuous, a torque or a dose, that maximum is a nonlinear program, to be solved once for every target at every iteration. NFQCA Hafner & Riedmiller (2011) trains a second network, an actor πw(s)≈arg⁡max⁡aq(s,a;θ)\pi_{\boldsymbol w}(s) \approx \arg\max_a q(s,a;\theta), and uses it in the target in place of the maximum. The critic qq is fitted by regression against fixed targets, exactly as in this chapter, and the actor by gradient ascent on the critic. In the terms of Approximate Policy Iteration, NFQCA is approximate policy iteration with one fitted evaluation sweep per improvement, that is, a fitted version of modified policy iteration (Algorithm 4) in which the improvement step is learned as well. The amortized action optimization chapter develops it, together with its online descendants DDPG and TD3. The smooth Bellman operator meets the same obstacle in the partition function over a continuous action set (Continuous Action and State Spaces), and soft actor-critic resolves it in the same way.

What fitted value iteration assumedWhat replaces itWhere
State values v(s)v(s)Action values q(s,a)q(s,a), so acting needs no modelAction Values: Acting Without a Model
Exact expectation in the targetOne sampled successor per transitionAction Values: Acting Without a Model
Targets at chosen statesA fixed batch of logged transitions (FQI, NFQ)Fitted Q-Iteration on a Fixed Batch of Transitions
A fixed batch, each fit run to completionA replay buffer and a target network (DQN)Deep Q-networks
Maximum over a finite action setA learned actor in the target (NFQCA, DDPG, TD3)Amortized action optimization

Exercises

The exercises follow the chapter: the fitted iteration, its regressor and its error bounds, single estimators and their effect inside the iteration, then logged data. Exercise 6 reuses the code of the eight-dimensional stopping problem, Exercise 12 is a short simulation and Exercise 18 is a short program.

Solution to Exercise 1
  1. The objective is (θ−2γθ)2+(2θ−2γθ)2=θ2[(1−2γ)2+4(1−γ)2](\theta - 2\gamma\theta)^2 + (2\theta - 2\gamma\theta)^2 = \theta^2\big[(1-2\gamma)^2 + 4(1-\gamma)^2\big], a parabola whose coefficient is positive for γ<1\gamma < 1. Its minimizer is θ=0\theta = 0.

  2. Gradient descent on a positive-definite quadratic converges for any step size below 2/c2/c, where cc is its curvature. Fitted value iteration does not descend this objective: it holds the target fixed and fits it, which is the semi-gradient, and the semi-gradient map θ↦65γθ\theta \mapsto \tfrac65\gamma\theta has modulus 65γ>1\tfrac65\gamma > 1 for γ>5/6\gamma > 5/6, so it is not a contraction.

  3. Squaring the residual of a single sampled successor gives E[(v(s)−r−γv(s′))2]\mathbb{E}\big[(v(s) - r - \gamma v(s'))^2\big], which equals the squared residual plus the variance of r+γv(s′)r + \gamma v(s'). The minimizer is biased toward functions with small variance of the successor value. An unbiased estimate needs two independent successors of the same state, the double-sampling problem, which a log with one successor per transition cannot provide.

Solution to Exercise 2

The least-squares fit is not an averager: it maps the constant target to a line that overshoots at state 2. Its sup-norm operator norm is 6/56/5, so the modulus 6γ/56\gamma/5 of the composition exceeds one when γ>5/6\gamma > 5/6. The fit error at iteration kk is proportional to θk\theta_k, so there is no single ε\varepsilon that bounds it for all kk, and the theorem’s assumption fails.

Solution to Exercise 3
  1. ∥v50−v∗∥∞≤0.950⋅10+0.1/0.1=0.052+1\|v_{50} - v^*\|_\infty \le 0.9^{50} \cdot 10 + 0.1/0.1 = 0.052 + 1. Further iterations shrink the first term only; the second, ε/(1−γ)=1\varepsilon/(1-\gamma) = 1, is the price of the fits and stays.

  2. The greedy loss is at most 2γ1−γ⋅1.052≈18.9\tfrac{2\gamma}{1-\gamma} \cdot 1.052 \approx 18.9, nearly twice ∥v∗∥∞\|v^*\|_\infty, so the bound says nothing useful here.

  3. The value bound charges every fitting error at its worst state and lets the errors add in the same direction at every iteration. The greedy bound charges the worst value error twice, once for each of the two actions being compared. In the duck problem the fitting errors are much smaller than ε\varepsilon at most states, they do not align over the 50-year horizon, and much of the error is common to all four packages, so it cancels in the comparison that decides the action.

Solution to Exercise 4

The fit may be accurate under the weighted norm yet poor in that neglected region, leading to bad values or decisions there. In the error bound of fitted value iteration, this shows up as a large sup-norm error, or, in the weighted analysis, as a large concentrability coefficient.

Solution to Exercise 5

Any averager gives the guarantee: multilinear interpolation on a grid, state aggregation, or kk-nearest neighbors on sampled states. A report should state the fit, the states where targets are computed, the tolerance, and the policy loss measured against an exact or fine-grid solution. With the network, expect the iterates to wander by an amount comparable to the fit error rather than converge, as in the duck-harvest experiment, and a policy whose errors concentrate where the data are sparse or two actions are close.

Solution to Exercise 6

The changes shrink geometrically, by a factor of about 0.43 to 0.55 per iteration, faster than γ\gamma, because the stopping reward caps the values, and they reach 10-14 within the 40 iterations. With k=10k = 10 at D=8D = 8 the mean error is about 0.022 and the largest about 0.155, between the trees (0.031) and the network (0.013) on average. Larger kk averages targets over a larger neighborhood; at a corner of the cube all neighbors lie on one side, so the prediction is pulled toward the interior, and the largest error grows to about 0.2 at k=50k = 50. For the trees and the network the measurement is worth making, because no theorem predicts its outcome: the splits of the trees depend on the targets, and the network has no sign or normalization constraint.

Solution to Exercise 7

Positive. Maximization preferentially selects estimates with favorable noise, so the expected maximum exceeds the common true value.

Solution to Exercise 8

The evaluation noise is made independent of the lucky noise that caused the selection, which removes the reuse of the same positive error for both jobs. The selection bias remains: the chosen action is still more often one whose first estimate was lucky, so the double estimator is biased slightly downward.

Solution to Exercise 9
  1. σ/N=0.01\sigma/\sqrt N = 0.01 gives N=(3/0.01)2=90,000N = (3/0.01)^2 = 90{,}000.

  2. 2,000×4×90,000=7.2×1082{,}000 \times 4 \times 90{,}000 = 7.2 \times 10^8 calls per iteration. The Monte Carlo rate does not depend on the dimension, so the count does not change unless σ\sigma does; a product quadrature rule would need NDN^D nodes instead.

  3. At most 0.01/(1−0.95)=0.20.01/(1 - 0.95) = 0.2, added to the error of the fit.

Solution to Exercise 10
  1. max⁡(X1,X2)=12(X1+X2)+12∣X1−X2∣\max(X_1, X_2) = \tfrac12(X_1 + X_2) + \tfrac12|X_1 - X_2|. The first term has mean 0. The difference is Gaussian with standard deviation 2 σmean\sqrt2\,\sigma_{\text{mean}}, and E∣Z∣=2/π\mathbb{E}|Z| = \sqrt{2/\pi} for a standard Gaussian, so the expectation is 122 σmean2/π=σmean/π=1/5π≈0.252\tfrac12\sqrt2\,\sigma_{\text{mean}}\sqrt{2/\pi} = \sigma_{\text{mean}}/\sqrt\pi = 1/\sqrt{5\pi} \approx 0.252.

  2. The figure shows 0.25 at two actions.

  3. It scales with σmean=1/N\sigma_{\text{mean}} = 1/\sqrt N: four times as many draws halve it. It never vanishes for finite NN.

Solution to Exercise 11
  1. Φ(−1/2)=0.240\Phi(-1/\sqrt2) = 0.240 and ϕ(1/2)=0.311\phi(1/\sqrt2) = 0.311, so the expected maximum is −0.240+2×0.311=0.200-0.240 + \sqrt2 \times 0.311 = 0.200, a bias of +0.20.

  2. The double estimator is unbiased for the value of the action it selects, so its expectation is −1×0.240=−0.240-1 \times 0.240 = -0.240, a bias of -0.24. A simulation with 2×1062 \times 10^6 draws gives 0.200 and -0.238.

  3. The maximum estimator is closer here, by a little. With equal values the selection costs nothing and the double estimator is unbiased; with a gap of the size of the noise, selection bias dominates, and it is negative. Removing evaluation bias does not remove selection bias, which is why the double estimator is pessimistic rather than unbiased in general.

Solution to Exercise 12
  1. Taking expectations, E[vk+1]=b+γ E[vk]\mathbb{E}[v_{k+1}] = b + \gamma\,\mathbb{E}[v_k], a contraction with fixed point b/(1−γ)b/(1-\gamma).

  2. With b≈0.460b \approx 0.460 the limit is 4.6, ten times the per-step bias. A simulation such as

import numpy as np
rng = np.random.default_rng(0)
M, N, gamma, runs, iterations = 4, 5, 0.9, 20000, 200
v = np.zeros(runs)
for _ in range(iterations):
    v = rng.normal(size=(runs, M, N)).mean(axis=2).max(axis=1) + gamma * v
print(v.mean())

prints a value close to 4.6. 3. Selecting with one set of means and evaluating with the other gives an expectation of 0 at each step, so E[vk]→0\mathbb{E}[v_k] \to 0: with equal true values the double estimator removes the compounding entirely.

Solution to Exercise 13
  1. For each (s,a)(s,a), ∣(Lq)(s,a)−(Lq′)(s,a)∣≤γ E[∣max⁡a′q(s′,a′)−max⁡a′q′(s′,a′)∣]≤γ∥q−q′∥∞|(\Bellman q)(s,a) - (\Bellman q')(s,a)| \le \gamma\,\mathbb{E}\big[|\max_{a'} q(s',a') - \max_{a'} q'(s',a')|\big] \le \gamma\|q - q'\|_\infty.

  2. π⋆(s)∈arg⁡max⁡aq⋆(s,a)\pi^\star(s) \in \arg\max_a q^\star(s,a) and v⋆(s)=max⁡aq⋆(s,a)v^\star(s) = \max_a q^\star(s,a). Neither needs the model, which is the point of storing qq.

  3. Fitted Q-iteration computes targets for every state-action pair, ∣A∣|\mathcal{A}| times as many as fitted value iteration with a model, but acting with it is a maximization over stored values, with no expectation to estimate.

Solution to Exercise 14

This exercise is open-ended. More successors per state reduce the variance of each target, which a regression would otherwise have to average out across nearby states. More states reduce the error of the fit itself and extend coverage. Which wins depends on the noise of the targets relative to the smoothness of the value: a problem with very noisy transitions and a smooth value favors more successors, and a problem whose value varies a lot across the state space favors more states.

Solution to Exercise 15

The fit is unconstrained off the data support. Maximization can select extrapolated action values that are numerically large but unsupported by transitions in the dataset.

Solution to Exercise 16

Repeated transitions make the empirical regression problem easier on the visited region, but they supply no Bellman targets for omitted actions and states. Greedy action selection can therefore depend on unsupported extrapolation even when the in-buffer fit is accurate.

Solution to Exercise 17

Extra trees predict the average of the targets in a leaf, so a single cost three times larger than all the others combined raises the prediction of every state that shares a leaf with that event’s epochs. Fitting the cost relative to the current message’s own estimate turns the target into a correction factor of ordinary size, so the event no longer dominates the leaves that contain it.

Solution to Exercise 18

With the broad log the greedy policy moves right everywhere and its value from state 0 is 3.90, the optimal value. With the narrow log, “right” has no data in states 5 to 8, so its value there stays at 0, which ties with “left” and loses the tie. The policy moves left in states 5 to 8, and the value it attains from state 0 is 0. In states 0 to 4 both actions have data, but the targets of “right” are built from the values of states 1 to 5, which are wrong: the error in the uncovered states propagates backward through the bootstrapped targets. A fit that generalizes, such as trees on the state index, could extrapolate “right” from state 4 or 9, and that extrapolation would decide the result, which is the situation of the narrow inference-scheduling buffer.

Solution to Exercise 19

It replaces the maximization over next actions inside each Bellman target. With a finite action set the maximum is computed by enumeration; with a continuous action set it is a nonlinear program for every target, and the actor amortizes those programs into one trained network.

Summary and Forward Look

Fitted value iteration computes Bellman targets at chosen states and fits a regressor to them. Collocation and Galerkin projection are two fitting rules, and regression with trees or neural networks is the one that scales, as the eight-dimensional stopping problem showed. Fitted Bellman updates contain two expectations, inside the operator and over the states, and either can be estimated from samples. The sample average is unbiased, its error falls as N−1/2N^{-1/2} whatever the dimension, and it adds a per-iteration error that the bound of the previous chapter absorbs. Sampling makes the model optional: a simulator or a log of transitions suffices, which is the setting of reinforcement learning. Acting on a sampled value function would require sampling at decision time, so the action-value function q(s,a)q(s,a) stores the backup of each action instead, and fitted Q-iteration is fitted value iteration on qq. Temporal-difference learning solves the Galerkin system of the previous chapter one transition at a time; it is stable on-policy for the same reason that the projected equation contracts, and off-policy it can diverge even when the equation is well posed, which importance sampling, gradient TD and emphatic TD repair in different ways. The maximum over noisy estimates is biased upward, and the bias compounds through the iterations; using one estimate to select the action and an independent one to value it removes the larger part of the bias, and learned, analytic or weighted corrections are the alternatives.

Fitted Q-iteration on data is fitted value iteration with the model replaced by the empirical distribution of a buffer: targets from recorded transitions, one successor each, and a fit that averages its error over them. The two experiments located the errors of a fitted policy. In the scheduling log with full coverage, the policy erred only where two actions were nearly tied, an approximation error that more data would not remove; in the log that followed one heuristic, it erred where the heuristic had never tried the exact policy’s action, a coverage error that no regressor can repair. On ESA’s collision warnings, fitted Q-iteration learned from the log alone a rule within about 7% of the one an operator would write by hand, once its targets were scaled so that one rare event could not dominate the fit.

Every fit in this chapter ran to completion on data that did not change. Deep Q-networks lets the data grow as the agent acts and merges the fit with the outer loop, which produces the target network, the replay buffer and DQN.

References
  1. Gordon, G. J. (1995). Stable function approximation in dynamic programming. Proceedings of the Twelfth International Conference on International Conference on Machine Learning, 261–268.
  2. Ernst, D., Geurts, P., & Wehenkel, L. (2005). Tree-Based Batch Mode Reinforcement Learning. Journal of Machine Learning Research, 6, 503–556.
  3. Riedmiller, M. (2005). Neural Fitted Q Iteration – First Experiences with a Data Efficient Neural Reinforcement Learning Method. Proceedings of the 16th European Conference on Machine Learning (ECML), 317–328.
  4. Singh, S. P., & Yee, R. C. (1994). An upper bound on the loss from approximate optimal-value functions. Machine Learning, 16(3), 227–233.
  5. Munos, R. (2007). Performance bounds in Lₛ-norm for approximate value iteration. SIAM Journal on Control and Optimization, 46(2), 541–561.
  6. Munos, R., & Szepesvári, C. (2008). Finite-time bounds for fitted value iteration. Journal of Machine Learning Research, 9, 815–857.
  7. Johnson, F. A., Moore, C. T., Kendall, W. L., Dubovsky, J. A., Caithamer, D. F., Kelley, J. R., Jr., & Williams, B. K. (1997). Uncertainty and the management of mallard harvests. The Journal of Wildlife Management, 61(1), 202–216. 10.2307/3802429
  8. U.S. Fish and Wildlife Service. (2012). Adaptive Harvest Management: 2012 Hunting Season [Techreport]. U.S. Department of the Interior. https://webarchive.library.unt.edu/web/20120925054441/http:/www.fws.gov/migratorybirds/NewReportsPublications/AHM/Year2012/AHMReport2012.pdf
  9. Kushner, H. J., & Yin, G. G. (2003). Stochastic Approximation and Recursive Algorithms and Applications (2nd ed., Vol. 35). Springer.
  10. Tsitsiklis, J. N., & Van Roy, B. (1997). An analysis of temporal-difference learning with function approximation. IEEE Transactions on Automatic Control, 42(5), 674–690.
  11. Bertsekas, D. P., & Tsitsiklis, J. N. (1996). Neuro-Dynamic Programming. Athena Scientific.
  12. Bertsekas, D. P. (2011). Approximate Policy Iteration: A Survey and Some New Methods. Journal of Control Theory and Applications, 9(3), 310–335.
  13. Bertsekas, D. P., & Yu, H. (2009). Projected Equation Methods for Approximate Solution of Large Linear Systems. Journal of Computational and Applied Mathematics, 227(1), 27–50.
  14. Yu, H., & Bertsekas, D. P. (2010). Error Bounds for Approximations from Projected Linear Equations. Mathematics of Operations Research, 35(2), 306–329.
  15. Kolter, J. Z. (2011). The Fixed Points of Off-Policy TD. Advances in Neural Information Processing Systems, 24.