DeepMind Acme: Distributed Reinforcement Learning Framework

Jul 10, 2025

Introduction

Developing deep reinforcement learning (RL) agents often requires a frustrating trade-off between rapid prototyping and the ability to scale to massive compute clusters. Many researchers find themselves writing simple scripts for small-scale tests, only to realize that moving to a distributed architecture requires a complete rewrite of their codebase. DeepMind Acme, a Python-based research framework, solves this by providing a modular architecture that allows agents to scale from a single thread to hundreds of actors without changing the core logic. With its focus on readability and reproducibility, Acme has become a staple for researchers who need to turn complex RL papers into verifiable code.

What Is DeepMind Acme?

DeepMind Acme is a library of reinforcement learning building blocks designed to expose simple, efficient, and readable agents. It is a Python-based framework that provides both the infrastructure for distributed RL and a set of reference implementations for state-of-the-art algorithms. Maintained by Google DeepMind and released under the Apache License 2.0, Acme allows developers to build agents using modular components that can be executed at various scales.

The framework is designed to bridge the gap between small-scale experiments and large-scale distributed training. By separating the “acting” (interacting with the environment) from the “learning” (updating the policy), Acme enables a seamless transition from a single-process setup to a distributed system using tools like Launchpad and Reverb.

Why DeepMind Acme Matters

In the early days of deep RL, reproducing results from research papers was notoriously difficult because the implementation details were often buried in monolithic, non-modular code. Acme addresses this by prioritizing the readability of RL agents, ensuring that the transition from a mathematical paper to a Python implementation is transparent. This makes it an invaluable tool for students and research practitioners who want to baseline their new ideas against proven algorithms.

Furthermore, the scalability of Acme is a primary differentiator. Most RL libraries are either designed for ease of use on a single machine or are built for massive scale but are incredibly complex to configure. Acme provides a middle ground: you can debug your agent in a simple loop on your laptop and then deploy it to a Google Cloud Platform (GCP) cluster using Vertex AI without rewriting your agent’s logic. This capability significantly accelerates the RL research cycle by reducing the time spent on infrastructure engineering.

Key Features

  • Modular Agent Design: Acme splits agents into actors and learners. This separation allows the acting portion to be reused across different agents and enables the learning process to be parallelized across multiple machines.
  • Multi-Scale Execution: Agents can be run as single-stream processes or as fully distributed systems. This means a researcher can prototype an agent on a local machine and scale it up to a cluster without changing the agent’s code.
  • Reference Implementations: The library includes high-quality implementations of several key RL algorithms, including DQN, R2D2, MPO (Maximum a posteriori Policy Optimization), and D4PG. These serve as strong baselines for performance.
  • Integration with Reverb: Acme is designed to work seamlessly with Reverb, a specialized data storage system for experience replay. Reverb allows for efficient data handling in both on-policy and off-policy algorithms.
  • Framework Agnostic-ish: While heavily tied to TensorFlow and JAX, Acme provides a structure that allows researchers to implement agents using these powerful numerical libraries while keeping the RL logic separate from the deep learning framework’s boilerplate.
  • Environment Wrappers: Acme provides wrappers for the DeepMind Environment API and OpenAI Gym, allowing it to interact with a wide variety of simulated environments.

How DeepMind Acme Compares

When choosing an RL framework, the decision usually comes down to a trade-off between the number of available algorithms and the architectural cleanliness of the system. Acme is often compared to Ray RLlib and Stable Baselines3.

Feature DeepMind Acme Ray RLlib Stable Baselines3
Primary Goal Research & Reproducibility Industrial Scale & Production Ease of Use & Prototyping
Architecture Modular (Actor/Learner) Integrated Ray Cluster Monolithic/Simple
Scalability High (via Launchpad/Reverb) Very High (Native Ray) Low (Single Machine)
DL Framework TF / JAX PyTorch / TF PyTorch
Learning Curve Moderate Steep Low

Acme’s primary differentiator is its architectural purity. While RLlib is incredibly powerful for production-grade distributed RL, it can be a “black box” that is difficult to customize or debug. Acme, by contrast, is designed for researchers who want to see exactly how the data flows from the environment to the replay buffer and into the learner. It is the tool of choice for those who prioritize the transition from paper to code.

Stable Baselines3 is excellent for beginners who want to run a standard algorithm on a standard environment without diving into the internals. However, for anyone needing to scale beyond a single machine or implement a novel, distributed algorithm, SB3 is not a viable option. Acme fills this gap by providing a framework that is both readable and scalable.

Getting Started: Installation

Acme can be installed in several ways depending on your needs. It is strongly recommended to use a Python virtual environment to avoid dependency conflicts.

Using pip

The simplest way to install Acme is via pip. You can choose the installation options based on the the deep learning framework you intend to use (JAX or TensorFlow).

pip install dm-acme[reverb,tf]

Or for JAX users:

pip install dm-acme[reverb,jax]

Installing from Source

If you are contributing to the project or need the latest development version, you can install from the GitHub repository.

git clone https://github.com/deepmind/acme.git
cd acme
pip install -e .

Prerequisites

Acme requires Python 3.8 or higher. It also relies on Reverb for experience replay, which may require specific OS requirements depending on your platform.

