COMPARISON OF MACHINE LEARNING METHODS AND TRADITIONAL ALGORITHMS IN NPC NAVIGATION AND BEHAVIOR TASKS
DOI:
https://doi.org/10.53920/ITS-2026-1-1Keywords:
Behavior control, ML-Agents, games, NPC, Reinforcement Learning, RL, Unity, PPO, LSTM, Behavior Trees, State Machines, Deep Learning, Reinforcement LearningAbstract
As part of this study, the Unity ML-Agents toolkit, which implements the reinforcement learning paradigm, was tested as a methodological foundation for modeling the autonomous behavior of non-player characters (NPCs). This approach is considered a conceptually distinct and adaptive alternative to classical control architectures, particularly behavior trees and state machines, as it provides a higher level of nonlinearity, variability, and cognitive complexity in agent behavior.
The empirical part of the study was implemented in the Unity environment using the game “Snake” as a test case for comparative analysis. The study compares the performance of NPCs controlled by traditional algorithms with the results obtained using ML-Agents that employed Proximal Policy Optimization (PPO) and its modification with Long Short-Term Memory (LSTM) networks (PPO+LSTM). Comparative tables of results allow for a quantitative and qualitative assessment of the effectiveness of the proposed approach, as well as an outline of its potential in the context of further research in the field of intelligent agent systems.
The scientific novelty of this study lies in the verification of the hypothesis regarding the feasibility of using reinforcement learning methods as an alternative to traditional control architectures, as confirmed by empirical results obtained in the test environment of the “Snake” game. The practical significance of this work lies in the fact that the proposed recommendations and the results of the comparative analysis can be directly integrated into the development process of modern game products, contributing to an increase in the level of autonomy, adaptability, and intellectual complexity of NPC behavior.
The conclusions of this work formulate a set of practical recommendations addressed to game developers and game designers who are seeking alternative approaches to organizing and controlling the behavior of non-player characters in their own projects. In addition, a systematic comparative analysis was conducted of the integration capabilities and limitations of various architectural solutions, specifically the Unity ML-Agents toolkit and behavior trees (Behavior Trees), which allows not only to outline their functional advantages and disadvantages in the context of practical application but also to identify promising directions for the further optimization of agent-based systems in the field of interactive digital environments.
Thus, this study not only expands theoretical understanding of the potential applications of policy optimization algorithms in the field of interactive simulations, but also lays the groundwork for future research aimed at developing scalable models of agent behavior capable of achieving a qualitatively new level of cognitive adaptability in digital environments.
References
1. Millington I., Funge J. Artificial Intelligence for Games. Taylor & Francis Group, 2018. 872 p.
2. Liu T., Cann A., Colbert I., Saeedi M. BT+RL: Hybrid NPCs for Commercial Video Games / T. Liu, A. Cann, I. Colbert, M. Saeedi // arXiv. 2025. arXiv:2510.14154v1.
3. Addoum M. A., Mekhaemar J., Rouffet M., Jacopin E. Khaldun: GOAP for both Procedural Level generation and NPC Behaviors // Proceedings of the IEEE Conference on Games (CoG). 2024. P. 324-326.
4. Bellemare M., Veness J., Bowling M. Investigating Contingency Awareness Using Atari 2600 Games. Proceedings of the AAAI Conference on Artificial Intelligence. 2012. Vol. 26, no. 1. P. 864–871.
5. Human-level control through deep reinforcement learning / V. Mnih et al. Nature. 2015. Vol. 518, no. 7540. P. 529–533.
6. Juliani A., Berges V.-P., Vckay E., Gao Y., Henry H., Mattar M., Lange D. Unity: A General Platform for Intelligent Agents // Proceedings of the AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment (AIIDE). 2018. Vol. 14,
No. 1. P. 123-134.
7. Ma B., Tang M., Zhang J. Application of Reinforcement Learning in the Snake Game: A Comparative Study of Q-learning and SARSA / B. Ma, M. Tang, J. Zhang. - [S.l. : University of California, Berkeley, n.d.]. 5 p.
8. Hausknecht M., Stone P. Deep Recurrent Q-Learning for Partially Observable MDPs // Advances in Neural Information Processing Systems 28 (NIPS 2015) / ed. by C. Cortes, N. Lawrence, D. Lee, M. Sugiyama, R. Garnett. 2015. P. 3338 - 3346.
9. Li Z., Xi-Jia Z., Altundas B., Chen L., Paleja R., Gombolay M. Towards Automated Semantic Interpretability in Reinforcement Learning via Vision-Language Models // arXiv. 2025.
10. GitHub - Unity-Technologies/ml-agents: The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning. GitHub. URL: https://github.com/Unity-Technologies/ml-agents (дата звернення: 05.02.2026).
11. Unity Real-Time Development Platform | 3D, 2D, VR & AR Engine. Unity. URL: https://unity.com/ (дата звернення: 05.02.2026).
12. Sekhavat Y. A. Behavior Trees for Computer Games. International Journal on Artificial Intelligence Tools. 2017. Vol. 26, no. 02. P. 1730001.
13. Unity - Scripting API: Random.Range. Unity - Manual: Unity 6.3 User Manual. URL: https://docs.unity3d.com/6000.3/Documentation/ScriptReference/Random.Range.html (дата звернення: 02.02.2026).
14. Previous PyTorch Versions. PyTorch. URL: https://pytorch.org/get-started/previous-versions/ (дата звернення: 02.02.2026).
15. CUDA Toolkit Archive. NVIDIA Developer. URL: https://developer.nvidia.com/cuda-toolkit-archive (дата звернення: 02.02.2026).
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Антон Андрійович БУТЕНКО, Олексій Дмитрович ГОЛУБЕНКО, Олександр Анатолійович КЛИМЕНКО, Дмитро Володимирович ШАНДИБА

This work is licensed under a Creative Commons Attribution 4.0 International License.





