Territory Paint Wars: Diagnosing and Mitigating Failure Modes in Competitive Multi-Agent PPO
Organizations: Independent Researcher
Abstract
We present Territory Paint Wars, a minimal competitive multi-agent reinforcement learning environment implemented in Unity, and use it to systematically investigate failure modes of Proximal Policy Optimisation (PPO) under self-play. A first agent trained for episodes achieves only win rate against a uniformly-random opponent in a symmetric zero-sum game. Through controlled ablations we identify five implementation-level failure modes -- reward-scale imbalance, missing terminal signal, ineffective long-horizon credit assignment, unnormalised observations, and incorrect win detection -- each of which contributes critically to this failure in this setting. After correcting these issues, we uncover a distinct emergent pathology: competitive overfitting, where co-adapting agents maintain stable self-play performance while generalisation win rate collapses from to . Critically, this failure is undetectable via standard self-play metrics: both agents co-adapt equally, so the self-play win rate remains near throughout the collapse. We propose a minimal intervention -- opponent mixing, where of training episodes substitute a fixed uniformly-random policy for the co-adaptive opponent -- which mitigates competitive overfitting and restores generalisation to (, seeds) without population-based training or additional infrastructure. We open-source Territory Paint Wars to provide a reproducible benchmark for studying competitive MARL failure modes.
Figures & tables
| Failure | v1 Bug | v2 Fix |
|---|---|---|
| No terminal reward | Win/loss gives zero reward; agent has no signal about the game outcome | terminal bonus on final step |
| Reward-scale explosion | per step (cumulative); episode returns reach 10,000 | per step; returns stay in |
| Monte Carlo returns | MC over steps; step-1 advantages discounted by | GAE ( ); effective horizon steps |
| Unnormalised observations | Raw positions mixed with steps remaining in the same input layer | All inputs scaled to |
| Wrong win detection | Winner determined by comparing cumulative episode rewards (corrupted by reward-scale bug) | Winner determined by counting tiles from the board observation |
| Hyperparameter | Value |
|---|---|
| Discount | 0.99 |
| GAE | 0.95 |
| PPO clip | 0.2 |
| Value loss coefficient | 0.5 |
| Entropy coefficient | 0.01 |
| PPO update epochs per episode | 4 |
| Seed | Cumul. WR (self-play) | vs. Random WR |
|---|---|---|
| 42 | 64.0% | 93.9% |
| 43 | 55.4% | 56.8% |
| 44 | 49.9% | 84.8% |
| 45 | 67.1% | 90.8% |
| 46 | 56.1% | 55.7% |
| 47 | 55.5% | 75.8% |
| Variant | vs. Random WR | from v3 |
|---|---|---|
| v3 full (all fixes, 10-seed mean) | 77.1% | — |
| terminal reward | pp † | |
| GAE (plain MC returns) | pp | |
| obs. normalisation | pp | |
| opponent mixing (= v2, ep 12k) | 21.6% | pp |
| v1 baseline (all bugs) | 26.8% | pp |
Multi-Agent Reinforcement Learning
Multi-agent reinforcement learning studies how interacting agents learn coordinated or competitive policies through shared experience and rewards.
See all 373 papers