n-Step Bootstrapping Methods

Imagine an agent learning to play a card game. A single misplay only reveals its cost several turns later. One-step Temporal-Difference Learning updates a value estimate using just one reward and the very next state. Credit for a delayed mistake trickles backward one step at a time. This happens painfully slowly. Monte Carlo methods swing to the opposite extreme. They wait for an entire episode to end before updating anything. They use the full, unbiased return. But they pay for it with high variance. They also lack any ability to learn online. Neither extreme is obviously right. Real systems — from robotic controllers to game-playing agents — often need something in between. n-step bootstrapping methods supply exactly that middle ground. Instead of bootstrapping after one reward or waiting for the complete return, an n-step method looks ahead n rewards. It then bootstraps off the value estimate at that horizon. This single design knob, the integer n, lets a practitioner slide continuously along the bias-variance spectrum. n = 1 recovers ordinary TD(0). n = ∞ (or n equal to the episode length) recovers Monte Carlo. Tuning n is often the difference between two outcomes. One is an algorithm that learns in a handful of episodes. The other never converges in a reasonable budget. The idea matters far beyond a textbook exercise. Multi-step returns are the computational backbone of practical deep reinforcement learning systems. Rainbow DQN uses n-step returns as one of its core components. A3C and IMPALA use n-step returns to reduce variance and enable parallelism. n-step SARSA and n-step Q-learning give control analogues. These let an agent choose actions using intermediate lookahead. Understanding n-step methods also builds essential intuition for the article's natural successor. That successor is TD(λ) and eligibility traces. It can be viewed as an efficient, continuous averaging over all values of n simultaneously. This article develops the n-step return precisely. It derives n-step TD prediction and n-step SARSA control. It gives working pseudocode for both. It analyzes the time/space cost and the bias-variance tradeoff rigorously. It traces a full worked numerical example. It surveys the common implementation traps. This includes especially the off-by-one errors that plague every first attempt at coding this family of algorithms.

Key takeaways
  • n-step methods interpolate between one-step TD (n=1) and Monte Carlo (n=∞) by bootstrapping n steps into the future.
  • The n-step return Gt:t+nG_{t:t+n} sums n discounted rewards, then adds the discounted bootstrap estimate V(St+n)V(S_{t+n}).
  • Larger n reduces bias (closer to the true return) but increases variance and delays updates; there is usually an intermediate n that minimizes error empirically.
  • n-step SARSA extends the idea to control by bootstrapping on action-values Q(St+n,At+n)Q(S_{t+n}, A_{t+n}), preserving on-policy correctness.
  • Off-policy n-step methods need importance-sampling correction across all n steps, which can inflate variance sharply.
  • n-step methods are a discrete stepping stone to TD(λ), which computes a weighted average over all n simultaneously via eligibility traces.
The core insight

The n-step return trades a tunable amount of Monte-Carlo-style accuracy for TD-style bootstrapping speed, controlled by a single integer n.

The idea

Consider a trajectory S0,A0,R1,S1,A1,R2,S2,…S_0, A_0, R_1, S_1, A_1, R_2, S_2, \dots generated under a policy π\pi. The one-step TD target is Rt+1+γV(St+1)R_{t+1} + \gamma V(S_{t+1}): it uses exactly one real reward and then bootstraps, substituting the current value estimate for everything that would happen afterward. The Monte Carlo target is the full return Gt=Rt+1+γRt+2+γ2Rt+3+⋯G_t = R_{t+1} + \gamma R_{t+2} + \gamma^2 R_{t+3} + \cdots, using every real reward until termination and no bootstrapping at all. The n-step return generalizes both by truncating the sum after n real rewards and bootstrapping there:

Gt:t+n=Rt+1+γRt+2+⋯+γn−1Rt+n+γnVt+n−1(St+n)G_{t:t+n} = R_{t+1} + \gamma R_{t+2} + \cdots + \gamma^{n-1} R_{t+n} + \gamma^n V_{t+n-1}(S_{t+n})

Here Vt+n−1V_{t+n-1} denotes the value function estimate available at time t+n−1t+n-1 (subscripting the estimate this way is the standard convention that makes the update rule well-defined even mid-episode). If t+n≥Tt+n \geq T (the episode terminates before n steps elapse), the bootstrap term is simply dropped and Gt:t+n=GtG_{t:t+n} = G_t, the ordinary return. The update rule mirrors one-step TD exactly, just applied n steps later:

