OPPONENT MODELING IN REAL-TIME STRATEGY GAMES Frederik Schadd, Sander Bakkes and Pieter Spronck Universiteit Maastricht MICC-IKAT P.O. Box 616 NL-6200 MD Maastricht The Netherlands e-mail: f.schadd@student.unimaas.nl, {s.bakkes,p.spronck}@micc.unimaas.nl ABSTRACT Real-time strategy games present an environment in which game AI is expected to behave realistically. One feature of realistic behaviour in game AI is the ability to recognise the strategy of the opponent player. This is known as opponent modeling. In this paper, we propose an approach of opponent modeling based on hierarchi- cally structured models. The top-level of the hierarchy can classify the general play style of the opponent. The bottom-level of the hierarchy can classify specific strate- gies that further define the opponent’s behaviour. Ex- periments that test the approach are performed in the RTS game Spring. From our results we may conclude that the approach can be successfully used to classify the strategy of an opponent in the Spring game. INTRODUCTION In computer gaming, real-time strategy (RTS) is a genre of simulated wargames which take place in real time. In RTS games, the player needs to construct a base and build units for the purpose of destroying the opponent. The opponent is either a human player, or a player con- trolled by an artificial intelligence (AI). Each unit-type has particular strengths and weaknesses. To effectively play an RTS game, the player has to utilise the right units in the right circumstances. An important factor that influences the choice of strat- egy, is the strategy of the opponent. For instance, if one knows what types of units the opponent has, then typ- ically one would choose to build units that are strong against those of the opponent. To make predictions about the opponent’s strategy, an AI player can estab- lish an opponent model. Many researchers point out the importance of modelling the opponent’s strategy [2, 3, 9, 10, 12, 14], and state that opponent models are sorely needed to deal with the complexities of state- of-the-art video games [8]. Establishing effective opponent models in RTS games, however, is a particular challenge because of the lack of perfect information of the game environment. In classi- cal board games the entire board is visible to the player; a player can observe all the actions of the opponent. Hence, assessing the opponent’s strategy and building an opponent model is possible in principle, for instance by using case-based reasoning techniques [1]. In RTS games, however, the player has to deal with imperfect information [5]. Typically, the player can only observe the game map within a certain visibility range of its own units. This renders constructing opponent mod- els in an RTS game a difficult task. In this paper we will investigate to what extent models of the opponent’s strategy can be established in an imperfect-information RTS-game environment. The outline of this paper is as follows. We will first in- troduce the concept of opponent modeling. Then, our approach to establish effective opponent models in RTS games will be discussed. Subsequently, our implementa- tion of the approach will be presented. The experiments that test our approach are described next, followed by a discussion of the experimental results. Finally, we pro- vide conclusions and describe future work. OPPONENT MODELING In general, an opponent model is an abstracted descrip- tion of a player or a player’s behaviour in a game [8]. Opponent modeling can be seen as a classification prob- lem, where data that is collected during the game is classified as one of the available opponent models. A limiting condition is the fact that in RTS games, these classifications have to be performed in real-time, while many other computations, such as rendering the game graphics, have to be performed in parallel. This lim- its the amount of available computing resources, which is why only computationally-inexpensive techniques are suitable for opponent modeling in RTS games. Preference-based modeling is a commonly used computationally-inexpensive technique [4]. The tech- nique identifies the model of an opponent by analyzing the opponent’s choices in important game states. Due to the visibility limitations in RTS games, however, it is common that choices of the opponent cannot always be observed. In the present research we use Spring, illustrated in