How to Use DeepMind Acme

The core workflow in Acme involves connecting an actor to an environment using an environment loop. The actor is responsible for selecting actions and observing the results, while the learner updates the policy based on the data collected.

To get started, you can use one of the pre-built agents. The process generally follows these steps: instantiate the agent, create the environment, and run the loop. In a single-process setup, the actor and learner are combined into a single agent instance that interacts with the environment in a simple while loop.

For distributed setups, you use the run_experiment or make_distributed_experiment scripts, which handle the orchestration of multiple actors and a single learner across a cluster using Launchpad.

Code Examples

The following example demonstrates the basic structure of an Acme environment loop for a single-process agent.

import acme
from acme import agents
from acme.wrappers import GymWrapper
import gym

# 1. Setup the environment
env = acme.wrappers.GymWrapper(gym.make("CartPole-v1"))

# 2. Initialize a pre-built agent (e.g., DQN)
# Note: In a real scenario, you would use an AgentBuilder
agent = agents.DQN(...
)

# 3. The Environment Loop
while True:
    step = env.reset()
    actor = agent.actor()
    
    while not step.last():
        action = actor.select_action(step.observation)
        step = env.step(action)
        actor.observe(action, next_step=step)
        actor.update()
    
    # Learner update happens internally or via a separate process
    agent.learn()

This code snippet shows the fundamental interaction pattern: the actor selects an action based on the current observation, the environment provides the next observation and reward, and the actor records this experience for the learner to update the policy.

Real-World Use Cases

DeepMind Acme shines in scenarios where the transition from research to scale is critical. Here are a few concrete examples:

  • Academic RL Research: A PhD student implementing a new variant of MPO. They can develop and debug the loss function in a simple Python script on their local machine, then scale the training to 100 actors on a GCP cluster to get the final results for their paper.
  • Developing Complex Control Systems: An engineer building a robotic arm controller. They can use Acme’s reference implementations of D4PG or SAC to establish a baseline of performance, then customize the actor-learner architecture to handle the high-dimensional continuous action space of the robot.
  • Benchmarking New Environments: A data scientist testing a new simulated environment. By using Acme’s modular agents, they can quickly swap between DQN and R2D2 to see which algorithm performs better in their specific domain without rewriting the environment interface.

Contributing to DeepMind Acme

Acme is an open-source project maintained by Google DeepMind. Contributions are welcome and encouraged. To contribute, you can report bugs via GitHub issues or submit a pull request with a new feature or a new agent implementation.

Contributors are required to sign the Google Contributor License Agreement (CLA) before their contributions can be merged. The project follows standard GitHub flow for submissions, and it is recommended to check the CONTRIBUTING.md file in the repository for specific coding standards and guidelines.

Community and Support

The primary hub for the Acme community is the GitHub repository, where discussions and issues are handled. Detailed documentation is available on the official Acme documentation site, which is hosted on Read the Docs.

Because Acme is a research-oriented framework, the community is primarily composed of RL researchers and practitioners. Support is typically found through GitHub Discussions or by engaging with the rest of the RL community on Twitter/X and specialized AI research forums.

Conclusion

DeepMind Acme provides a critical bridge between the conceptual beauty of RL research and the engineering reality of distributed training. By prioritizing modularity and readability, it allows researchers to avoid the “infrastructure trap” where they spend more time managing clusters than designing algorithms. For those who need a framework that can scale from a laptop to a cluster without sacrificing transparency, Acme is the right choice.

If you are a researcher or developer who wants to turn a paper into a verifiable, scalable agent, we recommend starting with the quickstart notebook and the reference implementations. Star the repo, try the quickstart, and join the community of RL practitioners.

What is DeepMind Acme and what problem does it solve?

DeepMind Acme is a research framework for reinforcement learning that solves the problem of scaling RL agents from single-threaded prototypes to distributed systems. It allows researchers to write agent logic once and run it at multiple scales of execution without rewriting the code.

How do I install DeepMind Acme?

The easiest way to install Acme is via pip using the command pip install dm-acme[reverb,tf] for TensorFlow users or pip install dm-acme[reverb,jax] for JAX users. You can also install from source via the GitHub repository.

How does DeepMind Acme compare to Ray RLlib?

While both support distributed RL, Acme focuses more on research, reproducibility, and architectural purity, making it more readable for researchers. RLlib is designed for industrial-scale production and offers a wider array of algorithms, but can be more complex to configure and a la more “black box” approach.

Can I use DeepMind Acme for continuous control tasks?

Yes, Acme includes several reference implementations specifically for continuous control, such as MPO, D4PG, and SAC. It is designed to handle high-dimensional continuous action spaces efficiently.

What is the relationship between Acme and Reverb?

Reverb is a specialized data storage system for experience replay that Acme uses as its primary mechanism for handling data. Acme and Reverb were designed together to ensure efficient data handling in both on-policy and off-policy RL algorithms.

Is DeepMind Acme open source?

Yes, DeepMind Acme is licensed under the Apache License 2.0, allowing for both personal and commercial use.

Does DeepMind Acme support PyTorch?

No, DeepMind Acme is primarily built for TensorFlow and JAX. It is not designed for PyTorch users, which is a significant limitation for some researchers.