Continuous Control with Deep Reinforcement Learning (DDPG)
- Paper: Continuous control with deep reinforcement learning
- Authors: Timothy P. Lillicrap, Jonathan J. Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, Daan Wierstra
- Lab, year: Google DeepMind, 2015 (ICLR 2016)
- Video: YouTube Short coming on 9 Dec 2026 on Backprop Daily
Summary
Deep Q-Networks (DQN) learned to play Atari games, but they pick the best action by checking every action’s value. That does not work when an action is a set of real numbers, like the torques on a robot’s joints: finding the best action at every step would be too slow (Section 3).
DDPG (Deep Deterministic Policy Gradient) solves this with two networks. An actor maps a state straight to an action, and a critic learns how good each state-action pair is. The actor is trained to pick actions the critic rates higher. To keep training stable with neural networks, DDPG borrows two ideas from DQN, a replay buffer and target networks, and adds batch normalization (Section 3).
With the same algorithm, network shapes and settings, DDPG solved more than 20 simulated physics tasks, including cart-pole swing-up, manipulation, legged locomotion and car driving, and for many of them it learned directly from pixels (Abstract).
What Problem Does It Solve
Think of steering a car. You don’t choose from “left”, “straight” and “right”; you turn the wheel by any amount. A method that must score every possible amount before each move would be far too slow.
DDPG gives the car a driver (the actor) who simply turns the wheel by some amount, and a coach (the critic) who says how good that turn was. The driver adjusts in whichever direction the coach says would score better. Nobody has to list every possible turn.
Core Idea
- Deterministic policy gradient: the actor μ(s) outputs one action. Its gradient is the critic’s gradient with respect to the action, ∇ₐQ(s, a), passed back through the actor by the chain rule (Section 3, Eq. 6, building on Silver et al., 2014).
- Replay buffer: transitions (s, a, r, s′) are stored and minibatches are sampled uniformly, which breaks the correlation between consecutive steps. Since DDPG is off-policy, the buffer can be large (Section 3).
- Soft target networks: slowly moving copies of the actor and critic compute the critic’s targets, updated by θ′ ← τθ + (1 − τ)θ′ with τ ≪ 1. Both target networks were needed to train the critic without divergence (Section 3).
- Exploration: noise from an Ornstein-Uhlenbeck process is added to the actor’s action; this noise is correlated in time, which suits physical systems with momentum (Section 3).
Key Method Details
- Settings (Supplementary Section 7): Adam with learning rates 10⁻⁴ (actor) and 10⁻³ (critic), L2 weight decay 10⁻² on the critic, γ = 0.99, τ = 0.001, minibatch 64, replay buffer 10⁶, OU noise with θ = 0.15 and σ = 0.2.
- Networks: two hidden layers of 400 and 300 ReLU units; the action enters the critic at the second hidden layer; the actor’s output is a tanh. Final-layer weights start in [−3 × 10⁻³, 3 × 10⁻³] so the first outputs are near zero (Supplementary Section 7).
- Batch normalization: on the state input and all actor layers, and on the critic layers before the action input, so one set of settings works across tasks with different units (Section 3).
- Ablations: both the target network and batch normalization were needed to do well on all tasks; learning without a target network was very poor in many environments (Section 4).
- Q accuracy: on simple tasks such as pendulum and cart-pole, the critic’s Q estimates were quite accurate; on harder tasks less so, but still good enough to learn competent policies (Section 4, Figure 3).
- Sample efficiency: nearly all problems were solved within 2.5 million steps, a factor of 20 fewer than DQN needs for good Atari solutions (Section 6).
Simplifications in This Notebook
- Task: Gymnasium’s Pendulum-v1 (swing up and hold a pendulum with one torque in [−2, 2], 200 steps per episode) for 120 episodes, one seed.
- Networks: actor and critic MLPs with two hidden layers of 256; the action joins the state at the critic’s input; no batch normalization; default PyTorch initialization.
- Settings: τ = 0.005, replay buffer 100,000, no critic weight decay. Learning rates, γ, minibatch 64 and the OU parameters follow the paper; the noise is scaled down linearly from 0.3 to 0.05.
- Terminal flag: only real terminal states (
terminated) stop bootstrapping; a 200-step time-limit cut does not.
What the Notebook Result Shows
- The earlier saved run failed: it stored
terminated or truncatedas the terminal flag, so every time-limit cut told the critic the future reward was 0, and it did not learn. The fixed version learned. - Training: the 10-episode average reward rose from -1454.51 (episodes 1 to 10) to -141.51 (episodes 111 to 120); the best 10-episode average was -139.58 (episodes 94 to 103).
- Evaluation without noise: -176.60 ± 95.86 over 10 fixed start states, against -1344.44 ± 301.62 for a random policy on the same starts.
- Losses: the mean critic loss rose from 0.6108 (first 1,000 steps) to 4.0951 (last 1,000) and the mean actor loss (−Q) from 20.28 to 85.28 as the values being learned changed.
Influence
OpenAI Spinning Up and Stable Baselines3 both include DDPG among their algorithms (Spinning Up, Stable Baselines3). OpenAlex lists about 18,600 citations (18,561 when checked on 3 December 2026).
Resources
| File | Description |
|---|---|
| README.md | This overview — a 5-minute read covering the paper’s summary, core idea, key method details, influence, and a plain-English explanation of the problem it solves |
| solution.ipynb | From-scratch PyTorch DDPG (actor, critic, target networks, replay buffer, OU noise) on Pendulum-v1, with a random-policy baseline |
| CODE_ARCHITECTURE.md | Section-by-section breakdown of the notebook — what each cell does, data flow, tensor shapes, and key design decisions |
| TALK.md | Press coverage, Q&A (answers from the paper), citations, and common misconceptions about the paper |