Modeling and Experimental Analysis of Troop Pathfinding and Target Selection Algorithms in Clash of Clans–Style War Scenarios
Pathfinding and target selection algorithms play a critical role in real-time strategy and mobile games, directly influencing gameplay balance, fairness, and player skill expression. Unlike traditional shortest-path algorithms such as A*, many commercial games intentionally employ simplified or constrained pathfinding to preserve strategic depth. This paper presents a modeling and experimental analysis of troop pathfinding and target selection behavior inspired by Clash of Clans, with a focus on Clan War attack scenarios involving troop movement toward Town Halls and defensive structures. Since the internal implementation of Clash of Clans is proprietary, this study proposes a behavioral approximation model based on observable in-game mechanics. A hybrid algorithm combining greedy nearest-target selection, local obstacle-aware movement, and priority-based cost functions is designed and evaluated. Multiple simulated base layouts with varying densities and wall configurations are tested. Results show that intentionally non-optimal pathfinding enhances game balance, prevents deterministic outcomes, and promotes strategic base design. The study follows the IMRAD structure and applies standard experimental game AI research methodologies.