Abstract
In this paper, we focus on the virtual world, a cyberspace where people can live in. An ideal virtual world shares great similarity with our real world. One of the crucial aspects is its evolving nature, reflected by individuals' capability to grow and thereby influence the objective world. Such dynamics is unpredictable and beyond the reach of existing systems. For this, we propose a special engine called Delta-Engine to drive this virtual world. $\Delta$ associates the world's evolution to the engine's scalability. It consists of a base engine and a neural proxy. The base engine programs the prototype of the virtual world; given a trigger, the neural proxy generates new snippets on the base engine through incremental prediction. This paper presents a full-stack introduction to the delta-engine. The key feature of the delta-engine is its scalability to unknown elements within the world. Technically, it derives from the perfect co-work of the neural proxy and the base engine, and the alignment with high-quality data. We introduce an engine-oriented fine-tuning method that embeds the base engine into the proxy. We then discuss the human-LLM collaborative design to produce novel and interesting data efficiently. Eventually, we propose three evaluation principles to comprehensively assess the performance of a delta engine: naive evaluation, incremental evaluation, and adversarial evaluation.
Introduction
Traditional Role-Playing Games (RPGs) often confine players to predefined evolution paths and scripted interactions. Even in "open-world" titles, the underlying logic is static, limited by what developers have pre-programmed. To move toward a truly open virtual world, we propose Open Role-Playing Games (ORPGs), where characters can evolve through free-form natural language instructions. The primary challenge lies in the "semantic gap"—translating a player's imaginative request (e.g., "I want to learn a move that turns me into a Dragon-type and protects me") into executable, bug-free code that integrates seamlessly with the existing game state.
The Delta-Engine Architecture
To bridge this gap, we introduce the Delta-Engine. Unlike traditional engines that require full recompilation or manual scripting for every change, the Delta-Engine treats evolution as an incremental update.
The system consists of two primary components:
- Base Engine: Provides the foundational "prototype" code, defining the core rules and physics of the world.
- Neural Proxy: A code-specialized Large Language Model (LLM), such as CodeGemma, that acts as a "neural wrapper."
When a player provides an instruction, the engine performs Incremental Prediction. It calculates a "delta" ($\Delta$)—a specific snippet of new code—rather than regenerating the entire character class. This delta is then merged into the character's definition using a custom @Increment decorator. To ensure scalability as the codebase grows, we employ a Sparse Retrieval mechanism. The LLM first analyzes a "skeleton" of existing methods to identify relevant code blocks, pulling only necessary context into its workspace to generate the update.
Human-LLM Collaborative Design
High-quality data is essential for aligning the neural proxy with the base engine's logic. We found that purely synthetic data generated by LLMs often lacks novelty and converges on repetitive patterns. To overcome this, we utilized a Human-AI Co-design process.
Humans provide "Prototypes"—concrete imaginative foundations like descriptions of real-world animals or mythical creatures—which the LLM then uses to design novel mechanics. Furthermore, we implemented Tags of Interest (ToI) to filter for "interesting" traits (e.g., health-draining moves or stat-boosting abilities), ensuring the generated content contributes to engaging gameplay.
Evaluation and Results
We evaluated the Delta-Engine using the Free Pokémon playground, testing it against both synthetic (SY. TRAIN) and co-designed (CO. TRAIN) datasets. Performance was measured by Execution Rate (Exe) and Accuracy (Acc).
As shown in the results, the model trained on co-designed data significantly outperformed the synthetic-only model on the "Hard" test set, which featured complex, human-designed roles. The addition of the retrieval mechanism further boosted accuracy to 89.7% on hard tasks, with an execution rate of 92.0%. Crucially, while naive models struggle as code length increases, the Delta-Engine maintained stability over 30+ evolution steps, handling codebases exceeding 5,000 tokens.
Conclusion and Future Work
The Delta-Engine represents a significant step toward dynamic, player-driven virtual worlds. By combining incremental code generation with human-AI collaborative design, we enable a level of autonomy previously impossible in RPGs. Future work will focus on expanding this system to handle visual assets (3D models and animations) and implementing "contextual constraints" to maintain game balance and prevent game-breaking instructions.
Paper Citation: Wu, H., et al. (2025). Open Role-Playing with Delta-Engines. arXiv:2408.05842v5 [cs.AI].
Summary updated