Data-Efficient Exploration with Self Play for Atari

Michael Laskin, Catherine Cang, Ryan Rudes, Pieter AbbeelURL @ ICML 2021

TL;DR

This paper introduces SelfPlayer, a novel single-agent self-play algorithm that enables efficient exploration in reinforcement learning without relying on hand-crafted rewards. By having two agent copies (Alice and Bob) learn from each other's experiences and maximize a symmetric KL divergence between their state visitation distributions, SelfPlayer effectively creates a curriculum of increasingly challenging goals, outperforming existing state-of-the-art exploration methods on the Atari benchmark.

What Problem Does This Paper Address?

Reinforcement learning (RL) agents typically learn by maximizing extrinsic rewards provided by human designers. However, this approach is not scalable, as crafting specific reward functions for every desired skill is laborious and often leads to agents that are narrowly specialized. This paper tackles the challenge of data-efficient exploration in RL, aiming to develop agents that can learn diverse skills autonomously, even in environments with sparse or no extrinsic rewards. Existing methods for reward-free exploration often struggle with sample efficiency, meaning they require a vast amount of experience to discover useful behaviors. Self-play has shown promise, but its successful applications have largely been confined to multi-agent games. This work seeks to adapt the power of self-play to the single-agent exploration problem, making it more efficient and scalable.

Methods

The core innovation of SelfPlayer lies in its single-agent self-play mechanism. Instead of a single agent exploring, SelfPlayer instantiates two identical goal-conditioned agents, Alice and Bob. These agents interact with the environment and store their experiences (observations, actions, next observations) in separate replay buffers. The key idea is to use these past experiences to generate challenging goals.

SelfPlayer's objective is to maximize a symmetric KL divergence between the state visitation distributions of Alice and Bob. This means Alice is rewarded for reaching states that Bob has rarely visited, and Bob is rewarded for reaching states that Alice has rarely visited. This adversarial dynamic implicitly creates a curriculum: as Alice gets better at reaching certain states, Bob is incentivized to explore states Alice hasn't, and vice versa. This process avoids the need for explicit reward engineering and instead leverages the agents' own histories to drive exploration.

Crucially, SelfPlayer avoids the computationally expensive Monte-Carlo rollouts often used in prior self-play methods for goal generation. Instead, it approximates the goal-setting objective by fitting categorical visitation probability distributions to the agents' replay buffers. Goals are then sampled from these distributions, making the process much more data-efficient. For visual environments like Atari, SelfPlayer uses a VQ-VAE2 encoder to generate discrete latent representations of observations, which serve as the goals.

Datasets

The primary dataset used for evaluation is the Atari100k benchmark. This benchmark is designed for data-efficient RL, evaluating agents after 100,000 agent steps (or 400,000 frames due to action repetition). The authors also mention using a simple gridworld environment called PointMaze for motivational experiments.

Key Insights and Ideas

  • Self-play for single-agent exploration: The paper demonstrates that the self-play paradigm, traditionally used in multi-agent settings, can be effectively adapted for efficient single-agent exploration by creating an internal adversarial dynamic between two copies of the same agent.
  • KL divergence as a curriculum generator: Maximizing the symmetric KL divergence between agent visitation distributions naturally induces a curriculum of increasingly difficult goals, pushing agents to explore novel parts of the state space.
  • Data efficiency through memory-based goal sampling: By leveraging past experiences stored in replay buffers and fitting visitation distributions, SelfPlayer avoids costly rollouts, leading to significantly improved sample efficiency compared to prior methods.
  • Exploration as a proxy for performance: The paper suggests that in many games, higher scores are a direct result of more efficient exploration. By discovering more unique states (cells), agents are better positioned to achieve higher extrinsic rewards.

Key Results

  • SelfPlayer outperforms leading unsupervised exploration algorithms like GoExplore and Curiosity on the Atari100k benchmark, achieving state-of-the-art results.
  • It achieves the best score in 26 games out of the benchmark's 48, compared to 7 for the next best unsupervised baseline.
  • SelfPlayer exhibits a 1.34x higher mean and 2.5x higher median Human Normalized Score (HNS) than the next leading unsupervised method.
  • The algorithm achieves superhuman performance on some Atari games (e.g., Breakout, James Bond, Wizard of Wor).
  • Remarkably, SelfPlayer is competitive with supervised RL algorithms like PPO and Rainbow DQN, and even competitive with the data-efficient supervised model-based RL algorithm SimPLe.
  • Experiments on the PointMaze environment show SelfPlayer achieving significantly higher maze coverage than GoExplore and a random policy.

Limitations and Future Work

  • Reliance on discrete representations: The current implementation of SelfPlayer relies on discrete representations of states for goal sampling. While the paper shows that using a general VQ-VAE2 encoder (VQ-SelfPlayer) is competitive, training these encoders can be challenging. Future work could explore continuous representation learning.
  • Simulated environments: The authors acknowledge that their approach, like most exploration methods, is most useful in simulated environments. Deploying SelfPlayer onto real-world robots could lead to unintended consequences due to the lack of explicit safety guarantees.
  • Future directions: The paper suggests investigating continuous representation learning and exploring alternative methods for optimizing the self-play objective.

Summary updated

BibTeX
@inproceedings{laskin2021data,
  author = {Michael Laskin and Catherine Cang and Ryan Rudes and Pieter Abbeel},
  title = {{Data-Efficient Exploration with Self Play for Atari}},
  booktitle = {URL @ ICML},
  year = {2021},
  url = {https://openreview.net/forum?id=t7tlvee-LYi},
}
Figure