Level 5 · research · ~55 h
Reproduce DQN with target network and replay on Atari
Implement Deep Q-Networks from Mnih et al. (2015) with experience replay, a frozen target network and frame preprocessing, and reproduce learning curves on Pong and Breakout.
Problem statement
- 01Implement Deep Q-Networks from Mnih et al. (2015) with experience replay, a frozen target network and frame preprocessing, and reproduce learning curves on Pong and Breakout.
Real-world motivation
- 01DQN established that off-policy Q-learning with a nonlinear function approximator can be stable; reproducing it requires handling pixel preprocessing, reward clipping and evaluation protocol precisely.
Learning objectives
- 01Implement the CNN Q-network, replay buffer and target network
- 02Reproduce the reported preprocessing and training hyperparameters
- 03Run three seeds and report learning curves with confidence bands
Technical architecture
- 014-frame grayscale stack at 84x84
- 02three convolutional layers plus an MLP head
- 03target network synchronized every 10k environment steps
Mathematical foundations
- 01$y_j=r_j+\gamma\max_{a'}Q(s_{j+1},a';\theta^-)$
- 02$\mathcal{L}_j=\mathbb{E}_{(s,a,r,s')\sim D}[(y_j-Q(s,a;\theta))^2]$
Dataset and sources
- 01Atari PongNoFrameskip-v4
- 02Atari BreakoutNoFrameskip-v4
- 03ALE with standard preprocessing
Step-by-step tasks
- 01Implement frame skipping, max-pooling and grayscale downsampling
- 02Build a circular replay buffer with uniform sampling
- 03Implement the Q-network and target network
- 04Train with Adam, reward clipping and epsilon decay
- 05Evaluate every 10k steps with a fixed greedy policy
- 06Ablate target sync interval and replay size
Implementation requirements
- 01Use gymnasium Atari with standard wrappers
- 02Store frames as uint8 to save memory
- 03Use Huber loss on the TD error
Testing requirements
- 01Verify replay samples uniformly without replacement bias
- 02Check target parameters remain frozen between syncs
- 03Confirm preprocessing matches reference frames visually
Evaluation metrics
- 01mean episode return
- 02learning-curve AUC
- 03wall-clock environment steps
- 04Q-value magnitude
Expected outputs
- 01learning curves with seed bands
- 02trained agent checkpoint
- 03ablation report
- 04sample game frames
Common failure modes
- 01replay buffer too small causes correlated samples
- 02target sync too frequent destabilizes learning
- 03reward clipping changes the optimal policy on some games
Stretch goals
- 01implement Double DQN
- 02add prioritized experience replay
Research extensions
- 01study overestimation bias by measuring Q-value inflation
- 02compare replay strategies under a fixed step budget
GitHub submission requirements
- 01Full training code and wrappers
- 02Three-seed learning curves
- 03Ablation table
- 04README with preprocessing details and seeds
Completion rubric
- 01preprocessing matches the reference
- 02DQN implementation correct
- 03three seeds reported
- 04target-network ablation performed
- 05learning curves include error bands
Submit when every rubric item is satisfied and your repository contains runnable code plus a reproduction command.