Skip to main content
QUICK REVIEW

[Paper Review] Towards Solving Text-based Games by Producing Adaptive Action Spaces

Ruo Yu Tao, Marc-Alexandre Côté|arXiv (Cornell University)|Dec 3, 2018
Topic ModelingComputer Science15 references5 citations
TL;DR

This paper proposes a neural sequence-to-set generation model that produces adaptive, context-aware action spaces for text-based games, using three encoder-decoder architectures—pointer-softmax with beam search, hierarchical RNN with pointer-softmax, and concatenated command generation. The best-performing model (PS + Cat) achieves 96.5 F1-score on ACG and 97.6 on ACGE, generalizing to unseen valid commands with high accuracy.

ABSTRACT

To solve a text-based game, an agent needs to formulate valid text commands for a given context and find the ones that lead to success. Recent attempts at solving text-based games with deep reinforcement learning have focused on the latter, i.e., learning to act optimally when valid actions are known in advance. In this work, we propose to tackle the first task and train a model that generates the set of all valid commands for a given context. We try three generative models on a dataset generated with Textworld. The best model can generate valid commands which were unseen at training and achieve high $F_1$ score on the test set.

Motivation & Objective

  • To address the challenge of generating valid, context-dependent text commands in text-based games, a task often overlooked in reinforcement learning approaches.
  • To train a supervised model that maps game contexts and player inventories to sets of admissible actions, rather than selecting from a fixed action set.
  • To improve generalization by generating unseen valid commands, enabling agents to explore and solve games more effectively.
  • To evaluate and compare three neural sequence-to-set generation architectures for their ability to produce diverse, accurate, and contextually relevant command sets.
  • To lay the foundation for integrating adaptive command generation with reinforcement learning policies to solve text-based games end-to-end.

Proposed method

  • The model is trained on a supervised dataset of (context, action set) pairs generated via TextWorld, where actions are defined as state-changing commands.
  • Three architectures are evaluated: (1) pointer-softmax with beam search (PS + BS), (2) hierarchical RNN with pointer-softmax (HRED + PS), and (3) pointer-softmax with concatenated commands (PS + Cat).
  • The PS + Cat model uses separator tokens to delineate multiple commands in a single output sequence, enabling joint decoding with attention over input context.
  • The HRED + PS model uses a hierarchical decoding strategy, where session-level hidden states condition the generation of each command in the set.
  • The PS + BS model generates a fixed number of commands via beam search, which limits flexibility and causes over-generation when the target count differs from the beam size.
  • All models are trained to maximize the log-likelihood of the ground-truth command sets, with loss functions tailored to each architecture’s structure.

Experimental results

Research questions

  • RQ1Can a neural sequence-to-set model effectively generate diverse, valid text commands for a given game context in text-based games?
  • RQ2How do different sequence-to-set generation architectures compare in terms of F1-score, recall on seen vs. unseen commands, and generalization to unseen actions?
  • RQ3Does the use of hierarchical decoding or concatenated command generation improve performance over fixed-beam search in command set generation?
  • RQ4To what extent can the model generalize to commands not seen during training, particularly in complex or constrained game environments?
  • RQ5How does the inclusion of pre-trained embeddings (e.g., GloVe) affect model performance on command generation tasks?

Key findings

  • The PS + Cat model achieves the highest F1-score of 96.5 on the ACG dataset and 97.6 on the ACGE dataset, outperforming both HRED + PS and PS + BS.
  • The PS + Cat model achieves 83.0% unseen recall on ACG and 76.7% on ACGE, demonstrating strong generalization to commands not seen during training.
  • The HRED + PS model performs better than PS + BS but is outperformed by PS + Cat, likely due to gating mechanisms that hinder gradient flow in the absence of multiple queries.
  • Beam search with fixed beam size (PS + BS) suffers from over-generation and poor alignment with actual target command counts, leading to lower F1-scores despite high precision.
  • Removing pre-trained GloVe embeddings results in a negligible (≤0.2%) drop in F1-score, suggesting that the model’s performance is robust to embedding initialization mismatch.
  • The model generates a significant number of valid, unseen commands, with beam search helping to increase diversity when the beam size matches the expected number of actions.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.