arXiv(opens in a new tab)cs.AIAug 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2608.14490

Twin: Playing an Unknown Game with a Test-Time Digital Twin

Alexy Skoutnev, Kirill Acharya, Gaston Longhitano, Madeleine Udell, Kevin Ellis, Iddo Drori

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We present a Test-time World-model Inference (Twin) system, in which a frontier coding agent writes an executable world model for completing continual learning tasks, such as ARC-AGI-3 games. Traditional approaches hand-engineer such models, one custom design per task. Each game hides its rules and goal, and our system constructs them from simulation and interaction alone. Its inductive prior over grid games is strong enough to recover the true transitions of the game and the goal on nearly all levels. Replay validation happens in a twin world model. The harness enforces that an action is not made until the program reproduces every previous observed game transition. Each mismatch between a world model prediction and the actual action result becomes a counterexample that is used to repair the world model. Twin clears 179 out of 183 levels (97.8%), and does so more efficiently than humans in 158 out of 179 levels (88.3%). The system infers the goal before any reward on 156 of the levels it clears (87.2%), and in the remaining levels automatically discovers the goal by search. The benchmark scores completion and action efficiency, between 0 and 100, against humans playing each game for the first time. Played directly, the base model scores only 7.8%; an off-the-shelf harness increases it to 61.1%, whereas our twin world model increases the same base model to 93.3%, clearing 23 out of 25 games. Building a usable world model is simpler than anticipated, whereas the harder problem is inferring the right goal. The project website replays all 25 runs action by action: attr/Border[0 0 0] user/Subtype/Link/A<</S/URI/URI(https://arc-agi-3-twin.vercel.app/)>>TWIN website; code: attr/Border[0 0 0] user/Subtype/Link/A<</S/URI/URI(https://github.com/Alexyskoutnev/TWIN-ARC-AGI-3)>>GitHub repository.

1Stanford University

2Cornell University

3University of Southern California

4Yeshiva University

Introduction

Figure

Figure 1: The Twin loop, illustrated with states from the level ft09. Left of the scored boundary, every step is unscored. The agent appends each real transition to the log D\mathcal{D} and rewrites the twin until Validate replays every logged transition without a mismatch. Explore then ranks repair targets, or proposes reachable goal candidates when no route to the goal is found. Planning runs only inside a validated world model. Plan searches the world model for the shortest route, and ExecuteChecked submits that route one move at a time against the real ARC-AGI-3 simulator. A halted move returns its transition as a counterexample.

Consider learning an unfamiliar video game without instructions. You press a button and watch what changes. Within a handful of tries, you have a working mental model of the controls, the objects, and what counts as winning. That model lets you plan a few moves and act deliberately rather than mashing buttons. How might an agent acquire and use such a model as efficiently as you do?

We study this on ARC-AGI-3 (ARC Prize Foundation 2026), an interactive successor to the ARC reasoning benchmarks (Chollet 2019; Chollet et al. 2025). Each task is a grid-world game on a 64×6464\times 64 grid of colored cells whose controls and win condition are not stated and must be discovered by playing. Humans completely clear these games, whereas frontier models fail at most games. To close the gap, the field has moved from base models to agentic harnesses, and now to harnesses that build world models of their environment. ARC-AGI-3’s action-efficiency score, between 0 and 100, rewards clearing each game in as few actions as a human playing it for the first time. Reasoning, code, and simulation are not scored. Played directly, a strong frontier model scores only 7.8%, whereas the same model in an off-the-shelf coding harness increases the score to 61.1%. Introducing a world model into the harness, which builds and validates a model of the game, increases the score to 93.3%. The difficulty is neither knowledge nor perception: these games hide both how the world behaves and what counts as winning.

To act in an unfamiliar world, an agent should build an explicit model of it and reason inside it. Twin uses a coding agent to write the world model in code at test time. It treats each game as an unknown deterministic world and builds the twin, a Python program checked against reality, until its predictions match every observed transition. Recovering those rules is the tractable part. Searching inside the twin still needs a target, and the win condition is never stated, so the difficulty remains inferring the goal itself. Goal inference is the exploration problem of reinforcement learning (Dearden, Friedman, and Russell 1998): taking actions to discover a goal the environment never states explicitly. Each game therefore poses an asymmetric objective: the dynamics can be verified against every interaction, whereas goal reachability must be established through exploration.

Inferring the hidden goal state from sparse feedback is the more challenging problem. Twin treats the win condition as a hypothesis to test before any reward exists. Searching inside the validated twin surfaces states that look like progress. The agent writes rival goal predicates over promising planned states and chooses the most efficient plan. Completing a level confirms a candidate, while an exactly reached non-goal eliminates it. The concurrent systems we compare against either wait for the first reward or leave the question unanswered.

References (38)