Introduction
Text-based games (TBGs) like Zork represent a unique challenge for artificial intelligence, requiring a sophisticated synthesis of natural language understanding, logic, and commonsense reasoning. In these environments, agents interact with the world solely through text commands and observations. A critical component for success is the "world model"—an internal simulation used by the agent to predict the consequences of its actions.
However, existing world models often lack actionability. They frequently suffer from three primary failure modes:
- Object Localization and Inference (OLI): Proposing actions involving objects not currently in the player's possession.
- Object Affordance: Suggesting logically impossible interactions, such as drinking from an empty container.
- Insufficient Interaction Coverage: Failing to identify the full spectrum of valid actions available in a given state.
While pre-trained language models (PLMs) possess vast general knowledge, they often struggle to adhere to the strict logical constraints and controlled sublanguage required by game parsers.
Methods: The AWM-BART Framework
To address these challenges, this research introduces AWM-BART (Actionable World Model), which adapts the BART (Bidirectional and Auto-Regressive Transformers) architecture for simultaneous action and state prediction.
The core innovation of AWM-BART lies in reformulating action generation as a two-step process:
- Template Retrieval: Instead of generating actions word-by-word, the model's encoder acts as a re-ranker. It evaluates a library of action templates (e.g.,
put [MASK] in [MASK]) and assigns relevance scores based on the current game state. - Template Filling: The decoder then populates the masks with specific objects identified in the environment or inventory. This constrained decoding ensures the output remains syntactically valid within the game's grammar.
- Multi-task Learning and Hard Negative Mining: The model is trained to predict both valid actions and "graph differences" (state changes). To increase robustness, the authors utilize "hard negatives"—plausible but invalid templates—to sharpen the retriever's discernment.
Key Insights
The study reveals that using templates provides a powerful inductive bias. By focusing the decoder on filling specific slots, the model learns object affordances and relationships more effectively than unconstrained models. The authors argue that in TBGs, actionability—the likelihood of a command being accepted by the game engine—is a more vital metric than linguistic fluency. AWM-BART demonstrates that standard PLMs already contain sufficient commonsense; they simply require structural constraints to apply that knowledge to game logic.
Key Results
AWM-BART was evaluated on the JerichoWorld 2.0 benchmark, an updated dataset designed to provide consistent templates and objects for zero-shot prediction.
As shown in the results table, AWM-BART significantly outperformed baselines such as CALM and standard BART implementations. Specifically:
- Action Prediction: AWM-BART achieved an overall Exact Match (EM) score of 40.67, a substantial improvement over the baseline Worldformer-BART's 25.56.
- Error Reduction: Specialized studies indicated that AWM-BART reduced Object Localization (OLI) errors by approximately 47% and Affordance errors by 33%.
- Generalization: The model maintained strong performance on unseen games, suggesting it successfully learned generalizable rules of interactive fiction environments.
Future Work
While AWM-BART represents a significant step forward, limitations remain regarding model scale and genre scope. Future research will focus on integrating this actionable world model into reinforcement learning agents to determine if improved predictive accuracy translates directly into higher game scores and more efficient exploration.
Summary updated