Abstract
We present PORTAL, a novel framework for developing artificial intelligence agents capable of playing thousands of 3D video games through language-guided policy generation. By transforming decision-making problems into language modeling tasks, our approach leverages large language models (LLMs) to generate behavior trees represented in domain-specific language (DSL). This method eliminates the computational burden associated with traditional reinforcement learning approaches while preserving strategic depth and rapid adaptability. Our framework introduces a hybrid policy structure that combines rule-based nodes with neural network components, enabling both high-level strategic reasoning and precise low-level control. A dual-feedback mechanism incorporating quantitative game metrics and vision-language model analysis facilitates iterative policy improvement at both tactical and strategic levels. The resulting policies are instantaneously deployable, human-interpretable, and capable of generalizing across diverse gaming environments. Experimental results demonstrate PORTAL's effectiveness across thousands of first-person shooter (FPS) games, showcasing significant improvements in development efficiency, policy generalization, and behavior diversity compared to traditional approaches.
Introduction
The gaming landscape is currently experiencing a "UGC (User-Generated Content) explosion," driven by platforms like Roblox and Tencent’s Yuan Meng Star. These platforms host millions of games with unique, rapidly changing mechanics. Traditional AI development faces a dual crisis in this environment: Reinforcement Learning (RL) is too computationally expensive to scale across thousands of games, and Large Language Models (LLMs) are too latent to serve as direct real-time "actors" in fast-paced 3D environments.
PORTAL (Policy Optimization and Reasoning for Tactical Artificial Learning) addresses these challenges by repositioning the LLM as an "architect" rather than a direct player. By decoupling strategic planning from real-time execution, PORTAL creates agents that are both strategically sophisticated and computationally efficient.
The PORTAL Framework
The core innovation of PORTAL is the transformation of decision-making into a language modeling problem. Instead of predicting individual button presses, the LLM generates a Behavior Tree (BT) written in a human-readable Domain-Specific Language (DSL).
As shown in the architecture above, the generated policy $\pi = (\Pi, \Theta, \Phi)$ utilizes a hybrid structure:
- $\Pi$ (The Tree): The high-level logic governing execution flow.
- $\Theta$ (Neural Nodes): Specialized, lightweight neural networks for complex low-level tasks like aiming or navigation.
- $\Phi$ (Rule Nodes): Deterministic code for basic, discrete actions.
This separation allows the agent to run at the speed of a standard C++ game engine while retaining the reasoning depth of a world-class language model.
Iterative Policy Optimization
To refine these policies, PORTAL employs a "Reflexion Loop" that utilizes a dual-feedback mechanism. The system collects quantitative metrics (such as kill/death ratios) and pairs them with qualitative analysis from a Vision-Language Model (VLM). By analyzing "mini-map" footage, the VLM acts as a strategic coach, providing natural language critiques that the LLM uses to rewrite and improve the DSL.
Experimental Results
The researchers evaluated PORTAL on the Yuan Meng Star platform, specifically focusing on thousands of user-created First-Person Shooter (FPS) games. Key findings include:
- Rapid Convergence: Agents reached near-optimal performance within just a few iterations of the reflexion loop using Breadth-First Search (BFS) over the policy space.
- Cross-Game Generalization: A single high-level strategic policy successfully generalized across nine distinct FPS games with varying visual styles and layouts.
- Instant Deployment: Unlike RL models that require extensive retraining, PORTAL agents can be updated instantly by exporting a new JSON configuration file, allowing for real-time behavior adjustment via natural language prompts.
Conclusion and Future Work
PORTAL represents a significant shift in game AI, moving from trial-and-error learning to language-guided reasoning. While currently optimized for FPS environments, future work aims to extend this framework to more complex genres like RPGs and RTS games by expanding the library of basic action nodes. By treating game AI as a language problem, PORTAL offers a scalable, interpretable, and efficient solution for the next generation of virtual environments.
Summary updated