Abstract
Text-based games (TBGs) have emerged as an important collection of NLP tasks, requiring reinforcement learning (RL) agents to combine natural language understanding with reasoning. A key challenge for agents attempting to solve such tasks is to generalize across multiple games and demonstrate good performance on both seen and unseen objects. Purely deep-RL-based approaches may perform well on seen objects; however, they fail to showcase the same performance on unseen objects. Commonsense-infused deep-RL agents may work better on unseen data; unfortunately, their policies are often not interpretable or easily transferable. To tackle these issues, in this paper, we present EXPLORER which is an exploration-guided reasoning agent for textual reinforcement learning. EXPLORER is neuro-symbolic in nature, as it relies on a neural module for exploration and a symbolic module for exploitation. It can also learn generalized symbolic policies and perform well over unseen data. Our experiments show that EXPLORER outperforms the baseline agents on Text-World cooking (TW-Cooking) and Text-World Commonsense (TWC) games.
Introduction
Text-based games (TBGs) serve as a challenging sandbox for AI because they require an agent to understand natural language, reason about world state, and make sequential decisions. Current approaches generally fall into two camps: Neural Agents and Rule-Based Agents. Neural agents are flexible but "brittle," often failing when encountering Out-of-Distribution (OOD) entities. Rule-based agents are interpretable but rigid, relying on hand-coded knowledge that lacks adaptability. EXPLORER addresses this generalization gap by learning a policy that is both interpretable and capable of handling unseen objects.
Methodology
EXPLORER (Exploration-guided Reasoning) utilizes a hybrid neuro-symbolic architecture that balances discovery with logical application.
Neural Exploration
A neural module (such as an LSTM-A2C or BiKE) explores the environment to collect <action, state, reward> triplets. This module acts as the primary driver for discovering new interactions within the game world.
Symbolic Exploitation
The symbolic module processes these triplets using Inductive Logic Programming (ILP) to induce logical rules, such as insert(X, fridge) :- apple(X). These rules are represented in Answer Set Programming (ASP), allowing for non-monotonic reasoning—the ability to revise beliefs when new information appears.
Dynamic Rule Generalization
A core innovation of EXPLORER is its ability to "lift" specific rules to higher-level concepts using WordNet. Instead of maintaining rules for every individual object, the agent uses an entropy-based information-gain algorithm to generalize. For example, rules for "apple" and "banana" can be generalized to a broader "fruit" category, enabling the agent to handle an "orange" correctly even if it was never seen during training.
Exception Learning
The agent handles "Negation as Failure." If it learns that fruit generally goes in the fridge but discovers a "rotten apple" does not, it refines the rule to: insert(X, fridge) :- fruit(X), not rotten(X).
Benchmarks and Evaluation
EXPLORER was evaluated on two primary benchmarks:
- Text-World Cooking (TW-Cooking): Agents navigate a house and follow recipes.
- Text-World Commonsense (TWC): Agents tidy a house by placing objects in commonsense locations.
The experiments focused on In-Distribution (IN) and Out-of-Distribution (OUT) sets to measure generalization to unseen objects.
Results and Discussion
EXPLORER significantly outperformed state-of-the-art baselines, particularly in complex, unseen environments. On the "Hard" difficulty of the TWC Out-of-Distribution task, EXPLORER reached a normalized score of 0.78, compared to just 0.3 for the text-only neural baseline.
In terms of efficiency, EXPLORER completed TW-Cooking Level-2 tasks in approximately 15 steps, whereas the Graph-Aided Transformer Agent (GATA) required 28. Furthermore, EXPLORER’s policy is human-readable (e.g., insert(X, wardrobe) :- wearable(X), not dirty(X)), providing a level of interpretability absent in black-box neural models.
Conclusion
While EXPLORER demonstrates superior generalization and efficiency, it faces limitations in per-step computation time due to the symbolic solver. Additionally, its generalization capability is tied to the quality of the underlying ontology (WordNet). Future work may explore more sophisticated strategies for switching between neural and symbolic modes to further optimize performance.
Summary updated