RLS RL, Read as Statistics

Chapter 05 · Part 2: Learning values

TD learning as bootstrapping

Temporal-difference learning swaps an unbiased, noisy Monte Carlo return for a biased, steadier target built from the current estimate, and n-step returns tune that trade.

Chapter 4 estimated vπ(s)v_\pi(s) with a sample mean of observed returns. That estimator is unbiased (first-visit) and its error shrinks like 1/N1/\sqrt{N}, but each return carries the randomness of every step until the episode ends. A return from a 100-step episode adds up 100 noisy rewards and 100 random transitions, and all of that noise is the price of one observation. The question for this chapter: can we spend less variance per observation, and what do we pay for it?

The answer is to stop waiting for the end of the episode. After one step we already hold a guess, V(St+1)V(S_{t+1}), for the value of everything that happens next. Using that guess in place of the tail is called bootstrapping, a word borrowed from the statistician's bootstrap only in spirit: the estimate is pulled up by its own estimates. The resulting method is temporal-difference (TD) learning (Sutton, 1988). Throughout we use γ\gamma as in chapter 1 and evaluate a fixed policy π\pi, so π\pi is suppressed from the notation of the data-generating process.

What does the TD(0) update do?

Recall the incremental form of a sample mean from chapter 4. After observing a return GG from state ss, a step size α\alpha gives

V(s)←V(s)+α (G−V(s)).V(s) \leftarrow V(s) + \alpha\,\big(G - V(s)\big).

With α=1/N(s)\alpha = 1/N(s) this is exactly the running average; with constant α\alpha it is an exponentially weighted average. The Monte Carlo update has to wait for GG. The TD(0) update uses the one-step TD target Ut=Rt+1+γV(St+1)U_t = R_{t+1} + \gamma V(S_{t+1}) instead:

V(St)←V(St)+α δt,δt=Rt+1+γV(St+1)−V(St),V(S_t) \leftarrow V(S_t) + \alpha\,\delta_t, \qquad \delta_t = R_{t+1} + \gamma V(S_{t+1}) - V(S_t),

where δt\delta_t is the TD error from the notation page. It can be applied after every transition, in the middle of an episode, and works for continuing tasks.

A tiny numerical case. Suppose V(s)=0.50V(s)=0.50, we observe R=0R=0 and land in s′s' with V(s′)=0.60V(s')=0.60, γ=1\gamma=1, α=0.1\alpha=0.1. Then δ=0+0.60−0.50=0.10\delta = 0 + 0.60 - 0.50 = 0.10 and V(s)←0.50+0.1×0.10=0.51V(s)\leftarrow 0.50 + 0.1\times 0.10 = 0.51. Nothing about the end of the episode was needed.

Why should this converge? Stochastic approximation

Define the Bellman operator for the policy, (TV)(s)=E[Rt+1+γV(St+1)∣St=s](TV)(s) = \mathbb{E}\left[R_{t+1} + \gamma V(S_{t+1}) \mid S_t = s\right]. Chapter 1 showed that vπv_\pi is its fixed point, Tvπ=vπTv_\pi = v_\pi (that is the Bellman equation, the law of total expectation applied to Gt=Rt+1+γGt+1G_t = R_{t+1}+\gamma G_{t+1}). Finding vπv_\pi is therefore a root-finding problem, g(V)=TV−V=0g(V) = TV - V = 0, in which we can only observe gg with noise: the TD error δt\delta_t has conditional mean g(V)(St)g(V)(S_t) given the current VV and StS_t.

This is the setting of Robbins and Monro (1951): find the root of a function M(x)M(x) that can only be measured through noisy responses Y(x)Y(x) with E[Y(x)]=M(x)\mathbb{E}[Y(x)] = M(x), by iterating xt+1=xt−atY(xt)x_{t+1} = x_t - a_t Y(x_t). Their step-size conditions, in the form used ever since, are

∑tαt=∞,∑tαt2<∞.\sum_{t} \alpha_t = \infty, \qquad \sum_{t} \alpha_t^2 < \infty.

