Log inStart free
LESSON 17.03 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Double Q-learning

Watch the max push Q-values above the truth, and double DQN pull them back.


Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 17.03 · DOUBLE Q BAYMAX TARGET 2.37 · TRUE Q 0.86
01
Stage 1 of 5 · The max target
The DQN TD target uses the largest Q-value at the next cell. The target network picks that move and scores it.
Explain it simply

The teal arrow is one move, from cell 14 to cell 15. The four ochre bars are the target network's guesses at cell 15. The dashed lines are the true values. The target takes the largest bar, 3.02, while the true best is 0.90.

The move from cell 14 to cell 15. The target network's largest guess at cell 15 is 3.02, for right. The true best value is 0.90. The max target is 2.37.

transitiontarget networkonline network, curvesoverestimate, pittrue value
GP+1−1S012457891011131415online network · step 3,050next cell 15 · target network θ⁻2.71↑ up3.02→ rightmax2.78↓ down2.93← leftmax target y = −0.50 + 0.95 × 3.02 = 2.37Q(14, right) now 2.83 · true Q* 0.86GP+1−1S012457891011131415online network · step 3,050next cell 15 · target network θ⁻2.71↑ up3.02→ rightmax2.78↓ down2.93← leftmax target y = −0.50 + 0.95 × 3.02 = 2.37Q(14, right) now 2.83 · true Q* 0.86
Toy: the 17.C1 grid game with optional reward noise, a Q-network with 16 hidden units, 6,000 steps
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
y=r+γ max⁡a′Q(s′,a′;θ−)\sy{y}{param}{y} = \sy{r}{data}{r} + \sy{g}{param}{\gamma}\,\max_{a'}\sy{qt}{param}{Q(s',a';\theta^-)}
y=−0.50+0.95⋅3.02=2.37,Q∗(14,→)=0.86y = -0.50 + 0.95 \cdot 3.02 = 2.37,\quad Q^*(14,\rightarrow) = 0.86

The target adds the reward to the largest next guess.

Common mix-ups

MYTHNoisy guesses average out, so the max target is fair.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01Without reward noise, does DQN still end with a large overestimate?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.