Collaborative Quest Completion with LLM-driven Non-Player Characters in Minecraft

Sudha Rao, Weijia Xu, Michael Xu, Jorge Leandro, Ken Lobb, Gabriel DesGarennes, Chris Brockett, Bill DolanarXiv 2024 · DOI

Introduction

Traditional Non-Player Characters (NPCs) in video games are typically constrained by rigid, pre-scripted dialogue trees. While Large Language Models (LLMs) like GPT-4 offer the potential for freeform interaction, integrating them into a dynamic 3D environment like Minecraft requires more than just a chatbot interface. Researchers from Microsoft have addressed this by developing collaborative agents capable of multi-step questing and real-time interaction via code generation.

Methodology

The study utilized a custom Minecraft minigame featuring a multi-stage quest: gathering materials, building a bridge to a floating island, defending against hostile mobs, and retrieving a legendary sword.

Overview of the quest environment and NPCs Elena and Alaric.

The technical framework relied on several key components:

  • Persona-Driven Prompting: NPCs were assigned distinct roles and skill sets. Elena, the village healer, could assist with mining but avoided combat, while Alaric, the warrior, was a capable fighter stranded on a floating island.
  • Game API Integration: Building on the work of Volum et al. (2022), NPCs executed actions such as mineBlock or attackEntity by generating function calls.
  • Closed-Loop Feedback: Unlike systems that assume action success, this framework returned function outcomes to the LLM. This enabled NPCs to provide in-character explanations for failures (e.g., "I don't have a pickaxe right now").
  • Sub-goal Generation: To maintain narrative focus, the system prompted GPT-4 every six turns to generate a "sub-goal," nudging the player back toward the primary quest objective.

Key Insights: Bidirectional Assistance

A significant finding of the study was the emergence of bidirectional help. While NPCs provided game knowledge, players instinctively compensated for the AI's lack of visual grounding. Players were observed warning NPCs of approaching creepers or placing blocks to help them navigate difficult terrain. This suggests that humans are willing to act as the "sensors" for a cognitively capable but visually "blind" AI.

Furthermore, the sub-goal mechanism acted as "narrative glue," allowing NPCs to acknowledge player tangents before pivoting back to the quest. The integration of API errors into the dialogue also improved believability, as NPCs could offer contextual apologies for technical failures.

Key Results

The researchers conducted a user study with 28 Minecraft players to evaluate the system.

Quest completion rates across different stages of the collaborative task.
  • Quest Completion: Only 25% of players (7 out of 28) completed the entire quest. The primary bottleneck was the "tedious" task of building a path to the floating island, which took approximately 10 minutes even for skilled players.
  • Player Satisfaction: Despite the low completion rate, 88% of participants reported having fun, and 53% found the experience superior to standard Minecraft gameplay.
  • Emergent Reasoning: NPCs demonstrated real-time negotiation skills, such as offering specific rewards like a Netherite sword to persuade hesitant players to assist.

Limitations and Future Work

The main limitation identified was the lack of visual and real-time game-state grounding. Because GPT-4 is language-only, NPCs occasionally "hallucinated" their surroundings or failed to notice they were under attack.

Future research will focus on:

  • Multimodal Integration: Incorporating vision-language models (VLMs) to give NPCs environmental awareness.
  • Real-time State Updates: Providing a constant stream of coordinates and environmental data to the LLM.
  • Improved Skill Sets: Developing NPCs capable of handling tedious tasks like building to improve overall quest completion rates.

Summary updated

BibTeX
@misc{rao2024collaborative,
  author = {Sudha Rao and Weijia Xu and Michael Xu and Jorge Leandro and Ken Lobb and Gabriel DesGarennes and Chris Brockett and Bill Dolan},
  title = {{Collaborative Quest Completion with LLM-driven Non-Player Characters in Minecraft}},
  year = {2024},
  eprint = {2407.03460},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.03460},
}
Figure