Research

Playing Atari with Deep Reinforcement Learning

A convolutional neural network learns Atari control directly from pixels by combining Q-learning with experience replay.

Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, Martin RiedmillerDec 19, 2013NIPS Deep Learning Workshop 201312 min readDeepMind Technologies
FOUNDATIONALReinforcement LearningAdvanced

Key takeaway

DQN learns an action-value function Q(s,a) from image observations. It stores transitions in a replay memory, samples random minibatches to reduce temporal correlation, and uses an epsilon-greedy policy to balance exploration and exploitation. The 2013 paper evaluated one shared architecture across seven Atari games, beating prior learning methods on six and human experts on three.

Updated on Nov 18, 2026

01

Abstract

The breakthrough: learning control from pixels

The paper introduced a deep reinforcement learning agent that learns to play Atari games directly from screen images. Instead of relying on hand-engineered visual features or a game-specific state representation, it trains a convolutional neural network to estimate the long-term value of each available action.

The result was a single learning architecture and training procedure that could be reused across seven different games. The 2013 workshop paper reported performance above previous learning approaches on six games and above an expert human player on three.

02

Background

Research that connects to DQN

The paper builds on classical Q-learning and the Bellman optimality equation, experience replay introduced in earlier reinforcement-learning work, and the Arcade Learning Environment as a standardized Atari benchmark.

A major follow-up is Mnih et al., “Human-level control through deep reinforcement learning” (Nature, 2015), which expanded the evaluation and formalized the target-network stabilization approach widely associated with DQN. Later work such as Double DQN, Prioritized Experience Replay and Dueling Network Architectures addressed overestimation, replay efficiency and value-function representation.

03

Methodology

Learn which action has the highest future return

The central object is the action-value function Q(s,a): the expected discounted return obtained by taking action a in state s and then following a policy. DQN approximates this function with a neural network Q(s,a;θ).

For a given screen-history representation, the network emits one value for every legal action. The agent selects the action with the largest predicted value most of the time, while occasionally choosing a random action to explore.

The network is trained with a temporal-difference target: y = r + γ maxₐ′ Q(s′,a′;θ⁻) for a non-terminal transition, and y = r for a terminal transition. Important historical nuance: the 2013 workshop version describes targets based on a previous parameter iterate; the separately frozen target network commonly taught as part of canonical DQN was made explicit in the expanded 2015 Nature version.

Q-learning with experience replay

At each interaction step, the agent observes a state representation, chooses an action using an ε-greedy policy, receives a reward and next observation, and stores the transition (state, action, reward, next state) in a replay memory.

During learning, it samples a random minibatch of past transitions and minimizes the squared difference between the current Q estimate and the one-step Q-learning target. The same transition can be reused in multiple updates.

Replay breaks up the strong temporal correlations found in consecutive game frames and mixes experiences from different points in the agent’s learning history. This makes stochastic gradient updates less dependent on the latest behavior and improves data efficiency.

Figure 2

Experience replay turns gameplay into reusable training data

At each step, the agent chooses a random action with probability epsilon or the action with the largest predicted Q-value. It stores the transition—preprocessed state, action, reward, and next state—in replay memory. Training then samples a random minibatch from that memory and fits the Q-network to a bootstrapped target: the immediate reward for terminal states, or reward plus discounted best future value for non-terminal states. Replaying older transitions breaks up the strong temporal correlation in consecutive frames and lets each experience train the network more than once.

Algorithm 1 from Mnih et al. (2013), supplied by the user. Paper: arXiv:1312.5602.

04

Architecture

A CNN maps four game frames to action values

The input is an 84 × 84 × 4 tensor: four consecutive preprocessed grayscale frames stacked together. Stacking provides short-term motion information that a single screenshot cannot reveal.

The convolutional feature extractor uses 16 filters of size 8 × 8 with stride 4, followed by 32 filters of size 4 × 4 with stride 2. A fully connected hidden layer has 256 rectified linear units. The final linear layer has one output per legal game action; the games in the study had between 4 and 18 actions.

Because all action values are produced in one forward pass, the network does not need a separate inference pass for every possible action.

05

Dataset

Figure 1

One agent, many Atari environments

The five screenshots show the variety of Atari 2600 games used to test the same deep reinforcement-learning system: Pong, Breakout, Space Invaders, Seaquest, and Beam Rider. The agent receives pixels rather than a hand-designed state representation, and it must learn a policy that maps visual history to joystick actions. The diversity of game layouts and reward structures is what makes the benchmark a test of general learning rather than a single-game controller.

Figure 1 from Mnih et al. (2013), supplied by the user. Paper: arXiv:1312.5602.

06

Training

Training choices that helped stabilize optimization

The paper clipped positive rewards to +1 and negative rewards to −1 during training, leaving zero rewards unchanged. This limited the scale of temporal-difference errors and made a shared learning rate more practical across games, although it discarded information about reward magnitude.

The authors used RMSProp and minibatches of 32. The ε-greedy exploration rate was annealed linearly from 1.0 to 0.1 over the first million frames, then held at 0.1. Training ran for 10 million frames with a replay memory holding the most recent one million frames.

Actions were repeated across skipped frames to reduce computation: k=4 for most games and k=3 for Space Invaders so that its blinking lasers remained visible.

Input preprocessing and training budget

Raw Atari observations were 210 × 160 RGB images. The pipeline converted frames to grayscale, downsampled them to 110 × 84, then cropped an 84 × 84 playing region. The last four processed frames were stacked as the network input.

