Biologically-Inspired Algorithms for Adaptive Non-Player Character Behavior in Video Games
摘要
Video game designers frequently employ different movement algorithms to give players the impression of the intelligent and unpredictable motions of non-player characters or enemy agents. This paper explores the application of metaheuristic biological algorithms in video games to enhance the unpredictability and realism of enemy characters, moving away from traditional pre-programmed NPC behaviors. Developing the bespoke game “Run and Catch” incorporates the utilization of Particle Swarm Optimization (PSO) and Ant Colony Optimization (ACO) for directing the movement of non-player characters. We tackle the premature convergence challenge by introducing an adaptive \(Finder-Tracker\ agent\) approach. This mechanism maintains diversity in enemy movements to ensure responsiveness to real-time player character activities. The findings illustrate the adverse effects of early convergence on both immersion and the variety of non-player character movements within a 2D game environment. Moreover, the study underscores the success of ACO and PSO, equipped with the \(Finder-Tracker\ agent\) framework, in reshaping group movements of non-player characters and effectively dealing with the convergence challenge.