Preprint · 2019

TextWorld: A Learning Environment for Text-based Games

Marc-Alexandre Côté, Ákos Kádár, Xingdi Yuan, Ben Kybartas, Tavian Barnes, Emery Fine, James Moore, Ruo Yu Tao, Matthew Hausknecht, Layla El Asri, Mahmoud Adada, Wendy Tay, Adam Trischler

VenuearXiv
DOI10.48550/arXiv.1806.11532
URLhttp://arxiv.org/abs/1806.11532
TopicsReplicHAI / Agent Evals / 07 General, long-horizon & economic tasks
TagsComputer Science - Computation and Language, Computer Science - Machine Learning, Statistics - Machine Learning
archiveIDarXiv:1806.11532
extraarXiv:1806.11532 [cs.LG]
libraryCatalogarXiv.org
shortTitleTextWorld

Abstract

We introduce TextWorld, a sandbox learning environment for the training and evaluation of RL agents on text-based games. TextWorld is a Python library that handles interactive play-through of text games, as well as backend functions like state tracking and reward assignment. It comes with a curated list of games whose features and challenges we have analyzed. More significantly, it enables users to handcraft or automatically generate new games. Its generative mechanisms give precise control over the difficulty, scope, and language of constructed games, and can be used to relax challenges inherent to commercial text games like partial observability and sparse rewards. By generating sets of varied but similar games, TextWorld can also be used to study generalization and transfer learning. We cast text-based games in the Reinforcement Learning formalism, use our framework to develop a set of benchmark games, and evaluate several baseline agents on this set and the curated list.

BibTeX

@misc{cote_textworld_2019,
	title = {{TextWorld}: {A} {Learning} {Environment} for {Text}-based {Games}},
	shorttitle = {{TextWorld}},
	url = {http://arxiv.org/abs/1806.11532},
	doi = {10.48550/arXiv.1806.11532},
	abstract = {We introduce TextWorld, a sandbox learning environment for the training and evaluation of RL agents on text-based games. TextWorld is a Python library that handles interactive play-through of text games, as well as backend functions like state tracking and reward assignment. It comes with a curated list of games whose features and challenges we have analyzed. More significantly, it enables users to handcraft or automatically generate new games. Its generative mechanisms give precise control over the difficulty, scope, and language of constructed games, and can be used to relax challenges inherent to commercial text games like partial observability and sparse rewards. By generating sets of varied but similar games, TextWorld can also be used to study generalization and transfer learning. We cast text-based games in the Reinforcement Learning formalism, use our framework to develop a set of benchmark games, and evaluate several baseline agents on this set and the curated list.},
	urldate = {2026-11-06},
	publisher = {arXiv},
	author = {Côté, Marc-Alexandre and Kádár, Ákos and Yuan, Xingdi and Kybartas, Ben and Barnes, Tavian and Fine, Emery and Moore, James and Tao, Ruo Yu and Hausknecht, Matthew and Asri, Layla El and Adada, Mahmoud and Tay, Wendy and Trischler, Adam},
	month = nov,
	year = {2019},
	note = {arXiv:1806.11532 [cs.LG]},
	keywords = {Computer Science - Computation and Language, Computer Science - Machine Learning, Statistics - Machine Learning},
}