ABSTRACT

The biggest challenge when building AI for modern strategy games is dealing with their complexity. This chapter outlines solutions to common pitfalls when using Monte Carlo Tree Search (MCTS) and shows how to adapt the algorithm to work with strategy games. The strength of MCTS lies in its ability to cope with large, complex problems in which the long-term ramifications of a move are generally more important than its short-term effects. For strategy games, one common problem is when a single move for a player can be broken down into several actions. In Xenonauts 2 a unit can move to upwards of 50 different locations and select between 4 different weapons to attack 1 of 16 different targets, not to mention additional unit abilities. By using an iterator pattern and only adding a single action per expansion people can avoid a lot of resource waste resulting in a significant performance boost.