Papers · arXiv 1312.5602
Playing Atari with Deep Reinforcement Learning
Summary in three lines
- 🎯 Reinforcement learning from high-dimensional visual inputs typically suffered from instability, sample inefficiency, and hand-crafted feature reliance.
- 🔧 Connects a convolutional neural network directly to raw pixels using model-free Q-learning trained on mini-batches sampled from an experience replay buffer.
- 📈 Outperformed prior RL baselines on six of seven Atari games and exceeded human expert benchmark scores on Breakout, Enduro, and Pong.
Abstract
We present the first deep learning model to successfully learn control policies directly from high-dimensional sensory input using reinforcement learning. The model is a convolutional neural network, trained with a variant of Q-learning, whose input is raw pixels and whose output is a value function estimating future rewards. We apply our method to seven Atari 2600 games from the Arcade Learning Environment, with no adjustment of the architecture or learning algorithm. We find that it outperforms all previous approaches on six of the games and surpasses a human expert on three of them.
Reading guide
Problem and motivation
Reinforcement learning (RL) in sensory domains historically depended on hand-engineered features combined with linear value functions or policy approximations. Deep neural networks had demonstrated strong representation learning in computer vision and speech recognition, but applying them to RL posed fundamental challenges:
- Delayed and sparse rewards: Learning signals are scalar, noisy, and separated from actions by thousands of time steps.
- Non-i.i.d. observations: Successive environment states form highly correlated time series rather than independent samples.
- Non-stationary distributions: The data-generating policy shifts continuously during learning, creating feedback loops that can cause nonlinear function approximators to diverge.
The goal of this work is to create a single algorithm and neural network architecture capable of learning control policies directly from high-dimensional visual input ( RGB video) across diverse Atari 2600 games without game-specific modifications.
Key ideas
- End-to-end sensory control: Map raw pixels directly to action-values (-values) without domain-specific vision systems or access to emulator internals.
- Experience Replay Buffer: Store agent interactions in a finite memory buffer . Training draws uniform mini-batches randomly from this memory. This breaks sample correlations, reduces gradient variance, and stabilizes the data distribution across past policies.
- Action-value output parameterization: Instead of feeding both state and action as inputs to compute a single scalar , the network takes only the state representation as input and outputs a vector containing the predicted -values for all legal discrete actions in a single forward pass.
- Frame stacking and downsampling: Because single frames suffer from perceptual aliasing (inability to infer velocity or trajectory), histories of four preprocessed grayscale frames are stacked into an input tensor.
Method (with the key equations)
The state sequence is mapped via a preprocessing function to an representation. The network parameters are trained using a sequence of mean squared Bellman error loss functions at each iteration :
where the target is computed using parameters from the previous iteration:
The gradient with respect to is:
Model Architecture and Training Setup
- Input: image produced by cropping downsampled grayscale frames.
- Conv 1: 16 filters of size , stride 4, ReLU activation.
- Conv 2: 32 filters of size , stride 2, ReLU activation.
- FC 1: 256 fully-connected ReLU units.
- Output: Fully-connected linear layer with 4 to 18 outputs (one per legal action).
- Optimizer: RMSProp with batch size 32.
- Exploration: -greedy with annealed linearly from to over the first frames, then fixed at .
- Reward Clipping: Positive rewards set to , negative rewards to , and neutral rewards to to standardize the error scale.
- Frame skipping: Agent observes and acts every frames (repeated action), except for Space Invaders to keep blinking laser sprites visible.
Results (with the most important numbers)
DQN was evaluated on seven Atari 2600 games using an -greedy policy with . Average scores compared to prior linear RL baselines and expert humans:
| Game | Random | Sarsa | Contingency | DQN (Average) | Human Expert | DQN (Best Episode) |
|---|---|---|---|---|---|---|
| Beam Rider | 354 | 996 | 1743 | 4092 | 7456 | 5184 |
| Breakout | 1.2 | 5.2 | 6 | 168 | 31 | 225 |
| Enduro | 0 | 129 | 159 | 470 | 368 | 661 |
| Pong | -20.4 | -19 | -17 | 20 | -3 | 21 |
| Q*bert | 157 | 614 | 960 | 1952 | 18900 | 4500 |
| Seaquest | 110 | 665 | 723 | 1705 | 28010 | 1740 |
| Space Invaders | 179 | 271 | 268 | 581 | 3690 | 1075 |
- DQN outperformed prior reinforcement learning methods (Sarsa and Contingency) on all seven games.
- DQN outperformed human expert scores on three games: Breakout (168 vs. 31), Enduro (470 vs. 368), and Pong (20 vs. -3).
- Tracking the average predicted maximum -value on a held-out set of states yielded smooth monotonic improvement during training, demonstrating stability without divergence.
Limitations and open questions
- Long-horizon strategic planning: Games requiring delayed, long-term credit assignment (such as Q*bert, Seaquest, and Space Invaders) lagged significantly behind human scores.
- Reward clipping side effects: Normalizing all positive rewards to prevents distinguishing high-value targets from low-value targets.
- Uniform replay memory limitations: The replay buffer has a fixed capacity ( frames) that overwrites older data and samples uniformly without weighting transitions by importance (unlike prioritized replay).
- Changing target values: While parameters are kept fixed during a single gradient step, they update continuously across SGD steps (a dedicated slowly updating target network was introduced in later work).
Key terms
- Deep Q-Networks (DQN)
- A convolutional neural network architecture trained using Q-learning to map high-dimensional state observations directly to action-value estimates for all valid actions.
- Experience Replay
- A mechanism that stores state transitions in a replay memory and samples random mini-batches for weight updates, breaking temporal correlations and smoothing data distribution shifts.
- Q-learning
- An off-policy, model-free temporal difference reinforcement learning algorithm that iteratively estimates the optimal action-value function .
- Arcade Learning Environment (ALE)
- A software platform exposing Atari 2600 games as an empirical benchmark for reinforcement learning agents interacting with video frames and emulated hardware.
- Frame-skipping
- A technique where the agent samples observations and selects actions only once every frames, repeating the selected action during skipped frames to speed up wall-clock execution.
- Reward Clipping
- Transforming all positive environmental rewards to and negative rewards to during training to stabilize gradients across different game score scales.
- Perceptual Aliasing
- A condition where a single static visual frame does not contain sufficient state information (such as velocity or direction of movement) to resolve the true underlying environment state.
Questions
Why does DQN predict all action values in one forward pass instead of taking (state, action) as input?
Taking only the preprocessed state as input and outputting a vector of Q-values for all legal actions allows the agent to evaluate all possible actions in a single forward pass, rather than performing separate forward passes per time step.
Why is experience replay necessary for training deep networks with Q-learning?
Standard sequential RL transitions are strongly correlated and generate a shifting data distribution determined by current policy weights. Uniformly sampling past transitions from replay memory breaks correlations, reduces update variance, and prevents destructive feedback loops or divergence.
How does DQN handle velocity and motion from 2D images?
The preprocessing function stacks the last 4 consecutive downsampled grayscale frames into an input tensor, enabling the network to infer speed and direction.
On which Atari games did DQN surpass human performance?
DQN achieved higher average scores than the human expert baseline on Breakout (168 vs. 31), Enduro (470 vs. 368), and Pong (20 vs. -3).
The overview on this page was written by AI from the paper and may contain mistakes. Read the paper for the details.