Introduction
Text-based games represent a significant challenge for Reinforcement Learning (RL) agents. Unlike visual environments, these games require agents to process natural language, reason about abstract world states, and navigate vast action spaces simultaneously. Traditional Deep RL (DRL) often struggles with these environments due to two primary hurdles: low sample efficiency and the combinatorial explosion of the action space. In a typical text game, an agent might waste thousands of steps attempting nonsensical actions—such as "eat the stove"—because it lacks a fundamental understanding of the world's affordances.
To address these challenges, this paper introduces the Question-guided World-perceiving Agent (QWA). QWA is a framework designed to mimic human-like "common sense" filters by decomposing complex tasks into manageable subtasks and pruning irrelevant actions through a structured perception layer.
Methodology: Decoupling Perception from Strategy
The core innovation of QWA is a two-phase training framework that decouples language acquisition from strategic decision-making. This separation allows the RL component to focus on high-level logic rather than learning basic world interactions from scratch.
Phase 1: Supervised Pre-training
The agent is first trained on simplified environments using human-labeled data. During this phase, the agent develops two "world-perceiving" modules formulated as Question-Answering (QA) tasks:
- Task Selector: This module identifies available subtasks (e.g., "get apple") by treating them as a series of binary Yes/No questions based on the current state.
- Action Validator: Once a subtask is selected, this module filters the action space by asking if a specific command (e.g., "slice apple") is relevant to the chosen subtask.
Phase 2: Reinforcement Learning
In the second phase, the pre-trained perception modules are "frozen." The agent is then placed in complex games where the RL algorithm only needs to learn the high-level strategy of which subtask to pick and when. To prevent the agent from getting stuck due to perception errors, the authors implemented a "time-aware" mechanism that forces the agent to re-select a subtask if it fails to complete it within a certain limit.
Experimental Setup
The framework was evaluated using the TextWorld cooking game environment. The researchers utilized 3,488 "simple" games (few ingredients and rooms) for supervised pre-training and 700 "medium/hard" games for RL evaluation. These complex games required navigating multiple rooms, following intricate recipes, and performing specific preparation steps like dicing and frying.
Key Results and Insights
The QWA framework demonstrated significant improvements over state-of-the-art baselines like GATA and Imitation Learning:
- Superior Efficiency: QWA reached peak performance in complex games using only 20% of the training data required by the benchmark GATA model. This 80% reduction in required online interactions highlights the power of pre-trained perception.
- Enhanced Performance: In "Hard" games, QWA achieved a normalized score of 0.53, significantly outperforming GATA (0.48) and Imitation Learning (0.35) baselines.
- Robust Generalization: QWA maintained a high score (0.80) on simple tasks even after being trained on hard ones. In contrast, other models experienced "catastrophic forgetting," with GATA’s performance on simple tasks dropping to 0.32.
- Resilience: The model remained effective even when the pre-training dataset was reduced by 50%, suggesting that the framework does not require a perfect teacher to provide a useful strategic foundation.
Conclusion
QWA demonstrates that formulating world perception as a series of structured questions provides a powerful bottleneck for RL agents. By filtering the noise of vast action spaces and focusing on high-level subtasks, the agent achieves human-like efficiency in complex text environments.
Future work may focus on reducing the reliance on human-annotated data by using Large Language Models (LLMs) to generate QA pairs or by developing methods for the agent to dynamically discover its own subtasks during exploration.
Summary updated