Intelligent NPC AI Based on FSM and Reinforcement Learning: Implementation Study of A 2D Mobile Idle RPG Game 


Vol. 14,  No. 6, pp. 480-488, Jun.  2025
https://doi.org/10.3745/TKIPS.2025.14.6.480


PDF
  Abstract

This study focuses on the design and implementation of an intelligent NPC AI system that integrates Finite State Machines (FSM) and reinforcement learning in mobile idle RPG games. By combining FSM with reinforcement learning techniques such as Q-learning and Deep Q-Networks (DQN), the system optimizes NPCs’ environmental perception, combat strategies, and state management. The NPC AI dynamically transitions between various states such as idle, attack, and retreat, and experimental evaluation involved collecting and analyzing performance metrics such as combat win rates, response times, and movement distances to refine behavioral patterns and maintain game balance. This study proposes a method for enhancing NPC AI performance in idle RPGs through the integrated application of FSM and reinforcement learning. Through real-time data analysis, the difficulty and behavior patterns of NPCs were dynamically adjusted, and an intelligent NPC system was implemented that adapts to various combat environments and situations. This research provides a guide for developing auto-roguelike RPG games and can be used as foundational material for enhancing game experiences based on real-time AI optimization.

  Statistics


  Cite this article

[IEEE Style]

D. Kim and S. Koh, "Intelligent NPC AI Based on FSM and Reinforcement Learning: Implementation Study of A 2D Mobile Idle RPG Game," The Transactions of the Korea Information Processing Society, vol. 14, no. 6, pp. 480-488, 2025. DOI: https://doi.org/10.3745/TKIPS.2025.14.6.480.

[ACM Style]

Dongju Kim and Seok-Joo Koh. 2025. Intelligent NPC AI Based on FSM and Reinforcement Learning: Implementation Study of A 2D Mobile Idle RPG Game. The Transactions of the Korea Information Processing Society, 14, 6, (2025), 480-488. DOI: https://doi.org/10.3745/TKIPS.2025.14.6.480.