Imitation learning through games: theory, implementation and evaluation

Despite a history of games-based research, academia has generally regarded commercial games as a distraction from the serious business of AI, rather than as an opportunity to leverage this existing domain to the advancement of our knowledge. Similarly, the computer game industry still relies on techniques that were developed several decades ago, and has shown little interest in adopting more progressive academic approaches. In recent times, however, these attitudes have begun to change; under- and post-graduate games development courses are increasingly common, while the industry itself is slowly but surely beginning to recognise the potential offered by modern machine-learning approaches, though games which actually implement said approaches on more than a token scale remain scarce. One area which has not yet received much attention from either academia or industry is imitation learning, which seeks to expedite the learning process by exploiting data harvested from demonstrations of a given task. While substantial work has been done in developing imitation techniques for humanoid robot movement, there has been very little exploration of the challenges posed by interactive computer games. Given that such games generally encode reasoning and decision-making behaviours which are inherently more complex and potentially more interesting than limb motion data, that they often provide inbuilt facilities for recording human play, that the generation and collection of training samples is therefore far easier than in robotics, and that many games have vast pre-existing libraries of these recorded demonstrations, it is fair to say that computer games represent an extremely fertile domain for imitation learning research. In this thesis, we argue in favour of using modern, commercial computer games to study, model and reproduce humanlike behaviour. We provide an overview of the biological and robotic imitation literature as well as the current status of game AI, highlighting techniques which may be adapted for the purposes of game-based imitation. We then proceed to describe our contributions to the field of imitation learning itself, which encompass three distinct categories: theory, implementation and evaluation. We first describe the development of a fully-featured Java API - the Quake2 Agent Simulation Environment (QASE) - designed to facilitate both research and education in imitation and general machine-learning, using the game Quake 2 as a testbed. We outline our motivation for developing QASE, discussing the shortcomings of existing APIs and the steps which we have taken to circumvent them. We describe QASE’s network layer, which acts as an interface between the local AI routines and the Quake 2 server on which the game environment is maintained, before detailing the API’s agent architecture, which includes an interface to the MatLab programming environment and the ability to parse and analyse full recordings of game sessions. We conclude the chapter with a discussion of QASE’s adoption by numerous universities as both an undergraduate teaching tool and research platform. We then proceed to describe the various imitative mechanisms which we have developed using QASE and its MatLab integration facilities. We first outline a behaviour model based on a well-known psychological model of human planning. Drawing upon previous research, we also identify a set of believability criteria - elements of agent behaviour which are of particular importance in determining the “humanness” of its in-game appearance. We then detail a reinforcement-learning approach to imitating the human player’s navigation of his environment, centred upon his pursuit of items as strategic goals. In the subsequent section, we describe the integration of this strategic system with a Bayesian mechanism for the imitation of tactical and motion-modelling behaviours. Finally, we outline a model for the imitation of reactive combat behaviours; specifically, weapon-selection and aiming. Experiments are presented in each case to demonstrate the imitative mechanisms’ ability to accurately reproduce observed behaviours. Finally, we criticise the lack of any existing methodology to formally gauge the believability of game agents, and observe that the few previous attempts have been extremely ad-hoc and informal. We therefore propose a generalised approach to such testing; the Bot-Oriented Turing Test (BOTT). This takes the form of an anonymous online questionnaire, an accompanying protocol to which examiners should adhere, and the formulation of a believability index which numerically expresses each agent’s humanness as indicated by its observers, weighted by their experience and the accuracy with which the agents were identified. To both validate the survey approach and to determine the efficacy of our imitative models, we present a series of experiments which use the believability test to evaluate our own imitation agents against both human players and traditional artificial bots. We demonstrate that our imitation agents perform substantially better than even a highly-regarded rule-based agent, and indeed approach the believability of actual human players. Some suggestions for future directions in our research, as well as a broader discussion of open questions, conclude this thesis.