Journal Article

·2026 OPEN ACCESS

MATHEMATICAL AND GRAPH-THEORETICAL ANALYSIS OF BEHAVIOR TREES FOR NPC MODELING

Seda Göktepe Körpeoğlu YTU , Melike Gören YTU , İrem Arslantürk YTU

Eskişehir Technical University Journal of Science and Technology A - Applied Sciences and Engineering

Abstract

Behavior Trees (BTs) have emerged as a widely adopted method for modeling Non-Player Character (NPC) behavior in digital games, offering modularity, scalability, and flexibility compared to traditional approaches such as Finite State Machines. This paper explores the theoretical underpinnings of BTs and their application in NPC modeling. Behavior trees are formalized using graph theory, propositional logic, and probabilistic models, and their computational complexity is analyzed to position them within the broader mathematical framework of decision-making systems. Furthermore, practical examples are presented to demonstrate the advantages of BTs in creating adaptive and realistic NPC behaviors. The results highlight that BTs not only provide practical benefits for game developers but also offer a rigorous mathematical structure for analyzing decision-making models, enabling comparison with alternative approaches such as Markov Decision Processes and reinforcement learning.

Keywords

Flexibility (engineering) Probabilistic logic Markov chain Mathematical structure Graph Markov decision process Tree (set theory) Mathematical model Computer science Artificial intelligence Theoretical computer science

Subject Areas

Artificial Intelligence in Games ·Artificial Intelligence ·Physical Sciences
Reinforcement Learning in Robotics ·Artificial Intelligence ·Physical Sciences
Formal Methods in Verification ·Computational Theory and Mathematics ·Physical Sciences

OpenAlex SDG Match

SDGs auto-classified by OpenAlex (score ≥ 0.4 shown).

Peace, Justice and strong institutions 79%