RPGBENCH: Evaluating Large Language Models as Role-Playing Game Engines

Pengfei Yu, Dongming Shen, Silin Meng, Jaewon Lee, Weisu Yin, Andrea Yaoyun Cui, Zhenlin Xu, Yi Zhu, Xingjian Shi, Mu Li, Alex Smola · DOI

Introduction

While Large Language Models (LLMs) have demonstrated remarkable proficiency in adopting specific personas, their potential to function as comprehensive role-playing game (RPG) engines remains largely unexplored. A robust text-based RPG engine must go beyond narrative generation; it must maintain a coherent world state, enforce complex game mechanics, and ensure logical playability. RPGBENCH introduces a framework to evaluate LLMs across these dimensions, shifting the focus from "role-level" acting to "game-level" system management.

The RPGBENCH Framework

The researchers propose a two-stage pipeline to test LLMs as game engines: Game Creation (GC) and Game Simulation (GS).

Overview of the RPGBENCH framework, illustrating the transition from character data to structured game definitions and interactive simulation trajectories.
  1. Game Creation (GC): The model generates a structured RPG world (in JSON format) based on a character's Wikipedia entry. This definition includes scenes, state variables (e.g., "trust," "skills"), and "Game Events" with specific logical triggers and effects.
  2. Game Simulation (GS): The model acts as the engine, managing a multi-round loop. It must plan events based on current conditions, narrate the story, and manually update numerical state variables based on player actions.

To ensure the generated games are logically sound, the authors developed a Breadth-First Search (BFS) Validity Checker. This tool explores the state space of the generated JSON to verify that all events are reachable and that the game can reach both success and failure states without logical deadlocks.

Mechanical Consistency and Evaluation

A core challenge identified in the study is mechanical consistency—the ability of the model to follow its own rules and update the "math" of the game accurately. To quantify this, the researchers use metrics such as Event Condition Errors (ECE) and State Variable Update Errors (VUE).

Formal definitions of Event Condition Errors (ECE) and State Variable Update Errors (VUE) used to quantify mechanical consistency.

These metrics reveal how often a model triggers a scene despite unmet requirements or fails to update a character's stats correctly after an event. The study highlights a "fundamental mismatch" between human and LLM judges when evaluating subjective traits like personality consistency, suggesting that mechanical metrics are currently more reliable for benchmarking.

Key Findings

The evaluation of leading LLMs revealed a distinct trade-off between storytelling prowess and mechanical reliability:

  • The "Engine" vs. "Actor" Paradox: Models like Claude 3.5 Sonnet excel in Interestingness (0.722) and Factual Consistency (0.991), making them superior narrators. However, they frequently struggle with mechanical validity, often failing to follow the rules they helped define.
  • Leading Models: GPT-4o emerged as the most reliable game designer, achieving a 49% Validity-Check Pass Rate (VCR). For simulation, Gemini 2.0 Flash Exp proved most robust, with a Mechanic Score (MEC) of 0.765, indicating it followed rules correctly in over three-quarters of instances.
  • Mechanical Vulnerability: Even top-tier models struggle with state management. Errors in variable updates and event triggers remain the primary "glitches" in LLM-driven game engines.
  • Determinism and Creativity: Higher sampling temperatures improve narrative quality but significantly degrade mechanical consistency. Stable game engines currently require lower temperature settings to maintain logical integrity.

Conclusion and Future Directions

RPGBENCH highlights a fundamental gap in current LLM capabilities: while they are excellent "actors," they are inconsistent "engines." The study suggests that future architectures might benefit from a multi-agent approach, where a creative model handles narration while a specialized, logical model manages the underlying game state. Addressing the instability of subjective metrics remains a critical hurdle for the automated evaluation of role-playing systems.

Summary updated

BibTeX
@misc{yu2025rpgbench,
  author = {Pengfei Yu and Dongming Shen and Silin Meng and Jaewon Lee and Weisu Yin and Andrea Yaoyun Cui and Zhenlin Xu and Yi Zhu and Xingjian Shi and Mu Li and Alex Smola},
  title = {{RPGBENCH: Evaluating Large Language Models as Role-Playing Game Engines}},
  year = {2025},
  eprint = {2502.00595},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.00595},
}
Figure