Realistic Dialogue Engine for Video Games
Total Page:16
File Type:pdf, Size:1020Kb
Western University Scholarship@Western Electronic Thesis and Dissertation Repository 1-5-2014 12:00 AM Realistic Dialogue Engine for Video Games Caroline M. Rose The University of Western Ontario Supervisor Mike Katchabaw The University of Western Ontario Graduate Program in Computer Science A thesis submitted in partial fulfillment of the equirr ements for the degree in Master of Science © Caroline M. Rose 2014 Follow this and additional works at: https://ir.lib.uwo.ca/etd Part of the Artificial Intelligence and Robotics Commons Recommended Citation Rose, Caroline M., "Realistic Dialogue Engine for Video Games" (2014). Electronic Thesis and Dissertation Repository. 2652. https://ir.lib.uwo.ca/etd/2652 This Dissertation/Thesis is brought to you for free and open access by Scholarship@Western. It has been accepted for inclusion in Electronic Thesis and Dissertation Repository by an authorized administrator of Scholarship@Western. For more information, please contact [email protected]. REALISTIC DIALOGUE ENGINE FOR VIDEO GAMES (Thesis format: Monograph) by Caroline M. Rose Graduate Program in Computer Science A thesis submitted in partial fulfillment of the requirements for the degree of Master of Science The School of Graduate and Postdoctoral Studies The University of Western Ontario London, Ontario, Canada © Caroline M. Rose 2015 Abstract The concept of believable agent has a long history in Artificial Intelligence. It has applicability in multiple fields, particularly video games. Video games have shown tremendous technological advancement in several areas such as graphics and music; however, techniques used to simulate dialogue are still quite outdated. In this thesis, a method is proposed to allow a human player to interact with non-player characters using natural-language input. By using various techniques of modern Artificial Intelligence such as information retrieval and sentiment analysis, non-player characters have the capability of engaging in dynamic dialogue: they can answer questions, ask questions, remember events, and more. This conversation system is highly customizable, so the types of responses that non-player characters give can be modified to fit within a game’s storyline. Although the system only currently allows for simple dialogue, it illustrates the potential for a more robust way to simulate believable agents in video games. Keywords Video games, non-player characters, conversation, dialogue, autonomy, believability, believable agent, intelligent agent, illusion of intelligence ii Acknowledgments I wish to acknowledge the tremendous help given to me by my supervisor, Dr. Michael Katchabaw. Without his guidance, this thesis would not have been possible. I also wish to acknowledge Andrew Kope for his help in creating the episodic memory module. iii Table of Contents Abstract ............................................................................................................................... ii Acknowledgments.............................................................................................................. iii Table of Contents ............................................................................................................... iv List of Tables ..................................................................................................................... ix List of Figures ..................................................................................................................... x List of Plates ..................................................................................................................... xv Chapter 1 ............................................................................................................................. 1 1 Introduction .................................................................................................................... 1 1.1 Artificial Intelligence in Games .............................................................................. 1 1.1.1 Movement ................................................................................................... 2 1.1.2 Decision Making ......................................................................................... 2 1.1.3 Strategy ....................................................................................................... 2 1.1.4 Dialogue ...................................................................................................... 2 1.2 Research Questions ................................................................................................. 3 1.3 Motivation for Research ......................................................................................... 3 1.4 Proposed Method .................................................................................................... 4 1.4.1 Types of Input ............................................................................................. 5 1.4.2 Expected Types of Responses ..................................................................... 5 1.4.3 End of Conversation ................................................................................... 6 1.5 Structure of Thesis .................................................................................................. 6 Chapter 2 ............................................................................................................................. 7 2 State of the Art in Video Games .................................................................................... 7 2.1 Cutscenes ................................................................................................................ 7 2.1.1 Classifications ............................................................................................. 8 iv 2.1.2 Advantages .................................................................................................. 9 2.1.3 Disadvantages ............................................................................................. 9 2.2 Branching Dialogue Trees .................................................................................... 10 2.2.1 Advantages ................................................................................................ 11 2.2.2 Disadvantages ........................................................................................... 11 2.3 Simple Natural Language Processing ................................................................... 12 2.3.1 Classifications ........................................................................................... 12 2.3.2 Advantages ................................................................................................ 14 2.3.3 Disadvantages ........................................................................................... 14 2.4 Summary ............................................................................................................... 15 Chapter 3 ........................................................................................................................... 16 3 State-of-the-Art in Artificial Intelligence..................................................................... 16 3.1 Information Extraction .......................................................................................... 16 3.1.1 Named Entity Recognition and Classification .......................................... 17 3.1.2 Coreference Resolution ............................................................................. 19 3.1.3 Relationship Extraction ............................................................................. 20 3.2 Sentiment Analysis ............................................................................................... 23 3.2.1 Potential Use in Video Games .................................................................. 23 3.3 Question Answering.............................................................................................. 24 3.3.1 Difficulties ................................................................................................ 24 3.3.2 Potential Use in Video Games .................................................................. 25 3.4 Summary ............................................................................................................... 25 Chapter 4 ........................................................................................................................... 27 4 Conversation Model ..................................................................................................... 27 4.1 Opening Greeting .................................................................................................. 28 4.1.1 Social Distance.......................................................................................... 29 v 4.1.2 Relative Power .......................................................................................... 29 4.1.3 Absolute Ranking of Imposition ............................................................... 30 4.1.4 Justification for Inclusion in Video Games .............................................. 30 4.2 Small Talk ............................................................................................................. 31 4.2.1 Justification for Inclusion in Video Games .............................................. 32 4.3 Core ....................................................................................................................... 32 4.3.1 Player