Back to AI Research

AI Research

Twin: Playing an Unknown Game with a Test-Time Digi... | AI Research

Key Takeaways

  • Twin: Playing an Unknown Game with a Test-Time Digital Twin introduces a system that enables AI agents to learn and solve unfamiliar, rule-hidden games by bu...
  • 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.
Paper AbstractExpand

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.

Twin: Playing an Unknown Game with a Test-Time Digital Twin introduces a system that enables AI agents to learn and solve unfamiliar, rule-hidden games by building an executable "digital twin" of the environment in real-time. By writing and refining a Python-based world model at test time, the system allows an agent to plan and test actions within a simulation before executing them in the actual game.

Building a World Model at Test Time

Traditional AI agents often struggle with tasks where the rules and goals are not explicitly stated. Twin addresses this by using a frontier coding agent to write a program that simulates the game's dynamics. This program acts as a "twin" of the environment. The system operates on a strict contract: the agent cannot submit a move to the real game until its twin successfully reproduces every transition observed in the game's history. If the twin makes a prediction that does not match the actual game result, that mismatch serves as a counterexample, which the agent uses to repair its code.

The Validate-Explore-Plan Loop

The system functions through three primary routines:

  • Validate: Ensures the twin is consistent with all past interactions. If the twin fails to replay the log, the agent is blocked from taking further scored actions.

  • Explore: When the agent is stuck, this routine identifies whether the issue is a failure to understand the game's mechanics (dynamics wall) or a failure to identify the winning condition (goal wall). It ranks repair targets or proposes potential goal states.

  • Plan: Once a twin is validated, the agent uses it to search for the shortest path to a goal. This search happens entirely within the simulated environment, ensuring that the agent only executes moves that have been pre-tested.

Performance and Goal Inference

The authors evaluated Twin on the ARC-AGI-3 benchmark, which requires agents to solve grid-world games with unknown rules and goals. Twin cleared 179 out of 183 levels (97.8%) and outperformed humans in action efficiency on 158 of those levels. A key finding is that while building a functional world model is relatively straightforward, inferring the correct goal is the more difficult challenge. Twin manages this by proposing goal hypotheses and testing them through search; on 156 of the 179 levels it cleared, the system correctly identified the goal before receiving any explicit reward.

Franklin Analysis

The evidence suggests that shifting the burden of intelligence from the base model to an executable, self-repairing world model significantly improves performance. While a base model alone scored 7.8% on the benchmark, the addition of the Twin system increased the score to 93.3%. The system’s reliance on an "asymmetric objective"—where consistency with past data is a hard requirement for action, but goal discovery is treated as a hypothesis-testing problem—appears to be the primary driver of its efficiency. A notable limitation is that the system assumes the game's dynamics are program-compressible and roughly deterministic, which may restrict its application to environments that do not fit these criteria.

Comments (0)

No comments yet

Be the first to share your thoughts!