Coding4Games: coding agents' frozen programs beat GUI agents on 13 of 15 modern games

Coding4Games: Can Modern Coding Agents Play Modern Video Games?

Shifang Zhao, Haoyu Wang, Yuyang Yin, Dong Chen, Xingyilang Yin, Yunkang Tao, Honghao Chen, Guangzhi Wang, Yiran Wang, Junfu Pu, Cheng Cheng, Xiaodong Cun, Ying Shan

cs.AI

2026-11-24

12 coding agents write standalone programs that play 15 modern games with zero inference at test time; the best program per game beats the top GUI baseline on 13 of 15, while humans still lead on 10.

What problem this solves

The dominant way to measure LM game playing is the GUI agent: screenshot, call the model, emit one keyboard or mouse action, repeat. That design has two structural problems. Inference cost scales with play time, so a long session is a long stream of paid calls. And real-time games do not wait while the model thinks, which is why several benchmarks quietly pause the game during inference. The other line of work, code-competition arenas like CodeClash and ProxyWar, has coding agents write bots, but hands them game-specific APIs with structured state and actions, so perception and low-level control are skipped entirely.

Coding4Games merges the two lines: the agent sees only pixels, sends only standard keyboard and mouse input, and must deliver a program that plays without any model calls.

Method

The protocol separates development from testing.

The 15 games span five demand categories: combat and action timing (Black Myth: Wukong, Sekiro, KOF98), strategy and resource planning (Balatro, Slay the Spire, Kingdom Rush 5), 3D precision control (Forza Horizon 5, NBA 2K25, Riders Republic), movement and timing (TrackMania, Brotato), and multi-step execution (Overcooked! 2, Palworld, and others).

Beyond scores, three process measures: FGL grades how deeply a program grounds decisions in game information, from G0 fixed scripts to G4 memory, planning, and failure recovery; IMS measures how deep the changes between self-tested versions go; NER and RS measure whether modifications actually get tested against the problems they target, and whether those problems get fixed. These process measures are the most original part of the benchmark.

Results

Twelve coding agents, eight closed and four open, with scores normalized 0-100 per game:

ReferenceAvg over 15 games
Human player97.2
Top coding program52.6
Claude Opus 5.544.0
Qwen3.8-27B (best open)37.7
GUI agent baseline26.6

Taking the best program per game, frozen programs beat the strongest GUI baseline on 13 of 15 and tie on one. GPT-6-Astra takes the top coding score on five games, but no model leads across the board. The human outscores every agent on 10 games; programs beat the human reference on Balatro, Forza Horizon 5, Slay the Spire, Riders Republic, and Aimlab.

The paired same-model comparison is more telling. GPT-5.6-Sol's programs beat its own GUI agent on 8 of 15 games and lose on 7; Claude-Sonnet-5 wins 7, loses 6, ties 2. Both models' programs win on Balatro, Kingdom Rush 5 (+72.6 for Sol), and KOF98, and lose on Forza Horizon 5, Slay the Spire, Brotato, and Palworld.

The process metrics locate the real weakness. NER runs 80% to 100% across models, while RS spreads from 35.7% to 83.3%: modifications almost always get self-tested, but the problems they target often survive. GPT-5.6-Sol posts NER of 100% with RS of 41.7%. Complexity does not pay for itself either. On Forza Horizon 5, Qwen3.8-Flash's PID controller averages 443.7 against 645.7 for Claude-Sonnet-5's simpler local route follower, with logs full of road departures and false recovery triggers. A typical failure on Riders Republic: the program detects crashes via a red-screen threshold but runs tricks on a fixed counter, so it notices failures without adapting the actions that cause them.

Why it matters

The benchmark reframes computer use from online control to delivered artifacts: a program that runs standalone, can be inspected, replayed, and systematically tested, and costs zero inference at run time. The protocol itself is a template, with host-metered budgets, sandboxed development, an isolated test stage, and an auditable trajectory. It transfers to any setting where an agent ships code that later runs unsupervised, such as RPA or ops automation.

The results stay honest about scope: frozen programs are not a general replacement for GUI agents, and the conclusion says so directly. But on strategy and turn-based tasks they already match or beat online control at zero deployment cost. Code as a reusable representation of interactive behavior is a direction worth following.

Limitations

The human reference is a single player briefed on rules and controls but not proficient, so the 97.2 line is soft. Three test episodes per task gives a coarse variance estimate. Scores are normalized within the entrant pool, so the same program's number moves when the pool changes; cross-paper comparison is not valid. Best program per game stitches together twelve agents' peaks; no single model reaches that level. Budget experiments (game tics 5k to 15k, tokens 5M to 25M) show both matter with game-dependent returns, and no saturation point is given. All 15 games are commercial titles, so reproducing the suite means licensing every game. The LLM usage statement also discloses that most of the code implementation was done by OpenAI Codex.

Terms

Source

Related papers

All paper explainers