Procgen Benchmark
# Procgen Benchmark: Measuring Generalization in Reinforcement Learning OpenAI's Procgen Benchmark is a suite of 16 procedurally generated environments built to measure how quickly reinforcement learning agents learn skills that generalize to unseen levels. The authors argue that classic benchmarks like the Arcade Learning Environment reward memorizing specific trajectories rather than robust learning, and that a diverse collection of environments is needed to evaluate generalization directly. Their experiments show that agents overfit heavily to small training sets in nearly every environment, and that many need around 10,000 levels or more to close the generalization gap. ## Limits of Existing Benchmarks - Agents in several environments have been shown to overfit even to very large training sets. - The Arcade Learning Environment has long been a gold standard, but its low emphasis on generalization makes it hard to tell whether agents learn a relevant skill or memorize trajectories. - CoinRun was designed to separate training and test levels through procedural generation, but it is a single environment and cannot represent the full range of RL challenges. - Environments like Dota and StarCraft are complex but are slow to iterate on, and using several of them at once is difficult. ## Design Goals of Procgen The benchmark is built around experimental convenience, high diversity within each environment, and high diversity across environments. Each environment follows four design principles: - **High diversity:** Level generation logic has maximal freedom within basic design constraints, so the resulting level distributions pose meaningful generalization challenges. - **Fast evaluation:** Difficulty is calibrated so baseline agents make significant progress after 200M timesteps, and the environments run at thousands of steps per second on a single CPU core. - **Tunable difficulty:** Each environment offers easy and hard settings. Results are reported on hard, while easy requires roughly one-eighth of the training resources. - **Visual recognition and motor control:** Games mimic the style of Atari and Gym Retro titles, so strong performance depends on identifying key visual assets and producing appropriate low-level motor responses. Using the benchmark is simple for both humans and AI agents. Installation is done with `pip install procgen`, and environments such as `procgen:procgen-coinrun-v0` can be created through Gym. ## Generalization Experiments - The team trained agents with Proximal Policy Optimization for 200M timesteps on training sets ranging from 100 to 100,000 levels, then measured performance on unseen test levels. - Agents strongly overfit to small training sets in almost all environments, and some needed up to 10,000 levels to close the generalization gap. - Past a certain threshold, training performance improved as the training set grew. The authors attribute this to an implicit curriculum created by diverse levels, which helps agents learn to generalize even across levels they have already seen. This contrasts with supervised learning, where training performance usually falls as datasets grow. ## Deterministic Level Ablation - When test-time level sequences were randomized instead of fixed, agents appeared to make progress over the first several levels in most games. - Test performance showed that agents had learned almost nothing about the underlying level distribution. - The authors conclude that training on a fixed sequence of levels hides a serious flaw, and that diverse level distributions are essential for training and evaluating RL agents. ## Looking Ahead The authors expect insights from the benchmark to carry over to more complex settings and plan to use these environments to build more capable and efficient agents. For anyone evaluating RL methods, the practical takeaway is to test on held-out levels drawn from a diverse distribution, not on a fixed sequence of training levels.