V(St)←V(St)+α[Gt:t+n−V(St)]V(S_t) \leftarrow V(S_t) + \alpha \left[ G_{t:t+n} - V(S_t) \right]

This is still a form of Bootstrapping and the Bias-Variance Tradeoff: the target is not the true expected return, but an estimate contaminated by whatever error currently sits in V(St+n)V(S_{t+n}). As n grows, that contamination shrinks — after n steps the bootstrapped term is discounted by γn\gamma^n, so its influence on the target decays geometrically — while the variance contributed by the n sampled rewards grows, since each reward is itself a random variable. The n-step return is a genuine statistical interpolation: it is provably less biased than the one-step target (whenever VV is inaccurate) and provably lower-variance than the full Monte Carlo return, for any finite n and 0<γ<10 < \gamma < 1. A crucial structural fact: because Gt:t+nG_{t:t+n} requires rewards Rt+1,…,Rt+nR_{t+1}, \dots, R_{t+n} and state St+nS_{t+n}, the update for V(St)V(S_t) cannot be performed until time t+nt + n. This delay is the price of looking further ahead, and it is the central bookkeeping challenge in implementing these algorithms correctly.

How it works

n-step TD prediction. The agent walks the trajectory, and at each time step τ\tau once τ+n\tau + n rewards have been observed (or the episode has ended), it computes Gτ:τ+nG_{\tau:\tau+n} and updates V(Sτ)V(S_\tau). A circular buffer of the last n+1n{+}1 states and nn rewards is the natural implementation, since only that much history is needed at any moment. ``` Algorithm: n-step TD for estimating V ≈ v_π Input: policy π, step size α ∈ (0,1], integer n ≥ 1 Initialize V(s) arbitrarily for all states s for each episode: Initialize and store S_0 T ← ∞ # will hold the episode length once known for t = 0, 1, 2, ...: if t < T: take action A_t ~ π(·|S_t) observe and store R_{t+1}, S_{t+1} if S_{t+1} is terminal: T ← t + 1 τ ← t - n + 1 # time whose estimate is being updated if τ ≥ 0: G ← 0 for i = τ+1 to min(τ+n, T): G ← G + γ^(i-τ-1) R_i if τ + n < T: G ← G + γ^n V(S_{τ+n}) V(S_τ) ← V(S_τ) + α (G - V(S_τ)) if τ == T - 1: break # all remaining updates done, episode finished ``` Two indexing subtleties deserve emphasis. First, τ=t−n+1\tau = t - n + 1 is the time step being updated, which lags the current simulation time tt by n−1n-1 steps; this is the most common source of off-by-one bugs. Second, the loop must keep running for n−1n-1 extra iterations after* the episode terminates at TT, because early time steps like τ=T−n\tau = T - n still need their (now fully realized, no-bootstrap) n-step return computed — this is why the loop condition is on τ\tau reaching T−1T-1, not on the episode-generation step reaching TT.

n-step SARSA for control. The same idea lifts directly to action-value control by bootstrapping on Q(St+n,At+n)Q(S_{t+n}, A_{t+n}) instead of V(St+n)V(S_{t+n}), using the action actually selected by the current (on-policy) behavior:

Gt:t+n=Rt+1+γRt+2+⋯+γn−1Rt+n+γnQt+n−1(St+n,At+n)G_{t:t+n} = R_{t+1} + \gamma R_{t+2} + \cdots + \gamma^{n-1} R_{t+n} + \gamma^n Q_{t+n-1}(S_{t+n}, A_{t+n})

``` Algorithm: n-step SARSA for estimating Q ≈ q_π (or q_ with GLIE policy) Input: step size α ∈ (0,1], small ε > 0, integer n ≥ 1 Initialize Q(s,a) arbitrarily for all s,a; policy π = ε-greedy w.r.t. Q for each episode: Initialize S_0; choose A_0 ~ π(·|S_0) T ← ∞ for t = 0, 1, 2, ...: if t < T: take action A_t, observe R_{t+1}, S_{t+1} if S_{t+1} is terminal: T ← t + 1 else: choose A_{t+1} ~ π(·|S_{t+1}) # on-policy next action τ ← t - n + 1 if τ ≥ 0: G ← 0 for i = τ+1 to min(τ+n, T): G ← G + γ^(i-τ-1) R_i if τ + n < T: G ← G + γ^n Q(S_{τ+n}, A_{τ+n}) Q(S_τ, A_τ) ← Q(S_τ, A_τ) + α (G - Q(S_τ, A_τ)) update π to be ε-greedy w.r.t. Q # policy improves online if τ == T - 1: break ``` Because At+1A_{t+1} is chosen before it is needed as the bootstrap action, the algorithm must select actions one step ahead of when they are consumed in the update — exactly analogous to ordinary SARSA: On-Policy TD Control, just with the bootstrap pushed n steps further down the trajectory.