The first lets the iterates travel any distance needed; the second makes the accumulated noise, whose variance is proportional to ∑αt2\sum\alpha_t^2, finite. The sample mean is the simplest case. With αt=1/t\alpha_t = 1/t the recursion mt=mt−1+(xt−mt−1)/tm_t = m_{t-1} + (x_t - m_{t-1})/t reproduces Xˉt\bar X_t, and ∑1/t\sum 1/t diverges while ∑1/t2\sum 1/t^2 converges. A constant α\alpha violates the second condition: the estimate never settles, it keeps fluctuating around the target with variance of order ασ2/(2−α)\alpha\sigma^2/(2-\alpha) for iid noise of variance σ2\sigma^2. That is the bias–variance trade of a constant step size that chapter 4 met as exponential smoothing.

For tabular TD(0), each state has its own count and step size, every state must be visited infinitely often, and the conditions hold per state. Sutton (1988) proved convergence of the expected values for TD(0) on absorbing Markov chains; almost-sure convergence follows from stochastic-approximation theory, and Sutton and Barto's textbook (2018, chapter 6) gives the details and references. The statistical content is: TD(0) is a Robbins–Monro procedure for a fixed point, with the next-state estimate standing in for the unknown tail.

Why is the TD target biased, and why does it have lower variance?

Fix a state ss and a current estimate VV. Compare the two measurements of vπ(s)v_\pi(s):

  • the return GtG_t, with E[Gt∣St=s]=vπ(s)\mathbb{E}[G_t \mid S_t=s] = v_\pi(s);
  • the TD target Ut=Rt+1+γV(St+1)U_t = R_{t+1} + \gamma V(S_{t+1}).

Bias. Because vπ(s)=E[Rt+1+γvπ(St+1)∣St=s]v_\pi(s) = \mathbb{E}[R_{t+1} + \gamma v_\pi(S_{t+1}) \mid S_t = s],

E[Ut∣St=s]−vπ(s)=γ E[V(St+1)−vπ(St+1)∣St=s].\mathbb{E}[U_t \mid S_t = s] - v_\pi(s) = \gamma\,\mathbb{E}\big[V(S_{t+1}) - v_\pi(S_{t+1}) \mid S_t=s\big].

The bias of the target at ss is γ\gamma times the average error of the estimate at the successor states. It vanishes when V=vπV = v_\pi and is carried backward one step at a time. Note this is bias in the measurement conditional on the current VV; the final estimator is a different object and its bias decays as the successors improve.

Variance. Take the favourable case V=vπV = v_\pi, so the target is unbiased, and decompose Gt=Rt+1+γGt+1G_t = R_{t+1} + \gamma G_{t+1} with the law of total variance, conditioning on the first transition (Rt+1,St+1)(R_{t+1}, S_{t+1}):

Var⁡(Gt∣St=s)=E[γ2Var⁡(Gt+1∣St+1)∣St=s]⏟randomness after the first step+Var⁡(Rt+1+γvπ(St+1)∣St=s)⏟Var⁡(Ut∣St=s).\operatorname{Var}(G_t \mid S_t = s) = \underbrace{\mathbb{E}\big[\gamma^2 \operatorname{Var}(G_{t+1} \mid S_{t+1}) \mid S_t = s\big]}_{\text{randomness after the first step}} + \underbrace{\operatorname{Var}\big(R_{t+1} + \gamma v_\pi(S_{t+1}) \mid S_t = s\big)}_{\operatorname{Var}(U_t \mid S_t=s)} .

Here I used E[Gt∣St,Rt+1,St+1]=Rt+1+γvπ(St+1)\mathbb{E}[G_t \mid S_t, R_{t+1}, S_{t+1}] = R_{t+1} + \gamma v_\pi(S_{t+1}), which is the Markov property at work. The first term is nonnegative, so Var⁡(Ut)≤Var⁡(Gt)\operatorname{Var}(U_t) \le \operatorname{Var}(G_t), with the gap equal to the discounted expected variance of the whole future. The target is the return with its random tail replaced by the tail's conditional mean: this is the Rao–Blackwell idea, and conditioning never increases variance. The difference is that the conditional mean is not known and has to be estimated, which is where the bias enters.

When V≠vπV \ne v_\pi the target's variance is Var⁡(Rt+1+γV(St+1)∣s)\operatorname{Var}(R_{t+1} + \gamma V(S_{t+1}) \mid s) for the current VV; its mean squared error about vπ(s)v_\pi(s) is bias2^2 plus that variance, so

