Intrinsic Motivation and Automatic Curricula via Asymmetric Self-Play

Sainbayar Sukhbaatar, Zeming Lin, Ilya Kostrikov, Gabriel Synnaeve, Arthur Szlam, Rob Fergus

TL;DR

This paper introduces asymmetric self-play, a simple yet powerful unsupervised training scheme where an agent splits into two roles—Alice and Bob—to explore its environment. Alice sets challenges by performing actions, and Bob earns rewards by either undoing or repeating them, creating an automated curriculum that significantly accelerates learning on downstream tasks with sparse rewards.

What Problem Does This Paper Address?

Reinforcement learning (RL) is notoriously sample-inefficient. In many real-world scenarios, agents face "sparse rewards"—they might wander for thousands of steps before stumbling upon a success signal. Without a guide, the agent learns nothing during these failed attempts.

While "curriculum learning" (starting with easy tasks and gradually increasing difficulty) helps, designing these curricula manually is difficult and environment-specific. The authors tackle the challenge of intrinsic motivation: how can an agent learn useful behaviors and understand environment dynamics entirely on its own, without any external reward signal?

Methods

The core innovation is a game played between two "minds" of the same agent: Alice and Bob.

  1. The Setup: Alice starts in an initial state and performs a sequence of actions until she chooses a "STOP" action.
  2. The Challenge:
    • In reversible environments, Bob must return the environment to the initial state.
  3. In resettable environments, the environment is reset, and Bob must reach the final state Alice achieved.
  4. The Reward Loop: This is where the "asymmetry" creates a curriculum.
  5. Bob is rewarded for completing the task as quickly as possible.
  6. Alice is rewarded if Bob takes longer than she did to complete the task. However, Alice is also penalized for her own time spent setting the task.

This creates a competitive pressure: Alice wants to find tasks that are just barely too hard for Bob, while Bob strives to master them. As Bob improves, Alice must find increasingly complex trajectories to stay ahead, leading to an automated, self-regulating curriculum of exploration.

Figure 1: Illustration of the self-play concept in a gridworld setting. Training consists of two types of episode: self-play and target task. In the former, Alice and Bob take turns moving the agent within the environment. Alice sets tasks by altering the state via interaction with its objects (key, door, light) and then hands control over to Bob. He must return the environment to its original state to receive an internal reward. This task is just one of many devised by Alice, who automatically builds a curriculum of increasingly challenging tasks. In the target task, Bob’s policy is used to control the agent, with him receiving an external reward if he visits the flag. He is able to learn to do this quickly as he is already familiar with the environment from self-play.

Datasets

The authors evaluated their approach across five distinct environments, ranging from toy problems to complex simulations:

  • Long Hallway: A simple 1D chain of states to test basic exploration.
  • MazeBase: A 2D gridworld containing interactive objects like keys, doors, and light switches.
  • Mountain Car (RLLab): A classic continuous control problem requiring momentum to escape a valley.
  • SwimmerGather (RLLab): A MuJoCo-based task where a multi-jointed worm must navigate a fluid to collect items.
  • StarCraft (Training Marines): A high-dimensional micro-management task involving mining resources, building structures, and training units.

Key Insights and Ideas

  • Automatic Frontier Discovery: The reward structure naturally pushes the agents to the "frontier" of their knowledge. Alice won't set impossible tasks because her own time penalty discourages aimless wandering, and she won't set trivial tasks because Bob would solve them too quickly, leaving her with zero reward.
  • "Universal" Competence: In the tabular setting, the authors provide a theoretical argument that this equilibrium forces Bob to become a "fast policy"—essentially learning the shortest path between any two reachable states in the environment.
  • Emergent Complexity: In the MazeBase experiments, the agents started by just moving around. Over time, Alice "discovered" that toggling switches or moving keys made Bob's job much harder, effectively teaching Bob how to use tools without being told they were important.
Visualizing the curriculum: As training progresses, Alice interacts with more objects (a) and takes more time (d) to set tasks, indicating increasing difficulty.

Key Results

  • Faster Convergence: In the StarCraft environment, agents using asymmetric self-play learned to train marines significantly faster than those using standard policy gradients or even count-based exploration methods.
  • Robustness to Sparse Rewards: In the SwimmerGather and Mountain Car tasks, standard RL often failed completely. Asymmetric self-play performed comparably to state-of-the-art intrinsic motivation methods like VIME and SimHash, often reaching target rewards much earlier in training.
  • Superiority over Random Exploration: Using a "Random Alice" (where Alice takes random actions) was shown to be far less effective, proving that the competitive pressure is vital for building a useful curriculum.
Comparison of success rates: The blue line (Self-Play) consistently reaches high success rates faster than standard Reinforce (red) or Random Alice (magenta) baselines.

Limitations and Future Work

  • Environment Constraints: The method currently requires environments to be either (nearly) reversible or resettable. This makes it difficult to apply to "one-way" environments where an agent can permanently break something or get stuck.
  • Local Minima in Exploration: The authors noted that Alice can sometimes get stuck in a "preferred direction." For example, in the Swimmer task, Alice might only teach Bob how to swim right, neglecting other directions.
  • Meta-Exploration: While the curriculum is automatic, Alice herself still needs to explore the space of possible tasks. The authors suggest that using multiple "Alices" with diversity constraints could help ensure broader coverage of the environment's state space.

Summary updated

BibTeX
@inproceedings{sukhbaatar2018intrinsic,
  author = {Sainbayar Sukhbaatar and Zeming Lin and Ilya Kostrikov and Gabriel Synnaeve and Arthur Szlam and Rob Fergus},
  title = {{Intrinsic Motivation and Automatic Curricula via Asymmetric Self-Play}},
  booktitle = {International Conference on Learning Representations},
  year = {2018},
  url = {https://openreview.net/forum?id=SkT5Yg-RZ},
}
Figure