Learning Human Behavior from Observation for Gaming Applications
Total Page:16
File Type:pdf, Size:1020Kb
University of Central Florida STARS Electronic Theses and Dissertations, 2004-2019 2007 Learning Human Behavior From Observation For Gaming Applications Christopher Moriarty University of Central Florida Part of the Computer Engineering Commons Find similar works at: https://stars.library.ucf.edu/etd University of Central Florida Libraries http://library.ucf.edu This Masters Thesis (Open Access) is brought to you for free and open access by STARS. It has been accepted for inclusion in Electronic Theses and Dissertations, 2004-2019 by an authorized administrator of STARS. For more information, please contact [email protected]. STARS Citation Moriarty, Christopher, "Learning Human Behavior From Observation For Gaming Applications" (2007). Electronic Theses and Dissertations, 2004-2019. 3269. https://stars.library.ucf.edu/etd/3269 LEARNING HUMAN BEHAVIOR FROM OBSERVATION FOR GAMING APPLICATIONS by CHRIS MORIARTY B.S. University of Central Florida, 2005 A thesis submitted in partial fulfillment of the requirements for the degree of Master of Science in the School of Electrical Engineering and Computer Science in the College of Engineering and Computer Science at the University of Central Florida Orlando, Florida Summer Term 2007 © 2007 Christopher Moriarty ii ABSTRACT The gaming industry has reached a point where improving graphics has only a small effect on how much a player will enjoy a game. One focus has turned to adding more humanlike characteristics into computer game agents. Machine learning techniques are being used scarcely in games, although they do offer powerful means for creating humanlike behaviors in agents. The first person shooter (FPS), Quake 2, is an open source game that offers a multi-agent environment to create game agents (bots) in. This work attempts to combine neural networks with a modeling paradigm known as context based reasoning (CxBR) to create a contextual game observation (CONGO) system that produces Quake 2 agents that behave as a human player trains them to act. A default level of intelligence is instilled into the bots through contextual scripts to prevent the bot from being trained to be completely useless. The results show that the humanness and entertainment value as compared to a traditional scripted bot have improved, although, CONGO bots usually ranked only slightly above a novice skill level. Overall, CONGO is a technique that offers the gaming community a mode of game play that has promising entertainment value. iii Dedicated to my Mom for letting my Dad buy the Apple IIGS instead of a car. iv ACKNOWLEDGMENTS I’d like to first acknowledge my friends at the UCF Intelligent Systems Lab. They are some of the smartest and most helpful folks I’ve ever met. In particular, Brian Becker and Gary Stein, whose programming wizardry far exceeds that of which any one person should possess. I can’t thank my family enough for the much needed moral support they always gave me. Last but definitely not least, I also thank my advisor, Dr. Gonzalez, for all his knowledge and guidance. v TABLE OF CONTENTS LIST OF FIGURES ......................................................................................................... X LIST OF TABLES .......................................................................................................... XI CHAPTER 1: INTRODUCTION AND BACKGROUND ............................................ 1 1.1 History of Video Games ........................................................................................... 1 1.1.2 Consoles vs PC .................................................................................................. 2 1.1.3 Graphics Don’t Mean Everything Anymore ...................................................... 3 1.2 Background of Research ........................................................................................... 5 1.2.1 Next-Generation Game Consoles Adding More Than Graphics ....................... 5 1.3 Game Engine as a Test-Bed for Research ................................................................. 6 1.4 Game AI Behind the Times ...................................................................................... 8 1.5 Machine Learning for Gaming .................................................................................. 9 1.6 Combining Machine Learning and Knowledge Engineering ................................. 11 1.7 CxBR and IASKNOT Comparison ......................................................................... 14 1.8 Default Level of Intelligence .................................................................................. 16 CHAPTER 2: LITERATURE REVIEW ..................................................................... 17 2.1 First Person Shooter Engines for Research ............................................................. 17 2.1.1 Systems That Simplify the Use of a Game Environment ................................ 17 2.2 Complex AI Employed Through Game Engines .................................................... 19 2.2.1 SOAR Rule-Based Architecture ...................................................................... 19 2.2.2 “D’Artagnan Cognitive Architecture” ............................................................. 21 2.2.3 Machine Learning Study .................................................................................. 23 2.2.4 Neural Networks applied to a FPS ................................................................... 25 2.3 Genetic Algorithms for Games ............................................................................... 27 2.3.1 Neuro-Evolution .............................................................................................. 28 2.4 Learning from Observation ..................................................................................... 29 2.4.1 “Learning Robotic Primitives” ........................................................................ 29 2.4.2 Complex Learning from Observation Techniques ........................................... 30 2.5 Summary ................................................................................................................. 31 CHAPTER 3: PROBLEM DEFINITION AND HYPOTHESIS................................ 34 3.1 General Problem Statements ................................................................................... 34 3.2 Specific Problem Statements .................................................................................. 35 3.2.1 Humanness in Games ....................................................................................... 35 3.2.2 Validating Humanness and Entertainment Value ............................................ 37 3.3 Hypothesis............................................................................................................... 37 3.4 Contributions........................................................................................................... 37 CHAPTER 4: APPROACH ........................................................................................... 38 vi 4.1 Introduction to Contextual Game Observation (CONGO) ..................................... 38 4.1.1 Learning from Observation using CxBR and NN............................................ 39 4.1.2 Synergistic Combination .................................................................................. 39 4.2 Overview of the System .......................................................................................... 40 4.2.1 Contextual Observation Module ...................................................................... 40 4.2.1.1 Context Inheritance ................................................................................... 41 4.2.1.2 Modified CxBR Engine Algorithm ........................................................... 42 4.2.1.3 Pseudo Code for Modified CxBR Algorithm ........................................... 42 4.2.2 Training module ............................................................................................... 44 4.2.2.1 RPROP – Neural Network Training Algorithm........................................ 44 4.2.2.2 Time Delay Neural Networks ................................................................... 45 4.2.3 Gaming Performance Module .......................................................................... 46 4.2.3.1 Performance CxBR engine ....................................................................... 46 4.3 Context Breakdown ................................................................................................ 48 4.3.1 Reaction Contexts ............................................................................................ 50 4.4 Summary ................................................................................................................. 50 CHAPTER 5: IMPLEMENTATION ........................................................................... 52 5.1 Quake 2 Introduction .............................................................................................. 52 5.1.1 Game Play ........................................................................................................ 52 5.1.2 ACEbot ............................................................................................................ 53 5.2 Quake 2 Source Code .............................................................................................. 54 5.2.1 Quake Structure ............................................................................................... 55 5.2.1.1 Sever Executable Modifications