A Minimal Approach for Natural Language Action Space in Text-based Games

Dongwon Ryu, Meng Fang, Gholamreza Haffari, Shirui Pan, Ehsan Shareghi

Abstract

Text-based games (TGs) present a significant challenge for reinforcement learning due to their vast, natural language action spaces. Recent trends have favored complex architectures utilizing large Language Models (LMs) or Knowledge Graphs (KGs) to prune these spaces. This paper introduces the Text-based Actor-Critic (TAC), a minimalist agent that achieves state-of-the-art performance by leveraging a simple $\epsilon$-admissible exploration strategy and supervised learning regularization. With fewer than 2 million parameters, TAC outperforms significantly larger models across the Jericho game suite, demonstrating that efficient exploration can be more effective than architectural complexity.

Introduction

Text-based games like Zork require agents to interact with environments using natural language commands. Unlike games with discrete, low-dimensional action spaces, TGs present a "combinatorial explosion" where millions of word combinations are possible, yet only a few are "admissible"—valid within the current game state and capable of changing it.

Historically, researchers have addressed this by integrating heavy external modules. Some use pre-trained LMs to predict valid actions, while others maintain dynamic KGs to track the world state. This paper challenges the necessity of such complexity, proposing that a streamlined architecture combined with targeted exploration can achieve superior results with a fraction of the computational cost.

Methodology: The Text-based Actor-Critic (TAC)

The proposed TAC agent is designed for efficiency and robustness. Its core architecture consists of a shared Gated Recurrent Unit (GRU) encoder that processes textual observations and a template-object decoder that generates actions.

The minimalist architecture of the Text-based Actor-Critic (TAC) agent, featuring shared encoders and specialized decoders.

$\epsilon$-admissible Exploration

The primary innovation is the $\epsilon$-admissible exploration strategy. During training, the agent typically follows its learned policy. However, with a small probability ($\epsilon$), it ignores its policy and samples a random action from the set of "admissible actions" provided by the game engine. This "manual" guidance allows the agent to discover critical state transitions without needing a complex KG to prune the action space, effectively teaching the agent the boundaries of the game world naturally.

Regularization via Supervised Learning

To stabilize early training, the authors incorporate a Supervised Learning (SL) loss. This acts as a regularizer, nudging the agent toward generating syntactically valid templates and objects. This prevents the agent from wasting training cycles on "meaningless exploration" (e.g., typing gibberish) before it has received enough environmental rewards to form a coherent policy.

Experimental Setup

The TAC agent was evaluated using the Jericho suite, a standard benchmark for interactive fiction. The study included a main evaluation on 10 popular games (including Zork1, Detective, and Pentari) and an extended evaluation on 29 games to assess broader generalization across diverse narrative environments.

Results and Discussion

TAC achieved a new state-of-the-art (SotA) mean score across the 10 primary games, outperforming models like CALM-DRRN (LM-based) and KG-A2C (KG-based).

Performance comparison of TAC against CALM-DRRN and KG-A2C across five representative Jericho games, showing score progression over training steps.

Key performance highlights include:

  • Significant Score Gains: In ZTUU, TAC reached a score of 33.2, a massive improvement over the previous SotA of 5.1. Similarly, in Deephome, it achieved 25.4 compared to the previous best of 1.0.
  • Computational Efficiency: With fewer than 2 million parameters, TAC is roughly 100x smaller than many LM-based competitors. It trains 2x to 3x faster than KG-A2C, as it avoids the overhead of graph updates and heavy text generation.
  • Robustness to Exposure Bias: The authors found that exposing the agent to its own (potentially inadmissible) actions during training, rather than strictly constraining it to admissible ones, improved its robustness during testing.

Conclusion and Future Work

The success of TAC suggests that for text-based games, "simpler is better." By focusing on effective exploration rather than architectural bloat, the agent achieves higher scores with significantly lower resource requirements.

A current limitation is the reliance on the environment's "admissible action" list during training. Future research could explore using lightweight LMs to generate candidate action lists in environments where they are not natively provided. Additionally, addressing "catastrophic forgetting" in long-form games remains a priority for future iterations of the TAC framework.

Summary updated

BibTeX
@inproceedings{ryu2023minimal,
  author = {Dongwon Ryu and Meng Fang and Gholamreza Haffari and Shirui Pan and Ehsan Shareghi},
  title = {{A Minimal Approach for Natural Language Action Space in Text-based Games}},
  booktitle = {CoNLL},
  year = {2023},
  doi = {10.18653/v1/2023.conll-1.10},
}
Figure