2. Background and Related Work
2.4 Applications
Computational models of narrative have many applications. In this section we summarize some applications from the digital entertainment research community.
Narrative Generation and Storytelling
Narratives are complex intellectual products. Additionally, storytelling is an activity that requires a wide range of skills and cognitive abilities intrinsic to humans. Despite that, there have been research efforts aiming at achieving computers inventing and telling stories. In the context of storytelling, creativity implies inventing a satisfactory story in terms of believable characters, their personalities, goals, feelings and emotions; interesting situations and events; and a discourse that facilitates the
\resizebox{\textwidth}{!}{ (setf *riu-STORY-DAG* ’( (STORY-6-FACTORY-JOB (:discourse (:clauses (c0 (:s phase1 phase2))
(phase1 (:s t1a t2a t3a t4a (:m phase1))) [...]
(:templates
(t1a "After counting street numbers and puzzling over the scrawl of a 4, which turned out to be a 9,")
(t2a (s6-notice (ales "Ales") " found a " (s6-in-door (s6-small-door "small " (door "door")) " in the side of an " (s6-big-factory "immense " (factory "factory"))) " that matched the Aristobots description.")) (t3a "Soon after knocking, " (s6-open "a solid, " (workbot "grubby
workbot") " opened up") " and greeted " (ales "Ales") " with a scowl of pure skepticism.")
(t4a (s6-explain (ales "Ales") " stammered out his situation, describing in too great of detail the recent " (theft "theft incident,")))
[...]
(:structure (common
(:entities (ales :type robot) (robot :type animate) (workbot :type robot) (factory :type inanimate))
(:expressions
((big factory) :name s6-big-factory) )
) (phase1
(:entities (door :type inanimate) (theft :type inanimate)) (:expressions
((small door) :name s6-small-door) ((big factory) :name s6-big-factory) ((notice ales door) :name s6-notice)
((tell ales workbot theft) :name s6-explain) ((in door factory) :name s6-in-door)
((open workbot door) :name s6-open)
((fd-agonist ales phase1) :name s6-p1-agonist)
((fd-antagonist workbot phase1) :name s6-p1-antagonist)
((fd-stronger s6-p1-agonist phase1) :name s6-p1-strong-agonist) [...]
}
Figure 2.8: An excerpt of the story format used byRiu3;4.
Joe Bear was hungry. He asked Irving Bird where some honey was. Irving refused to tell him so Joe offered to bring him a worm if he’d tell him where some honey was. Irving agreed. But
Joe didn’t know where any worms were, so he asked Irving, who refused to say.
Figure 2.9: An excerpt of an example story generated byTale-spin5.
reader to understand the characters’ motivations, associate characters intentions with feelings, and develop empathy towards the characters and situations12.
Tale-spin5is a story generation system that generates stories of woodland creatures using back- ward chaining for resolving goals and subgoals and forward chaining to compute consequences of narrative events. Tale-spin simulates a small world populated with characters, each with their own problems and motivations. Each character uses planning in order to satisfy their own goals given the current world state. Complex relations between characters are modeled using simulation over the events and the outcome is used to select plot points with satisfied preconditions. After the sim- ulation and problem-solving phase, a separate component is used to generate a textual description of the generated narrative. Figure2.9shows an excerpt of an example story generated byTale-spin.
Minstrel83 tells stories about the Knights of the Round Table. Minstrel uses case-based rea- soning instead of planning, and introduces concepts such as author goals in order to guide the plot generation. Minstrel implemented a general theory of creativity based around the concept of Transform Recall Adapt Methods (TRAMs). TRAMs are used to query an episodic memory and retrieve schemas or scripts that define the story. In the case that a query fails, the query process allows TRAMs to be modified and additional queries issued recursively, the output of which can be combined and adapted to match the initial query constraints. ProtoPropp93 generates stories step by step by using a simplified Case-Based Reasoning approach with a Proppian ontology that transforms annotated stories using a simulator and explicit domain knowledge. Riu3;4 is a text- based interactive storytelling system. Riu uses computational analogy with a force-dynamics based story representation to create stories. The narrative oscillates between two worlds: the main story world and the memory world that share parts of the structure and influence each other. Riu uses
Figure 2.10: Screenshot from an interactive storytelling session in OPIATE by Fairclough6 (reproduced with permission).
two repositories of authored data encoding the story world and the protagonist’s memories and an analogy module based on thestructure-mapping engine94 finds mappings between scenes.
Storytelling not only happens in written stories but also in other media and realizations such as computer games. Computational models of narrative have been used to achieve systems that automatically adapt the plot of a game to maximize engagement of the player and maintain a dramatic arc defined by the author. For example,OPIATE6;89is an interactive storytelling engine that generates new stories using multiagent system similar to Tale-spin. Opiate incorporates a drama manager agent that uses a Case-Based Reasoning (CBR) approach with a case base of tales analyzed in terms of Proppian functions in order to guide plot generation. Figure 2.10shows a screenshot from an interactive storytelling session generated by OPIATE. TheAutomated Story Director95uses a planning approach to model a narrative space. It automatically considers all possible breaks in the original story that can be caused by the actions of the player and proposes contingency narratives for each rupture, in order to allow the game narrative to proceed. PAST96 builds on top of the
Automated Story Directorand uses it in combination with player modeling to generate player-specific game narratives while still maintaining authorial intent on the original narrative space.
Computational narrative may play other support roles within digital entertainment applications such as a part of a procedural content generation system. Procedural content generation (PCG)
Figure 2.11: Virtual environment generated by Game Forge by Hartsook et al.7.
refers to the creation of content automatically through algorithmic means97. PCG has been applied to computer games, specially for “map” (i.e., the virtual environment) generation for computer games in order to increase variability and replayability98.
In addition to generating stories or engaging players, computational models of narrative can be embedded in other game elements. Game maps are an important storytelling element in computer games but most procedural map generation techniques typically neglect the role of the story in the construction of the map. Recent work has started to integrate narrative elements into map generation. Game Forge7, is a system capable of generating a map given a linear story represented by a sequence of plot points. It uses a genetic algorithm approach to infer the spatial relationships between the locations annotated in the given story and generates a map genotype as a space tree. In a second step, the system maps the genotype to a phenotype where the space tree has been embedded on a grid. Then, the virtual world is graphically realized as a 2D map by instantiating predefined image tiles and handed to a game engine so that it can be navigated by the player’s avatar. Figure 2.11 illustrates the output of this system. Dormans and Bakkes99 introduce the idea of stories and spatial environments (referred tomissionsandspacesin their work) as separate structures; the first holding the logical causal relationship between the sequence of events and the second one the spatial description of the playable map where the story will unfold (or where the player will execute their mission). In our own research90, we proposed a framework which, given
Figure 2.12: A social network automatically extracted from Jane Austen’s Mansfield Park by Elson8. The size of the nodes represent the relevance of a character and the width of the edges the relative number of interactions (reproduced with permission).
the specification of astory space, represented as a collection ofplot points and their dependencies, can generate maps that support one or more stories from that story space.
Narrative Analysis and Narrative Information Extraction
Besides uses in story generation and storytelling, computational narrative systems using automatic and semi-automatic narrative information extraction have been used to study literature and analyze narrative theories. Finlayson84uses a semi-automatic annotation procedure and a machine learning algorithm to extract plot patterns from a set of Russian fairy tales. In his work he reports results that aim to approximate manual narratology models via automatic analysis of the annotations. Elson8 proposed the use of an automatic system to extract and study character interactions in classic literary works. Figure 2.12 shows a social network automatically extracted from Jane Austen’s Mansfield Park by Elson. Bamman et al.57 proposed an unsupervised approach to automatically extract characters, their attributes and the actions in which they participate in order to identify latent character archetypes or personas by clustering their stereotypical actions and attributes. In more recent work, Reagan et al.85 studied emotional arcs in a big corpus of literature and elicited recurrent structures in books. They perform hedonometric analysis (to quantify sentiment or overall happiness over time100) and apply unsupervised machine learning techniques related to principal
component analysis in order to elicit 6 emotional arc patterns predominant in literature10.
2.5
A Taxonomy of Computational Models of Narrative
The wide range of different computational narrative applications, the disparity between the require- ments of each system implementation, and the fact that narrative is such a broad and complex subject, makes it difficult to settle on a unified model to represent a narrative. Many approaches exist, such as scripts, plans or grammars but each of those approaches can only capture certain parts of the narrative. Large parts of what constitutes the plot and discourse of narratives, such as authorial intent, conflict, or character subjectivity are not properly captured by existing models. On the one hand, there are several competing proposed standards on text annotation for narrative, each focusing on different parts of the narrative and favoring different approaches. On the other hand, story generation systems require computational narrative models that enable the generation of multiple stories and provide affordances for interactive narrative. Moreover, given the complexity of the current approaches, system builders tend to favor developing customized ad-hoc models to suit their particular implementation needs.
In this section we present our survey on both narrative generation and analysis and the compu- tational models of narrative used in such work.
2.5.1
Narrative Generation and Storytelling
Storytelling has been an integral part of digital entertainment, especially in interactive fiction and games in the genres of adventure and role playing6;7. Research in storytelling is tangentially related to fields such as text summarization, machine translation, or intelligent assistants but in our survey we focus on areas related to digital entertainment and computer games. Specifically we look at the following broad lines of work:
Story Generation: Related to computational creativity, research on story generation explores ap- proaches for the generation of stories by computers12. Story generation ranges from off-line story generation tointeractive storytellingwork such as interactive fiction101;102. Most of these
systems havetext output in the form of a human-readable story whereas some fulfill asupport role in mixed-initiative approaches to help authors write (e.g., by providing plot outlines or story space elements such as character profiles)103;104. We also find work where the generated stories are actually told by storyteller agents or characters within a game or other virtual environment105. In general, work can be classified into plot generation and discourse genera- tion (i.e., the plot’s realization) with some recent work integrating them106. Usually there are approaches focusing on the text realization of the stories107–109whereas other generate output to be consumed by a second system110–112 or a specialized text realization component113;114. Another lens with which to look at research in story generation is from the computational creativity perspective. We refer the reader to an overview by Gervás12 for more information in this regard.
Drama Management: Relevant to interactive applications and games (and to some extent to other educational and training tools), drama management focuses on techniques that shape and modify the plot of a game or interactive experience on-line based on both authorial intent and the users’ actions. In the context of computational narrative, drama management has been used in interactive fiction applications and games to either maintain tension or an author’s desired dramatic arc22;24;82; or maintain story coherence and/or enable/prevent player actions given some authorial goals115. There several other interesting systems and we refer the reader to some of the previous overviews on this topic116;117.
Narrative-based Procedural Content Generation: Computational narrative systems have also been used in a support role to generate other game content such as side quests or maps, levels and virtual environments7;90. There are also examples that integrate computational narrative in several game components6.
Other: Out of the scope of our work but relevant to this area of research, the reader may be inter- ested in an overview on emergent narrative118and how narratology informs other applications of computational narrative119.