Procedural Content Generation (PCG) is a cornerstone of modern game development, enabling the automated creation of diverse and complex environments. Traditionally, Reinforcement Learning (RL) agents in PCG were controlled via scalar parameters—numerical values representing specific attributes like "wall density" or "enemy count." While effective, these controls lack the intuitive flexibility of natural language. Recent advancements introduced Instruction-conditioned PCGRL (IPCGRL), allowing developers to guide generation using sentences like "Make a long path."
However, a significant bottleneck remains: multi-objective instructions. When an agent is asked to "Make a long path and add many bats," existing architectures often fail. This failure stems from "representation entanglement," where the embeddings for different goals merge into a single, confusing signal. The agent may prioritize one goal while ignoring others or fail to understand the relationship between them. This paper introduces MIPCGRL, a framework designed to disentangle these representations and provide precise control over multi-faceted generation tasks.
The MIPCGRL Framework
The core innovation of MIPCGRL is the Instruction-aware Modular Encoder. Unlike previous models that use a unified text encoder, MIPCGRL processes instructions through a multi-stage, disentangled pipeline.
The process begins with a pre-trained BERT model that generates a general sentence embedding ($z_{bert}$). This embedding is then passed to a task-specific encoder ($E_\theta$), which partitions the latent space into discrete "bins" or chunks, each dedicated to a specific generation task (e.g., path length, tile counts).
To ensure the agent only focuses on relevant goals, the framework employs two parallel modules:
- Multi-label Task Classifier (CLS): This module identifies which objectives are present in the instruction.
- Multi-head Fitness Regression (REG): This predicts the target "fitness" values for each task.
The classifier's output serves as a probabilistic weight. If an instruction omits a specific task (e.g., "bats"), the corresponding segment of the latent vector is suppressed. This "cleaned" representation ($z_{enc}$) is then concatenated with state features and fed into a standard PPO-based RL policy.
Experimental Evaluation
The authors evaluated MIPCGRL on a 2D level generation suite involving five distinct objectives: region count (RG), path length (PL), wall count (WC), bat count (BC), and bat distribution (BD). The model was tested against scalar-conditioned (CPCGRL) and single-objective text-conditioned (IPCGRL) baselines using a dataset of 80 single-objective and 256 multi-objective instructions.
Key Results and Insights
MIPCGRL demonstrates a clear advantage in handling complex, multi-part requests. In multi-task scenarios, the model achieved a 13.8% improvement in controllability over the state-of-the-art IPCGRL.
A key finding is the synergy between the classification and regression modules. Ablation studies (shown in the figures as $w/o REG$ and $w/o CLS$) indicate that while either module helps, their combination is essential for stable training and high performance. The regression module defines the "what" (the target values), while the classifier defines the "which" (which tasks to ignore), effectively filtering out noise from the latent representation.
Interestingly, MIPCGRL also outperformed traditional scalar-conditioned models in single-task scenarios by an average of 25.4%. This suggests that the semantic richness of natural language provides a more informative signal for the agent than raw numerical values, potentially aiding in faster and more robust policy learning.
Conclusion and Future Work
MIPCGRL represents a significant step toward more expressive and controllable AI-driven content generation. By disentangling latent representations, the framework allows agents to follow complex, multi-objective instructions with high fidelity.
Future research will focus on addressing reward imbalances—where "easier" tasks like tile counting might overshadow "harder" tasks like path length—and scaling the architecture to handle three or more simultaneous, potentially conflicting objectives. The authors propose exploring adaptive reward weighting techniques to further refine the agent's multi-task learning capabilities.
Summary updated