Search-Based Drama Management in the Interactive Fiction Anchorhead∗
Total Page:16
File Type:pdf, Size:1020Kb
Search-Based Drama Management in the Interactive Fiction Anchorhead∗ Mark J. Nelson and Michael Mateas College of Computing Georgia Institute of Technology Atlanta, Georgia, USA fmnelson, [email protected] Abstract towards a story that maximizes the evaluation function, tak- ing into account any effect on evaluation the DM actions Drama managers guide a user through a story experience by themselves may have. DM actions might include things such modifying the experience in reaction to the user’s actions. as causing a non-player character to bring up a particular Search-based drama management (SBDM) casts the drama- management problem as a search problem: Given a set of conversation topic, causing certain parts of the world to be- plot points, a set of actions the drama manager can take, and come inaccessible, or leaving items where they’re likely to an evaluation of story quality, search can be used to optimize be found by the player. Search over possible choices of DM the user’s experience. SBDM was first investigated by Peter actions and the possible resultant sequences of plot points Weyhrauch in 1997, but little explored since. We return to (subject to a model of what the user is likely to do) is run at SBDM to investigate algorithmic and authorship issues, in- each step to choose the DM action that maximizes expected cluding the extension of SBDM to different kinds of stories, plot quality. This all takes place in an abstract model, con- especially stories with subplots and multiple endings, and is- nected to the real game by passing messages back and forth, sues of scalability. In this paper we report on experiments as illustrated in figure 1: The game tells the drama manager applying SBDM to an abstract story search space based on when plot points have happened, and the drama manager the text-based interactive fiction Anchorhead. We describe the features employed by the story evaluation function, in- tells the game when it wishes to take a DM action. vestigate design issues in the selection of a set of drama man- SBDM rests on two fundamental assumptions: That an agement actions, and report results for drama managed versus evaluation function can encode an author’s aesthetic, and unmanaged stories for a simulated random user. that search can be used to effectively guide a game’s plot progression. Peter Weyhrauch (1997) demonstrated a proof of concept for both assumptions in a small interactive fiction Introduction story, Tea for Three, but to what extent these results can be A drama manager guides a player’s experience—ideally in generalized, scaled, and extended isn’t clear. an unintrusive manner—in order to create a narratively- We present work applying SBDM to the interactive fic- pleasing story arc while still allowing the player’s actions tion piece Anchorhead, in order to further investigate the al- to be relatively unconstrained. The alternatives are to either gorithmic and authorship issues involved. We conclude that, write a game in which all possible story arcs are reason- while SBDM remains promising, Weyhrauch’s results were ably good, or to give up the goal of a narratively-pleasing too optimistic, and are not easily generalizable. In particular, story arc entirely. We’re particularly interested in adding search scales poorly to large stories, and the effectiveness of plot to large, open-world games, with a number of subplots tractable sampling search depends heavily on the nature of and multiple endings, all without enforcing prewritten linear the particular story. Further work, especially on algorithmic or trivially-branching storylines. issues, is necessary before it can be effectively used in real- Search-based drama management (Weyhrauch 1997), or world stories. SBDM, guides the player by projecting possible future sto- ries and reconfiguring the story world based on those pro- Related Work jections. Stories are modeled as a set of plot points that can Search-based drama management was first proposed by happen, and an author-specified evaluation function rates the Bates (1992) and developed by Weyhrauch (1997); reviving quality of a particular sequence of plot points. The drama the technique was proposed by Lamstein & Mateas (2004). manager has a set of drama manager actions (DM actions) Weyhrauch applied SBDM to a simplified version of the In- it can make to modify the world in order to guide the player focom interactive fiction Deadline, named Tea for Three, achieving impressive results in an abstract story space with ∗This research is supported by a grant from the Intel Founda- tion and by the National Science Foundation’s Graduate Research a simulated user. Fellowship program. The Mimesis architecture (Young et al. 2004) constructs Copyright c 2005, American Association for Artificial Intelli- story plans for real-time virtual worlds. The generated plans gence (www.aaai.org). All rights reserved. are annotated with a rich causal structure, and the system Mark J. Nelson and Michael Mateas (2005). Search-based drama management in the interactive fiction Anchorhead. In Proceedings of the 1st Artificial Intelligence and Interactive Digital Entertainment Conference, pp. 99–104. Tea for Three story that Weyhrauch investigated, Anchor- head has a much larger world, both in terms of the number of plot points and in terms of the physical size of the world itself, such as the numbers of locations and objects available to the player. When the story starts, the player has just arrived in the town of Anchorhead, where her husband, Michael Verlac, recently inherited the Verlac mansion from a branch of the family he hadn’t been in contact with. The player begins to find out strange things about the town and the Verlac family: Edward Verlac, Michael’s brother and previous occupier of the mansion, killed his family and later committed suicide in a mental institution; the townspeople are aloof and secre- tive; the real-estate agent who had overseen the inheritance is nowhere to be found; and so on. The full Anchorhead story is quite large, consisting of well over a hundred significant plot points, making it some- what unwieldy for initial experiments. Fortunately, it’s bro- ken into seven relatively separate days of action, and we’ve chosen to focus on the second day. We modified the original second day to make it stand on its own by removing some Figure 1: An excerpt from Anchorhead, showing the re- subplots that only make sense in light of the subsequent days lationships between concrete game-world actions and the and moving some events from later days forwards. The end abstract plot points and DM actions. When the propri- result was a story with two main subplots, each potentially etor opens the puzzle box, the game recognizes this as leading to an ending. the plot point open puzzle box and tells the drama In one subplot, the player discovers a safe in which a puz- manager. The drama manager decides on the DM action zle box she’s unable to open is hidden. The owner of the temp deny get amulet and sends it to the game, which town’s Magical Shoppe will helpfully open it, revealing an implements it by not allowing the user to get the amulet. odd lens. When the lens is inserted into a telescope in the Verlac mansion’s hidden observatory, the player sees an evil god approaching Earth on a comet, reaching the climax of monitors for player actions that might threaten causal links the subplot and a possible ending. in the current story plan, either replanning or preventing In the other subplot, the player discovers that giving a bum player action if a threat is detected. a flask of liquor makes him talkative. Through questioning, The Interactive Drama Architecture (Magerko & Laird the player discovers the bum knows quite a bit about the Ver- 2003) takes a prewritten plot and tries to keep the user on the lac family, including a terrible secret about a deformed child, plot by taking corrective action according to a state-machine William, who supposedly was killed soon after birth. The model of likely user behavior. SBDM, by contrast, tries to bum grows anxious and refuses to give more information incorporate user action into a quality plot rather than insist- until the player finds that William’s coffin contains an ani- ing on a prewritten plot. mal skeleton. Upon being shown the animal skull, the bum confesses that William is still alive, and confesses his role in Mateas and Stern (2003) developed a beat-based drama the matter. The bum reveals who William is and some of the manager for their interactive drama Fac¸ade, using the con- background of the Verlac family. Parallel to this progression, cept of a dramatic beat. Beats are the smallest unit of the bum is afraid for his life and desires a protective amulet change in dramatic value, where dramatic values are char- the player can get from the shopkeeper; if the player gives acter and story attributes such as love, trust, and tension; at it to him, he’ll in return give the player a key to the sewers, each point in the story, a beat-based drama manager selects in which will be a book revealing the full background, and one of the available beat-level actions. This style of manage- forming the other possible ending. ment makes them particularly suited to tight story structures, where ideally all the activity in the story world contributes to the story. SBDM, on the other hand, lends itself to more Modeling a Story with Plot Points open-ended story structures. The first authorial task when applying SBDM is to abstract the contents of the story into discrete plot points, each of which represents some event in the story that the drama man- Anchorhead ager should know about.