Off-policy n-step control. If the behavior policy bb differs from the target policy π\pi, each of the n actions along the segment must be corrected by an importance-sampling ratio ρt:t+n−1=∏k=tt+n−1π(Ak∣Sk)b(Ak∣Sk)\rho_{t:t+n-1} = \prod_{k=t}^{t+n-1} \frac{\pi(A_k|S_k)}{b(A_k|S_k)}, and the update becomes Q(St,At)←Q(St,At)+α ρt+1:t+n−1[Gt:t+n−Q(St,At)]Q(S_t, A_t) \leftarrow Q(S_t,A_t) + \alpha \, \rho_{t+1:t+n-1}\big[G_{t:t+n} - Q(S_t,A_t)\big]. Each additional factor in the product can push the ratio toward 0 or blow it up, so variance grows multiplicatively with n — this is the direct control-side manifestation of the bias-variance cost analyzed below. (n-step tree-backup and Q(σ)Q(\sigma) are further refinements that reduce or eliminate this variance blow-up, but they are extensions beyond the scope of the core method.)

Figure
The n-step return: how far real reward extends before bootstrapping
Trajectory: S_t --A_t,R_{t+1}--> S_{t+1} --...--> S_{t+n} S_t S_t+1 S_t+2 ... S_t+n R_t+1 R_t+2 R_t+n n real, discounted rewards (no bias here) γ^n V(S_t+n) bootstrap term (source of bias) n=1: bracket vanishes, all bias. n=∞: box vanishes, all variance (Monte Carlo).

Complexity & correctness

Time complexity. Each n-step update requires summing n discounted rewards, an O(n)O(n) operation if computed naively as shown in the pseudocode. In practice this sum is almost always maintained incrementally: on each new time step, the buffered partial return can be updated in O(1)O(1) by adding the new discounted reward and removing the oldest bootstrap contribution, since Gt:t+nG_{t:t+n} and Gt+1:t+n+1G_{t+1:t+n+1} share n−1n-1 common reward terms. With that optimization, each of the TT time steps in an episode costs O(1)O(1) amortized work, so a full episode is processed in O(T)O(T) total time, identical in order to one-step TD or Monte Carlo — the constant factor grows with n but the asymptotic behavior does not change. Space is O(n)O(n): a sliding window must retain the last n+1n{+}1 states, nn rewards, and (for SARSA) nn actions, versus O(1)O(1) for TD(0) and O(T)O(T) for a naive Monte Carlo implementation that stores an entire episode.

Bias–variance derivation. Fix a state St=sS_t = s and write vπ(s)v_\pi(s) for the true value. Decompose the error of the n-step target:

E[Gt:t+n]−vπ(s)=γn E[Vt+n−1(St+n)−vπ(St+n)]\mathbb{E}\big[G_{t:t+n}\big] - v_\pi(s) = \gamma^n \, \mathbb{E}\big[V_{t+n-1}(S_{t+n}) - v_\pi(S_{t+n})\big]

This holds because the real-reward prefix Rt+1+⋯+γn−1Rt+n+γnvπ(St+n)R_{t+1} + \cdots + \gamma^{n-1}R_{t+n} + \gamma^n v_\pi(S_{t+n}) is, by the definition of vπv_\pi as an expected return, an unbiased estimator of vπ(s)v_\pi(s) — the only source of bias is substituting the (possibly wrong) current estimate Vt+n−1V_{t+n-1} for the true vπv_\pi at the horizon, and that substitution error is attenuated by γn\gamma^n. So:

  • As n→∞n \to \infty (or γ<1\gamma < 1 fixed and nn reaches episode length), γn→0\gamma^n \to 0: bias vanishes, recovering the unbiased Monte Carlo return.
  • As n→1n \to 1, bias equals γ E[Vt(St+1)−vπ(St+1)]\gamma \, \mathbb{E}[V_t(S_{t+1}) - v_\pi(S_{t+1})], the full one-step TD bias, present whenever VV has not yet converged.