MSE⁡(Ut)=γ2(E[V(St+1)−vπ(St+1)])2+Var⁡(Ut),MSE⁡(Gt)=Var⁡(Gt).\operatorname{MSE}(U_t) = \gamma^2\big(\mathbb{E}[V(S_{t+1}) - v_\pi(S_{t+1})]\big)^2 + \operatorname{Var}(U_t), \qquad \operatorname{MSE}(G_t) = \operatorname{Var}(G_t).

TD wins whenever the squared error of VV at the successors is smaller than the variance it saves. Early on, with VV initialised arbitrarily, the bias term can dominate; later, the variance term does.

A worked example by hand

Take a symmetric random walk on states 1,…,191,\dots,19 with exits at 00 and 2020; from each state, move left or right with probability 1/21/2; reward 11 on reaching 2020, 00 otherwise; γ=1\gamma=1. The return from any state is 11 if the walk exits on the right and 00 otherwise, so Gt∼Bern⁡(v(s))G_t \sim \operatorname{Bern}(v(s)) with v(s)=s/20v(s) = s/20 (gambler's ruin). Take s=10s = 10:

  • v(10)=0.5v(10) = 0.5 and Var⁡(Gt∣St=10)=0.5×0.5=0.25\operatorname{Var}(G_t \mid S_t=10) = 0.5\times 0.5 = 0.25.
  • With the exact values, the TD target is Ut=v(St+1)U_t = v(S_{t+1}), and St+1∈{9,11}S_{t+1}\in\{9, 11\} equally likely, so Ut∈{0.45,0.55}U_t \in \{0.45, 0.55\}. Mean 0.50.5, variance 0.052=0.00250.05^2 = 0.0025.

The target is unbiased and its variance is one hundredth of the return's. The experiment below confirms both by simulation. If instead V(9)=V(11)=0V(9)=V(11)=0, the target is 00 with certainty: variance 00, bias −0.5-0.5. Bootstrapping from a bad estimate trades all the variance for all the bias.

What is the nn-step return, and what does λ\lambda do?

Between one step and the whole episode there is a family of targets. The nn-step return uses nn real rewards and then bootstraps:

Gt(n)=∑k=0n−1γkRt+k+1+γnV(St+n).G_t^{(n)} = \sum_{k=0}^{n-1}\gamma^k R_{t+k+1} + \gamma^n V(S_{t+n}).

For n=1n=1 this is the TD target, and once t+nt+n reaches the end of the episode it is the Monte Carlo return. The same argument as above gives

Bias⁡(Gt(n))=γn E[V(St+n)−vπ(St+n)∣St=s].\operatorname{Bias}\big(G_t^{(n)}\big) = \gamma^n\,\mathbb{E}\big[V(S_{t+n}) - v_\pi(S_{t+n}) \mid S_t = s\big].

The bias is multiplied by γn\gamma^n and the estimation error is evaluated nn steps ahead. With γ=1\gamma=1 the factor does not shrink, but the estimate VV at states further from where we are learning has often had more time to improve, and in episodic tasks the target eventually reaches terminal states, where V≡0V\equiv 0 is exact. The variance has nn rewards and nn transitions in it: when the increments behave roughly like independent draws, it grows about linearly in nn until it saturates at Var⁡(Gt)\operatorname{Var}(G_t).

The λ\lambda-return averages all nn-step returns with geometric weights, 0≤λ≤10\le\lambda\le 1:

Gtλ=(1−λ)∑n=1∞λn−1Gt(n)G_t^{\lambda} = (1-\lambda)\sum_{n=1}^{\infty}\lambda^{n-1} G_t^{(n)}

(in an episodic task, the weight on nn values beyond the end of the episode goes to the full return). It is a convex combination of the dial settings, so its bias is the weighted average of their biases and λ=0\lambda=0 is TD(0), λ=1\lambda=1 is Monte Carlo. Its practical appeal, via eligibility traces, is that it can be computed online without storing nn steps; Sutton and Barto's chapters 7 and 12 cover both. Chapter 8 meets the same λ\lambda dial again as generalised advantage estimation.

What is known theoretically about the dial?

Kearns and Singh (2000) give upper bounds on the error of TD updates with kk-step backups or parameter λ\lambda, as a function of the number of trajectories, for any MDP, in an analysed "phased" variant where each phase averages nn fresh trajectories per state (so the step-size randomness is removed). Their bounds are sums of terms that grow with kk or λ\lambda (more reward noise) and terms that shrink with kk or λ\lambda (less reliance on the current estimate). They predict that larger kk or λ\lambda gives faster convergence to a higher asymptotic error floor, that for a fixed number of trajectories an intermediate value is best, and that a schedule which decreases kk or λ\lambda over time can beat any fixed value. These are upper bounds, not exact errors, and their analysis is for the phased scheme; but the experiment below shows the U-shape they predict.

What do the numbers say about the dial? An experiment

The script ch05_td.py runs three things. First, the variance check at one state from the worked example. Second, the main experiment: 19-state random walk as above, VV initialised to 00, online nn-step TD, a fixed budget of 10 episodes, and then the estimate VV at the end of those 10 episodes is compared with the true v(s)=s/20v(s)=s/20. This is repeated over 1000 independent runs (all configurations reuse the same simulated episodes, so comparisons between nn and α\alpha are paired). At each state we compute Bias⁡2=(E[V(s)]−v(s))2\operatorname{Bias}^2 = (\mathbb{E}[V(s)] - v(s))^2 and Var⁡(V(s))\operatorname{Var}(V(s)) across runs, and average over the 19 states, so that MSE⁡=Bias⁡2+Var⁡\operatorname{MSE} = \operatorname{Bias}^2 + \operatorname{Var} holds exactly. "MC" is constant-α\alpha every-visit Monte Carlo. Third, certainty equivalence, discussed in the next section.

Output
1. Variance of the target at state s=10 (V exact, true v=0.500)
                                   exact  simulated
   Var(G)  = v(1-v)               0.2500     0.2500
   Var(R+V(S')) = 1/400           0.0025     0.0025
   mean of G                      0.5000     0.5004
   mean of R+V(S')                0.5000     0.5000

2. 19-state random walk, 10 episodes, 1000 independent runs
   Quantities are averaged over the 19 states; V0 = 0; truth v(s) = s/20.

   bias^2, variance, MSE at alpha = 0.2
   n        bias^2   variance        MSE   bias/var
   1       0.24821    0.00170    0.24990     146.36
   2       0.18609    0.00354    0.18963      52.59
   4       0.10661    0.00781    0.11442      13.65
   8       0.03933    0.01508    0.05441       2.61
   16      0.00977    0.02707    0.03684       0.36
   32      0.00344    0.04782    0.05126       0.07
   64      0.00178    0.07580    0.07757       0.02
   MC      0.00129    0.10956    0.11085       0.01

   MSE by n (rows) and alpha (columns)
   n        0.05     0.10     0.20     0.30     0.40     0.60   best alpha
   1     0.30229  0.28302  0.24990  0.22162  0.19708  0.15785   0.60
   2     0.28158  0.24633  0.18963  0.14582  0.11233  0.07147   0.60
   4     0.24580  0.18896  0.11442  0.07323  0.05251  0.04386   0.60
   8     0.19131  0.11790  0.05441  0.03791  0.03778  0.05200   0.40
   16    0.12752  0.06227  0.03684  0.04297  0.05377  0.07576   0.20
   32    0.07959  0.04482  0.05126  0.06760  0.08195  0.10400   0.10
   64    0.06389  0.05612  0.07757  0.09674  0.11090  0.13049   0.10
   MC    0.07984  0.08714  0.11085  0.12743  0.13891  0.15429   0.05

   best MSE over alpha, with its bias^2 and variance
   n     alpha     bias^2   variance        MSE
   1      0.60    0.14892    0.00893    0.15785
   2      0.60    0.05504    0.01642    0.07147
   4      0.60    0.01913    0.02473    0.04386
   8      0.40    0.01059    0.02719    0.03778
   16     0.20    0.00977    0.02707    0.03684
   32     0.10    0.01742    0.02740    0.04482
   64     0.10    0.00962    0.04651    0.05612
   MC     0.05    0.02766    0.05218    0.07984

3a. Sutton & Barto A/B example: 8 episodes (A,0,B,0), 6 x (B,1), (B,0)
                                  V(A)     V(B)
   batch MC (mean return)       0.0000   0.7500
   batch TD(0), iterated        0.7500   0.7500
   ML model, solved exactly     0.7500   0.7500

3b. 5-state random walk, RMS error over states, mean of 500 runs
   episodes    batch MC   batch TD
   1             0.4005     0.4005
   2             0.3547     0.2966
   5             0.2479     0.1767
   10            0.1857     0.1266
   25            0.1099     0.0758
   50            0.0791     0.0541

Part 1: the variance gap. The return at state 10 has variance 0.250.25 and the one-step target has 0.00250.0025 (simulated values agree to four decimals), and both are centred on 0.50.5.

Part 2: bias, variance and MSE of the estimator. A caution about what "bias" means in this table. The estimator is VV after 10 episodes, started from V≡0V\equiv 0 while the truth runs from 0.050.05 to 0.950.95. Bias here is dominated by the initial error not yet having propagated. A one-step method moves information one state per visit, so after 10 episodes the far-from-exit states are still near zero. That is the bias of TD(0) as a learning procedure, a different (and more practically relevant) thing than the one-step bias of a target computed from a fixed VV, though they have the same cause.

At α=0.2\alpha=0.2 the pattern is clean. Squared bias falls monotonically with nn (0.2480.248 at n=1n=1 to 0.00130.0013 for MC); variance rises monotonically (0.00170.0017 to 0.1100.110); MSE is U-shaped with a minimum at n=16n=16 (0.0370.037). Monte Carlo has three times the MSE of the best nn, almost all of it variance, and 1-step TD has seven times, almost all of it bias.

The MSE table across step sizes adds a second dial. Large α\alpha speeds up learning (less initialisation bias) but amplifies noise (variance), so the best α\alpha falls as nn grows: 0.60.6 for n≤4n\le 4, 0.40.4 at n=8n=8, 0.20.2 at n=16n=16, 0.10.1 at n=32,64n=32,64, and 0.050.05 for MC. Two of those winners sit at the edge of the α\alpha grid (0.60.6 for n=1,2,4n=1,2,4 and 0.050.05 for MC), so the true optimum for n=1,2,4n=1,2,4 might be at a larger α\alpha and for MC at a smaller one; those rows are upper bounds on what tuning could achieve. Tuned over α\alpha, intermediate nn (88 or 1616) still gives the lowest MSE (0.0380.038 and 0.0370.037), about half that of tuned MC (0.0800.080) and under a quarter of tuned 1-step TD (0.1580.158).

Three honest limits. The optimum depends on the budget: with 100 episodes instead of 10, the initialisation bias would shrink and the best nn would move down (try it in the exercises). It depends on the problem: here rewards are sparse and the variance in GG is large. And "bias" in this experiment includes the initial value; started from V≡0.5V\equiv 0.5 the small-nn methods would look better.

What does a fixed batch of data say? Certainty equivalence

Suppose we stop collecting data and have a fixed batch of episodes. Repeatedly sweep through the batch and apply the TD(0) increments summed over the whole batch (small α\alpha) until VV stops changing; do the same with Monte Carlo increments. What do the two procedures converge to?

Batch Monte Carlo converges, in the tabular case, to the sample average of the observed returns from each state. Equivalently, it minimises the squared error on the training returns,

V^MC=arg⁡min⁡V ∑visits (si,Gi)(Gi−V(si))2,\hat V_{\mathrm{MC}} = \arg\min_{V}\ \sum_{\text{visits } (s_i, G_i)} \big(G_i - V(s_i)\big)^2 ,

which is a one-way ANOVA: a separate mean per state, with no structure shared between states.

Batch TD(0) converges (for α\alpha small enough) to the value of the model fitted by maximum likelihood. Count the transitions in the batch: p^(s′∣s)=n(s,s′)/n(s)\hat p(s'\mid s) = n(s,s')/n(s) and r^(s)\hat r(s), the mean reward observed leaving ss (with terminals as absorbing states of value zero). The batch TD fixed point solves

V(s)=r^(s)+γ∑s′p^(s′∣s) V(s′),V(s) = \hat r(s) + \gamma \sum_{s'}\hat p(s' \mid s)\,V(s') ,

which is exactly the value of the policy in the estimated Markov chain: V^TD=(I−γP^)−1r^\hat V_{\mathrm{TD}} = (I - \gamma\hat P)^{-1}\hat r. This property is called certainty equivalence: act as if the estimated model were the truth. It is shown in Sutton and Barto (2018), section 6.3; the TD(0) increments sum to zero precisely at this equation, which is the reason.

The A/B example by hand

The classic case from Sutton and Barto: a two-state process with no discounting, observed in eight episodes. States are AA and BB; each line is the sequence "state, reward received on leaving it":

  • one episode: A,0,B,0A, 0, B, 0;
  • six episodes: B,1B, 1;
  • one episode: B,0B, 0.

Batch Monte Carlo. BB was visited in all eight episodes, with returns 0,1,1,1,1,1,1,00,1,1,1,1,1,1,0, so V^MC(B)=6/8=0.75\hat V_{\mathrm{MC}}(B) = 6/8 = 0.75. AA was visited once, with return 0+0=00 + 0 = 0, so V^MC(A)=0\hat V_{\mathrm{MC}}(A) = 0. This fits the training returns perfectly (zero squared error at AA).

Batch TD(0). The data say AA always goes to BB with reward 00 (p^(B∣A)=1\hat p(B\mid A)=1, r^(A)=0\hat r(A)=0), and from BB the episode terminates with mean reward 6/86/8. So V^TD(B)=0.75\hat V_{\mathrm{TD}}(B)=0.75 and V^TD(A)=0+1×0.75=0.75\hat V_{\mathrm{TD}}(A) = 0 + 1\times 0.75 = 0.75.

Which is right? If the process is Markov, then everything we know about the future from AA passes through BB, we have eight observations about BB and only one about AA, and 0.750.75 is the better estimate: one observation of AA ending in 00 is not strong evidence against AA being as good as BB. If, however, there is something about AA that is not captured by the state (non-Markov), then the single observation is the only evidence of it. This is the statistician's choice between a model-based and a model-free estimator, and the data cannot settle it by themselves. The script computes all three versions of the answer: batch MC, TD(0) swept to convergence, and the ML model solved as a linear system; the last two agree.

The results in the output above (section 3a) match the by-hand calculation. Part 3b measures what the difference is worth on a Markov problem: the 5-state random walk starting from the middle state, with RMS error over the five states after kk episodes, mean of 500 independent runs. After a single episode both methods agree (every visited state's observed return equals the outcome, and the ML model also routes everything to that exit). From two episodes on, batch TD has lower error, by about 16% at two episodes and about 30% from five episodes on: 0.1270.127 against 0.1860.186 after 10 episodes, 0.0540.054 against 0.0790.079 after 50. Both go to zero as data accumulate; the model-based one gets there faster because the walk really is Markov.

Exercises

  1. Step sizes. Show that αt=1/t\alpha_t = 1/t satisfies the Robbins–Monro conditions and gives the sample mean. For αt=t−p\alpha_t = t^{-p}, for which pp do both conditions hold? For constant α\alpha and iid observations of variance σ2\sigma^2, derive Var⁡(mt)→ασ2/(2−α)\operatorname{Var}(m_t)\to \alpha\sigma^2/(2-\alpha) for mt=(1−α)mt−1+αxtm_t = (1-\alpha)m_{t-1} + \alpha x_t.
  2. A/B with different data. Change the batch to: one episode A,0,B,1A,0,B,1; two episodes B,1B,1; one episode B,0B,0. Compute V^MC\hat V_{\mathrm{MC}} and V^TD\hat V_{\mathrm{TD}} at AA and BB by hand, then edit ab_example in the script to check.
  3. Variance of a target. A chain moves s0→s1→⋯→sms_0 \to s_1 \to\dots\to s_m (terminal), each step a reward with variance σ2\sigma^2, independent across steps, and mean μ\mu; γ=1\gamma=1. Give Var⁡(G0)\operatorname{Var}(G_0) and Var⁡(G0(n))\operatorname{Var}(G_0^{(n)}) when VV is exact at sns_n. Where is the gap in the law of total variance?
  4. Change the code and predict. Set episodes = 100 in nstep_experiment (and reduce runs to keep the runtime down). Predict how the best nn and the best α\alpha move before running. Then set v0=0.5 and predict which nn benefits most.
  5. Model misspecification. Modify the walk so the transition probabilities depend on a hidden coin that is fixed within an episode (a non-Markov chain in the observed state). Predict whether batch TD still beats batch MC, run it, and say what the ML-model value converges to.

Chapter 6 takes the next step: what if the data were generated by a different policy than the one we want to evaluate? The unbiased fix, importance sampling, has its own variance problem. Chapter 7 combines bootstrapping with function approximation, where the interplay of bias and sharing information becomes more delicate.

Sources