Skip to content
AI.info

Papers

Coding4Games: Can Modern Coding Agents Play Modern Video Games?

Many game-agent benchmarks ask a language model to repeatedly choose actions while a game is running. This paper asks a different question: can a coding agent explore a game, write and test a program…

The paper’s first page · arXiv:2611.31974
arXiv
2611.31974 · Preprint · not peer-reviewed
Published
2026-11-24
Authors
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

In plain words

Many game-agent benchmarks ask a language model to repeatedly choose actions while a game is running. This paper asks a different question: can a coding agent explore a game, write and test a program for it, and then have that program play independently using ordinary visual observations and game controls?

Key results

  • Standalone programs can be competitive. The best program for each game outscored the strongest GUI baseline on 13 games and tied it on one.
  • Human performance remained strong. The human player outscored all agents on 10 games.

AI summary

Overview

  • Research area: Coding agents, game-playing agents, and interactive AI benchmarks.
  • Technical level: Beginner-Friendly.
  • Scope: The paper introduces a benchmark for testing whether coding agents can use visual interaction with modern video games to build standalone programs that play without further language-model inference.

What This Paper Is About

Many game-agent benchmarks ask a language model to repeatedly choose actions while a game is running. This paper asks a different question: can a coding agent explore a game, write and test a program for it, and then have that program play independently using ordinary visual observations and game controls? The authors introduce Coding4Games to evaluate both how well those programs play and how effectively agents learn from testing during development.

Key Contributions

  1. A benchmark of modern games: Coding4Games covers 15 games across combat and action timing, strategy and resource planning, sports and precision control, movement and timing, and multi-step task execution.
  2. A development-and-test protocol: Agents develop programs in a sandbox using a standard game interface. The chosen program is then frozen and tested in a fresh environment without language-model inference.
  3. Measures of development as well as performance: The benchmark evaluates game scores and reliability, along with how programs use game information, how substantially agents revise them, and whether revisions address identified problems.
  4. An evaluation of coding agents and baselines: The authors assess 12 coding-agent models and compare their programs with GUI agents and a human player.

Main Findings

  • Standalone programs can be competitive: The best program for each game outscored the strongest GUI baseline on 13 games and tied it on one.
  • Human performance remained strong: The human player outscored all agents on 10 games. The best program for a game beat the human on three games and tied on two.
  • Results depend on the model and game: Performance varied substantially across games, and no model led consistently across every game or category.
  • More elaborate code did not guarantee better play: In Forza Horizon 5, Qwen3.8-flash’s PID controller received a lower mean score than Claude-Sonnet-5’s simpler local route follower. The authors point to unresolved calibration issues as a possible factor, while cautioning that their contribution to the score gap cannot be isolated.
  • Testing did not reliably lead to repairs: Agents often tested modifications in relevant situations, but success at resolving the targeted problems was lower. The paper reports NER values from 80.0% to 100% and RS values from 35.7% to 83.3%.
  • Programs and GUI agents had mixed results: GPT-5.6-Sol’s programs beat its GUI baseline on eight games and lost on seven. Claude-Sonnet-5’s programs beat its GUI baseline on seven, lost on six, and tied on two.
  • Development budgets had game-dependent effects: The authors explored how token and game-tic budgets affected performance, but the reported content does not provide a general result that more budget consistently improves performance.

Methodology in Plain English

For each task, a game server starts the game, provides screenshots, accepts standard gameplay inputs, tracks game time, and calculates a score. During development, a coding agent works in a persistent sandbox: it can interact with the game, write and run programs, review results, and revise its work, but it cannot access the game’s implementation files or the host-side scorer.

The agent selects a program, which is then frozen and run in a fresh test environment. It plays without language-model calls or public network access. The researchers run three test episodes per method and game, averaging valid scores. They also examine development records to assess how much programs rely on game state, how deeply agents change their code, whether a change is tested in a relevant situation, and whether the targeted problem is resolved.

Why This Matters

The benchmark tests a capability beyond answering coding questions: turning observations and feedback from a changing environment into software that continues to act on its own. Its separation between development and testing also makes it possible to examine whether an agent’s apparent understanding survives outside the interactions it used to build its program.

Potential applications include:

  • Automated game testing: Programs could repeatedly exercise game scenarios without requiring a language model to decide every action.
  • Game playtesting and debugging: Development traces and targeted tests could help identify where a program’s assumptions or control logic fail.
  • Interactive software automation: The approach may inform agents that operate visual interfaces through ordinary inputs, where actions must be encoded into reusable programs.
  • Simulation and training environments: The benchmark’s focus on visual feedback, control, and planning may help researchers evaluate agents in other interactive settings.

Industry relevance: Game studios and developers of interactive agents could use this kind of evaluation to distinguish systems that can demonstrate a good action once from systems that can produce repeatable, testable behavior. The paper’s results also highlight a practical challenge: generating code is not enough if the agent cannot reliably use test feedback to improve it.

Future Directions

  • Improve how agents turn observed failures into revisions that resolve problems and work across more gameplay conditions.
  • Study how programs’ use of game state, memory, planning, and recovery relates to their performance and reliability.
  • Investigate how development budgets affect outcomes across more games and coding agents.
  • Extend the benchmark or evaluation approach to other visual, interactive environments, while preserving independent testing of the resulting programs.

Target Audience

This paper is most useful for researchers working on coding agents, game-playing AI, computer-use agents, and interactive benchmarks. It may also interest game developers and AI practitioners who want to evaluate whether an agent can create reusable, autonomous behavior rather than relying on continuous model-guided actions.

Authors’ abstract

Games, especially modern AAA games, challenge language models to perceive complex scenes, control actions, and make decisions over long horizons. Existing game benchmarks primarily test language models as computer-use agents that query a language model throughout play, incurring repeated inference cost and, in real-time games, acting while the environment continues to evolve. We ask whether coding agents can learn from game interaction to develop standalone game-playing…

The full abstract on arXiv
Read the original paper

Related papers