Provable Self-Play Algorithms for Competitive Reinforcement Learning

Yu Bai, Chi Jin

Introduction

In recent years, self-play has powered breakthroughs in artificial intelligence, leading to superhuman performance in complex games like Go (AlphaGo) and Dota 2 (OpenAI Five). In these systems, agents reach extraordinary skill levels by repeatedly competing against versions of themselves. However, most reinforcement learning (RL) theory has historically focused on a single agent operating within a static environment.

In competitive multi-agent settings—specifically modeled as Markov Games—the "environment" includes other agents whose strategies change over time, creating a moving target. Prior to this work, it was unclear if self-play algorithms could provably manage the "exploration-exploitation tradeoff" (the need to try new strategies while also playing well) without relying on restrictive assumptions, such as having access to a perfect simulator or an expert opponent.

This paper provides the first theoretical guarantees for self-play in competitive reinforcement learning. The authors introduce algorithms that achieve near-optimal regret in two-player zero-sum Markov games, proving that agents can learn to play optimally against any opponent simply by playing against themselves.

Algorithmic Approaches

The authors propose two primary algorithms for episodic two-player zero-sum Markov games, focusing on the tabular setting where state and action spaces are discrete and finite:

  1. VI-ULCB (Value Iteration with Upper/Lower Confidence Bound): This algorithm extends the classic "Optimism in the Face of Uncertainty" principle to two players. It maintains two sets of Q-value estimates: an Upper bound ($Q^{up}$) for the maximizing player and a Lower bound ($Q^{low}$) for the minimizing player. In each step, the agents find a Nash Equilibrium for a "general-sum" game where the payoff matrices are defined by these optimistic and pessimistic bounds. This dual-bound approach ensures that both players are incentivized to explore effectively.

  2. VI-Explore: Designed as an "explore-then-exploit" alternative, VI-Explore first performs reward-free exploration to learn the transition dynamics of the Markov game. Once the model is sufficiently accurate, it computes a near-optimal policy. This version trades some statistical efficiency for computational efficiency, running in polynomial time even for general Markov games.

Key Insights

  • Optimism for Both Sides: The core innovation of VI-ULCB is maintaining simultaneous upper and lower confidence bounds. By solving for the Nash Equilibrium of the game formed by these bounds, the agents are naturally driven to visit states where their knowledge is weakest.
  • Self-Play vs. Adversaries: Remarkably, even though the agent only learns by playing against itself, its regret is measured against a fully adversarial opponent who can exploit the agent's strategy at any step. The paper proves that self-play alone is sufficient to defend against such an opponent.
  • Turn-Based Simplification: In turn-based games (like Chess or Go), the computational bottleneck of finding a Nash Equilibrium disappears. For these games, VI-ULCB runs in polynomial time because the equilibrium calculation simplifies to a basic maximum/minimum search.
  • Computational Hardness: For general "simultaneous-move" games, finding the exact Nash Equilibrium of the UCB bounds is PPAD-complete. This suggests that finding a perfectly computationally efficient algorithm with optimal $\tilde{O}(\sqrt{T})$ regret for the general case may be fundamentally difficult.

Theoretical Guarantees

Summary of regret, PAC bounds, and runtimes for the proposed algorithms.

The theoretical contributions of the paper establish strong bounds on both regret and sample complexity:

  • Regret Bound: VI-ULCB achieves a regret of $\tilde{O}(\sqrt{H^3 S^2 ABT})$, where $S$ is the number of states, $A$ and $B$ are the action counts for the two players, $H$ is the horizon, and $T$ is the total number of steps. This represents the first $\sqrt{T}$ regret result for this setting.
  • PAC Complexity: The algorithm translates to a PAC (Probably Approximately Correct) sample complexity of $\tilde{O}(H^4 S^2 AB / \epsilon^2)$, meaning it successfully finds an $\epsilon$-optimal policy after a polynomial number of episodes.
  • Polynomial Alternative: VI-Explore achieves a slightly worse $\tilde{O}(T^{2/3})$ regret (shown as $\tilde{O}((H^5 S^2 ABT^2)^{1/3})$ in the table) but guarantees a polynomial runtime for any Markov game, bypassing the PPAD-completeness of the general VI-ULCB approach.
  • Lower Bound: The authors provide a theoretical lower bound of $\Omega(\sqrt{H^2 S(A+B)T})$. This demonstrates that VI-ULCB is near-optimal, though a small gap remains regarding how the bounds scale with the state and action spaces.

Limitations and Future Directions

While this work lays a crucial theoretical foundation for self-play, several challenges remain. First, the results are currently limited to tabular RL. Extending these guarantees to environments requiring function approximation (e.g., using deep neural networks) is a significant open challenge.

Second, there is a clear tension between statistical efficiency (achieving $\sqrt{T}$ regret) and computational efficiency (polynomial runtime) in simultaneous-move games. Finally, future work is needed to close the theoretical gap between the $\sqrt{S^2 AB}$ upper bound achieved by VI-ULCB and the $\sqrt{S(A+B)}$ lower bound, determining the true optimal dependency on the size of the state and action spaces.

Summary updated

BibTeX
@inproceedings{bai2020provable,
  author = {Yu Bai and Chi Jin},
  title = {{Provable Self-Play Algorithms for Competitive Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=FD-XsNkrjZO},
}
Figure