The mind and the body: A hybrid architecture for believable game AI

Loading...
Thumbnail Image

URL

Journal Title

Journal ISSN

Volume Title

School of Science | Master's thesis

Authors

Department

Mcode

Language

en

Pages

46

Series

Abstract

The game industry utilizes predefined NPC behaviours to ensure that non-Player Characters (NPCs) are predictable. However, these solutions lack the natural language processing capability needed to simulate the communication styles and behaviours of real humans. Even though Large Language Models (LLMs) address this conversational deficit, they introduce instability through hallucination, latency, and logical incoherence. To resolve this trade-off, this thesis presents a hybrid architecture that com-bines the natural language understanding of LLMs with conventional ap-proaches such as Finite State Machines (FSMs) and Behaviour Trees (BTs). Specifically, the LLM acts as a “mind” that makes high-level strategic and emotional decisions, while a traditional FSM & BT handle runtime behaviour control in the game engine. This architecture is implemented in Echoshell, a survival builder game where the player interacts with NPCs driven by this system. As iterating within Unre-al Engine 5 is costly, the architecture's logic was validated during the early stages using n8n, a visual automation tool for running scripts and AI-integrated functionalities. The development process incorporates concepts such as Function Calling and Contextual Knowledge Injection to mitigate the challenges of generative models. This thesis analyses the methodology, early prototyping, and the subse-quent production phase of Echoshell. The results demonstrate that this ap-proach enables AI to process both natural language and behaviour more intel-ligently. The study provides a reusable pattern applicable to future titles, ele-vating the gaming experience by stabilizing the inherent unpredictability of generative agents.

Description

Supervisor

Hämäläinen, Perttu

Other note

Citation