Value-based deep RL: from DQN to Rainbow

Child of Topic: rl. How Q-learning was made to work with neural networks: why a network breaks it, DQN's replay buffer and target network, the six fixes Rainbow combined, the distributed agents that followed, and how to read Atari numbers. Sources linked inline; data as of October 2026. Reading: 34 min, plus 16 in closed details.

The idea in one screen

Value-based deep RL is Q-learning with a neural network in place of the table. Because one update now moves the values of other states, including the state its own target was read from, DQN made the problem look like supervised regression again (a replay buffer of past transitions and a frozen target network), and every later method repairs one failure that remained.

Every method on this page changes one part of DQN's training loop

  1. Act. The emulator's last 4 frames (84 × 84, greyscale) go into the online network θ, which outputs one Q-value per action; the agent takes the argmax, or a random action with probability ε (annealed from 1.0 to 0.1).
  2. Store. The transition (s, a, r, s′) joins the replay buffer, which keeps the last 1M.
  3. Sample. A minibatch of 32 is drawn uniformly at random from anywhere in the buffer, so consecutive, nearly identical frames rarely train together.
  4. Target from the frozen copy. The target network θ− reads s′ and gives (2.0, 3.5, 3.0) for three actions; with r = 1 and γ = 0.99 the target is y = 1 + 0.99 × 3.5 = 4.465 (section 3's example).
  5. Regress the online network onto it. θ says Q(s, a) = 4.0: a TD error of 0.465, a Huber loss and one gradient step on θ, never on θ−.
  6. Copy every C. Every C = 10,000 updates the online weights are copied into the target network; in between, the targets stand still.
  7. Where each later fix acts. NoisyNet changes how the agent acts (§9), multi-step what is stored as a target (§7), prioritised replay what is sampled (§6), dueling and distributional the network's head (§5, §8), Double DQN how the target picks its action (§4). Rainbow (§10) turns all six on.

The loop is DQN 2015 as published (Mnih et al., Nature); the numbers in steps 4 and 5 are section 3's worked update. Dots show what moves. Drag the figure to turn it.

You need neural-network training by gradient descent (Topic: ml-fundamentals), tabular Q-learning, the TD error and maximisation bias (Model-free prediction and control). Value iteration (Dynamic programming) helps for section 3.

function approximation
a parameterised q̂(s, a, w) in place of a table, so an update at one state moves similar states too
replay buffer
a store of past transitions (s, a, r, s′) that training samples from at random
target network
a copy of the network, frozen for C updates, that computes the regression targets
overestimation
the upward bias of a max taken over noisy estimates
atoms
the fixed return values on which C51 places probabilities
human-normalised score
(agent − random) / (human − random) per Atari game, then a median or mean over games
Method (first paper)What went wrong before itWhat it changes§
DQN, arXiv version (Dec 2013)Consecutive transitions are correlated; a table cannot read pixelsA convolutional Q-network; experience replay sampled at random3
DQN, Nature version (Feb 2015)The regression target moves with every updateA target network refreshed every C updates; 49 games, one set of hyperparameters3
Double DQN (Sep 2015)The max over noisy estimates is biased upwardThe online network picks the next action, the target network values it4
Dueling network (Nov 2015)Every action's value is learned separately, even where the action does not matterQ = V + (A − mean A)5
Prioritised replay (Nov 2015)Uniform replay wastes updates on transitions that teach nothingReplay in proportion to TD error, with importance weights6
Multi-step targets (Sutton 1988)One reward per update propagates slowlyn real rewards before bootstrapping7
C51, QR-DQN, IQN (2017 to 2018)One mean hides the shape of the returnLearn the whole return distribution8
NoisyNet (Jun 2017)ε-greedy explores without regard to the stateLearned noise on the weights9
Rainbow (Oct 2017)The six fixes were tested only separatelyAll six in one agent, then an ablation removing each10
Ape-X, R2D2, NGU, Agent57 (2018 to 2020)One machine, short memory, hard exploration gamesHundreds of actors, recurrent replay, intrinsic rewards, a policy chooser11

Dates are first arXiv versions, as in the parent's Method atlas tab (47 RL methods with sourced cells). Click a row to jump. The Atari score tables, each with its protocol, are on the parent's Milestones and benchmarks tab. DDPG, TD3 and SAC reuse this page's replay buffer and target networks for continuous actions (Policy gradients and actor-critic); AlphaGo to MuZero is Model-based RL and planning.

1Why a network breaks Q-learning

A table needs one entry per state. Go has about 2 × 10170 legal positions (Tromp); an Atari screen is 210 × 160 pixels in a 128-colour palette (Mnih et al. 2015, Methods), and two screens that differ in one pixel share nothing in a table. So the table becomes a function q̂(s, a, w) ≈ Q(s, a): an update at one state also moves similar states, including ones never visited. That generalisation is the point, and the problem. TD learning then differentiates only the prediction, not the bootstrapped target:

w ← w + α [ Rt+1 + γ v̂(St+1, w) − v̂(St, w) ] ∇w v̂(St, w)
semi-gradient
the target is treated as a constant although it depends on w (Sutton and Barto §9.3); it is not the gradient of any objective, which is why it can fail
Q-learning version
maxa′ q̂(St+1, a′, w) as the target and ∇w q̂(St, At, w) as the gradient: the update DQN performs on minibatches

With on-policy data and linear features this converges, to the TD fixed point, within a factor 1/(1 − γ) of the best fit the features allow (proof and conditions on Model-free prediction and control); at γ = 0.99 that factor is 100 derived. A network trained on RL data breaks the three assumptions of supervised learning, and each fix in the figure above answers one of them:

  • Correlated data. Consecutive transitions are nearly identical; stochastic gradient descent assumes roughly independent, identically distributed (i.i.d.) samples. Answer: replay.
  • Moving targets. The target r + γ maxa′ Q(s′, a′; θ) uses the weights being trained, so each update moves what it chases. Answer: the target network.
  • Data that depends on the policy. "If the maximizing action is to move left then the training samples will be dominated by samples from the left-hand side", and the parameters "could get stuck in a poor local minimum, or even diverge catastrophically" (Mnih et al. 2015, Methods). A bad update makes bad data, which makes worse updates.
Kinds of approximator, and why Monte Carlo regression is safe (1 min)
  • Linear in features: v̂(s, w) = w⊤x(s) with hand-made features: polynomials, Fourier bases, coarse coding, tile coding (several overlapping grids, one active tile per grid), radial basis functions (Sutton and Barto §9.4 to 9.5). The gradient is simply x(s). One-hot features recover the table exactly: tabular learning is linear approximation with no generalisation.
  • Neural networks: the features are learned too. DQN's network reads the last four 84 × 84 greyscale frames and outputs one Q-value per action in one forward pass. Nothing in the classical convergence theory covers this case.

Monte Carlo regression onto returns is ordinary supervised learning: the target Gt does not depend on w, so SGD on the squared error is a true gradient method. The bound for linear TD is VE(wTD) ≤ minw VE(w) / (1 − γ) (Sutton and Barto eq. 9.14, from Tsitsiklis and Van Roy 1997).

2The deadly triad, and how often it bites on Atari

Function approximation, bootstrapping (targets built from current estimates) and off-policy training together can make value estimates diverge: "if any two elements of the deadly triad are present, but not all three, then instability can be avoided" (Sutton and Barto §11.3); it appears even in prediction, and even in dynamic programming with a known model, and with the on-policy distribution of updates convergence is guaranteed (§11.2). Q-learning with replay has all three. The mechanism, with two states that read one weight as w and 2w (each off-policy update multiplies w by 1 + α(2γ − 1)) and Baird's seven-state counterexample with each leg switchable, is drawn on Model-free prediction and control, Reading section 7. This section is DQN's side of it.

Less than the theory suggests. Van Hasselt et al. 2018 ran 336 configurations of DQN variants on all 57 Atari games, three replications each, about 20M frames per run. With rewards clipped to [−1, 1] and γ = 0.99 no true value exceeds 1/(1 − γ) = 100, so estimates beyond that are soft divergence. Estimates "frequently grew quickly to over a million" and came back down; no run became unbounded.

Fixes that keep all three elements: gradient-TD and emphatic TD (under 1 min)

In the linear case, gradient-TD methods (GTD2, TDC) descend the projected Bellman error, and emphatic TD reweights updates toward the on-policy emphasis (Sutton and Barto §11.7 to 11.8). They are provably stable with linear features but "have mostly not been extended to non-linear function approximation, and have not been widely adopted in practice" (van Hasselt et al. 2018). Deep value methods instead live with the triad and tame it with the engineering below.

Soft divergence by bootstrap target, 336 configurations on 57 games

Share of runs that soft-diverged, by bootstrap target (labels printed on their Figure 2 transcribed): Q-learning 61%, inverse double Q 33% (corrects overestimation but bootstraps on the online network), DQN's target 14%, Double DQN's 10%. Their text adds: one-step Q-learning soft-diverged in 94% of runs, 10-step returns 21%; larger networks diverged more (67% against 53%, against their hypothesis); stronger prioritisation diverged more. Each returns below: target networks (§3), double estimation (§4), multi-step (§7).

3DQN: replay and a target network

DQN (deep Q-network) is Q-learning with a convolutional network that reads raw pixels and outputs one Q-value per action, trained by regression on the TD target. One update, with numbers: a stored transition has r = 1, γ = 0.99, and the target network gives Q(s′, ·; θ−) = (2.0, 3.5, 3.0) for three actions. The target is 1 + 0.99 × 3.5 = 4.465 derived. If the online network says Q(s, a; θ) = 4.0, the TD error is 0.465 and the gradient step raises Q(s, a) toward 4.465. Over a minibatch of such transitions:

L(θ) = 𝔼(s, a, r, s′) ∼ 𝒟 [ ( r + γ maxa′ Q(s′, a′; θ−) − Q(s, a; θ) )² ]
θ
the online network's weights, the ones being trained
θ−
the target network's weights: a copy of θ refreshed every C updates (2015); in the 2013 version, effectively θ itself
𝒟
the replay buffer; at a terminal s′ the target is just r
γ
0.99
error clipping
the Nature paper clipped the TD error to [−1, 1], which "corresponds to using an absolute value loss function for errors outside of the (−1, 1) interval": a Huber loss with threshold 1, as most implementations now write it

Two versions. The 2013 arXiv paper used replay only; the target network arrived with the 2015 Nature paper, "the second modification to online Q-learning". Retellings merge them; the parent's atlas keeps two rows.

Experience replay

Store every transition (the Nature version kept the most recent 1 million) and train on minibatches of 32 drawn uniformly. In the paper's words: "each step of experience is potentially used in many weight updates"; "randomizing the samples breaks these correlations and therefore reduces the variance of the updates"; and "the behavior distribution is averaged over many of its previous states, smoothing out learning and avoiding oscillations or divergence". Replay is legitimate only because Q-learning is off-policy: its target does not depend on which policy chose the stored action ("when learning by experience replay, it is necessary to learn off-policy ... which motivates the choice of Q-learning"). It also makes the data more off-policy (a mixture of past policies), strengthening one corner of the triad while weakening correlation. The idea is Lin's (1992) (Sutton and Barto §16.5).

Online, the target runs away with the estimate; frozen for C updates, the estimate catches it

The two values and the target they chase
Error against the true values (log scale), both runs

The target network

Every C updates (10,000 in the Nature paper), copy θ into θ− and use θ− for every target in between. The paper's reason is the triad in one sentence: in online Q-learning "an update that increases Q(st, at) often also increases Q(st+1, a) for all a and hence also increases the target", "possibly leading to oscillations or divergence"; older parameters add "a delay between the time an update to Q is made and the time the update affects the targets". The figure runs exactly that, with expected updates and no sampling noise; the steps below say what each frame shows. Predict: will a frozen target make the estimate converge, or only diverge more slowly?

  1. Update 1: the target is read from the weights being trained. For each state the target y = r + γV(s2) comes from the same w that the update changes.
  2. Update 3: the target has moved with the estimate. Every step that raises V(s1) also raises V(s2) twice as much (its features are twice as large), and drags the target along.
  3. Update 10. The chase goes on.
  4. Update 30. The chase goes on.
  5. Update 60. The chase goes on.
  6. After 120 updates. With s1 replayed two times in three, the estimate never catches the target.

The problem illustrative, built for this page: features s1 = (1, 0), s2 = (2, 2); s1 → s2 with reward 0, s2 loops with reward 1; γ = 0.9, true values 9 and 10, exactly representable (w = (9, −4)). Replay draws s1's transition two times in three, more often than the policy would (off-policy). Each step is the expected semi-gradient update from w = 0. "C = ∞" solves the regression exactly at every refresh: fitted Q iteration. Nothing published is reproduced; the arithmetic (online growth of about 4% per update, convergence with C = 5) is checked against an independent Python implementation.

Try: raise C to 40: stable but slow, the price DQN pays with C = 10,000. Lower the replay share of s1 toward one half: the online run stops diverging, because the off-policy weighting is part of the cause.

DQN is online fitted Q iteration (FQI; Ernst, Geurts and Wehenkel 2005): FQI labels a fixed dataset with targets from the frozen previous estimate and fits a fresh regressor to them, again and again. In DQN the buffer is the dataset, θ− is the previous estimate, and C minibatch steps are a partial regression.

Freezing the target is not a cure for the triad
Even exact regression onto a frozen target diverges when the features cannot represent it: in Tsitsiklis and Van Roy's counterexample, any γ above 0.893 (with ε = 0.1). Convergence is guaranteed only for approximators that do not extrapolate, "but not popular methods such as tile coding and artificial neural networks" (Sutton and Barto §11.2).
Fitted Q iteration step by step, and the counterexample (1 min)

FQI (after fitted value iteration, Gordon 1999) freezes Q̂N−1, labels every stored transition with q = r + γ maxu Q̂N−1(s′, u), and fits a fresh regressor Q̂N to those labels with any supervised method (Ernst et al. used tree ensembles; Riedmiller's neural fitted Q iteration, 2005, a multilayer perceptron trained on the whole batch). Iteration N approximates the optimal N-step Q-function, and each regression has fixed labels. DQN's derivation says so: "we hold the parameters from the previous iteration θi− fixed when optimizing the ith loss function", "resulting in a sequence of well-defined optimization problems" (Mnih et al. 2015, Methods). With two states the animation's features represent the true values, so its FQI is plain value iteration and converges at rate γ.

The counterexample. Extend the two-state w, 2w pair (Model-free prediction and control, section 7) with a transition from the 2w state to the end with probability ε (reward 0 everywhere); the exact least-squares fit gives wk+1 = γ(6 − 4ε)/5 · wk, which diverges whenever γ > 5/(6 − 4ε) and w0 ≠ 0 (Sutton and Barto Example 11.1); with ε = 0.1 that is γ above 0.893 derived. FQI's convergence "depends on properties of the function approximation algorithm" (§16.7): guaranteed for approximators "that do not extrapolate from the observed targets", called averagers (nearest neighbours, locally weighted regression).

What each stabiliser was worth

Extended Data Table 3 of the Nature paper trained DQN on five games for 10 million frames with all four combinations (best of three learning rates, best evaluation score during training), transcribed from the image:

Replay mattered most in every game; the target network added on top of replay in all five (Seaquest 822.6 to 2,894.4). Extended Data Table 4 replaced the network with one linear layer, keeping both stabilisers: Breakout 3.00 against DQN's 316.8, Enduro 62.0 against 1,006.3 transcribed. The convolutional network, not only the stabilisers, made the result.

Extended Data Table 3: replay and the target network, alone and together

DQN 2013 against 2015, input processing and the full recipe (3 min)
DQN 2013 (arXiv workshop paper)DQN 2015 (Nature)
PaperMnih et al., Playing Atari with Deep Reinforcement LearningMnih et al., Human-level control through deep reinforcement learning (doi)
StabilisersReplay only. The target uses "the parameters from the previous iteration", which with an update every step are the current weights; the phrase "target network" does not occurReplay and a target network
Network16 filters 8 × 8 stride 4; 32 filters 4 × 4 stride 2; 256 fully connected units32 filters 8 × 8 stride 4; 64 filters 4 × 4 stride 2; 64 filters 3 × 3 stride 1; 512 fully connected units (about 1.5M parameters, per van Hasselt et al.)
Games7 (Beam Rider, Breakout, Enduro, Pong, Q*bert, Seaquest, Space Invaders)49
Training10 million frames per game50 million frames per game ("around 38 days of game experience")
Result"outperformed all previous RL algorithms on six of the seven games" and "surpassed an expert human player on three of them"Better than the best earlier RL methods on 43 of 49 games; more than 75% of a professional human tester's score on 29

Input and rewards (both versions). The last 4 frames, max-pooled over pairs of frames to remove flicker, converted to luminance and rescaled to 84 × 84 (one frame shows where the ball is, not where it is going); frame skip k = 4 (act on every fourth frame, repeat the action in between; the 2013 paper used k = 3 on Space Invaders, whose lasers blink at a period that made them invisible with 4); reward clipping (positive to 1, negative to −1), which "makes it easier to use the same learning rate across multiple games" at the cost that the agent "cannot differentiate between rewards of different magnitude". In the Nature version a lost life ends the episode during training.

Hyperparameter (Nature, Extended Data Table 1)ValueNote
Minibatch size32
Replay memory size1,000,000most recent transitions
Agent history length4frames stacked as input
Target network update frequency C10,000parameter updates
Discount factor γ0.99
Action repeat (frame skip)4
Update frequency4actions between gradient steps
Optimiser, learning rateRMSProp, 0.00025momentum 0.95, squared-gradient momentum 0.95, min squared gradient 0.01
ε-greedy exploration1.0 to 0.1annealed linearly over the first 1,000,000 frames, then fixed
Replay start size50,000uniform random play before learning starts
No-op max30random "do nothing" actions at the start of an episode

The values "were selected by performing an informal search on the games Pong, Breakout, Seaquest, Space Invaders and Beam Rider", then held fixed for all games. On the word "frames": Rainbow restates DQN's schedule as ε annealed "over the first 4M frames" and learning starting after "200K frames", four times the Nature figures, which is consistent with the Nature table counting agent steps (each repeated over 4 emulator frames) while calling them frames (Hessel et al. 2017). The Nature text never says so; it stays unconfirmed here and on the parent's Milestones tab.

4Overestimation and Double DQN

The max in the target uses the same noisy estimates to select the best action and to evaluate it, so whichever action happens to be overestimated is picked, and its overestimate enters the target. Every estimate can be unbiased and the max still is not: with three actions truly worth 0 and independent standard normal errors, the expected maximum is about 0.85; with ten, about 1.54 derived. The tabular version (Sutton and Barto's Example 6.7, live) is on Model-free prediction and control (its Reading section 5); what changes with a network is that the bias needs no noise at all.

Exact samples, no noise, and the max of ten fits still sits above the truth

Van Hasselt, Guez and Silver (2015), Figure 2: 10 actions with the same true value in every state; each action's estimate is a polynomial fitted to exact samples of that value at the integer states from −6 to 6, with two adjacent states left out (a different pair per action). The fits disagree between samples, and their max sits above the truth almost everywhere. The double estimator picks with one fit and values with another, fitted to different samples. Predict: which overestimates more, a degree-6 or a degree-9 fit that passes through every sample exactly?

  1. One action's fit. Action 1: a degree-6 polynomial fitted to the true values at 11 integer states; states −5 and −4 (red rings) are left out. The samples are exact: no noise anywhere.
  2. Another action, other samples. Action 2 leaves out −4 and −3, so between samples its fit differs from action 1's.
  3. All ten fits. Each is right at most of its samples, but they err in different places.
  4. The max over the ten. Q-learning's target takes this dashed line: it collects whichever error happens to be positive.
  5. Overestimation. Max − true, averaged over states: +0.612. Positive almost everywhere, largest where samples are sparse or the fit is flexible.
  6. The double estimator. Pick the best action with one set of fits and value it with fits made from other samples (action ai+5's for ai): the errors no longer line up with the choice, and the average error is −0.021.

Defaults reproduce the paper's printed average errors independently: from the stated construction (least-squares fits, the samples of action ai+5 as the second set for ai, errors averaged over a fine grid on [−6, 6]) the three rows give +0.612 and −0.021, +0.473 and +0.016, +3.349 and −0.016, against the printed +0.61 and −0.02, +0.47 and +0.02, +3.35 and −0.02. The degree-9 row overestimates most: it passes through every sample and swings wildly between them.

Double DQN uses the two networks DQN already has. Continuing the example: the online network gives Q(s′, ·; θ) = (2.5, 3.0, 3.8), so it selects the third action; the target network values that action at 3.0; the target is 1 + 0.99 × 3.0 = 3.97 instead of 4.465 derived.

yDouble = r + γ Q( s′, argmaxa′ Q(s′, a′; θ); θ− )
θ
online network: picks the next action
θ−
target network: values it. θ− is an old copy of θ, so the decoupling is partial: "perhaps the minimal possible change to DQN towards Double Q-learning"

On Atari, DQN's estimates were "consistently and sometimes vastly overoptimistic", and overestimation "was observed for DQN in all 49 tested Atari games, albeit in varying amounts". With DQN's hyperparameters unchanged, the median human-normalised score over 49 games rose from 93.5% to 114.7% and the mean from 241.1% to 330.3% (5 minutes of play, no-op starts, Table 1).

Theorem 1, game-level effects, the tuned version and descendants (1 min)

Theorem 1 needs no independence and no particular error distribution: if all true action values in a state are equal, Q*(s, a) = V*(s), and the estimates are unbiased on the whole (errors sum to 0) but not all correct (mean squared error C > 0), then maxa Qt(s, a) ≥ V*(s) + √(C / (m − 1)) for m actions, and the bound is tight; the Double Q-learning estimate's lower bound on absolute error is zero. The bound shrinks with m only because it is a worst case; with errors uniform on [−1, 1] the overestimation is (m − 1)/(m + 1), which grows with m (0.82 for 10 actions derived).

On Asterix and Wizard of Wor the estimates grew by orders of magnitude and the scores fell as they did, so the paper reads the instability as overestimation rather than inherent off-policy instability; overestimation does not always hurt (DQN plays Pong optimally while slightly overestimating). Some games changed sharply (Road Runner 233% to 617%, Double Dunk 17% to 397%). A tuned version (target refresh every 30,000 frames instead of 10,000, ε 0.01 in training and 0.001 in evaluation, one shared bias for all action values) reached 116.7% median under human starts, against 47.5% for DQN and 88.4% for untuned Double DQN (Table 2).

Rainbow and R2D2 use this target; TD3 fights the same bias with twin critics and a minimum (Policy gradients and actor-critic); offline RL meets it on actions the data never tried (Offline RL and imitation).

5The dueling network: value plus advantage

The dueling architecture (Wang et al. 2015) changes only the head: after the shared convolutions it splits into a state-value stream V(s) and an advantage stream A(s, a), then recombines them. "For many states, it is unnecessary to estimate the value of each action choice" (in Enduro, left or right "only matters when a collision is eminent"), but bootstrapping needs a good state value everywhere; with its own stream, V(s) improves on every update, whichever action was taken. Example: V = 5 and A = (1, −1, 3), whose mean is 1.

  1. DQN's head: one stream. After the shared convolutions, one fully connected stream outputs a Q-value per action, each learned only when that action is taken.
  2. Dueling splits the head in two. A value stream outputs one number, V(s); an advantage stream outputs one per action, A(s, a). Every update trains V, whichever action was taken.
  3. The example. The bars: V = 5, and A = (1, −1, 3) for three actions.
  4. Subtract the mean advantage. The mean of A is 1 (the glass level across the bars), so the centred advantages are (0, −2, 2).
  5. Add V: the Q-values. V and the centred advantages flow together: Q = (5, 3, 7). The greedy action is a3, and V = 5 is the average of Q, not the value of the best action (7).
  6. Subtract the max instead. The max of A is 3: centred advantages (−2, −4, 0) and Q = (3, 1, 5). Now V = 5 equals max Q, exactly the state value, and the best action's advantage is 0. Same ranking, same greedy action.

Two ways to recombine the same streams: the ranking of actions survives, the meaning of V does not. Every experiment in the paper used the mean.

Q(s, a) = V(s) + ( A(s, a) − (1/|𝒜|) Σa′ A(s, a′) )
|𝒜|
the number of actions
why subtract
Q = V + A alone is unidentifiable (add a constant to V, subtract it from every A, and Q is unchanged), "mirrored by poor practical performance when this equation is used directly"

Subtracting the max, Q = V + (A − maxa′ A), makes V exactly the state value (step 6: (3, 1, 5) in the example). The mean (step 5: (5, 3, 7) derived) "loses the original semantics of V and A" but "increases the stability of the optimization", because the advantages "only need to change as fast as the mean". Evidence: on a corridor task with exact Q-values the two architectures tied with 5 actions, and the dueling network's error fell faster as no-op actions were added (10, then 20). On 57 Atari games, trained with Double DQN, the dueling network ("Duel Clip") beat the same single-stream network with the same gradient clipping on 75.4% of games (43 of 57).

Training details and the full score table (under 1 min)

The combined gradient into the last convolutional layer was rescaled by 1/√2 and gradients were clipped to norm 10. Mean and median human-normalised scores, 30 no-op starts (their Table 1): Nature DQN 227.9% and 79.1%; single stream 307.3% and 117.8%; single stream with clipping 341.2% and 132.6%; dueling with clipping 373.1% and 151.5%; dueling with prioritised replay 591.9% and 172.1%. Under human starts the dueling gain over the clipped single stream is smaller (343.8% and 117.1% against 302.8% and 114.1%).

6Prioritised experience replay

Uniform replay replays every transition as often as it happened, informative or not. Prioritised experience replay (Schaul et al. 2015) replays transitions with a large TD error more often, as prioritised sweeping orders planning updates. Its "Blind Cliffwalk" has n states and a reward that random actions reach with probability 2−n, so the one useful transition is buried among failures; an oracle choosing what to replay learns exponentially faster than uniform replay. Predict: with the largest error 60 times the smallest, how much more often is it sampled at α = 0.6?

P(i) = piα / Σk pkα,    wi = ( N · P(i) )−β / maxj wj
pi
priority: |δi| + ε (proportional) or 1/rank(i) by |δ| (rank-based, a power law, "insensitive to outliers"). New transitions enter at the maximum priority so each is replayed at least once
α
how much prioritisation: α = 0 is uniform
wi, β
importance-sampling weight that undoes the sampling bias, fully at β = 1; β is annealed to 1 because unbiasedness matters most near convergence. Dividing by the largest weight only scales updates down
N
transitions in the buffer

Settings and evidence. The proportional version samples in O(log N) with a sum-tree (each node holds the sum of its children's priorities). It beat uniform replay "on 41 out of 49 games". It also makes replay more off-policy: stronger prioritisation soft-diverged more often (van Hasselt et al. 2018, §2 above).

Chosen settings and score table (under 1 min)

A grid search on 8 games chose α = 0.7, β0 = 0.5 (rank-based) and α = 0.6, β0 = 0.4 (proportional), with the step size cut by 4 because high-error transitions give larger gradients.

Median and mean, human starts (their Table 1): DQN 48% and 122%, rank-based on DQN 106% and 355% (49 games); tuned Double DQN 111% and 418%, rank-based 113% and 454%, proportional 128% and 551% (57 games).

Prioritising skews what is replayed; β undoes the skew in the expected update

Eight transitions with illustrative TD errors (|δ| from 0.05 to 3.0, ε = 0.01). Bars: probability of being sampled (uniform 1/8 dashed) and the normalised importance weight. N·P(i)·wi is each transition's effective weight in the expected update: equal for all only at β = 1.

7Multi-step targets

A one-step target moves reward information back one state per update; an n-step target uses n real rewards before bootstrapping. On a corridor with the only reward at the end, every synchronous sweep of backups carries it n states further.

y(n) = Σk=0n−1 γk rt+k+1 + γn maxa′ Q(st+n, a′; θ−)
n
steps of real reward; n = 1 is DQN's target, n = ∞ a Monte Carlo return

The cost: the n − 1 intermediate actions were chosen by the behaviour policy (ε-greedy, and old for replayed data), not the greedy policy whose value the target claims, so the uncorrected target is biased off-policy. Rainbow and R2D2 accept the bias (n = 3 and n = 5); Rainbow found n "a sensitive hyper-parameter", 3 and 5 both good early and 3 best by the end. Retrace (Munos et al. 2016) corrects it by cutting traces with truncated importance weights; Agent57 uses a Retrace loss. Multi-step targets also bootstrap less, and in the 2018 triad study longer n clearly reduced soft divergence (§2). The bias-variance dial, tabular n-step and TD(λ) are on Model-free prediction and control.

With n-step targets the reward travels n states per sweep instead of one

A 12-state corridor illustrative: one action, reward 1 on leaving the last state, γ = 0.9, values start at 0; each sweep backs up every state at once with the n-step target, so a state's value turns on once it is within k·n steps of the reward after k sweeps (shade: its value γd−1, d steps from the reward). The start needs ⌈12/n⌉ sweeps derived: 12 at n = 1, 4 at n = 3.

8Distributional RL: C51, QR-DQN and IQN

A Q-value is the mean of a random return Z(s, a). Bellemare, Dabney and Munos (2017) learn the whole distribution with the distributional Bellman equation: Z(s, a) has the same distribution as R + γZ(S′, A′).

The distributional target keeps the losing and surviving outcomes apart; DQN's target averages them

The next-state distribution is illustrative (two bumps, a losing outcome and a surviving one, on [−10, 10]); the projection is exact. The dashed line is DQN's scalar target r + γ𝔼[Z]: the same mean whenever nothing is clipped.

C51 puts probabilities on N fixed atoms zi = VMIN + iΔz, Δz = (VMAX − VMIN)/(N − 1); the Atari agent uses N = 51 and VMAX = −VMIN = 10, hence the name. The network outputs a softmax over atoms per action and acts greedily on the means. The target is the next state's distribution, discounted and shifted, then put back on the grid. Step through it:

  1. Next-state distribution. The target network's probabilities on the 11 atoms for the greedy action at s′: a losing outcome (around −5) and a surviving one (around +5).
  2. Shrink every atom by γ. Each atom zj moves to γzj, pulling the distribution toward 0: the discount applied to every possible future return at once.
  3. Shift by the reward. Each atom now sits at r + γzj, between the grid points. The shape is the target; only its support is wrong.
  4. Clip to [−10, 10]. Atoms that fall outside the support are pushed to the edge: the returns C51 can represent are bounded.
  5. Split each atom between its two neighbours. Equation 7: an atom at distance d from grid point zi gives it the fraction 1 − d/Δz of its probability. Nothing is lost.
  6. The target against DQN's scalar target. The blue bars are the training target for the cross-entropy loss; their mean equals DQN's r + γ𝔼[Z] whenever nothing is clipped, but the distribution keeps the two outcomes apart.
(ΦT̂Z)i = Σj [ 1 − | [r + γzj]VMINVMAX − zi | / Δz ]01 pj(s′, a*)
Φ
projection onto the fixed atoms (equation 7): each shifted atom's probability is split between its two grid neighbours in proportion to closeness; [·] clips to the given range
loss
cross-entropy between the projected target and the prediction, −Σi mi log pi(s, a): the KL divergence up to a constant, so "the Bellman update" becomes "multiclass classification"
a*
the greedy action at s′ by the means, from a target network as in DQN
Algorithm 1 as printed loses probability
The pseudocode computes bj = (T̂zj − VMIN)/Δz, l = ⌊bj⌋, u = ⌈bj⌉ and adds pj(u − bj) to atom l and pj(bj − l) to atom u. When bj is a whole number, l = u and both amounts are zero, so that atom's probability vanishes. With r = 0 and γ = 1 the whole target is lost; at the defaults the two end atoms land on the grid (b = 1 and b = 10 at N = 11) and their mass disappears derived. Equation 7 has no such gap, and implementations special-case the tie. Switch the figure to Algorithm 1 to see it.

Evidence. Across 57 games (best evaluation score during training), C51 reached 701% mean and 178% median human-normalised, against DQN 228% and 79%. The authors' reading: the learned distributions keep "the low-value, 'losing' event" separate from "the high-value, 'survival' event, rather than average them into one (unrealizable) expectation".

QR-DQN (Dabney et al. 2017) fixes the probabilities and learns the locations: N quantiles at the midpoints τ̂i = (2i − 1)/(2N), trained by quantile regression with an asymmetric Huber loss (κ = 1). That minimises a Wasserstein distance directly, closing C51's gap between theory (Wasserstein contraction) and algorithm (a KL loss after a projection), and drops VMIN and VMAX. IQN (Dabney et al. 2018) samples τ uniformly from [0, 1] and feeds it to the network, so one network represents the whole quantile function; distorting how τ is sampled gives risk-sensitive policies (CVaR acts on the worst η of outcomes).

Convergence, atom counts, IQN's embedding and every published score (1 min)

For a fixed policy the distributional Bellman operator is a contraction in a maximal form of the Wasserstein metric; for control, Proposition 1 shows it "is not a contraction in any metric over distributions", although the means still converge to Q* exponentially fast.

The 51-atom network trains at about 75% of DQN's speed. On five training games more atoms always helped, and the 51-atom agent beat DQN on all five (the two-atom "Bernoulli" variant on 3 of 5). C51's comparison over 57 games (their Figure 6, a table): Double DQN 307% and 118%, dueling 373% and 151%, prioritised 434% and 124%, prioritised dueling 592% and 172%.

QR-DQN with N = 200: 915% mean and 211% median over 57 games (QR-DQN-1, best scores; QR-DQN-0 without the Huber smoothing 881% and 199%). IQN's cosine embedding is φj(τ) = ReLU(Σi=0n−1 cos(πiτ) wij + bj) with n = 64; eight samples of τ per update were enough, and K = 32 samples choose actions. IQN's Table 1 (57 games, 30 no-op starts, averaged over seeds): IQN 1019% mean and 218% median (5 seeds), QR-DQN 864% and 193% (3 seeds), Rainbow 1189% and 230% (2 seeds); under human starts IQN's median is 162% against Rainbow's 153%. Note that IQN's table prints QR-DQN at 193% median and Rainbow at 230%, while their own papers print 211% and 223%: different seeds, averaging and protocol (§12).

9NoisyNet: exploration in the weights

ε-greedy explores by occasionally pressing a random button, the same way in every state. NoisyNet (Fortunato et al. 2017) replaces a linear layer y = wx + b with a noisy one whose noise scale is learned along with the weights:

y = (μw + σw ⊙ εw) x + μb + σb ⊙ εb
μ, σ
learnable means and noise scales of the weights and biases
ε
noise: independent, one Gaussian per weight, pq + q variables for p inputs and q outputs; or factorised, p + q unit Gaussians combined as εi,j = f(εi)f(εj) with f(x) = sgn(x)√|x|, used for DQN and dueling to save random-number generation. For DQN's 512-unit layer on its 3,136 convolutional outputs (7 × 7 × 64) that is 3,648 draws per resample against 1,606,144 derived
  1. Draw one Gaussian per input. The layer has p = 6 inputs: six unit Gaussians εi along the input edge.
  2. Draw one per output. q = 4 more, εj, along the output edge: 10 random numbers in all.
  3. Each weight's noise is a product. Weight (i, j) gets f(εi)f(εj), with f(x) = sgn(x)√|x|: every output row is a scaled copy of one pattern (rank one), and a negative output draw flips its row. Input draws stream along the plate's columns, output draws along its rows.
  4. The biases. Each output's bias noise is f(εj), the column on the right.
  5. Independent noise, for comparison. One Gaussian per weight and per bias: 28 random numbers (pq + q) and no pattern. For DQN's 512-unit layer the gap is 3,648 draws against 1,606,144.
Factorised noise: 10 random numbers instead of 28 for a layer with 6 inputs and 4 outputs. Values illustrative (a seeded generator); the counts are exact.

NoisyNet-DQN drops ε-greedy and acts greedily on the noisy network. Because σ is learned, the network can shrink its noise where it is sure and keep it where it is not: state-dependent, temporally consistent exploration. Median human-normalised scores, no-op starts (their Table 1): DQN 83% to NoisyNet-DQN 123%; dueling 132% to 172%; A3C 80% to 94%.

48% of what?
The text says NoisyNet adds "at least 18 (in the case of A3C) and at most 48 (in the case of DQN) percentage points to the median". Table 1 says otherwise: the median gains are 40 points for DQN (83 to 123) and 14 for A3C (80 to 94); 48% and 18% are relative improvements (123/83 and 94/80) derived. The parent's Milestones tab records the same finding.
Resampling, initialisation and mean scores (under 1 min)

The noise is resampled before every action and held fixed across each replayed minibatch; independent noise samples are used for the online network, the target network and acting, "to avoid bias due to the correlation".

Factorised: μ uniform in [−1/√p, 1/√p], σ = σ0/√p with σ0 = 0.5; independent: μ uniform in [−√(3/p), √(3/p)], σ = 0.017. Mean scores (Table 1): DQN 319% to 379%; dueling 524% to 633%; A3C 293% to 347%. How NoisyNet sits among exploration methods (count bonuses, curiosity, randomised value functions) is on Bandits and exploration.

10Rainbow, and what its ablation shows

Rainbow (Hessel et al. 2017) asked whether the six extensions "are complementary and can be fruitfully combined", putting each where step 7 of the figure at the top shows; they had to be adapted to each other (closed block below: prioritised by the distributional loss, dueling per atom, double on the n-step target).

How the six were adapted to each other (under 1 min)
  • Distributional and multi-step: the target distribution is the n-th next state's, shrunk by γn and shifted by the n-step discounted reward, projected onto the 51 atoms; the loss is the KL divergence.
  • Double: the online network chooses the greedy action at st+n; its distribution comes from the target network.
  • Prioritised: by that KL loss (proportional, exponent 0.5) rather than a TD error, "since this is what the algorithm is minimizing".
  • Dueling: value and advantage streams each output 51 logits, combined per atom as in dueling DQN, then a softmax.
  • Noisy: every linear layer becomes a factorised noisy layer, and ε = 0.

Results. Rainbow matched DQN's final performance after 7M frames (under 10 hours on one GPU) and passed the baselines' best final performance after 44M; a full 200M-frame run took about 10 days. Median human-normalised score of the best agent snapshot (Table 2): 223% with no-op starts and 153% with human starts, against DQN 79% and 68%; the best single extension, distributional DQN, reached 164% and 125%.

The ablation removes one component at a time (57 games, 200M frames each). The text: "Prioritized replay and multi-step learning were the two most crucial components" (removing either dropped the median a lot; multi-step also hurt final performance); distributional Q-learning "ranked immediately below", no different for the first 40 million frames and lagging afterwards, mostly on games at or above human level; removing Noisy Nets made the median worse but helped a few games; and "in aggregate, we did not observe a significant difference when removing the dueling network" or double Q-learning. The authors' hypothesis for double Q-learning: returns often exceeded 10, outside the [−10, 10] support, so "clipping the values to this constrained range counteracts the overestimation bias", though "the importance of double Q-learning may increase if the support of the distributions is expanded".

Figure 4 gives the per-game evidence: the area under each ablated agent's learning curve, normalised so that 0 is as good as Rainbow and 1 as bad as DQN (two games where DQN beats Rainbow are omitted, leaving 55). The PDF draws every bar as a vector rectangle, so all 330 heights (6 components × 55 games) were decoded exactly decoded from the figure. Predict first: the ablation is often quoted as "prioritised replay and multi-step matter, the rest barely do". In how many of the 55 games did removing double Q-learning make Rainbow worse?

53 of 57, or 46 of 55?
The text says Rainbow "performed better than either ablation in 53 games out of 57" for prioritisation and multi-step. In Figure 4 both bars are positive in 46 of 55 games and at least one is in 49 derived, so the 53 likely counts something other than these bars (final scores, perhaps); the sentence does not say.

Prioritised replay and multi-step have the largest median drops; double Q and dueling help about as many games as they hurt

Drop: (Rainbow − ablation) / (Rainbow − DQN) of the area under the learning curve; positive means the component helped. "Hurt" counts games with a drop above 0.005, "helped" below −0.005. "Strongest" counts games where the figure highlights this component's bar. Click a column header to sort. The medians rank the components in the order the text gives.

One game, six removals

Every game for one component, how the figure was decoded, Rainbow's hyperparameters and other baselines (2 min)
Sort:
0: as good as Rainbowright of 0: the component helped this game; left: removing it helpedbold: the strongest drop for this game

Removing double Q-learning hurt 30 games and helped 25, and was never the strongest drop; removing multi-step hurt 48.

Decoding. Each bar's height was read from its rectangle's coordinates relative to the row's two reference lines (Rainbow at 0, DQN at 1). Two checks: the figure highlights the strongest drop per game with an opaque overlay, and in all 55 games the highlighted bar is the largest decoded value (Montezuma's Revenge has two highlighted bars, both at the clip); and the medians rank the components as the text does. The drawing clips bars at −1 and 1, so a bar at the edge may be larger; means are affected, medians and counts are not. Script: src/checks/decode_rainbow_fig4.py. What the figure cannot say: it averages over the whole run, so a component that only speeds up early learning (as the paper says prioritisation and multi-step both do) and one that only raises the final score look alike. The median curves (Figure 3) separate the two but are curves, which this page does not read.

Rainbow hyperparameter (Table 1)Value
Min history to start learning80K frames (DQN: 200K)
Adam learning rate, Adam ε0.0000625, 1.5 × 10−4
Exploration ε; Noisy Nets σ00.0; 0.5
Target network period32K frames
Prioritisation: type, exponent ω, importance sampling βproportional, 0.5, 0.4 to 1.0
Multi-step returns n3
Distributional atoms, min/max values51, [−10, 10]

The other baselines in Table 2 (no-op and human starts): Double DQN 117% and 110%, prioritised Double DQN 140% and 128%, dueling Double DQN 151% and 117%, A3C 116% (human starts), Noisy DQN 118% and 102%.

Later work re-ran the ablation cheaply: Revisiting Rainbow (Obando-Ceron and Castro 2021) revisits the components on small-scale environments, arguing these "can still yield valuable scientific insights" at a fraction of the compute; its findings are not quoted here because they were not checked for this page.

11Scaling out: Ape-X, R2D2 and Agent57

After Rainbow the value-based line on Atari moved to distributed agents that separate acting from learning: many actors fill one replay buffer, one learner trains on it. Ape-X (Horgan et al. 2018) used 360 actors and reached a 434% median after 22.8 billion frames. R2D2 (Kapturowski et al. 2019) added an LSTM and replays sequences, warming the stale hidden state up with a burn-in before training, and replaced reward clipping with value rescaling: 1920.6% median. Agent57 (Badia et al. 2020b) is "the first deep RL agent that outperforms the standard human benchmark on all 57 Atari games".

  1. 360 actors. Each runs its own emulator with its own exploration rate εi = 0.41 + 7i/359, from 0.4 down to about 0.0007 derived (column height, log scale).
  2. One shared prioritised replay. The actors write their transitions into it with priorities they computed themselves.
  3. One learner. One GPU samples by priority and trains: a 434% median after 22.8 billion frames.
  4. Weights back to the actors. The actors periodically copy the learner's latest network.
  5. R2D2. 256 actors; the replay holds sequences of 80 steps, and the LSTM learner unrolls the first 40 as burn-in and trains on the other 40: a 1920.6% median.
How each one works, with its numbers (2 min)
  • Ape-X: 360 actor processes, each with its own environment, write into one shared prioritised replay, and one GPU learner trains on it (Double DQN with dueling and n-step targets). Actors compute initial priorities themselves, so new data needs no learner pass. Actor i explores with εi = ε1 + iα/(N−1) (ε = 0.4, α = 7), a spread from greedy to very exploratory. Median 434% with no-op starts after 22.8 billion frames in 5 days (its Table 1).
  • R2D2 (PDF read via the Wayback Machine): an LSTM after the convolutions; replays fixed-length sequences of 80 steps (overlapping by 40); stores the actor's hidden state and spends a burn-in of 40 steps unrolling the network before training on the rest. 256 actors, n = 5 double Q-learning, γ = 0.997, priorities mixing the max and mean TD error over the sequence (η = 0.9); a lost life is not an episode end, and rewards are not clipped: values are rescaled with h(x) = sign(x)(√(|x| + 1) − 1) + εx, ε = 10−3 (from Pohlen et al. 2018), which compresses a return of 1,000 to about 31.6 derived. Its Table 1: median 1920.6% and mean 4024.9% over 57 games, final score averaged over 3 seeds; the feed-forward variant reached 589.2%.
  • NGU and Agent57 (Badia et al. 2020a; 2020b): R2D2 still scored near zero on the hardest exploration games. Never Give Up adds an intrinsic novelty reward and learns a family of policies, each with its own weight on that reward and its own discount. Agent57 separates intrinsic and extrinsic value heads, trains 32 such policies, and lets a sliding-window UCB bandit choose which one each actor runs; Skiing, the last game, fell after 78 billion frames. The bandit is on Bandits and exploration.

Scores for Ape-X, R2D2, MuZero and Agent57, with protocols, frame counts and the per-game recomputation, are on the parent's Milestones and benchmarks tab. That tab found that Agent57's per-game table prints two of MuZero's scores with an extra digit (Asteroids and Beam Rider), which reorders the medians, and notes that R2D2's paper could not be fetched there; it is quoted here from the archived PDF, and its printed 1920.6% matches the figure MuZero and NGU reprint. Agent57 is above the human benchmark on all 57 games, which MuZero is not (51); MuZero has the higher mean and median, so which is "better" depends on the aggregate.

12Reading Atari numbers: protocols and pitfalls

Every score on this page is a human-normalised score: (agent − random) / (human − random) per game (van Hasselt et al., equation 5), aggregated by a median or a mean. The formula hides a dozen choices, and two papers rarely make them alike. The same agent, DQN, has at least four published medians: 93.5%, 79.1%, 68.5% and 47.5%.

The choices that move the number most: no-op starts (up to 30 random "do nothing" actions) against human starts (100 start points from expert play), whose gap Rainbow reads as "the extent to which the agent has over-fit to its own trajectories" (223% against 153%); the episode cap (5 or 30 minutes); a deterministic emulator against sticky actions (Machado et al. 2018); the best snapshot during training against the final agent; and the number of seeds. Agarwal et al. 2021 find "substantial uncertainty in median scores even with 50 runs" and recommend stratified bootstrap confidence intervals and the interquartile mean (IQM).

Nine printed medians for three agents: the same agent moves by a factor of two with the protocol

Each bar is a printed median from the table named, with its protocol. They share an axis only to show the spread; reading any two as a comparison of agents is the mistake this section is about. Compare only within one table, or recompute from per-game scores under one protocol.

Every protocol choice in the papers on this page, and the Nature evaluation (3 min)
ChoiceVariants in the papers on this pageWhy it matters
Start conditionNo-op starts: up to 30 random "do nothing" actions (DQN Nature). Human starts: 100 starting points sampled from a human expert's play (Nair et al. 2015), scoring only rewards after the start pointDeterministic games let an agent memorise one action sequence; human starts test whether it generalises
Episode cap5 minutes (18,000 frames) in DQN and Double DQN's no-op tables; 30 minutes (108,000 frames) in human-start tables and RainbowLong games score more with a longer cap; DQN's Extended Data Table 3 notes its uncapped Enduro scores are higher than the capped ones
StochasticityDeterministic emulator, or sticky actions: with probability ς = 0.25 the previous action repeats (Machado et al., who recommend it as the standard)Sticky actions break open-loop memorised play while keeping the game the same
Which snapshotThe best evaluation during training (C51, QR-DQN, Rainbow's "best agent snapshot"; Agent57 reports "the maximum over training" for baselines), or the final agent (R2D2, averaged over 3 seeds)A maximum over many evaluations is biased upward; Agarwal et al. find results under protocols "involving maximum are generally incomparable with end-performance reported results"
Seeds and aggregateOften 1 to 5 runs per game; median or mean over gamesThe mean is "dominated by a few games (e.g., Atlantis)" (Rainbow)
Game set49 games (DQN, Double DQN) or 57 (dueling onward)Rainbow takes DQN's 57-game scores from the dueling paper "since DQN's paper did not report scores for all 57 games"
Human baselineDQN's professional tester (about 2 hours of practice, about 20 episodes per game), or the human starts' expertAgent57 notes the baseline may underestimate what humans can do; a game where human and random scores are close makes the ratio fragile (the parent's Milestones tab shows Agent57's median game, Double Dunk, moving the median by about 42 points with a 0.05-point change of baseline)
Training rulesLife loss as episode end (DQN) or not (R2D2, Machado et al.); reward clipping (DQN) or value rescaling (R2D2); minimal or full 18-action setThese change what the agent optimises, not just how it is scored
What a "frame" isEmulator frames, or agent steps of 4 framesA factor of 4 in every budget (§3's recipe block)

The Nature evaluation, which defined the human-normalised score for every paper since: each game played 30 times for up to 5 minutes, from up to 30 random no-op starts, with ε = 0.05; the professional human tester played "around 20 episodes of each game lasting a maximum of 5 min each, following around 2 h of practice", with no pausing, saving or reloading; the random baseline pressed a random action at 10 Hz.

Two more traps, found by recomputing printed tables on the parent page: a paper's per-game table can contradict its own summary (Agent57's two MuZero misprints), and two of a paper's own numbers can disagree (EfficientZero's abstract and section 5.2); both are on the Milestones and benchmarks tab of Topic: rl, with the arithmetic. The data-efficient regime: Atari 100k limits an agent to 100K steps (400K frames, about two hours of play; Kaiser et al. 2019); the value-based line continues there with data-efficient Rainbow, DrQ, SPR and BBF, a scaled-up value-based agent, whose IQM, median and mean, each with its seed count, are in the same Milestones tab.

13When to use a value-based deep method

  • Discrete actions, with data that is precious or a simulator that is cheap to replay from: the DQN family. Replay makes it sample-efficient and off-policy learning reuses old data. The price: the deadly triad, many interacting hyperparameters, and no natural handling of continuous actions, where the max over actions is itself an optimisation (DDPG, TD3 and SAC learn an actor to do that max; Policy gradients and actor-critic). Note that off-policy is not offline: DQN and SAC interact online and learn off-policy from a buffer.
  • Stability over sample efficiency, or any action space: PPO-style on-policy methods, same page; they cannot replay old data without importance ratios.
  • Planning matters: MuZero's search uses a value network trained with the same n-step value targets and, on Atari, R2D2's value rescaling (Model-based RL and planning).
  • No interaction at all: offline Q-learning (CQL and others) must keep Q-values down on actions the data never shows (Offline RL and imitation).
  • Language models: post-training uses policy gradients (PPO, GRPO), not Q-learning over a 100,000-token action space (RL for LLMs).

Libraries implement DQN and a few descendants rather than full Rainbow: Stable-Baselines3 lists DQN for discrete actions only, with QR-DQN in its contrib package; CleanRL has single-file DQN and C51; Google's Dopamine implements DQN, C51, Rainbow and IQN (with SAC and PPO). Their defaults have drifted from the Nature paper (CleanRL: Adam at 0.0001 and plain MSE loss).

CleanRL's DQN defaults against the Nature paper (1 min)
SettingDQN, Nature 2015CleanRL dqn_atari.py (master, read 4 October 2026)
Optimiser, learning rateRMSProp, 0.00025Adam, 0.0001
Losssquared error with the TD error clipped to [−1, 1] (Huber)mean squared error
Target network refreshevery 10,000 updatesevery 1,000 environment steps (250 updates at one update per 4 steps)
ε schedule1.0 to 0.1 over the first 1M frames1.0 to 0.01 over the first 10% of 10M steps
Learning starts50,00080,000 steps
Same in bothreplay of 1M transitions, minibatch 32, γ = 0.99, one update per 4 steps, 30 no-op starts, frame skip 4 with max-pooling, life loss as episode end in training, reward clipping

From the CleanRL source. Its tau option allows soft (Polyak) target updates, θ− ← τθ + (1 − τ)θ−, the form DDPG introduced; the default τ = 1 is DQN's hard copy.

Misconceptions worth checking yourself against (1 min)
  • "The target network solves the deadly triad." It cuts soft divergence a great deal (14% against 61%), but fitting a frozen target exactly can still diverge when the features cannot represent it (§3's counterexample).
  • "Overestimation needs biased estimates." Every estimate can be unbiased, and with a network it appears even with exact, noise-free samples (§4).
  • "The dueling head's V is the state value." Only with the max-subtracting form; the mean form every experiment used shifts V and A by a constant (§5).
  • "Multi-step returns are free." Uncorrected n-step targets from a buffer assume the intermediate actions were greedy (§7).
  • "Rainbow shows double Q-learning and dueling do not matter." No significant aggregate difference inside Rainbow, where the [−10, 10] support itself limits overestimation; per game both helped some and hurt others (§10).