For variance, treat the nn reward random variables as (approximately, for a fixed policy) having bounded variance σR2\sigma_R^2 each and being suitably weakly correlated; the discounted-sum variance grows roughly as

Var⁡(Gt:t+n)≈∑k=0n−1γ2kσR2+γ2nVar⁡(Vt+n−1(St+n)),\operatorname{Var}(G_{t:t+n}) \approx \sum_{k=0}^{n-1} \gamma^{2k}\sigma_R^2 + \gamma^{2n}\operatorname{Var}\big(V_{t+n-1}(S_{t+n})\big),

a strictly increasing function of n for γ>0\gamma>0: every additional real reward folded into the target adds sampling noise that no bootstrap could have contributed, since the bootstrap only contracts the tail of the sum, not the prefix. This formalizes the intuitive tradeoff: larger n monotonically trades bias for variance.

Convergence. Under the standard stochastic-approximation conditions — a tabular representation, every state visited infinitely often, and step sizes satisfying ∑tαt=∞\sum_t \alpha_t = \infty, ∑tαt2<∞\sum_t \alpha_t^2 < \infty — n-step TD converges to vπv_\pi with probability 1 for any fixed finite n, by the same Robbins–Monro argument used for one-step TD: the n-step operator is still a contraction in expectation toward vπv_\pi under the sup-norm (composing n applications of the Bellman evaluation operator with one bootstrap step preserves the contraction property, since the Bellman operator itself is a γ\gamma-contraction and γn<1\gamma^n < 1). n-step SARSA converges to qπq_\pi analogously under a fixed policy, and to q∗q_* under GLIE (greedy in the limit with infinite exploration) policy schedules, mirroring one-step SARSA's control convergence guarantee.

Empirical tradeoff. Neither n=1n=1 nor n=∞n=\infty is typically optimal in practice with function approximation and a finite number of episodes: an intermediate n minimizes root-mean-square error in classic benchmarks (e.g., the random walk task from Sutton & Barto), because the reduction in bias from moderate n outweighs the added variance until n grows too large, at which point variance dominates and error rises again — an empirical U-shaped curve in n that directly reflects the bias/variance decomposition above.

Worked example

Consider a 5-state random walk: states A,B,C,D,EA, B, C, D, E arranged left to right, with two terminal absorbing states at the far left (reward 0) and far right (reward +1); all other rewards are 0, γ=1\gamma = 1, and the agent starts every episode at CC. Initialize V(A)=V(B)=V(C)=V(D)=V(E)=0.5V(A)=V(B)=V(C)=V(D)=V(E)=0.5. Suppose one episode runs: C→D→E→Terminal(right)C \to D \to E \to \text{Terminal(right)}, giving rewards R1=0,R2=0,R3=1R_1=0, R_2=0, R_3=1, so T=3T=3. Take n=2n=2, α=0.1\alpha = 0.1.

ttτ=t−n+1\tau=t-n+1segment used for Gτ:τ+2G_{\tau:\tau+2}computationGGupdate
0−1-1— (τ<0, skip)——none
10R1,R2,V(S2)=V(E)R_1, R_2, V(S_2){=}V(E)0+1⋅0+12⋅0.50 + 1\cdot0 + 1^2\cdot0.50.50.5V(C) ⁣← ⁣0.5+0.1(0.5−0.5)=0.5V(C)\!\leftarrow\!0.5+0.1(0.5-0.5)=0.5
21R2,R3R_2, R_3; τ+n=3=T so no bootstrap0+1⋅10 + 1\cdot 11.01.0V(D) ⁣← ⁣0.5+0.1(1.0−0.5)=0.55V(D)\!\leftarrow\!0.5+0.1(1.0-0.5)=0.55
32R3R_3 only; τ+n=4>T111.01.0V(E) ⁣← ⁣0.5+0.1(1.0−0.5)=0.55V(E)\!\leftarrow\!0.5+0.1(1.0-0.5)=0.55

