Asynchronous Methods for Deep Reinforcement Learning (A3C)

A3C banner Kaggle

Summary

Deep reinforcement learning (RL) used to depend on an experience replay memory: the agent stores its past steps and trains on random old samples, so that updates are not all about the same moment of play. Replay works, but it uses more memory and computation, and it only suits off-policy methods that can learn from data made by an older policy (Section 1).

This paper drops replay. Instead, many actor-learners run at the same time as CPU threads on one machine. Each has its own copy of the environment, and each updates one shared network whenever it is ready (asynchronously). Because the threads are in different situations at the same moment, their updates are less correlated, which does the job replay used to do (Section 4).

The best of the four methods it tries is A3C (asynchronous advantage actor-critic). On 57 Atari games it beat the previous best mean score while training for half the time, on 16 CPU cores and no GPU (Section 5.1, Table 1).

What Problem Does It Solve

Imagine learning to cook by making the same dish again and again, starting from where you stopped. Your lessons come in long runs about the same thing, and you keep making the same mistakes in a row.

DQN fixed this by keeping a big diary of past attempts and studying random old pages. A3C uses a group instead: 16 cooks work in 16 kitchens at once, each on a different step, and they all send their lessons to one shared recipe book. The book gets a varied mix of lessons at every moment, so no diary is needed, and because there is no diary, methods that must learn from fresh experience (like actor-critic) also work.

Core Idea

  • Parallel actor-learners on one machine: several CPU threads, each with its own environment, update shared parameters without locks (Hogwild!-style), which avoids the cost of sending gradients between machines (Section 4).
  • Diversity instead of replay: threads exploring different parts of the environment make the combined updates less correlated in time, so no replay memory is used (Section 4).
  • Four algorithms in this framework: one-step Q-learning, one-step Sarsa, n-step Q-learning and advantage actor-critic (Section 4).
  • A3C: keeps a policy π(a∣s) and a value estimate V(s), updates both after every t_max actions or at the end of an episode, and uses the advantage Σ γ^i r_(t+i) + γ^k V(s_(t+k)) − V(s_t), with k up to t_max (Section 4).
  • Entropy bonus: adding the policy’s entropy to the objective improved exploration by discouraging early convergence to poor deterministic policies (Section 4).

Key Method Details

  • Network: for Atari, two convolutional layers (16 filters 8×8 stride 4, then 32 filters 4×4 stride 2) and a 256-unit layer, with a softmax policy output and a linear value output sharing all other layers (Supplementary Section 8).
  • Settings: 16 actor-learner threads, t_max = 5, discount γ = 0.99, entropy weight β = 0.01, and RMSProp whose statistics are shared across threads (Supplementary Section 8). On a subset of Atari games, shared RMSProp was considerably more robust than the other two optimisers tried (Section 4).
  • Learning rate: sampled from LogUniform(10^-4, 10^-2) and annealed to 0 during training (Supplementary Section 8). A3C reached good scores over a wide range of learning rates (Section 5.6, Figure 2).
  • Atari results (Table 1, mean / median human-normalised score): A3C feed-forward after 1 day on CPU 344.1% / 68.2%; after 4 days 496.8% / 116.6%; A3C LSTM after 4 days 623.0% / 112.6%. DQN after 8 days on a GPU: 121.9% / 47.5%.
  • Scaling: with 16 threads, A3C trained 12.5× faster than with 1 thread, averaged over seven Atari games (Table 2).
  • Other tasks: in TORCS car racing, A3C reached roughly 75% to 90% of a human tester’s score in about 12 hours (Section 5.2). On MuJoCo continuous-control tasks it found good solutions in less than 24 hours of training (Section 5.3), and in random 3D Labyrinth mazes it learned a reasonable exploration strategy from pixels alone (Section 5.4).

Simplifications in This Notebook

  • No asynchrony: one process steps 8 CartPole-v1 environments in turn and makes one synchronous update from all of them. There are no threads, so the notebook cannot show A3C’s parallel speed-up.
  • Small task: CartPole-v1 (4 numbers in, 2 actions) with a 2-layer MLP of 128 units (17,539 parameters), instead of Atari frames and a CNN.
  • Optimiser: Adam with learning rate 3e-3 decayed linearly, instead of shared RMSProp. Value-loss weight 0.5 and gradient clipping at 0.5 are not from the paper.
  • Short training: 500 updates of 5 steps × 8 environments (448 episodes).

What the Notebook Result Shows

  • Training: the mean reward of the last 20 episodes rose from 17.6 at update 30 to 98.6 at update 480 and ended at 80.2. The best episode reached 282. CartPole-v1’s maximum is 500, so the agent improved but did not solve the task.
  • Evaluation (10 episodes each): greedy actions gave a mean reward of 185.6 ± 17.5; sampled actions gave 92.1 ± 45.3 (range 18 to 180).
  • Entropy did not fall: mean policy entropy was 0.4899 over the first 50 updates and 0.6211 over the last 50, close to the maximum ln(2) = 0.693. The policy stayed quite random.
  • Value loss is noisy: for example 147.9 at update 210; its mean over the last 50 updates (83.07) is higher than over the first 50 (22.60).

Influence

OpenAlex lists about 11,500 citations (11,508 when checked on 3 December 2026). In 2017 OpenAI released A2C, which it describes as a synchronous, deterministic variant of A3C that gave equal performance in its tests (OpenAI Baselines: ACKTR & A2C); this notebook’s one-process setup is close to that synchronous form. Stable Baselines3 ships A2C under the same description (SB3 A2C docs), and OpenAI’s Spinning Up lists A3C among its key papers in deep RL (Spinning Up: Key Papers).


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 Single-process PyTorch version of the A3C loss (n-step returns, advantage actor-critic, entropy bonus) on CartPole-v1
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

Table of contents