TL;DR
This paper demonstrates that AI game generation cannot be solved by code synthesis alone; it requires an active player to detect interaction-level failures. The authors introduce PlaytestArena, a benchmark of 200 game tasks evaluated by GUI agents, and Play2Code, a multi-agent framework where a coding agent and a playtesting GUI agent co-evolve games through a continuous dialogue.
What Problem Does This Paper Address?
While large language models (LLMs) have become remarkably proficient at generating code, evaluating interactive software like video games remains a major challenge. Traditional code generation benchmarks rely on static analysis, syntax checking, or unit tests. However, a game can compile perfectly and still be completely unplayable—perhaps a character's jump arc is too low to clear an obstacle, a button fails to respond to clicks, or a win condition never triggers.
Because these interaction-level bugs only surface during live gameplay, the game industry has historically relied on human playtesters. Current AI pipelines treat game generation as a "one-shot" prompt-to-code translation or rely purely on compilation-level feedback, leaving them blind to the actual user experience. This paper addresses the open question: How can we automatically evaluate and iteratively refine interactive game generation?
Methods
The authors propose Play2Code, a framework that treats game generation as a continual evolution driven by a closed-loop dialogue between two specialized agents:
- Game Agent: Translates the initial prompt into a runnable HTML/CSS/JS game artifact, generates assets, and patches code based on feedback.
- GUI Agent: Acts as the playtester. Operating entirely on the presentational surface (screenshots), it reads a generated game guide and interacts with the game using simulated keyboard and mouse inputs—without any access to the underlying source code.
To ensure experience accumulates across rounds and tasks, Play2Code utilizes a three-layer Memory System:
- Episode Memory: Stores short-term round histories, play summaries, and fix lists shared between the two agents.
- Skill Memory: Retains cross-task, agent-isolated operational know-how (e.g., specific coding patterns or gameplay strategies).
- World Memory: A shared repository of general game rules, archetypes, and universal design principles.
During each round, the GUI Agent plays the current build and compiles a "Play Summary" along with an "Actionable Fix List." The Game Agent reviews these logs to implement targeted code revisions for the next build.
Datasets
The authors introduced PlaytestArena, a new evaluation benchmark consisting of 200 browser-based game generation tasks spanning eight genres (including puzzle, strategy, card, platformer, and action games).
Each game task is paired with a human-expert-authored rubric containing testable, expected in-play behaviors (1,548 total criteria across dimensions like mechanics, controls, progression, interface, and visual feedback). To validate the reliability of using a GUI agent as the judge, the authors compared its verdicts against blind human annotators across 32 games. The GUI judge matched human decisions on 84.2% of items, achieving a Cohen's $\kappa$ of 0.64, which falls squarely within the typical human-to-human agreement band (0.66).
Key Insights and Ideas
- The Presentational Surface is Essential: Evaluating interactive software requires an agent that perceives and acts exactly like a human user. Code-level critics systematically miss rendering glitches and timing-sensitive control errors.
- Traceable Feedback: Unlike human playtesters, who provide subjective summaries from memory, GUI agents log every single keypress, screen state, and error diagnosis. This perfect traceability makes it significantly easier for the coding agent to locate and fix bugs.
- LLM Agents Exhibit "Taste": When analyzing feedback categories, the authors discovered that different LLM backbones prioritize different aspects of a game. GPT-5.4 focused heavily on functionality bugs and control responsiveness, while Kimi K2.5 spent nearly half its attention on visual and aesthetic dimensions, mirroring the idiosyncratic nature of human testers.
Key Results
- Substantial Performance Gains: Across three frontier backbones (GPT-5.4, Claude Sonnet 4.6, and Kimi K2.5), Play2Code achieved an average rubric pass-rate of 66.8% (with GPT-5.4 leading at 72.3%).
- Baseline Comparison: Play2Code outperformed Direct LLM (one-shot generation) by 37.1 percentage points and OpenGame (an agentic coding pipeline that checks compilation but doesn't play the game) by 14.6 percentage points.
- Monotonic Improvement: Game quality scores consistently improved from Round 1 through successive iterations, proving that the GUI agent's playtesting reports provide an effective optimization signal for code refinement.
Limitations and Future Work
- HTML-Only Scope: The current implementation is restricted to 2D, browser-based games. Extending the framework to complex 3D environments or native engines (like Unity or Unreal) remains an open challenge.
- The Complexity Bottleneck: While the loop works exceptionally well for low-to-moderate complexity games, high-complexity games with intricate conditional logic or multi-phase state transitions plateau early because the GUI agent struggles to reliably trigger advanced gameplay mechanics.
- Memory Architecture: The memory schema is currently global; developing genre-aware or game-specific memory structures could yield more precise refinement capabilities.
Summary updated