Skip to main content
QUICK REVIEW

[Paper Review] Comprehensible Context-driven Text Game Playing

Xusen Yin, Jonathan May|arXiv (Cornell University)|May 6, 2019
Topic ModelingComputer Science20 references11 citations
TL;DR

This paper proposes a CNN-based DQN agent with position embeddings and dependency parsing reordering to accelerate training and improve performance in text-based games like Zork. By using a max-pooling CNN as an auto-attention mechanism and applying reward shaping with repeated bad try penalties, the method achieves state-of-the-art scores in under 10 hours (1 million steps), reducing convergence time by an order of magnitude compared to LSTM-based approaches.

ABSTRACT

In order to train a computer agent to play a text-based computer game, we must represent each hidden state of the game. A Long Short-Term Memory (LSTM) model running over observed texts is a common choice for state construction. However, a normal Deep Q-learning Network (DQN) for such an agent requires millions of steps of training or more to converge. As such, an LSTM-based DQN can take tens of days to finish the training process. Though we can use a Convolutional Neural Network (CNN) as a text-encoder to construct states much faster than the LSTM, doing so without an understanding of the syntactic context of the words being analyzed can slow convergence. In this paper, we use a fast CNN to encode position- and syntax-oriented structures extracted from observed texts as states. We additionally augment the reward signal in a universal and practical manner. Together, we show that our improvements can not only speed up the process by one order of magnitude but also learn a superior agent.

Motivation & Objective

  • To address the slow convergence of LSTM-based DQN agents in text-based games, which can take tens of days to train.
  • To improve training efficiency and final performance by replacing LSTM encoders with faster, context-aware CNNs.
  • To enhance state representation by reordering context sentences using dependency parsing to group syntactically related elements.
  • To reduce agent exploration inefficiencies caused by repeated failed actions through a novel negative reward penalty mechanism.
  • To demonstrate that combining architectural improvements with reward shaping leads to faster, more effective learning in complex text-based environments.

Proposed method

  • Uses a convolutional neural network (CNN) with max-pooling as a text encoder to extract position- and syntax-oriented features from game context sentences.
  • Applies position embeddings to preserve sequential order in trajectories, improving the model's understanding of context flow.
  • Employs a dependency parser to reorder context sentences so syntactically related words are spatially proximate, enhancing feature learning.
  • Introduces a reward shaping technique that assigns a cumulative penalty of -0.1 for repeated negative-action tries, discouraging redundant behavior.
  • Combines the CNN encoder with a Deep Q-Network (DQN) framework to train an end-to-end agent for text-based game playing.
  • Leverages max-pooling as a form of auto-attention, allowing the model to focus on salient phrases in the context without explicit attention mechanisms.

Experimental results

Research questions

  • RQ1Can a CNN-based text encoder outperform LSTM in training speed and final performance for text-based game agents?
  • RQ2How does syntactic reordering of context sentences via dependency parsing affect learning efficiency and convergence time?
  • RQ3To what extent can reward shaping based on repeated bad actions improve training stability and reduce exploration inefficiencies?
  • RQ4Does combining position embeddings with a CNN encoder lead to better state representation than standard sequence encoding?
  • RQ5Can a fast, non-recurrent encoder like CNN achieve performance comparable to or better than recurrent models like LSTM in complex text-based games?

Key findings

  • The CNN-based DQN agent with max-pooling and position embeddings achieved a final score of 40 on Zork within 1 million training steps, matching state-of-the-art performance.
  • Training time was reduced by an order of magnitude—achieving SOTA results in approximately 10 hours, compared to tens of days with LSTM-based DQN.
  • Dependency parsing reordering halved the convergence time, reducing training steps from ~1M to ~500K when combined with reward shaping.
  • The repeated bad try penalty reduced the proportion of redundant actions from 8.73% to 3.51%, significantly improving training efficiency.
  • The max-pooling layer in the CNN functioned as an implicit auto-attention mechanism, enabling the model to focus on key semantic components in context.
  • The combination of CNN encoding, dependency parsing, position embeddings, and reward shaping produced a synergistic improvement, outperforming prior LSTM-based and CNN-only approaches.

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.