LLM-Driven NPCs for Realistic Behavior and Collaboration in Games

relationships.isAuthorOf

Journal Title

Journal ISSN

Volume Title

Publisher

Abstract

Realistic behaviors of non-player characters (NPCs) are important in interactive games and simulations because NPCs influence how players understand and interact with virtual worlds. Large language models (LLMs) provide new opportunities for developing believable and socially responsive NPCs. A review of recent work shows that two areas have received limited attention in existing LLM-based approaches: NPC decision-making grounded in a continuously updated environment and inter-NPC interactions based on observable agent states.This thesis proposes an LLM-driven NPC framework to address these issues. The framework maintains a centralized Global World State that records environment states, player states, and observable states of the NPCs, providing NPC reasoning with explicit information about available entities, their locations, and current conditions. An LLM-based decision-making pipeline uses these structured representations to generate actions, update world states, and maintain behavioral continuity. The framework is implemented as a turn-based simulation in which time advances through discrete ticks. Each tick processes the Environment, Player, and NPC Turns in a fixed order, allowing all three to update the shared world state. Simulation results show that NPC behavior remained consistent with current object availability, object states, locations, and environmental changes while adapting to other agents’ requests and ongoing actions. These capabilities enabled coherent multi-step collaboration among multiple NPCs in a dynamic environment.

Description

Thesis (Master's)--University of Washington, 2026

Citation

DOI