△EvalGaming & SimulationFree
procgen — Procedural Game Environments for RL
OpenAI's MIT-licensed suite of 16 procedurally-generated 2D game environments for measuring generalization in reinforcement learning agents.
procgen — Procedural Game Environments for RL
procgen is OpenAI's suite of 16 fast procedurally-generated 2D game environments designed to benchmark generalization in reinforcement learning. Each environment — CoinRun, StarPilot, CaveFlyer, Dodgeball, Fruitbot, Chaser, Miner, Jumper, Leaper, Maze, BigFish, Heist, Climber, Plunder, Ninja, and BossFight — generates a virtually unlimited number of unique levels, making it impossible for agents to memorize solutions and forcing them to generalize.
Key Features
- 16 visually rich 2D game environments, each with unlimited procedural level generation
- Extremely fast C++ core: 5,000+ steps/second per environment
- Gymnasium-compatible API
- Configurable difficulty, number of training levels, and distribution shift between train/test
- Standard benchmark for measuring sample efficiency and generalization in RL research
Quick Start
pip install procgen
import gymnasium as gym
# Train on a fixed set of 200 levels, test on all levels
env = gym.make("procgen:procgen-coinrun-v0",
num_levels=200,
start_level=0,
distribution_mode="easy")
obs, info = env.reset()
for _ in range(1000):
action = env.action_space.sample()
obs, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
obs, info = env.reset()
env.close()
npx ai-supply add procgen-procedural-game-environments
Curated mirror of the open-source procgen (MIT). Get it from the source.