Keep CALM and Explore: Language Models for Action Generation in Text-based Games
Shunyu Yao, Rohan Rao, Matthew J. Hausknecht, Karthik Narasimhan
Abstract
Text-based games present a unique challenge for autonomous agents to operate in natural language and handle enormous action spaces. In this paper, we propose the Contextual Action Language Model (CALM) to generate a compact set of action candidates at each game state. Our key insight is to train language models on human gameplay, where people demonstrate linguistic priors and a general game sense for promising actions conditioned on game history. We combine CALM with a reinforcement learning agent which re-ranks the generated action candidates to maximize ingame rewards. We evaluate our approach using the Jericho benchmark (Hausknecht et al., 2019a), on games unseen by CALM during training. Our method obtains a 69% relative improvement in average game score over the previous state-of-the-art model. Surprisingly, on half of these games, CALM is competitive with or better than other models that have access to ground truth admissible actions. * * Code and data are available at https://github. com/princeton-nlp/calm-textgame .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
32 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Large Language Models Are Neurosymbolic Reasoners cites Graph Constrained Reinforcement Learning for Natural Language Action Spaces
- SwiftSage: A Generative Agent with Fast and Slow Thinking for Complex Interactive Tasks cites Graph Constrained Reinforcement Learning for Natural Language Action Spaces
- Do the Rewards Justify the Means? Measuring Trade-Offs Between Rewards and Ethical Behavior in the Machiavelli Benchmark cites Interactive Fiction Games: A Colossal Adventure
- Do the Rewards Justify the Means? Measuring Trade-Offs Between Rewards and Ethical Behavior in the Machiavelli Benchmark cites Graph Constrained Reinforcement Learning for Natural Language Action Spaces
- Graph Constrained Reinforcement Learning for Natural Language Action Spaces cites Interactive Fiction Games: A Colossal Adventure
- WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agents cites Interactive Fiction Games: A Colossal Adventure
Cited by top-tier papers32
- WebShop: Towards Scalable Real-World Web Interaction with Grounded Language AgentsShunyu Yao, Howard Chen, John Yang, Karthik NarasimhanNeurIPS 2022 · 1,477 citations
- Guiding Pretraining in Reinforcement Learning with Large Language ModelsYuqing Du, Olivia Watkins, Zihan Wang, Cédric Colas et al.ICML 2023 · 257 citations
- SwiftSage: A Generative Agent with Fast and Slow Thinking for Complex Interactive TasksBill Yuchen Lin, Yicheng Fu, Karina Yang, Faeze Brahman et al.NeurIPS 2023 · 244 citations
- Do the Rewards Justify the Means? Measuring Trade-Offs Between Rewards and Ethical Behavior in the Machiavelli BenchmarkAlexander Pan, Jun Shern Chan, Andy Zou, Nathaniel Li et al.ICML 2023 · 200 citations
- Large Language Models Are Neurosymbolic ReasonersMeng Fang, Shilong Deng, Yudi Zhang, Zijing Shi et al.AAAI 2024 · 53 citations
Builds on2
Related papers
- Monte Carlo Planning with Large Language Model for Text-Based Game AgentsZijing Shi, Meng Fang, Ling ChenICLR 2025
- Dual-Scale World Memory for LLM Agents towards Hard-Exploration ProblemsMinsoo Kim, Seung-won HwangICLR 2026
- Abstract then Play: A Skill-centric Reinforcement Learning Framework for Text-based GamesAnjie Zhu, Peng-Fei Zhang, Yi Zhang, Zi Huang et al.ACL Findings 2023
- Deep Reinforcement Learning with Stacked Hierarchical Attention for Text-based GamesYunqiu Xu, Meng Fang, Ling Chen, Yali Du et al.NeurIPS 2020 · 48 citations
- Interactive Fiction Game Playing as Multi-Paragraph Reading Comprehension with Reinforcement LearningXiaoxiao Guo, Mo Yu, Yupeng Gao, Chuang Gan et al.EMNLP 2020 · 21 citations
