OpenAI Competitive Self-Play Research

OpenAI has demonstrated that competitive self-play enables simulated AI agents to discover complex physical skills—such as tackling, ducking, faking, kicking, catching, and diving—without these behaviors being explicitly programmed into the environment. This approach ensures the training environment remains at an optimal difficulty level for the AI to improve, suggesting that self-play will be a foundational component of future powerful AI systems.

Emergent Behaviors via Simple Goals

Competitive pressure combined with simple reward structures allows agents to bootstrap their own performance. In experiments involving simulated 3D robots playing basic games, OpenAI used Proximal Policy Optimization (PPO) to train neural network policies independently for each agent.

Training Methodology

Agents are trained using a two-stage reward system:

  1. Dense Rewards: Initially, agents receive rewards for basic exploration behaviors, such as standing and moving forward.
  2. Competition Rewards: These dense rewards are gradually annealed to zero, shifting the agent's focus toward the primary goal of winning or losing (e.g., pushing an opponent out of a sumo ring or kicking a ball into a net).

Case Study: Sumo Wrestling

In the sumo wrestling task, OpenAI utilized a dense exploration reward based on previous work for training humanoids to walk, removing the velocity term and adding a negative L2 distance from the center of the ring. Once the agents had explored the ring, this reward was annealed to zero, forcing the agents to optimize for the competition reward: pushing the opponent out of the ring.

Transfer Learning and Generalization

Agents trained through competitive self-play exhibit transfer learning, meaning they can apply skills learned in one environment to a new, unseen setting.

In one specific test, an agent trained for sumo wrestling was placed in an environment where it was perturbed by "wind" forces. Despite never having encountered wind during training, the sumo agent managed to stay upright. In contrast, agents trained to walk using classical reinforcement learning fell over immediately when exposed to the same forces.

Mitigating Overfitting in Self-Play

OpenAI identified a risk of overfitting, where agents co-learn policies specifically tailored to counter a single opponent rather than developing general strategies. To prevent agents from learning narrow, opponent-specific counters, OpenAI implemented the following strategies:

  • Diverse Opponent Ensembles: Agents were pitted against multiple different opponents simultaneously.
  • Policy History: Agents faced policies from earlier stages of the training process.

By training against a diverse ensemble of policies, agents were forced to develop general strategies that remained effective against a variety of opponents.

Availability

OpenAI has released the MuJoCo environments and the trained policies used in this research to the public via GitHub to facilitate further experimentation with self-play systems.

Sources