Abstract. Most modern real-time strategy computer games have a sophisticated but fixed 'AI' component that controls the computer's actions. Once the user has learned how such a game will react, the game quickly loses its appeal. This paper describes an example of how a learning classifier system (based on Wilson's ZCS [1]) can be used to equip the computer with dynamically-changing strategies that respond to the user's strategies, thus greatly extending the games playability for serious gamers.
The Game and the Classifier SystemReal-time strategy (RTS) games typically involve fighting a battle against a computer opponent. This opponent typically has a very sophisticated but essentially static strategy and once the user has learned how it behaves, the game loses its playability. To get round this limitation we have used a learning classifier system (LCS) to provide the computer with the capability to dynamically change its strategy. LCSs are sometimes criticized for being slow to learn. In this example, the LCS has short conditions so as to fit in the real-time loop; success also depends on a careful choice of the types of actions.The game we implemented, using the publicly available version of the Auran Jet game engine, involves two opposing armies each consisting of two squads of 20 soldiers, moving on hilly terrain. A squad defaults to moving in a 6-6-6-2 formation but the soldiers are individually governed by a flocking algorithm [2] so that squad shapes are very fluid in battles. The essence of the game play is to jockey for position, because it pays for a squad to attack the flank of the enemy or for two squads to attack a third if its companion squad is too far away to offer support quickly enough. Figure 1 illustrates the idea. The rectangles are identifying battle-flags. The large diamond is the cursor that the user employs to command his squads, by placing the cursor somewhere and then left-or rightclicking to summon a particular squad towards that location.The classifier system sends commands to the computer's squads, at randomlychosen times within a two-to four-second interval (experimentally determined to offer good playability). The condition part has 14 bits as follows, the values depend on the squad to be commanded. For enemy squad 1, two bits describe how far away it is; one bit indicates whether that squad is engaged in a fight; E. Cantú-Paz et al. (Eds.): GECCO