Reinforcement Learning for High-Level Strategic Control in Tower Defense Games
Joakim Bergdahl, Alessandro Sestini, Linus Gisslén
TL;DR
This work tackles automated playtesting and difficulty validation for tower-defense style mobile games, focusing on Plants vs. Zombies. It introduces a hybrid RL approach (HRL) that learns high-level strategy selection while delegating low-level actions to an existing heuristic AI, enabling scalable yet adaptable testing. Empirical results show HRL outperforms purely heuristic or random baselines on 40 PvZ levels in terms of success rate and cumulative reward, though level-specific puzzles limit generalization across unseen levels. The findings suggest HRL can generate actionable level-testing data and validate difficulty at scale, with future work aimed at improving cross-level generalization and extending the approach to other genres such as real-time strategy games.
Abstract
In strategy games, one of the most important aspects of game design is maintaining a sense of challenge for players. Many mobile titles feature quick gameplay loops that allow players to progress steadily, requiring an abundance of levels and puzzles to prevent them from reaching the end too quickly. As with any content creation, testing and validation are essential to ensure engaging gameplay mechanics, enjoyable game assets, and playable levels. In this paper, we propose an automated approach that can be leveraged for gameplay testing and validation that combines traditional scripted methods with reinforcement learning, reaping the benefits of both approaches while adapting to new situations similarly to how a human player would. We test our solution on a popular tower defense game, Plants vs. Zombies. The results show that combining a learned approach, such as reinforcement learning, with a scripted AI produces a higher-performing and more robust agent than using only heuristic AI, achieving a 57.12% success rate compared to 47.95% in a set of 40 levels. Moreover, the results demonstrate the difficulty of training a general agent for this type of puzzle-like game.
