Regact
Reasoning · Game · Act
A framework for running coding agents on games they have never seen.
Regact is the research framework behind ModAct. A code-writing agent is given an unknown game, a workspace and a controlled way to interact with the game. The agent, the game and the experiment protocol are separate, interchangeable parts, so the same setup compares agents, models and protocols.
Agents
who writes the code
The agent is the program that writes the code. Regact drives three coding agents: Codex and Claude Code, the two command-line agents, and Alan Code, my open-source agent, which can also run open-weight models served locally through an OpenAI-compatible endpoint.
The choice of agent is independent of the experiment: the protocol supplies the instructions and the commands, so any agent can run any protocol, with any model it supports.
Sandbox and controllers
learning the game by playing it
A coding agent runs arbitrary code, so nothing would stop it from reading the game’s source and hard-coding an answer. Regact runs it inside an OS sandbox (bubblewrap on Linux, seatbelt on macOS): the agent sees its workspace and the runtime it needs, not the game files, and its network is limited to the connections it is allowed, such as its own model’s API. A run fails rather than proceed unconfined, and the confinement rules can be checked on any machine with one command.
The agent never touches the game directly. It writes controllers: Python code that the framework runs in a separate, more restricted process, from a frozen snapshot, without access to the agent’s workspace, the recorded data or the network. The framework plays the controller’s actions in the real environment and records every transition; the agent reads that experience back through a read-only data API.
Problems
the games
ARC-AGI-3The ARC-AGI-3 games: colour-grid games whose rules the agent has to discover by playing.watch this run PuzzleScriptGames from the puzzlescript.net gallery, run on the original engine. Each game is its own short set of rewrite rules. Baba Is YouThe campaign levels of Baba Is You, where the rules are word blocks on the board and pushing them changes the rules.watch this run MiniGridSmall symbolic grid worlds, including BabyAI levels with missions given in language.watch this run SokobanBox-pushing puzzles from DeepMind’s Boxoban levels, where a box pushed into a corner is lost for good.
Protocols
how the agent learns
- plain acting
- The
vanillaprotocol. The agent reads its recorded experience, writes a controller and runs it in the real game, as often as its budget allows. - ModAct
- The
cwmprotocol. The agent must first write a world model that reproduces all its recorded experience, and every action of its controllers is checked against the model’s prediction. How ModAct works.
Both protocols share the same environment management, data, controller execution and limits, so a comparison measures the effect of requiring a validated world model, and nothing else in the harness.
Recorded runs
everything can be replayed
Every run is recorded: the agent’s conversation and tool calls, the framework’s feedback, every observation the game produced and, under ModAct, each version of the world model with its validations and counterexamples.
The viewer replays it all. Follow the conversation, load the real trajectory of a controller next to its result, step through the frames, and compare the runs of a benchmark side by side. The benchmarks I have run are listed there.