Trace notes: at t=1t=1 (τ=0\tau=0), Sτ+n=S2=ES_{\tau+n}=S_2=E is not yet terminal at the moment the update is computed (termination is discovered at t=2t=2), so the bootstrap term γnV(E)=0.5\gamma^n V(E)=0.5 correctly enters; because V(E)V(E) was still 0.5 at that point, the update happens to leave V(C)V(C) unchanged this episode. At τ=1\tau=1, however, τ+n=3=T\tau+n = 3 = T, so the algorithm correctly drops the bootstrap term entirely and uses the full realized 2-step sum of rewards, propagating the terminal +1+1 reward two states backward in a single update — something one-step TD (n=1n=1) could not do until at least two separate episodes of updates. This is precisely the mechanism by which larger n propagates delayed reward information faster: DD's value moves from 0.50.5 toward 1.01.0 after just one episode, whereas one-step TD would need the +1 reward to first update EE, and only in a later episode update DD from the improved V(E)V(E). The final loop iterations (t=3,4t=3,4 conceptually) handle τ=2\tau=2 (updating EE from R3R_3 alone, no bootstrap) and then terminate since τ=T−1=2\tau = T-1 = 2.

Common pitfalls & traps

PitfallWhy it happensFix
Off-by-one in τ=t−n+1\tau = t-n+1Confusing the current simulation index tt with the update index τ\tauKeep them as separate variables; verify with n=1n=1 that it reduces exactly to TD(0)
Forgetting the post-termination tailLoop stops as soon as the episode ends at TT, skipping updates for τ=T−n,…,T−1\tau = T-n, \ldots, T-1Continue looping until τ=T−1\tau = T-1, using the shrinking, bootstrap-free sum for the tail
Wrong bootstrap cutoffApplying γnV(Sτ+n)\gamma^n V(S_{\tau+n}) even when τ+n≥T\tau+n \ge TGuard explicitly: only bootstrap if τ+n<T\tau + n < T
Choosing At+1A_{t+1} too late in n-step SARSAThe bootstrap needs Aτ+nA_{\tau+n}, which must already have been selected on-policy before the update firesSelect the next action immediately upon observing the next state, before any update logic
Naive O(n)O(n) resum every stepRecomputing the full n-term sum from scratch at each ttMaintain the partial sum incrementally in O(1)O(1) using a sliding window
Ignoring importance-sampling blow-up off-policyTreating off-policy n-step control like on-policy, or multiplying n ratios naivelyUse variance-reduced variants (tree-backup, Q(σ)Q(\sigma)) for large n off-policy

Pioneers & history

n-step methods emerged from the same lineage that produced Temporal-Difference Learning itself, as researchers explored the design space between the two limiting cases of bootstrapped and unbootstrapped prediction.

Origins · 1 minRichard S. Sutton and how this was discovered
RS
Richard S. Sutton
born 1957 · Reinforcement learning theory, University of Alberta and DeepMind

Sutton formalized temporal-difference learning and, with Andrew Barto, systematized the entire spectrum of n-step and eligibility-trace methods that unify TD and Monte Carlo prediction and control.

History
1988
— Sutton publishes the temporal-difference learning framework and TD(λ), implicitly containing n-step returns as a special case.
1994
— Multi-step and n-step return formulations are analyzed explicitly for prediction, clarifying the bias-variance interpolation.
1996
— n-step SARSA and n-step Q-learning-style control methods are studied as discrete stepping stones toward eligibility-trace control.
2000
s — Off-policy corrections (importance sampling, tree-backup) are developed to make multi-step methods usable when behavior and target policies differ.
2017–2018
— n-step returns become a standard component of deep RL systems, notably Rainbow DQN and distributed actor-learner architectures like IMPALA and Ape-X.

Where this matters

n-step returns are a default ingredient in modern deep reinforcement learning rather than a theoretical curiosity. Rainbow DQN combines n-step returns (typically n=3) with double Q-learning, prioritized replay, and distributional value functions, and ablations show n-step returns among the most impactful individual components for Atari performance. Actor-critic architectures such as A3C and IMPALA compute n-step (or truncated λ-return) advantage estimates to reduce the variance of policy-gradient updates while still enabling efficient rollout-based parallel training. Robotics and continuous-control agents commonly use short n-step horizons (n = 3 to 10) to balance sample efficiency against the instability that very long, high-variance rollouts introduce into function-approximated value learning. The concept also underlies generalized advantage estimation (GAE), which can be understood as a soft, exponentially-weighted average over n-step advantage estimates — directly foreshadowing how TD(lambda) and Eligibility Traces averages over all n simultaneously rather than committing to one fixed horizon.

