Skip to main content
QUICK REVIEW

[Paper Review] Playing Text-Adventure Games with Graph-Based Deep Reinforcement Learning

Prithviraj Ammanabrolu, Mark Riedl|arXiv (Cornell University)|Dec 4, 2018
Topic ModelingComputer Science16 references12 citations
TL;DR

This paper proposes KG-DQN, a graph-based deep reinforcement learning architecture that uses a knowledge graph to represent game states and prune the action space in text-based adventure games. By framing action selection as a question-answering task and pre-training with transfer learning, the method achieves 40% faster convergence to optimal rewards compared to baselines, while maintaining high-quality quest solutions with fewer steps.

ABSTRACT

Text-based adventure games provide a platform on which to explore reinforcement learning in the context of a combinatorial action space, such as natural language. We present a deep reinforcement learning architecture that represents the game state as a knowledge graph which is learned during exploration. This graph is used to prune the action space, enabling more efficient exploration. The question of which action to take can be reduced to a question-answering task, a form of transfer learning that pre-trains certain parts of our architecture. In experiments using the TextWorld framework, we show that our proposed technique can learn a control policy faster than baseline alternatives. We have also open-sourced our code at https://github.com/rajammanabrolu/KG-DQN.

Motivation & Objective

  • To address the challenge of combinatorially large action spaces in text-based adventure games, where actions are natural language commands.
  • To improve sample efficiency in partially observable environments by enabling persistent world state memory through knowledge graphs.
  • To accelerate learning convergence by integrating action space pruning and transfer learning via question-answering pre-training.
  • To demonstrate that explicit, structured world representations (knowledge graphs) outperform unstructured embeddings in complex, long-horizon text-based game environments.

Proposed method

  • The agent maintains a dynamic knowledge graph that captures entities and their relationships, evolving as the agent explores the environment.
  • The knowledge graph is used to prune the action space by filtering out actions involving entities or relations not present in the current graph state.
  • A graph attention network (GAT) processes the knowledge graph to attend to relevant subgraphs when estimating Q-values for state-action pairs.
  • Natural language actions are embedded using a transformer-based encoder, and Q-values are computed via a differentiable interaction mechanism between the state description and action embedding.
  • The model is pre-trained on a question-answering task using external game data, transferring general knowledge about effective actions to improve initial policy quality.
  • The full KG-DQN architecture combines knowledge graph state representation, graph attention, and pre-trained action encoders within a deep Q-network framework.

Experimental results

Research questions

  • RQ1Can a knowledge graph representation improve sample efficiency and convergence speed in text-based adventure games with large, combinatorial action spaces?
  • RQ2Does action pruning based on the knowledge graph lead to faster learning and reduced exploration of invalid actions?
  • RQ3To what extent does pre-training the action encoder via a question-answering paradigm transfer knowledge across different games and accelerate policy learning?
  • RQ4How does the combination of persistent memory (knowledge graph) and pre-training compare to standard deep Q-networks in terms of both learning speed and solution quality?

Key findings

  • KG-DQN converges to the maximum possible reward 40% faster than the best baseline (LSTM-DQN) on the small TextWorld map.
  • On the large map, KG-DQN achieves comparable performance to LSTM-DQN but in significantly fewer episodes, with a convergence rate that is substantially faster.
  • The ablated version of KG-DQN without pruning or pre-training requires 131.7 steps on average to complete the small quest, compared to 73.7 steps for the full model.
  • The full KG-DQN model completes the small quest in 73.7 ± 8.5 steps, which is not statistically significantly different from LSTM-DQN (p = 0.199), indicating equivalent solution quality.
  • Pre-training via question-answering improves generalization, enabling faster convergence even on unseen game variants without explicit instruction.
  • The knowledge graph provides a persistent memory that enables faster learning, as evidenced by the consistent performance gain across all KG-DQN variants, regardless of pre-training.

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.