
Self-play reinforcement learning has powered some of the most significant AI breakthroughs of the past decade, from mastering Go to training large language models that reason through complex problems. But the effectiveness of self-play hinges on one critical factor: the environment where agents compete, collaborate, and learn. Large-scale self-play deployments, and especially workloads that execute untrusted or agent-generated code, may require secure sandboxes that can scale to thousands of concurrent agents while maintaining isolation, consistent startup, and efficient use of CPU and memory. Smaller or classical self-play experiments do not inherently need that level of isolation or concurrency.
This guide examines seven platforms for self-play RL in 2026, spanning production-ready cloud sandbox infrastructure to specialized self-play RL environment, simulation, and API frameworks that can be run on or alongside sandbox infrastructure. Whether you're training game-playing agents, developing multi-agent social intelligence, or using self-play to improve LLM reasoning, these platforms offer distinct approaches to the challenge. The list starts with Modal, a scalable, high-performance sandbox platform for executing AI-generated code at production scale.
Modal is a scalable, high-performance sandbox platform for executing AI-generated code at production scale, and it supplies the infrastructure layer that self-play RL systems need to grow. While research frameworks provide environments and algorithms, Modal provides the compute fabric: high-concurrency Sandboxes with automatic CPU and memory bursting and consistent fast starts under load, plus GPU-enabled Sandboxes alongside CPU Sandboxes when environments need acceleration.
Self-play depends on running many environments in parallel, and Modal is built for that scale: it supports up to 1M concurrent Sandboxes, and each Sandbox can burst above its requested CPU and memory when an episode needs more. When agents need acceleration, Modal also offers GPU access inside isolated Sandboxes with full sandbox functionality. That capability matters for on-policy RL when environment instances need to run model inference alongside training. The platform supports GPUs ranging from T4 to B300, giving teams flexibility to match hardware to workload requirements, and the same Sandbox interface runs CPU-only environments for lighter self-play workloads.
Core capabilities for self-play RL:
Self-play training involves running many copies of an environment simultaneously, each hosting agents that learn by competing against themselves or previous versions. This requires infrastructure that can:
Modal's combination of high-concurrency Sandbox creation, automatic CPU and memory bursting, consistent starts under load, and GPU Sandboxes for accelerated environments addresses these requirements directly. Modal automatically handles the underlying scheduling and infrastructure, and Modal Functions autoscale their container pools up and down, including to zero. Sandboxes use a different abstraction: the application creates and manages Sandbox instances explicitly through the Sandbox API, which can be orchestrated at very high concurrency, including from Functions. In its January 2025 Sandbox GA announcement, Modal reported running SWE-bench Verified's 500 tasks in 7 minutes on its infrastructure.
Modal has completed a SOC 2 Type 2 audit and supports HIPAA-compliant workloads on Enterprise plans via a BAA. Self-play environments are isolated in VM or gVisor sandboxes, public APIs use TLS 1.3, and data is encrypted in transit and at rest. Modal supports region-pinning.
OpenSpiel, developed by Google DeepMind, provides a toolkit for game-theoretic RL research, used by researchers studying strategic decision-making in multi-agent settings.
OpenSpiel is a game-theory research library rather than an execution platform. Teams choose OpenSpiel when their self-play research centers on equilibrium computation and strategy across well-defined games, and they plan to run it on separate compute.
Unity ML-Agents brings RL into three-dimensional, physics-based environments. The project remains actively maintained: Release 23 / 4.0.0 was published on August 28, 2025, and the current development documentation remains active.
Unity ML-Agents is a simulation toolkit built on a game engine. Teams choose it when their self-play agents need physics-based 3D, VR, or AR environments authored in Unity.
SPIRAL is a research framework that uses self-play to improve language model capabilities. Released in June 2025, it demonstrates that playing text-based games against itself can enhance an LLM's general reasoning abilities.
SPIRAL is a research method and codebase for LLM self-play rather than an environment host. Teams choose SPIRAL when they want to test text-game self-play as an alternative to supervised fine-tuning or RLHF for improving model reasoning.
Melting Pot, another DeepMind project, focuses specifically on multi-agent social scenarios. A 2025 analysis of the Melting Pot contest describes over 50 substrates and more than 250 distinct test scenarios for evaluating social interaction and generalization in multi-agent systems.
Melting Pot is a multi-agent evaluation suite centered on social behavior. Teams choose it when they need to check whether self-play agents generalize to partners and situations they never saw in training.
TextArena provides an open-source collection of text-based competitive games designed for LLM evaluation and training. The 2025 TextArena paper describes 57+ unique environments spanning single-agent, two-player, and multi-player settings, and TextArena maintains a current environment catalog in which some entries are marked as previews.
TextArena is a library of competitive text-game environments with evaluation tooling attached. Teams choose it when they need a varied pool of text games to drive LLM self-play training or model-versus-model evaluation.
PettingZoo, maintained by the Farama Foundation (the organization behind Gymnasium), describes itself as an API standard for multi-agent reinforcement learning environments. Rather than offering a single type of environment, it provides a unified interface that works across many different multi-agent scenarios. It remains actively maintained, with release 1.27.0 published on August 13, 2026.
PettingZoo is an API standard and environment library for multi-agent RL. Teams choose PettingZoo when they want one interface across turn-based and simultaneous-action environments so self-play algorithms can be compared on equal terms.
Many self-play frameworks focus primarily on environments, algorithms, and training abstractions rather than providing a complete managed compute layer, although some include distributed-training or concurrent-environment integrations: SPIRAL documents Tinker distributed-training support, and Unity supports concurrent environment instances. Even so, teams frequently must provision servers, manage GPU allocation, handle container orchestration, and ensure security before training a single agent.
Modal provides the missing infrastructure layer with capabilities specifically suited to self-play workloads:
Massive Parallelism: Self-play training benefits from running many environment copies simultaneously. Modal has demonstrated creating 1M+ sandboxes in under a minute, exceeding 10,000 creations per second. Its Sandboxes support up to 1M concurrent instances, and Modal regularly runs tens of thousands of concurrent customer sandboxes.
CPU and Memory Bursting: Resource demand in self-play swings from match to match: a quick card game barely touches the CPU, while a physics-heavy episode or a turn that runs agent-written code can need several times more compute and memory. Fixed-reservation pricing pushes teams to size every environment for that worst case, so much of the reserved capacity goes unused. Each Modal Sandbox starts from the CPU and memory it requested and bursts above that level automatically when an episode calls for it, which lets teams provision for typical usage instead of peak usage. Billing is per second on the greater of requested and actual resources, and bursting also reduces the risk of out-of-memory failures that would cut an episode short.
Consistent Starts Under Load: Modal keeps sandbox starts sub-second and consistent as concurrency rises, with an optimized filesystem that helps containers come online quickly without letting large images slow startup down. That matters for episodic training where environments reset frequently, and it holds for large, custom images that package game engines, simulators, and their dependencies.
GPU-Enabled Sandboxes: When environments need acceleration, Modal supports GPU access inside isolated Sandboxes, with full sandbox functionality on GPU, alongside CPU Sandboxes for lighter environments. This matters for on-policy RL where each environment instance needs to run neural network inference.
Unified Platform: Beyond Sandboxes, Modal provides multi-node training spanning 1 to 64 GPUs with H100, H200, and B200 clusters on InfiniBand and private networking, inference endpoints for serving trained models, and batch processing for offline evaluation. Snorkel, for example, serves models on Modal and runs evals in Modal Sandboxes.
Security by Default: Running self-play means executing agent-generated actions, potentially including code. Modal offers gVisor sandboxes, which provide a kernel-level isolation boundary that intercepts syscalls and constrains the blast radius of malicious code, and VM Sandboxes that run on full virtual machines. Modal has completed a SOC 2 Type 2 audit, supports HIPAA-compliant workloads on Enterprise plans via a BAA, uses TLS 1.3 for public APIs, encrypts data in transit and at rest, and supports region-pinning.
Modal's customers page lists production workloads including reinforcement learning, coding agents, sandboxed code execution, and real-time robot control, with Cognition stating that Modal powers both its RL infrastructure and its production inference, involving millions of sandboxes. Agent workloads are a proven pattern here as well: Ramp built a full-context background coding agent on Modal, generating code changes that are written back into commits and pull requests, and Imbue orchestrates hundreds of isolated coding agents on Modal. By Modal's count, its platform had run 3 billion sandboxes as of October 2026. For self-play RL, this means you're building on infrastructure that's already proven at scale.
Whether you're using OpenSpiel for research, Unity ML-Agents for 3D training, or SPIRAL for LLM improvement, Modal provides production infrastructure suited to running these kinds of systems reliably and at scale, with high concurrency, automatic CPU and memory bursting, and consistent starts under load. Explore Modal's sandbox documentation to get started.
A sandbox environment provides an isolated, controlled space where RL agents can interact, compete, and learn without affecting external systems. For self-play specifically, sandboxes allow multiple copies of an agent to play against each other safely, generating training data from their interactions. Of the seven entries in this guide, only Modal is a secure execution sandbox in this infrastructure sense; the others are environment, simulation, toolkit, or API layers that can run inside such sandboxes.
Each platform approaches self-play differently. Modal provides infrastructure-level isolation through VM and gVisor sandboxes, where large numbers of sandboxed environments can run concurrently and burst above their requested CPU and memory, with GPU support available when needed. OpenSpiel and PettingZoo provide game logic and APIs for multi-agent interaction. Unity ML-Agents includes built-in self-play training modes with opponent snapshots. SPIRAL trains language models through self-play in text games drawn from TextArena, while TextArena supplies the environments and evaluation infrastructure.
Modal is best suited for resource-intensive simulations that need high parallelism, since it supports up to 1M concurrent Sandboxes and lets each one burst above its requested CPU and memory during heavy episodes. For neural network-based self-play, Modal's dedicated training and inference products handle policy updates and model serving, and GPU access inside isolated Sandboxes, with T4 through B300 support, covers environment-side models that need acceleration. For CPU-based game-theoretic research, OpenSpiel provides a C++ core as well as Python interfaces.
Modal is explicitly designed for production deployment. Modal has completed a SOC 2 Type 2 audit, supports HIPAA-compliant workloads on Enterprise plans via a BAA, and supports region-pinning. OpenSpiel, Unity ML-Agents, Melting Pot, TextArena, and PettingZoo are research-oriented environment, simulation, toolkit, or API layers, with Unity additionally targeting game-development workflows; you would typically train using these and then deploy trained models on production infrastructure like Modal.
PettingZoo is a Python library, so it requires Python proficiency. OpenSpiel supports both C++ and Python interfaces, and practical use of either generally benefits from familiarity with RL and game-theoretic concepts. Unity ML-Agents requires familiarity with the Unity game engine plus Python for training scripts. Running SPIRAL training at scale can require LLM-training and distributed-systems expertise, while TextArena itself can be used for game interaction and evaluation without distributed training. Modal defines and controls infrastructure in code, and it provides code-first SDKs in Python, TypeScript, and Go. The code running inside a Sandbox is not limited to a single language, so a Sandbox can run whatever runtime or language the workload requires, and the platform handles container orchestration, resource allocation, and scheduling.
SPIRAL demonstrates that competitive text games create an automatically evolving curriculum of progressively challenging problems. Unlike static datasets, self-play opponents improve alongside the model, helping maintain training pressure, though the authors note that fixed, human-designed game environments can still eventually saturate learning. The authors report gains of up to 10% across eight reasoning benchmarks on four models. Training on several games at once (TicTacToe, Kuhn Poker, and Simple Negotiation) gave the strongest results, suggesting that the competitive dynamics sharpen general reasoning capabilities beyond the specific game domains.
Modal bills on active resources. Each self-play environment requests a CPU and memory baseline, bursts above it automatically when a match turns compute-heavy, and is charged per second for whichever is greater, the requested or the actual resources. Teams can therefore size environments for an average match and still have headroom for long or complex ones, and automatic bursting lowers the chance that a game crashes with an out-of-memory error partway through. Most sandbox providers bill for a fixed reservation and cap usage at that size, so every environment has to be provisioned for the heaviest match, and teams pay for headroom that most episodes never touch.
$30 in free compute to get started.