Ask the tutor: How does the choice of n interact with function approximation error when the value network itself is inaccurate at long horizons?

Why not just always use a large n, since it reduces bias?

Because variance grows with n: every additional real reward folded into the n-step return contributes its own sampling noise, and unlike the bootstrap term (which is discounted and shrinks its own error contribution), the reward-sum prefix accumulates variance with each added term. Empirically, error as a function of n is typically U-shaped: an intermediate value minimizes total mean-squared error against the true value function, because the marginal bias reduction from adding one more real reward is eventually outweighed by the marginal variance it introduces. The "right" n is problem-dependent and is usually tuned as a hyperparameter, often n=3 to n=10 in practice for deep RL, though tabular problems can favor larger n depending on episode length and reward sparsity.

How does n-step TD relate to TD(λ)?

TD(λ) can be derived as a weighted average over all n-step returns simultaneously, with weight (1−λ)λn−1(1-\lambda)\lambda^{n-1} assigned to the n-step return of horizon n, normalized so weights sum to 1. Rather than committing to a single fixed n, TD(λ) blends every horizon, controlled by a single scalar λ∈[0,1]\lambda \in [0,1]: λ=0\lambda=0 recovers pure one-step TD, and λ=1\lambda=1 recovers the Monte Carlo return. Eligibility traces implement this averaged update efficiently online without literally computing every n-step return, achieving in O(1)O(1) per step what the λ-return definition would otherwise require O(T)O(T) work to compute directly.

Does n-step TD require waiting n steps before any learning happens?

Yes, structurally: the update for V(St)V(S_t) cannot fire until Rt+1,…,Rt+nR_{t+1}, \ldots, R_{t+n} and St+nS_{t+n} have all been observed, so learning is delayed by n-1 steps relative to one-step TD. This delay is a genuine practical cost in online or real-time systems, since state StS_t's value estimate is "stale" for n-1 extra decision points, potentially affecting exploration or control decisions made in the interim. The delay is bounded and fixed, though, unlike Monte Carlo's delay of a full (possibly very long or even unbounded) episode, which is precisely the practical advantage n-step methods retain over pure Monte Carlo.

Can n-step methods be used with function approximation instead of a table?

Yes — the update rule generalizes directly by replacing the tabular update with a gradient step on a parameterized value function: w←w+α[Gt:t+n−v^(St,w)]∇v^(St,w)\mathbf{w} \leftarrow \mathbf{w} + \alpha \big[G_{t:t+n} - \hat v(S_t, \mathbf{w})\big] \nabla \hat v(S_t, \mathbf{w}). The n-step return itself is computed identically; only the mechanism for reading and updating the value estimate changes. This is exactly how n-step returns are used inside deep RL systems like Rainbow DQN, where v^\hat v or q^\hat q is a neural network and the n-step target is computed from a short window of stored transitions in a replay buffer.

What is the practical effect of choosing n too large in a noisy environment?

Very large n in a highly stochastic environment causes the target to accumulate variance from many noisy reward samples before any bootstrap correction can stabilize it, which can slow or destabilize learning, especially with function approximation where updates also interact through shared parameters across states. In the extreme, n equal to the episode length degenerates fully into Monte Carlo, inheriting all of Monte Carlo's downsides: high variance, no online updates mid-episode, and no benefit from bootstrapping's implicit smoothing. Empirically this manifests as noisier learning curves and sometimes slower convergence despite the lower asymptotic bias, which is exactly the U-shaped tradeoff curve the bias-variance decomposition predicts.

Is n-step Q-learning the same as n-step SARSA?

No. n-step SARSA bootstraps using the action Aτ+nA_{\tau+n} that the behavior policy actually selected, making it on-policy and directly analogous to one-step SARSA. n-step Q-learning-style methods instead bootstrap using max⁡aQ(Sτ+n,a)\max_a Q(S_{\tau+n}, a), the greedy action, making the target off-policy with respect to whatever exploratory behavior generated the trajectory — and, critically, this max-based bootstrap makes the naive n-step generalization biased unless careful corrections (like tree-backup) are used, because intermediate actions along the n-step segment may not have been the greedy ones the target policy would have taken.

Before this

Where this leads