Abstract
Deep Reinforcement Learning (DRL) is a powerful tool for creating high-performing game AI, yet it remains computationally expensive and difficult to iterate upon. Traditional methods like re-training from scratch or fine-tuning often lead to long development cycles or catastrophic forgetting. This paper introduces Policy Fusion, a modular framework that allows designers to combine a general "main policy" with specialized "sub-policies" trained via Inverse Reinforcement Learning (IRL). Our results demonstrate that Entropy-Weighted (EW) fusion achieves performance comparable to or better than re-training while offering a 10x speedup in the design iteration loop.
Introduction
The development of Non-Player Characters (NPCs) using DRL often faces a "brittleness" problem. Minor changes to game mechanics or desired behaviors typically require massive re-training efforts. Policy Fusion aims to bridge the gap between technical DRL complexity and the iterative needs of game designers by allowing new behaviors to be "plugged in" as modular components without compromising the agent's existing capabilities.
Methodology
The core of the proposed approach is the modularization of behaviors. Designers can train specific "micro-behaviors" (sub-policies) using human demonstrations through IRL, which avoids the need for complex reward engineering. These sub-policies are then integrated with a pre-existing main policy using mathematical fusion methods that combine action probability distributions.
The study evaluates four fusion techniques:
- Mixture Policy (MP): A simple average of policy distributions.
- Product Policy (PP): Multiplies probabilities, emphasizing actions where policies agree.
- Entropy-Threshold Policy (ET): Switches to the sub-policy when its certainty exceeds a threshold.
- Entropy-Weighted Mixture Policy (EW): Dynamically weights the sub-policy based on its internal confidence (entropy). This allows the agent to adopt new behaviors only in relevant states, preserving the main policy's performance elsewhere.
Experimental Results
The framework was tested in the MiniWorld 3D simulator and DeepCrawl, a procedurally generated Roguelike. The experiments focused on performance enhancement, stylistic changes, and adaptation to new game features.
Efficiency and Performance
Training a sub-policy took approximately 6 hours, a significant reduction from the 66 hours required for a full re-train. Despite this 10x speedup, the EW fusion method consistently outperformed or matched traditional re-training. In performance-enhancement tasks, the EW method achieved win rates exceeding 70% against the original base agent, demonstrating its ability to effectively integrate new strategic behaviors.
Conclusion
Policy Fusion provides a scalable and efficient way to customize DRL agents. By leveraging entropy to manage policy transitions, the method avoids the pitfalls of fine-tuning while drastically reducing training time. Future work will explore applications in continuous action spaces and the management of larger sets of simultaneous sub-policies.
Summary updated