Supporting Dialogue Generation for Story-Based Games
Total Page:16
File Type:pdf, Size:1020Kb
Proceedings of the Fifth Artificial Intelligence for Interactive Digital Entertainment Conference Supporting Dialogue Generation for Story-Based Games Christopher Kerr, Duane Szafron Department of Computing Science, University of Alberta Edmonton, AB, Canada {kerr, duane}@cs.ualberta.ca Abstract appropriate and believable throughout the game, the Providing compelling, realistic, immersive game worlds is designers could use lack of behavior as a plot device. one of the major goals in modern game design. The Unfortunately, the creation of realistic NPC behavior is presence of unique and interesting dialogue for all of the not without its costs. The creation of unique and characters in a game enhances this sense of immersion. In appropriate behavior for the multitude of NPCs, especially this paper we present the concept of an “Intentional secondary NPCs, found in a game is often considered to be Dialogue Line” that supports the efficient generation of prohibitively time-consuming and expensive. What is multiple variations of a dialogue, where these variations are needed is a means of efficiently and effectively creating both unique and appropriate to the character who is realistic character behavior for the NPCs who populate the speaking them. This paper focuses on how machine learning game world, reducing the cost of making the game more can be used to quickly populate the intentional dialogue lines with existing content. immersive. A serious content bottleneck with realistic behaviors exists that is analagous to the graphics content bottleneck of ten years ago. To solve the behavior content Introduction bottleneck, we need abstractions that parallel the triangle- model-texture map abstraction that solved the graphics Imagine that you have just stepped into a tavern in a small bottleneck by representing graphics as data-driven content town. You are here because this is where, according to the rather than procedural algorithms (Hecker 2008) (Rabin et locals at least, you are most likely to find a little action. al. 2009). There are several aspects of the realistic NPC However, instead of a lively establishment full of patrons behavior problem, each requiring a set of abstractions. In enjoying themselves, what you have found is more akin to this paper, we tackle one very important component of what someone might expect to see in a wax museum. In immersive behavior – varied and contextually-sensitive place of lively patrons you find stiff unmoving people who dialogue. We introduce an abstraction, the intentional all seem to repeat the same set of two or three phrases. It is dialogue line, to facilitate the efficient creation of likely that you would find the whole situation quite appropriate, interesting dialogue for an arbitrary number of unnerving and quickly make your way out of the tavern. NPCs. While this may sound as if it is a scene out of a cheap Following a brief discussion of some related work, the horror film, it is in fact a scene found all too often in the remainder of this paper details the specifics of an majority of story-based video games. intentional dialogue line, as well as some tools to facilitate The idea of immersion has become a hot topic within the this abstraction. We discuss how intentional dialogue lines games industry in recent years as designers strive to create are translated into actual dialogue within the game. more believable worlds for their games (Hocking 2008). Following that, we present a machine learning method for By populating the game world with characters who behave quickly populating intentional dialogue lines with user in a believable manner, the designers enhance the player’s created content and then discuss the results of our machine ability to suspend disbelief. An increased sense of learning technique. immersion allows the player to more fully enjoy the gaming experience. In addition, the inclusion of realistic Related Work non-player characters (NPCs) in the game world can also provide designers with an increased number of creative The existing work on facilitating efficient dialogue options. Designers are able to influence the atmosphere of generation falls into two categories. One category focuses the game through the ambient behaviors of the NPCs. In on the development of tools to better represent game our previous example, if prior to entering the tavern the dialogue and tries to simplify the dialogue creation game had featured lively realistic characters, then the process. The results of this work can be seen throughout behavior of the NPCs within the tavern would seem all the the games industry with tools like BioWare Corp’s Aurora more unsettling. By ensuring that NPC behavior is Toolset for the game Neverwinter Nights (NWN 2009), or Bethesda Softworks' Elder Scrolls Construction Set for The Elder Scrolls IV: Oblivion (Oblivion 2009). This category Copyright © 2009, Association for the Advancement of Artificial also includes ongoing research to improve these kinds of Intelligence (www.aaai.org). All rights reserved. tools (Siegel and Szafron 2009). While such tools ease the 154 process of creating dialogue, they do not reduce the its intent and meets the situation’s requirements. This amount of dialogue that must be authored by the designers. approach allows NPCs to relate similar information using It is analogous to having excellent tools for creating different phrasing, helping to eliminate the drone effect graphical game objects while lacking the abstractions that described previously. The PC lines in Oblivion’s (Oblivion allow the same model to be re-used with different textures. 2009) wiki-style dialogue system can be thought of as The other category of work on game dialogue uses a “intentional” dialogue lines, though they are not replaced variety of natural language processing techniques to with an actual dialogue line at game time. Similarly, the wholly generate game dialogue. Examples of this approach short synopsis lines that the player is presented with in can be found in Kacmarcik's NPC dialogue generation Mass Effect (Mass Effect 2009) can also be thought of as (Kacmarcik 2006) and the free form dialogue found in the “intentional” lines, though in this case each Façade (Mateas and Stern 2003). While this approach is “intentional” line has only a single actual dialogue line perhaps the most exciting, it also faces the greatest associated with it. challenges. Much of the dialogue these approaches The question is how to create these intentional dialogue generate is simplistic and rigidly structured. Pure lines, and how to dynamically map the intent to an actual generation of game dialogue wrests too much dialogue line during the game. One idea is to have the designer control away from the game designers, who are tasked with simply write a dialogue line with the given intent, and then ensuring the game’s entertainment value and integrity. perform some automatic paraphrasing to morph the line Additionally, there is a great deal of difficulty in assigning into a variant with the desired traits. Unfortunately, there ratings, such as those of the ESRB, to games in which the are some major difficulties with this approach. In order for dialogue that is presented to the player is not fully known the NPCs in a game to be believable, they must speak in a prior to game time. Our approach is a hybrid of these two manner that is both fitting to their character and varied categories. We propose tools that not only support dialogue from other characters. Modern paraphrasing techniques are created by game designers, but also help to generate simply not sophisticated enough to accomplish this task dialogue based on a designer’s own style and present this (Lin and Pantel 2001). While it may be possible to achieve dialogue to the designer for approval before the game more desirable results through the use of domain-specific, ships. rule-based morphing algorithms, it is not clear that doing so will provide the degree of variation and suitability that is required. The Intentional Dialogue Line How then should one approach the task of creating intentional dialogue lines? Instead of a system based on Dialogue in a story-based game generally consists of a set automatic generation of morphed lines, we have created a of player character (PC) and NPC lines grouped into system focused on both flexibility and control. Designers exchanges. At any given point in the dialogue, an NPC will can manually generate the variations to be associated with speak a line, and then the player will choose one of an intentional dialogue line or they can use automatic potentially many responses. This will often be followed by methods to generate the variations. Regardless of the a series of other exchanges of NPC and PC lines until the method of generating the dialogue lines themselves, we end of the conversation is reached. Such a structure is provide a number of tools to support the automatic, clearly visible in the dialogue trees of games like dynamic replacement of intentional lines with appropriate Neverwinter Nights (NWN 2009) and Mass Effect (Mass actual dialogue lines based on the context in which they are Effect 2009). However, even games such as Oblivion being displayed (i.e. game state). We feel that this (Oblivion 2009) that lack tree-based dialogue tend to resort approach provides the greatest deal of control over the to exchanges. final result while still greatly reducing the effort required The lowest level element of a dialogue is the dialogue to create similar, but varied, dialogues. line. A dialogue line may consist of any statement, An intentional dialogue line is an abstract line with a question, or other similar element that the designer wishes specific intent, such as a greeting line or a farewell line. a character to say. Consequently, the set of all potential We then associate a number of actual dialogue lines that dialogue lines is massive.