[Paper Review] SPRING: Studying the Paper and Reasoning to Play Games
SPRING uses a large language model guided by a DAG-based reasoning framework to read a game-paper and act in Crafter, achieving zero-shot GPT-4 performance that surpasses prior RL baselines trained for 1M steps. The approach requires no training.
Open-world survival games pose significant challenges for AI algorithms due to their multi-tasking, deep exploration, and goal prioritization requirements. Despite reinforcement learning (RL) being popular for solving games, its high sample complexity limits its effectiveness in complex open-world games like Crafter or Minecraft. We propose a novel approach, SPRING, to read the game's original academic paper and use the knowledge learned to reason and play the game through a large language model (LLM). Prompted with the LaTeX source as game context and a description of the agent's current observation, our SPRING framework employs a directed acyclic graph (DAG) with game-related questions as nodes and dependencies as edges. We identify the optimal action to take in the environment by traversing the DAG and calculating LLM responses for each node in topological order, with the LLM's answer to final node directly translating to environment actions. In our experiments, we study the quality of in-context "reasoning" induced by different forms of prompts under the setting of the Crafter open-world environment. Our experiments suggest that LLMs, when prompted with consistent chain-of-thought, have great potential in completing sophisticated high-level trajectories. Quantitatively, SPRING with GPT-4 outperforms all state-of-the-art RL baselines, trained for 1M steps, without any training. Finally, we show the potential of games as a test bed for LLMs.
Motivation & Objective
- Motivate study of leveraging human-written knowledge from academic papers to inform agent behavior in open-world games.
- Propose a two-stage pipeline where an LLM extracts game-relevant knowledge from LaTeX sources and then reasons to act.
- Demonstrate that structured in-context reasoning with a DAG improves LLM planning and execution in Crafter.
Proposed method
- Generate a context string by reading relevant LaTeX paragraphs from Hafner (2021) to capture game mechanics and tech-tree dependencies.
- Construct a QA-DAG where each node is a gameplay-related question and edges encode dependencies to enforce consistent chain-of-thought.
- Traverse the DAG in topological order at each step to produce LLM answers, mapping the final node to one of 17 discrete actions.
- Use a visual descriptor to translate game observations into plain text for the LLM input.
- Concatenate question-context pairs into a context C and condition LLM answers on C and recent observations.
- Evaluate prompting variations and ablations to study the importance of context, DAG structure, and GPT-4 versus GPT-3.5.
Experimental results
Research questions
- RQ1Can an LLM read and extract actionable gameplay knowledge from an academic LaTeX source to inform decision making in Crafter?
- RQ2Does a DAG-based, in-context chain-of-thought prompting strategy improve planning and action selection for open-world games without RL training?
- RQ3How does GPT-4 compare to prior RL baselines on Crafter in a zero-shot setting?
- RQ4What is the impact of context quality and prompting design on LLM-based game playing performance?
Key findings
- SPRING with GPT-4 outperforms all state-of-the-art RL baselines trained for 1M steps, with no training.
- SPRING achieves 27.3% game score and 12.3 reward (±0.7) across five trials, without training.
- SPRING yields an 88% relative improvement in game score over the previous SOTA RL methods.
- The approach enables significant unlocks in depth-5 tech-tree tasks, outperforming baselines on hard tasks like crafting and mining.
- Ablation shows context C, DAG-based prompting, and GPT-4 are all important for best performance; GPT-3.5 performs substantially worse.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.