Introduction
In reinforcement learning (RL), the complexity of a trained agent is typically bounded by the complexity of its environment. To train a highly capable agent, researchers usually have to design intricate environments or "dense" reward functions—giving small rewards for every sub-action. This process, known as reward engineering, is tedious, prone to human bias, and often results in agents that "cheat" the reward system rather than learning the intended behavior.
Can we generate complex behavior from simple environments? This paper proposes that multi-agent competition is the key. In a competitive setting, the "complexity" of the environment is driven by the other agents. As an opponent improves, the environment effectively becomes more challenging, forcing the agent to develop more sophisticated strategies to win. This dynamic creates a "natural curriculum" where the environment's difficulty scales automatically with an agent's skill, leading to sophisticated motor skills without the need for complex reward engineering.
Methods for Competitive Self-Play
The researchers utilized a distributed version of Proximal Policy Optimization (PPO), a popular policy gradient algorithm, to train agents in 3D physics-based simulations. To stabilize training and ensure continuous improvement, they introduced three critical components:
- Exploration Curriculum: Training from "sparse" rewards (e.g., +1 for a win, 0 for a loss) is notoriously difficult because agents rarely win by accident at the start. The authors used a "dense" reward (like a reward for moving forward) at the beginning of training and gradually annealed it to zero, eventually leaving only the sparse competition reward.
- Opponent Sampling: Training only against the most recent version of an opponent can lead to instability or "cycling" through strategies. Instead, agents were trained against a random selection of their own past versions, ensuring robustness against a variety of skill levels.
- Policy Ensembles: To prevent an agent from overfitting to the specific quirks of a single opponent, they trained a pool of multiple policies simultaneously. During training, an agent would face a randomly selected opponent from this ensemble.
Environments and Tasks
The study used the MuJoCo physics engine to create four 1-vs-1 competitive environments featuring two agent body types: a four-legged "Ant" and a "Humanoid."
- Run to Goal: Two agents race to reach a goal on the opposite side.
- You Shall Not Pass: A "blocker" tries to prevent a "runner" from reaching a goal.
- Sumo: Agents try to knock each other down or push each other out of a circular ring.
- Kick and Defend: A penalty shootout where one agent kicks a ball and the other defends the goal.
Emergent Complexity and Results
Competition acts as a self-adjusting difficulty slider. No matter how weak or strong an agent is, an opponent of comparable strength provides the optimal "zone of proximal development" for learning.
Even though the rules of the environments were simple (e.g., "stay in the circle"), the resulting behaviors were highly complex. Agents learned to use their limbs to trip opponents, duck under blocks, and even perform "feints"—moving one way to trick a goalie before kicking the other way. In the "Kick and Defend" task, the kicker learned to move side-to-side to fool the defender's positioning.
Furthermore, agents trained in competitive environments developed much more stable and robust physical gaits than those trained in isolation. Because they had to withstand being pushed and tackled, they became naturally resilient to external perturbations. In a zero-shot "wind" test, a Humanoid trained in the Sumo environment was able to stay upright under heavy wind forces significantly longer (372 steps) than a Humanoid trained only to walk in a single-agent setting (179 steps), despite never seeing wind during training.
Limitations and Future Work
While the results are impressive, the approach has limitations. The agents still required an initial "kickstart" phase of hand-crafted dense rewards to learn basic locomotion (walking/standing) before the sparse competition reward could take over. Additionally, training these agents required massive computational scale, collecting hundreds of millions of samples and training for thousands of iterations on multiple GPUs.
Future directions suggest moving beyond 1-vs-1 to multi-agent "mixed" environments that blend cooperation and competition, and incorporating techniques that allow agents to explicitly reason about their opponents' intentions.
Summary updated