The authors trained for 10 million frames per game and used the same network architecture and hyperparameter settings across all seven games, apart from the documented frame-skip adjustment for Space Invaders. Frame skipping reduced the number of expensive agent decisions while allowing the emulator to advance between decisions.

Implementation blueprint

A faithful educational reproduction can be organized as follows:

  1. Build an Atari environment wrapper that returns processed grayscale frames and rewards.
  2. Maintain a four-frame state stack and a replay buffer of (s, a, r, s′, done) transitions.
  3. Implement a CNN that maps an 84 × 84 × 4 state to one Q-value per legal action.
  4. Choose actions with an ε-greedy policy.
  5. Sample random minibatches from replay memory and compute the terminal-aware TD target.
  6. Minimize the squared TD error with a gradient optimizer.
  7. Track episode returns, evaluation scores and predicted Q-values separately.

For a modern reproduction, use the later 2015 DQN formulation with a separately frozen target network if the goal is to reproduce the canonical Nature algorithm rather than this exact 2013 workshop version.

07

Experiments

Figure 3

The learned value function tracks useful game states

The left plot shows the predicted value for a sequence of 30 Seaquest frames; the screenshots marked A, B, and C show the corresponding visual states. A value function is not a pixel reconstruction: it estimates the expected future reward from a state under the learned policy. The changing score across frames illustrates how the network assigns different strategic value to visually similar moments as the game unfolds.

Figure 3 from Mnih et al. (2013), supplied by the user. Paper: arXiv:1312.5602.

08

Results

Seven games, one shared learning recipe

The 2013 paper evaluated Beam Rider, Breakout, Enduro, Pong, Q*bert, Seaquest and Space Invaders. DQN outperformed the other learning methods in the reported average-score comparison on all seven games and exceeded expert-human scores on Breakout, Enduro and Pong. It reached close to human performance on Beam Rider.

The abstract summarizes the headline comparison as outperforming all previous approaches on six of the seven games and surpassing a human expert on three. The paper also reports that the method did not require game-specific architecture or hyperparameter changes.

How to evaluate a DQN agent

The paper reports average episode scores under an ε-greedy evaluation policy with ε=0.05, alongside random, Sarsa, contingency-feature and human baselines. It also tracks the mean maximum predicted Q-value on a fixed held-out set of states because episode reward is noisy: small policy changes can alter the state distribution substantially.

A sound reproduction should report per-game scores over multiple evaluation episodes, use a clearly specified exploration rate, compare against meaningful baselines, and distinguish training reward from evaluation reward. Predicted Q-values are useful diagnostics, but they are not a substitute for actual return measurements.

Figure 4

DQN's scores across Atari games

The table compares average total reward for Random, SARSA, Contingency, DQN, and Human players, plus HNeat and the best single episode for HNeat and DQN. DQN is not uniformly human-level in every column, but it substantially outperforms the earlier learning baselines across the displayed games—for example, 4,092 on Beam Rider, 168 on Breakout, 1,952 on Q*bert, and 1,705 on Seaquest. The distinction between average reward and best episode matters: the upper DQN row measures a repeatable epsilon-greedy policy, while DQN Best shows its strongest recorded episode.

Table 1 from Mnih et al. (2013), supplied by the user. Paper: arXiv:1312.5602.

09

Limitations

What the original DQN did not solve

The method had no general convergence guarantee with nonlinear function approximation, and the paper itself noted the risk of instability in combining off-policy Q-learning with neural networks. Replay memory reduced correlation and smoothed the behavior distribution, but uniform sampling could waste capacity on uninformative transitions and overwrite older experience.

The agent also remained far from human performance on games requiring strategies over long time horizons, including Q*bert, Seaquest and Space Invaders. Reward clipping simplified optimization but removed distinctions between reward magnitudes. Results were specific to the Atari benchmark and its emulator interface.

10

Conclusion

What the paper contributed

The paper demonstrated end-to-end learning of action values from high-dimensional visual observations using a deep convolutional network. It paired Q-learning with replay memory and stochastic minibatch optimization, showing that a neural network could learn useful control policies from reward feedback rather than labeled action targets.

Its broader contribution was a reusable experimental recipe: raw pixels, a shared CNN, off-policy value learning, replayed transitions and ε-greedy exploration. This helped establish deep Q-learning as a foundational baseline for subsequent deep RL research.

Key takeaways

  • Q-learning can be combined with a CNN to estimate action values directly from pixels.
  • Experience replay reuses transitions and reduces harmful temporal correlation.
  • Four stacked frames provide short-term motion context.
  • ε-greedy exploration balances trying new actions with exploiting learned values.
  • Reward clipping and frame skipping made one training recipe practical across several Atari games.
  • Do not conflate the 2013 workshop paper with the expanded 2015 Nature DQN paper, which introduced the now-standard frozen target-network treatment.

Frequently asked questions

Is DQN model-based or model-free? Model-free. It learns from observed transitions without building an explicit model of the Atari emulator.

Is it on-policy? No. Q-learning is off-policy: the behavior policy explores, while the update targets greedy action values.

Why use experience replay? Consecutive observations are correlated. Random replay minibatches reduce this correlation and allow old transitions to be reused.

Does the 2013 paper use the target network from the 2015 DQN? Not in the same explicit, periodically copied form. The 2013 paper describes using a previous parameter iterate for the target; the separate frozen target network is a key part of the expanded 2015 formulation.

What did it beat? Its abstract reports better results than previous approaches on six of seven Atari games and expert-human performance on three.

Browse all research