Do Embodied Agents Dream of Pixelated Sheep: Embodied Decision Making using Language Guided World Modelling

Kolby Nottingham, Prithviraj Ammanabrolu, Alane Suhr, Yejin Choi, Hannaneh Hajishirzi, Sameer Singh, Roy Fox

Introduction

Reinforcement learning (RL) agents typically begin their training as tabula rasa—blank slates with no prior knowledge of their environment. In complex, open-ended worlds like Minecraft, this lack of prior knowledge creates a significant bottleneck known as the "sparse reward" problem. To craft a single stone pickaxe, an agent must navigate a multi-step "technology tree": collecting logs, crafting planks, making sticks, building a crafting table, crafting a wooden pickaxe, mining cobblestone, and finally assembling the stone tool.

Without guidance, the probability of an agent stumbling upon this specific sequence through random exploration is near zero. While Large Language Models (LLMs) like GPT-4 or Codex possess the "knowledge" of these recipes, they lack grounding—they do not know if their theoretical plans are compatible with the specific physics or constraints of a given game engine. This paper introduces DECKARD (DECision-making for Knowledgable Autonomous Reinforcement-learning Dreamers), a framework that uses LLMs to hypothesize world models that are then verified through grounded experience.

The DECKARD Framework

The core innovation of DECKARD is the Abstract World Model (AWM). The AWM is a directed acyclic graph where nodes represent subgoals (items) and edges represent dependencies. Instead of following an LLM's plan blindly, DECKARD treats LLM output as a hypothesis to be tested in the environment. The agent operates in two alternating phases:

1. The Dream Phase

In this phase, the agent uses few-shot prompting with OpenAI’s Codex to hypothesize an AWM. By asking the LLM for Minecraft recipes and requirements (e.g., "What do I need to make a diamond pickaxe?"), the agent constructs a "dreamed" roadmap of what it believes it needs to accomplish. This process effectively prunes the exploration space; instead of attempting to craft every possible item, the agent focuses only on those the LLM suggests are relevant to the final goal.

2. The Wake Phase

The agent then enters the environment to verify these hypotheses. Using a modular RL policy built on top of a Video-Pretrained Transformer (VPT), the agent attempts to achieve the subgoals defined in the AWM.

  • Verification: If a "dreamed" recipe works, the node is marked as verified.
  • Correction: If the agent discovers a new dependency or finds that the LLM's recipe was incorrect, it updates the AWM with grounded experience.

This synergy allows the agent to benefit from the LLM's vast prior knowledge while remaining robust to the model's potential hallucinations or inaccuracies.

Implementation and Methodology

DECKARD is built upon several key technical pillars:

  • Video-Pretrained Transformer (VPT): The agent's base policy is initialized using VPT, which was trained on 70,000 hours of Minecraft gameplay videos, providing a strong foundation for basic motor skills.
  • Modular RL with Adapters: Rather than retraining the entire massive VPT model, DECKARD utilizes lightweight "adapters." These layers comprise only 2% of the total parameters and allow the agent to efficiently learn specific sub-policies for different items.
  • MineDojo: Experiments were conducted using the MineDojo implementation of Minecraft, which provides a standardized suite of tasks and observation spaces for research.

Key Results

DECKARD demonstrates that combining LLM reasoning with grounded RL leads to significant performance gains:

  • Enhanced Sample Efficiency: When focused on a specific goal, such as crafting a stone pickaxe, DECKARD was an order of magnitude (12x) more sample-efficient than non-LLM baselines.
  • Accelerated Discovery: In open-ended exploration tasks, DECKARD discovered difficult items (like stone tools and glass) more than twice as fast as agents without LLM guidance.
  • Robustness to Errors: To test the system's resilience, researchers provided the agent with "noisy" LLM data containing incorrect recipes. DECKARD continued to outperform baselines because its "Wake" phase allowed it to correct the LLM's mistakes through trial and error.

Discussion and Future Work

DECKARD represents a shift in how we use LLMs for embodied AI. Rather than treating the LLM as a dictator that provides a rigid plan, DECKARD treats it as a source of informed hypotheses. This approach mitigates the impact of LLM hallucinations and ensures the agent remains grounded in the reality of its environment.

However, limitations remain. The system currently relies on predefined functions to map game observations to text (textual grounding). Future iterations could incorporate vision-language models to automate this mapping. Additionally, while DECKARD excels at deterministic "recipe" sequences, extending the AWM to handle the stochastic nature of more complex environments remains an open research frontier.

Summary updated

Abstract

Reinforcement learning (RL) agents typically learn tabula rasa, without prior knowledge of the world. However, if initialized with knowledge of high-level subgoals and transitions between subgoals, RL agents could utilize this Abstract World Model (AWM) for planning and exploration. We propose using few-shot large language models (LLMs) to hypothesize an AWM, that will be verified through world experience, to improve sample efficiency of RL agents. Our DECKARD agent applies LLM-guided exploration to item crafting in Minecraft in two phases: (1) the Dream phase where the agent uses an LLM to decompose a task into a sequence of subgoals, the hypothesized AWM; and (2) the Wake phase where the agent learns a modular policy for each subgoal and verifies or corrects the hypothesized AWM. Our method of hypothesizing an AWM with LLMs and then verifying the AWM based on agent experience not only increases sample efficiency over contemporary methods by an order of magnitude but is also robust to and corrects errors in the LLM, successfully blending noisy internet-scale information from LLMs with knowledge grounded in environment dynamics.
BibTeX
@inproceedings{nottingham2023do,
  author = {Kolby Nottingham and Prithviraj Ammanabrolu and Alane Suhr and Yejin Choi and Hannaneh Hajishirzi and Sameer Singh and Roy Fox},
  title = {{Do Embodied Agents Dream of Pixelated Sheep: Embodied Decision Making using Language Guided World Modelling}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=lykdfoQHWa},
}
Figure