For a sampled transition, r=1, γ=0.99, and the next state s′ has online-network values Qθ(s′,⋅)=(2.0,3.0,2.5) and target-network values Qθ−(s′,⋅)=(2.8,2.2,3.4). Compute the target used by DQN and by double DQN. Why does the max in DQN cause over-estimation, and how does double DQN reduce it?

Reinforcement learning, Deep Q-networks
Level L2 Elementary. Length Medium. Nature Th+Mat Both.

What's being asked

Whether you know that double DQN selects the action with the online network but evaluates it with the target network.

Key idea

DQN target: y=r+γmax⁡a′Qθ−(s′,a′). Double DQN target: y=r+γ Qθ− ⁣(s′, arg⁡max⁡a′Qθ(s′,a′)). Using two different networks to choose and to score the action breaks the positive correlation between "the action looks best" and "its value is over-estimated".

Steps

  1. DQN: max⁡a′Qθ−(s′,a′)=3.4 at the third action. So y=1+0.99×3.4=4.366.
  2. Double DQN, select: the online network's best action is the second one, with value 3.0.
  3. Double DQN, evaluate: the target network's value for the second action is 2.2. So y=1+0.99×2.2=3.178.
  4. Explain over-estimation. The estimates are noisy. Since E[max⁡iXi]≥max⁡iE[Xi], taking a max over noisy estimates is biased upwards, and the bias then propagates through bootstrapping.
  5. Explain the fix. The online network's choice of action carries its own noise, but the target network's error on that action is roughly independent, so the evaluation is not systematically too high. The new target (3.178) is lower than the DQN target (4.366) here.
  6. Mention that double DQN reuses the existing two networks, so it costs almost nothing extra.

Common mistakes

How long your answer should be

Half a page; 4 minutes.

Read this

Previous in Reinforcement learning: An episode has rewards r1=1, r2=2, r3=0, r4=3 and then ends, with γ=0.9. The current estimates are V(S1)=6, V(S2)=5 and V(S3)=4. What are the n-step returns G0(n) for n=1,2,3,4, and how does n trade off bias and variance?
Next in Reinforcement learning: How do you derive the REINFORCE policy-gradient estimator, and why does subtracting a baseline not introduce bias?