Liquid Narrative Group Technical Report Number

Similar documents
Getting the Story Right: Making Computer-Generated Stories More Entertaining

ReinForest: Multi-Domain Dialogue Management Using Hierarchical Policies and Knowledge Ontology

University of Groningen. Systemen, planning, netwerken Bosman, Aart

Lecture 10: Reinforcement Learning

Conversation Starters: Using Spatial Context to Initiate Dialogue in First Person Perspective Games

The Importance of Narrative as an Affective Instructional Strategy

Emotional Variation in Speech-Based Natural Language Generation

Reinforcement Learning by Comparing Immediate Reward

Causal Link Semantics for Narrative Planning Using Numeric Fluents

Visual CP Representation of Knowledge

A Case-Based Approach To Imitation Learning in Robotic Agents

Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

Oakland Unified School District English/ Language Arts Course Syllabus

Emergent Narrative As A Novel Framework For Massively Collaborative Authoring

Achievement Level Descriptors for American Literature and Composition

Common Core State Standards for English Language Arts

Student Name: OSIS#: DOB: / / School: Grade:

What s in a Step? Toward General, Abstract Representations of Tutoring System Log Data

Discriminative Learning of Beam-Search Heuristics for Planning

The Strong Minimalist Thesis and Bounded Optimality

On the Combined Behavior of Autonomous Resource Management Agents

Degree Qualification Profiles Intellectual Skills

Implementing a tool to Support KAOS-Beta Process Model Using EPF

Seminar - Organic Computing

AQUA: An Ontology-Driven Question Answering System

Grade 4. Common Core Adoption Process. (Unpacked Standards)

MYP Language A Course Outline Year 3

Arizona s English Language Arts Standards th Grade ARIZONA DEPARTMENT OF EDUCATION HIGH ACADEMIC STANDARDS FOR STUDENTS

Abstractions and the Brain

AGENDA LEARNING THEORIES LEARNING THEORIES. Advanced Learning Theories 2/22/2016

Language properties and Grammar of Parallel and Series Parallel Languages

Evolution of Collective Commitment during Teamwork

Unit purpose and aim. Level: 3 Sub-level: Unit 315 Credit value: 6 Guided learning hours: 50

Objectives. Chapter 2: The Representation of Knowledge. Expert Systems: Principles and Programming, Fourth Edition

On-Line Data Analytics

Copyright Corwin 2015

Exploring Persona-Scenarios - Using Storytelling to Create Design Ideas

CLASSIFICATION OF PROGRAM Critical Elements Analysis 1. High Priority Items Phonemic Awareness Instruction

EQuIP Review Feedback

Probability estimates in a scenario tree

Shared Mental Models

Proof Theory for Syntacticians

Ministry of Education, Republic of Palau Executive Summary

STA 225: Introductory Statistics (CT)

Rottenberg, Annette. Elements of Argument: A Text and Reader, 7 th edition Boston: Bedford/St. Martin s, pages.

Running Head: STUDENT CENTRIC INTEGRATED TECHNOLOGY

Notes on The Sciences of the Artificial Adapted from a shorter document written for course (Deciding What to Design) 1

DIGITAL GAMING & INTERACTIVE MEDIA BACHELOR S DEGREE. Junior Year. Summer (Bridge Quarter) Fall Winter Spring GAME Credits.

Evaluation of Learning Management System software. Part II of LMS Evaluation

THE ROLE OF TOOL AND TEACHER MEDIATIONS IN THE CONSTRUCTION OF MEANINGS FOR REFLECTION

Unit 7 Data analysis and design

THE DEPARTMENT OF DEFENSE HIGH LEVEL ARCHITECTURE. Richard M. Fujimoto

What is PDE? Research Report. Paul Nichols

5. UPPER INTERMEDIATE

Automating the E-learning Personalization

A Platform for Symbolically Encoding Human Narratives

Clouds = Heavy Sidewalk = Wet. davinci V2.1 alpha3

Software Maintenance

Backwards Numbers: A Study of Place Value. Catherine Perez

Lecture 1: Machine Learning Basics

Rule-based Expert Systems

An Interactive Intelligent Language Tutor Over The Internet

An Investigation into Team-Based Planning

10.2. Behavior models

Implementing the English Language Arts Common Core State Standards

ISFA2008U_120 A SCHEDULING REINFORCEMENT LEARNING ALGORITHM

A Metacognitive Approach to Support Heuristic Solution of Mathematical Problems

Facing our Fears: Reading and Writing about Characters in Literary Text

Data Fusion Models in WSNs: Comparison and Analysis

Concept Acquisition Without Representation William Dylan Sabo

Reading Grammar Section and Lesson Writing Chapter and Lesson Identify a purpose for reading W1-LO; W2- LO; W3- LO; W4- LO; W5-

MYCIN. The MYCIN Task

Simple Random Sample (SRS) & Voluntary Response Sample: Examples: A Voluntary Response Sample: Examples: Systematic Sample Best Used When

On Human Computer Interaction, HCI. Dr. Saif al Zahir Electrical and Computer Engineering Department UBC

Colorado Academic. Drama & Theatre Arts. Drama & Theatre Arts

CMST 2060 Public Speaking

GCSE Mathematics B (Linear) Mark Scheme for November Component J567/04: Mathematics Paper 4 (Higher) General Certificate of Secondary Education

Research as Design-Design as Research

A Game-based Assessment of Children s Choices to Seek Feedback and to Revise

Given a directed graph G =(N A), where N is a set of m nodes and A. destination node, implying a direction for ow to follow. Arcs have limitations

English Language Arts Missouri Learning Standards Grade-Level Expectations

Digital Fabrication and Aunt Sarah: Enabling Quadratic Explorations via Technology. Michael L. Connell University of Houston - Downtown

A General Class of Noncontext Free Grammars Generating Context Free Languages

21 st Century Skills and New Models of Assessment for a Global Workplace

BUILD-IT: Intuitive plant layout mediated by natural interaction

Guru: A Computer Tutor that Models Expert Human Tutors

Computerized Adaptive Psychological Testing A Personalisation Perspective

Lecture 1: Basic Concepts of Machine Learning

UC Merced Proceedings of the Annual Meeting of the Cognitive Science Society

Pearson Longman Keystone Book D 2013

GACE Computer Science Assessment Test at a Glance

Axiom 2013 Team Description Paper

Exploration. CS : Deep Reinforcement Learning Sergey Levine

A Pipelined Approach for Iterative Software Process Model

Classifying combinations: Do students distinguish between different types of combination problems?

ICTCM 28th International Conference on Technology in Collegiate Mathematics

Statewide Framework Document for:

DOCTORAL SCHOOL TRAINING AND DEVELOPMENT PROGRAMME

Writing Research Articles

An Introduction to the Minimalist Program

Transcription:

http://liquidnarrative.csc.ncsu.edu/pubs/tr04-004.pdf NC STATE UNIVERSITY_ Liquid Narrative Group Technical Report Number 04-004 Equivalence between Narrative Mediation and Branching Story Graphs Mark O. Riedl Department of Computer Science North Carolina State University Raleigh, NC, 27606 moriedl@ncsu.edu

Equivalence between narrative mediation and branching story graphs Mark O. Riedl Liquid Narrative Group Department of Computer Science North Carolina State University Abstract Narrative is an important part of the way we interact with and make sense of the world. Interactive narrative systems tell stories in a virtual world in which the user is an interactive participant. Since the behaviors the user performs in the virtual world can affect the way in which a storyline unfolds, interactive narrative systems often use a branching story structure where noninteractive story presentations are interleaved with user decision points. An alternative approach narrative mediation represents story as a linear progression of events with anticipated user actions and system-controlled agent actions together in a partially-ordered plan. For every possible way the user can violate the story plan, an alternative story plan is generated. If narrative mediation is powerful enough to express the same interactive stories as systems that use branching story structures, then linear narrative generation techniques can be applied to interactive narrative generation with the use of narrative mediation. This technical report sketches out a proof that narrative mediation is at least as powerful as acyclic branching story structures. 1. Introduction Narrative as entertainment, in the form of oral, written, or visual stories, plays a central role in our social and leisure lives. Narrative is also used in education and training contexts to motivate and to illustrate. One reason for this is that cognitive structures we use to understand the world around us are similar to the cognitive structures we use to understand narratives (Bruner, 1990). In order to act effectively in the world, one must understand the world one is situated in. Our understanding of the world is achieved by constructing reality as a sequence of related events from our senses (Bruner, 1991). The cognitive process of structuring related events enables one to extract meaning from changes in the world and to make inferences about the future. Essentially, we understand the world by telling ourselves stories about how we have changed the world and witnessed the world change. This autobiographical representation of memory and thought has evolved from the social nature of our species because stories are a highly efficient and natural way to communicate (Dautenhahn, 2003). Whereas we tend to understand inanimate objects through cause and effect, we attempt to understand the intentional behavior of others through a sophisticated process of interpretation with narrative at its core (Bruner, 1990; Sengers, 2000). Blair and Meyer (1997) coined the term

narrative intelligence to refer to the ability human or computer to organize experience into narrative. A computer system that uses a narrative approach to entertainment or education will benefit from the ability to reason about narrative intelligence because the system can structure its narrative in ways that afford understanding by the user. Recently, narrative intelligence has been applied to virtual worlds in order to create interactive narrative systems. A virtual world represents a space through which the user navigates. Typically virtual worlds are 3D graphical environments and the user is embodied in a graphical avatar that is situated in the environment. An interactive narrative system is a virtual world in which a story unfolds and the user is considered a character in the story, able to interact with elements and other characters in the virtual world. The standard approach to incorporating storytelling into a computer system, however, is to script a story at design time. That is, the system designers determine ahead of time what the story should be and hard-code the story into the system. For a computer system to use a scripted story means that the ability of the system to adapt to the user s preferences and abilities is limited. The story scripted into a system may not completely engage the user s interests or may be too challenging for the user to follow. Furthermore, if stories are scripted at design time, a system can only have a limited number of stories it can present to the user. In entertainment applications, a limited number of stories or a limited number of permutations of a single story in a computer game results limited replay value of that game. In educational and training applications, a limited number of stories or a limited number of permutations of a single story results in a system that cannot fully cater to the student s needs and abilities. The alternative approach is to generate stories either dynamically or on a per-session basis (one story per time the system is engaged). Narrative generation is a process that involves the selection of narrative content (the events that will be presented to an audience), ordering of narrative content and presentation through discourse of narrative content. A system that can generate stories is capable of adapting narrative to the user s preferences and abilities, has expanded replay value and is capable of interacting with the user in ways that were not initially envisioned by system designers. 2. Interactivity and Narrative There are two fundamental types of narratives used in computer games and education and training applications: linear narrative and branching narrative. Linear narrative is the traditional form of narrative in which a sequence of events is narrated from beginning to ending without variation or possibility of a user altering the way in which the story unfolds or ends. Computer games typically employ linear narratives although the story structure is partitioned into interactive portions levels and cut-scenes. Even though the user has a certain degree of control during a level, the only outcome is successful completion of some objective (usually killing all the enemies in an area) or failure, in which case the user must start the level over. All users experience the same story and each user will experience the same story during successive sessions. Some computer games use branching narrative in which there are many points in the story at where some action or decision made by the user alters the way in which a narrative unfolds or ends. Educational and training systems typically use branching narrative so that students can apply their skills or test their understanding. Branching narratives (e.g. Kelso, Weyhrauch, & Bates, 1993; Galyean, 1995; Silva, Raimundo, & Paiva, 2003; Swartout et al.,

2001; Gordon et al., 2004) are typically represented as directed graphs in which each node represents a linear, scripted scene followed by a decision point. Arcs between nodes represent decisions that can be made by the user. Even though a branching narrative may introduce variability into the experience a user has with a storytelling system, the variability is scripted into the system at design time and is thus limited by the system designer s anticipation of the user s needs or preferences. All users will be presented with the same set of decision points and each user will experience the same story if she makes the same set of choices. 2.1. Branching Narratives Branching narratives enable system users to influence the way in which a narrative unfolds or ends. At set points in branching narratives, the user is able to make a choice or perform an action that selects one of a set of alternative continuations of the storyline. Branching narratives are typically represented as a directed graph in which a node in the graph represents a linear story sequence followed by a decision point. The computational complexity of scripting story graphs at design time means that story graphs have either a low branching factor or a limited number of decision points (Bruckman, 1990). An interactive narrative system that represents story as a graph can be considered a story generation system because the story the end result of a user s session is not fixed at design time. The system, however, is merely piecing together pre-scripted sequences based on feedback from the user. The user is constrained to the structure of the branching story graph constructed by the system designer. Users that make the same choices at each decision point will have identical experiences with the system. If a user were to make the same decisions during two consecutive sessions with the system, her experience would be the same. 2.2. Balance between Coherence and Control Interactive narrative systems not only have to consider the quality of the storytelling experience, but must balance the coherence of a story against the amount of control afforded the user (Riedl, Saretto, & Young, 2003). The understandability of any narrative is determined, in part, by it s coherence, that is, by the user s ability to comprehend the relationships between the events in the story, both within the story world (e.g., the causal or temporal relations between actions) and in the story s telling (e.g., the selection of camera sequences used to convey the action to the user). Dramatists often refer to narrative as having a premise or point (Egri, 1960); stories are told for a reason and much of our comprehension of a story involves the construction of cognitive models that predict or explain these relationships (Gerrig, 1993). Systems that construct actions for telling a story should respect the story s coherence by clearly linking each action in the story world to its overall structure. The degree of engagement by a user within an interactive narrative lies, to a great extent, with the user s perceived degree of control over her character as she operates within the environment. The greater the user s sense of control over her character, the greater will be her sense of presence (Lombard & Ditton; 1997), that is, the sense that she is a part of the story world and free to pursue her own goals and desires. Unfortunately, control and coherence are often in direct conflict in an interactive narrative system. To present a coherent narrative, the actions within an interactive narrative system s story are carefully structured (either at design time by human designers or at run time by narrative generation systems) so that actions at one point in the story lead

clearly to state changes necessitated by actions occurring at subsequent points in the story. When users exercise a high degree of control within the environment, it is likely that their actions will change the state of the world in ways that may interfere with the causal dependencies between actions as intended within a storyline. 3. Generating Interactive Narratives The standard approach to implementing an interactive narrative is to provide a branching story structure at design time. A branching story structure is a story graph a directed graph of nodes connected by arcs that correspond to user choices. The nodes of a story graph contain a fragment of linear narrative that is presented to the user noninteractively. However, to achieve full potential, an interactive narrative system should generate a branching narrative dynamically on a per-session basis. There are many techniques for generating branching narratives. 3.1. Autonomous Agents One technique for generating interactive narrative is to implement the system-controlled story-world characters as autonomous agents that are capable of reacting to the user and the environment in a believable manner. The story emerges from the decisions the autonomous agents make and the behaviors they perform in the virtual world (Aylett, 2000). One advantage of this approach is that the characters in the story-world are capable of reacting to any actions the user performs. The user is afforded full control to act. However, there is no explicit representation of plot or any defined notion of the outcome of the story. It is possible that no coherent narrative structure emerges. In order to preserve the coherence of a system in which characters are implemented as autonomous agents, some interactive narrative systems use drama managers. A drama manager (Kelso, Weyhrauch, & Bates, 1993) is a process that monitors the activities of the autonomous characters and the user character and attempt to fit the emergent story to a story graph. The nodes in the story graph represent major turning points in the story and the drama manager adjusts the goals and beliefs of the autonomous characters in order to subtly manipulate the world into achieving the next plot point. However, the emerging story can deviate from the plot graph to the point where coherence fails. Interactive narrative systems such as the Oz Project (Bates, 1992; Kelso, Weyhrauch, & Bates, 1993) and the Virtual Storyteller (Theune et al., 2003) use a drama manager with a plot graph that is hard-coded at design time. The plot graph used by a plot manager can be generated (Weyhrauch, 1997; Lamstein & Mateas, 2004) using a modified adversarial search. The drama manager searches for complete sequences of user actions and autonomous agent actions that lead to a satisfying outcome. The search space is the plot graph. However, the generation of the complete search space is intractable; it is impractical to generate the entire search space for any story of significant length and complexity. 3.2. Narrative Mediation Another technique for generating an interactive narrative is narrative mediation (Young & Riedl, 2003; Riedl, Saretto, & Young, 2003; Young et al., 2004). The system generates a linear narrative that represents the ideal story that should be told to the user and then considers all the ways in which the interactive user can interact with the world and with the other characters. The story includes actions that system-controlled characters perform as well as

actions that the user-controlled character should perform. For every action that the user makes that threatens to deviate too severely from the linear story proposed by the system, the system dynamically generates an alternative storyline from the point of the deviation. With narrative mediation, the story is represented by a plan. The plan contains annotations that explicitly mark the temporal relationships between all actions user and system-controlled character in the plan, defining a partial order indicating the steps order of execution. Other annotations, called causal links, are used to mark all causal relationships between the actions in the plan as well. A causal link connects two plan steps s 1 and s 2 via condition e, written s 1 e s 2 when s 1 establishes the condition e in the world needed by subsequent action s 2 in order for s 2 to execute. As the user issues commands for their character to perform actions in the story world, these actions must be checked against the story plan to determine how they fit with the plan s structure. Some actions that are performed by the user are exceptions. Exceptional actions have effects that threaten the conditions in the world required by future system-controlled character actions. Specifically, an exception occurs whenever a user attempts to performs some action α, where some effect e of α threatens to undo some causal link s 1 e s 2 between two steps s 1 and s 2, with condition e, where s 1 has occurred prior to α and s 2 has yet to occur. Using planning structures to model narrative is advantageous because a narrative plan lays out the entire sequence of actions that will be performed during a storytelling session. The causal structure of the story plan is analyzed to determine all possible exceptions that can occur during the entire duration of the narrative. For every possible exception, an alternative story plan is generated that begins at the point of the exception. The process of narrative mediation defines a tree of partial story plans called a narrative mediation tree such that each plan represents a complete storyline, including both user actions and system-controlled character actions. The narrative mediation tree is constructed before execution of the interactive narrative session begins. To prevent the narrative mediation tree from growing infinitely large, some user actions are intervened with. Intervention is a process whereby a user action is surreptitiously replaced by a similar action with different effects effects that do not threaten the causal structure of the story plan. An exception that is intervened with does not require an alternative story plan since the causal structure of the original story plan is preserved. 4. Relationship between Narrative Mediation and Story Graphs The technique of narrative mediation shows that any system that can generate a linear narrative plan (with causal annotation) coupled with a replanning capability can be used to generate interactive narrative. Examples of linear narrative planners are Fabulist (Riedl & Young, 2004; Riedl, 2004) and Universe (Lebowitz, 1984; Lebowitz, 1985). However, most interactive narratives are expressed as story graphs. Even interactive narrative systems that use drama managers to control autonomous characters use a representation functionally equivalent to a story graph. The question is: Is the expressive power of narrative mediation at least as powerful as the story graph representation? If the answer is yes, then narrative mediation can be used to generate any branching narrative structure that can be represented as a story graph. Such an answer would conclusively demonstrate that linear narrative generation can be applied to the generation of branching narrative. Research efforts could then be focused on the generation of quality

α 1 α 2 α 3 δ 1 α 4 α 5 ε α 10 α 11 δ 2 δ 6 δ 3 α 6 α 7 δ 5 α 8 α 9 δ 4 Figure 1. A story graph. linear narratives with the understanding that any linear narrative generator can be coupled with narrative mediation to provide an interactive storytelling experience. A branching story structure is a story graph a directed graph of nodes connected by arcs that represent user choices. The nodes of a story graph contain a fragment of linear narrative that is presented out non-interactively. Every possible path through the graph represents a story that can be told to the user. The user s sense of control over the development of the story is limited by the number of interaction points (number of arcs) in a particular path in the branching story graph. However, to increase the number of interaction points in an interactive story means to construct a prohibitively large story graph (Bruckman, 1990). An example of a story graph is shown in Figure 1. The system starts out non-interactively with system-controlled characters performing actions α 1 and α 2. The user then chooses to perform action δ 1 or δ 2. If δ 1 is chosen, system-controlled characters perform actions α 3, α 4, and α 5. An ε-transition is taken in the absence of any user action. Narrative mediation (Young & Riedl, 2003; Riedl, Saretto, & Young, 2003; Young et al., 2004) is a technique for enhancing the user s sense of control in an interactive narrative system. The idea behind narrative mediation is to generate a linear story structure that represents the best story that the system can tell. The linear story structure includes actions that the interactive user should perform. However, the user is not necessarily aware of the story structure and is not guaranteed to perform the actions prescribed to her. Furthermore, the user is free to perform any action from an available action library at any time. Consequently, the possibility that the user performs an action that interferes with the story structure is possible. An action that interferes with the system s preferred story structure is called an exception. When an exception occurs, the system can either intervene or accommodate the action. Intervention means to prevent the exceptional action from interfering with the story structure. Accommodation means to incorporate the exceptional action into the story and generating a new linear story structure that is not threatened by the exception.

α 3 α 1 α 2 α 5 α 6 α 4 δ 3 δ 1 δ 1 δ 1 δ 1 δ 2 α 7 α 8 α 13 α 14 α 11 α 3 α 7 α 8 α 9 α 10 α 12 δ 4 δ 5 α 4 α 7 α 8 α 15 α 17 α 3 α 7 α 8 α 16 α 17 α 4 δ 3 δ 2 α 18 α 20 α 19 α 20 Figure 2. A narrative mediation tree. A system using narrative mediation can prepare in advance by predicting all possible user exceptions and generating contingency story structures. The result of this process is a data structured called a narrative mediation tree. Figure 2 shows an example of a narrative mediation tree. The node at the top of the graph represents the best linear story that the system can tell. The actions α 1 through α 6 are performed by both system-controlled characters and the user. Actions δ 1, δ 2, and δ 3 are exceptions. Note that there are many arcs for the δ 1 exception. This is because actions α 3 and α 4 in the node are unordered relative to each other. Which arc is followed and consequently which alternative

α 3 α 1 α 2 α 5 α 4 Figure 3. A partially-ordered plan. story that is presented to the user depends on what actions have been executed prior to the exception. If any exceptional action is performed by the user, the system begins executing the linear story that the most relevant arc terminates at. Each node should have at least one outgoing arc for every user action that is part of the linear story structure. This implies that the user always has a decision: to perform an action that is contingent part of the linear story or to perform an action that is exceptional. To provide the user with additional opportunities to exert control, the user can perform exceptional actions at any time, regardless of whether the linear story includes a user action or not. Narrative mediation makes generation of interactive narratives possible by generating multiple contingent story structures. However, it is necessary to prove that narrative mediation is at least as expressive as a system that uses the more conventional story graph. For narrative mediation to be as expressive as a system that uses a story graph, for any possible story graph, a narrative mediation tree must exist that is equivalent. If narrative mediation is at least as expressive as story graphs, then a linear narrative generation system can be used to generate branching narratives through a process such as narrative mediation. 4.1. Definitions The following are definitions necessary for the proofs. All graph structures used in the proof are assumed to use a basic partially-ordered plan structure to represent temporally ordered actions. Definition 1 (Partially-ordered plan). A partially-ordered plan is a tuple A, O such that A is a set of actions performed in the story world and O is a set of ordering constraints of the form α i, α j where α i, α j A. An example of a partially-ordered plan is shown in Figure 3. Partially-ordered plans are parts of the larger story node structures used in both the traditional story graph and the narrative mediation tree. A story graph G is a set of partially-ordered plans represented the non-interactive sequences of events. A set of partially-ordered plans P G make up the nodes in the graph. The nodes are connected by story branches, which represent decision-points where the user can make a choice or perform some action. There are necessarily a finite number of actions D G, some of which are possible user choices after every partially-ordered plan executes. D includes the special symbol ε indicating that the story branch is activated by the absence of a user action. Definition 2 (Story branch). A story branch in a story graph, G is a tuple p 1, C, δ, p 2 such that p 1, p 2 P, δ D, and C is an implementation-specific set of applicability criteria. The story

branch indicates that p 1 is temporally ordered before p 2 and that δ is an action executed by the user to cause transition from p 1 to p 2. Definition 3 (Story graph). A story graph is a tuple P, D, Λ, B such that P is a set of partially-ordered plans, D is a set of user actions, Λ is an action library such that for all p i P, A(p i ) Λ, and B is a set of story branches such that b B C(b) =. The action library is a set of all the actions that system-controlled characters can perform in the plan nodes in the story graph. It is possible that D Λ if the system takes control of the user s character during execution of the noninteractive plans. However, D and Λ can be disjoint or even non-intersecting. The implementation-specific criteria parameter of story branches is unused in the story graph representation because each story branch is applicable only at the time the previous plan completes execution. The story graph representation does not disallow cycles. A cycle in a story graph means that there is a point in the story where the user can make a decision that causes a previously experienced portion of the story to repeat. It is conceivable that the story could loop forever, depending on the willingness of the user to make the same choices over and over. An acyclic story graph, however, explicitly prohibits cycles, implying that any story has a finite duration. Definition 4 (Acyclic story graph). An acyclic story graph is a tuple P, D, Λ, B such that P is a set of partially-ordered plans, D is a set of user actions, Λ is an action library such that for all p i P, A(p i ) Λ, and B is a set of story branches such that b B C(b) = and B does not contain any cycles. However, even an acyclic story graph can be set up so that multiple story branches lead to the same partially-ordered plan. Bruckman (1990) identifies reusing portions of the story as a strategy for limiting the combinatorial explosion of a story graph. An acyclic story graph that does not have two story branches that terminate in the same node is a story tree. Definition 5 (Story tree). A story-tree is a tuple P, D, Λ, B such that P is a set of partiallyordered plans, D is a set of user actions, Λ is an action library such that for all p i P, A(p i ) Λ, and B is a set of story branches such that b B C(b) = and p 1, δ i, p 2 B p 3, δ j, p 2 B for all p 1, p 2, p 3 P. The narrative mediation tree is the primary structure used by narrative mediation. While the data structure is superficially similar to a story graph, the story nodes are used in very different ways. Instead of being a short sequence of actions between decision points, a story node in narrative mediation is meant to represent the entire story if the user chooses not to interfere. Definition 6 (Narrative mediation tree). A narrative mediation tree is a tuple P, D, Λ, B such that P is a set of partially-ordered plans, D is a set of user operations, Λ is an action library such that D Λ and for all p i P, A(p i ) Λ, and B is a set of story branches such that for all b

B, C(b) A(p 1 (b)) and {α 1 C(b) α 3 C(b) α 1, α 2 O(p 1 (b)) α 2, α 3 O(p 1 (b))} {α 2 C(b)} for all α 1,α 2,α 3 A(p 1 (b)). The applicability criteria of story branches are used in narrative mediation trees. Specifically, the applicability criteria of a story branch b is a subset of the actions in the partially-ordered plan from which b originates. Furthermore, the applicability criteria of b must be such that the actions form a prefix of the partially-ordered plan from which b originates. C(b) is the history of the actions that have been executed in the node that b originates from. The history is used to uniquely identify an arc in the case that several story branches with the same exceptional user action originate from the same node. For example, in Figure 2, if the user executes δ 1, then a different story branch is applicable depending on whether {α 1, α 2 }, {α 1, α 2, α 3 }, {α 1, α 2, α 4 }, or {α 1, α 2, α 3, α 4 } is in the history. Since C(b) is a history, the actions in C(b) must be contiguous, meaning that there must be a path from the first action in C(b) to every other action in C(b). Narrative mediation trees require the applicability criteria of story branches because an exceptional user action can cause a transition out of a plan node at any point prior to the completion of execution of the plan node. This differs from story graphs where interactivity only occurs after a particular node has completed execution. The set of user actions D is a subset of Λ because user actions are part of the plan nodes. Unlike story graphs, for a user action to be included in a plan node means the user is expected to perform that action at that particular time interval in the plan. The system does not take control of the user s character. 4.2. Proofs The following are sketches of proofs that establish that narrative mediation trees are able to express at least the same set of interactive stories that acyclic story graphs can express. The narrative mediation technique cannot handle infinite length stories because narrative mediation trees do not have cycles that can be repeatedly triggered by decisions made by the user. If the expressive power of narrative mediation trees is at least as powerful as that of acyclic story graphs, then narrative mediation can generate any interactive branching storyline that is used by a system that implements acyclic story graphs. In order to prove this, I show that the set of all acyclic story graphs is a subset of the set of all narrative-mediation trees. The subset relationship is true if there is an algorithm that transforms any arbitrary acyclic story graph into an equivalent narrative mediation tree representation. For an acyclic story graph to be equivalent to a narrative mediation tree, the set of all paths the set of all stories that can be told through a story graph must be a subset of the set of all paths through a narrative mediation tree. A path through either structure includes the system-controlled character actions interleaved with user actions. For example {α 1, α 2, δ 2, α 6, α 7, δ 5, α 8, α 9, δ 3, α 10, α 11 } is one path through the story graph in Figure 1. (1) The set of all story trees is a subset of the set of all story graphs. A story tree is a tree by Definition 5. An acyclic story graph is a directed acyclic graph by Definition 4. All trees are directed acyclic graphs. Therefore, a story tree is an acyclic story graph.

(2) The set of all acyclic story graphs is a subset of the set of all acyclic story graphs. Any acyclic graph can be transformed into an equivalent tree with the following algorithm. Let G a be an acyclic story graph. 1. Let G t = G a. 2. While there are story branches p 2,, δ i, p 1, p 3,, δ j, p 1 in G t. Let G s let the sub-graph of G t that has p 1 and all p k such that there is a path between p 1 and p k. Let G s be a duplicate of G s such that p 1 is the duplicate of p 1. Let G t = G t G s. Remove p 3,, δ j, p 1 from G t and insert a new story branch p 3,, δ j, p 1 into G t. The size of the resultant G t can be minimized by selecting story branches in the order of greatest depth. G t is equivalent to G a because every path {δ 1, δ 2, } in G a is also present in G t. If two paths through G a pass through the same node p those paths are also in G t because one of the sub-graphs containing p is duplicated exactly. (3) The set of all acyclic story graphs is equal to the set of all story-trees. Follows directly from (1) and (2). (4) The set of all acyclic story graphs is a proper subset of the set of all story graphs. Acyclic story graphs are story graphs that do not have cycles, by Definition 4. Therefore, if S a is the set of all acyclic story graphs and S is the set of all story graphs, then S a S. However, the definition of a story graph (Definition 3) does not preclude the possibility that a story graph can have a cycle. Therefore, there are some story graphs that are not acyclic story graphs. That is, S S a. Therefore S a S. (5) The set of all narrative mediation trees is not a subset of the set of all story graphs. Indirect proof. Suppose the set of all narrative mediation trees is a subset of the set of all story graphs. If so, then there is an algorithm that can transform an arbitrary narrative mediation tree into an equivalent story graph. Let G m be a narrative mediation tree that has a user action that can be executed concurrently with a system-controlled character action. Story graphs cannot have user actions that can execute concurrently with system-controlled character actions because the story nodes only contain systemcontrolled character actions. Therefore there cannot be an algorithm that translates G m into an equivalent story graph representation. Therefore, not all narrative mediation trees can be represented as story graphs. Therefore, the set of all narrative mediation trees is not a subset of the set of all story graphs. (6) The set of all story graphs is not a subset of the set of all narrative mediation trees. Indirect proof. Suppose the set of all story graphs is a subset of the set of all narrative mediation trees. If so, then there is an algorithm that can transform an arbitrary story graph into an equivalent narrative mediation tree. Let G s be a story graph that has a cycle. Since G s has a cycle, there is at least one infinite length path through G s. For a narrative mediation tree to have an infinite length path, it would have to have an infinite depth. Narrative mediation trees are finitely bounded trees. Therefore, there cannot be an

algorithm that transforms G s into an equivalent narrative mediation tree representation. Therefore, not all story graphs can be represented as narrative mediation trees. Therefore, the set of all story graphs is not a subset of the set of all narrative mediation trees. (7) The set of all narrative mediation trees is not a subset of the set of all acyclic story graphs. Indirect proof. Suppose the set of all narrative mediation trees is a subset of the set of all story graphs. If so, then there is an algorithm that can transform an arbitrary narrative mediation tree into an equivalent acyclic story graph. Let G m be a narrative mediation tree that has a user action that can be executed concurrently with a system-controlled character action. Acyclic story graphs cannot have user actions that can execute concurrently with system-controlled character actions because the story nodes only contain system-controlled character actions. Therefore there cannot be an algorithm that translates G m into an equivalent acyclic story graph representation. Therefore, not all narrative mediation trees can be represented as acyclic story graphs. Therefore, the set of all narrative mediation trees is not a subset of the set of all acyclic story graphs. (8) The set of all acyclic story graphs is a subset of the set of all narrative mediation trees. There must be an algorithm that can transform an arbitrary instance of an acyclic story graph into an equivalent narrative mediation tree. Let G a be an acyclic story graph. 1. Let G t = P, D, Λ, B be a story tree that is equivalent to G a. This is possible because of Proof (3). 2. Let D = B =. Let B = B. Let P = P. Let Λ = Λ. 3. If B =, then halt and return G m = P, D, Λ, B. Otherwise, Let b = p 1,, δ, p 2 be an arc in B. 4. Let L A(p 1 ) such that α i L α i, α j O(p 1 ) for all α i, α j A(p 1 ). Let F A(p 2 ) such that α i F α j, α i O(p 2 ) for all α i, α j A(p 2 ). 5. Let p = A(p 1 ) A(p 2 ) {δ}, O(p 1 ) O(p 2 ) { l, δ for all l L} { δ, f for all f F}. Let Λ = Λ {δ}. 6. For all b = p i, H, δ k, p j B such that p i = p 1, B = B {b} { p, H, δ k, p j } 7. For all b = p i, H, δ k, p j B such that p j = p 1 or p j = p 2, B = B {b} { p i, H, δ k, p } 8. B = B {b } 9. For each b = p i,, δ k, p j B such that p i = p 1, B = B {b}, B = B { p, A(p 1 ), δ k, p j }, and D = D {δ k }. 10. For each b = p i,, δ k, p j B such that p i = p 2, B = B {b} { p,, δ k, p j } 11. P = P {p 1, p 2 } {p } 12. Go to step 3. Given that the algorithm above is guaranteed to transform any arbitrary acyclic story graph into an equivalent narrative mediation tree, the set of all acyclic story graphs is a subset of the set of all narrative mediation trees.

The proof of correctness of the algorithm relies on the fact that one node in G m contains both systemcontrolled character actions and user actions, representing one path through G a. Line 7 creates a new node that is a concatenation of two nodes in G a plus the user action that transitions between those two nodes. Line 13 removes the old nodes from G m and adds the new amalgamated node. As a result, G m has a minimal number of nodes that represent the maximum-length sub-paths in G a. Whether or not G m is equivalent to G a relies on the positioning of the arcs in G m. If there are two arcs originating in a single node in G a, then in G m, the user action of one of the arcs must be part of a partiallyordered plan in a story node in Gm while the other user actions are represented by arcs originating in that node in G m. Line 7 incorporates one user action into a new node. Line 11 identifies the alternative arcs in G a (because the arc originates from the same node in G a ) and creates a new arc in G m originating from the new node. Finally, an arc b in G m that originates from node p and is an alternative for user action α must be deterministically located immediately before α. That is, the history of b must contain exactly the actions in p that temporally precede α. Suppose p is the amalgamation of two nodes p 1 and p 2 that are part of G a and that p 1 and p 2 are connected by an arc b in G a that has user action α. From Line 7, p contains the actions of p 1 are succeeded by α which is succeeded by the actions of p 2. The new arc in G m that is created in Line 11 has a history H = A(p 1 ), which is the whole of the plan (from the beginning or from the most recent exception) that can be executed before α is executed. Arc b must be located immediately before α because no other actions can be executed between the last action in H and α. The initial node of G m represents one path through G a. Whenever the user has a choice of actions to take, there is a branch in G m that is located immediately before a user action in the partially-ordered plan. The user can choose the action that part of the plan or can choose one of the exceptional actions in one of the branches. There are n 1 arcs for every decision point in G m where there would have been n arcs for every decision point in G a. To choose an exception means to follow an arc to a new partially-ordered plan that represents the next longest sub-path through G a from that decision-point on. Since G a is acyclic, the subpath is always finite. The process continues until the end of a partially-ordered plan is reached. Since each node in G m represents a sub-path through G a, then the end of a partially-ordered plan represents the end of a terminal node in G a. Consequently G a and G m are equivalent. Therefore, any arbitrary acyclic story graph can be transformed into an equivalent narrative mediation tree. Therefore the set of all acyclic story graphs is a subset of all narrative mediation trees. Figure 4 show three identical representations of a branching story. The first is an acyclic story graph representation of a branching story. The second is a story tree representation of the same branching story. The story tree is derived by applying the algorithm in Proof (2). Due to the way in which certain nodes are duplicated, actions α 11, α 11, and

α 11 in the story tree representation are all identical to each other as are actions α 12, α 12 and α 12. The third is a narrative mediation tree derived from the story tree using the algorithm in Proof (8). δ 1 α 4 ε α 11 α 12 α 1 α 2 α 3 α 5 δ 3 δ 6 δ 2 δ 5 α 8 δ 4 α 6 α 7 α 10 α 13 α 9 (A) The initial acyclic story graph representation for the branching narrative. δ 1 α 4 ε α 3 α 11 α 12 α 1 α 2 α 5 δ 2 δ 6 α 11 α 12 α 6 α 7 α 13 δ 4 δ 5 α 8 α 10 α 9 δ 3 α 11 α 12 (B) The story tree representation for a branching narrative. α 1 α 2 δ 1 α 3 α 4 ε α 11 α 12 α 5 δ 2 α 6 α 7 δ 5 α 8 α 10 δ 3 α 11 α 12 α 9 δ 6 δ 4 α 11 α 12 α 13 (C) The narrative mediation tree representation for the branching narrative. Figure 4. Three equivalent representations of the same branching narrative.

Story graphs Acyclic story graphs = Story trees Narrative mediation trees Figure 5. The set relationship between story graphs and narrative mediation trees. 5. Conclusions The conclusion that can be drawn from the proofs in the previous section is that narrative mediation is at least as powerful as interactive narrative systems that have acyclic branching stories. Any acyclic story graph can be transformed into an equivalent narrative mediation tree. Narrative mediation can represent stories in which user actions are performed concurrently with system-controlled character actions, something that is impossible to represent in the standard story graph representation. In that respect, narrative mediation trees can represent interactive stories that cannot be represented by story graphs. However, narrative mediation trees, by nature, cannot have cycles, meaning there is a class of story graph cyclic story graphs that cannot be represented by narrative mediation trees. The relationship between story graphs and narrative mediation trees is shown in Figure 5. Narrative mediation uses a narrative generator to construct linear narratives that are organized as a tree of contingencies. Since there is an equivalent narrative mediation tree for every acyclic story graph, interactive stories can be generated by iteratively invoking a linear narrative generator such as Fabulist (Riedl & Young, 2004; Riedl 2004) that represents the causal relationships between story world events. References Aylett, R. (2000). Emergent narrative, social immersion, and storification. Proceedings of the 1 st International Workshop on Narrative and Interactive Learning Environments, 35-44. Bates, J. (1992). Virtual reality, art, and entertainment. Presence: The Journal of Teleoperators and Virtual Environments, 1(1), 133-138. Blair, D. & Meyer, T. (1997). Tools for an interactive virtual cinema. In R. Trappl & P. Petta (Eds.) Creating Personalities for Synthetic Actors: Towards Autonomous Personality Agents (pp. 83-91). New York: Springer. Bruckman, A. (1990). The Combinatorics of Storytelling: Mystery Train Interactive. Unpublished manuscript. Bruner, J. (1990). Acts of Meaning. Cambridge, MA: Harvard University Press. Bruner, J. (1991). The narrative construction of reality. Critical Inquiry, 18(1), 1-21.

Dautenhahn, K. (2003). Stories of lemurs and robots: The social origin of story-telling. In M. Mateas & P. Sengers (Eds.) Narrative Intelligence (pp. 63-90). Philadelphia: John Benjamins Publishing. Egri, L. (1960). The Art of Dramatic Writing: Its Basis in the Creative Interpretation of Human Motives. New York: Simon & Schuster. Galyean, T.A. (1995). Narrative Guidance of Interactivity. Ph.D. Dissertation, MIT Media Arts and Sciences Program. Gerrig, R.J. (1993). Experiencing Narrative Worlds: On the Psychological Activities of Reading. Hew Haven: Yale University Press. Gordon, A., van Lent, M., van Velsen, M., Carpenter, P., & Jhala, A. (2004). Branching storylines in virtual reality environments for leadership development. Proceedings of the 16 th Innovative Applications of Artificial Intelligence Conference, 844-851. Kelso, M.T., Weyhrauch, P., & Bates, J. (1993). Dramatic presence. Presence: The Journal of Teleoperators and Virtual Environments, 2(1), 1-15. Lamstein, A. & Mateas, M. (2004). Search-based drama management. In D. Fu, S. Henke, & J. Orkin (Eds.) Challenges in Game Artificial Intelligence: Papers from the AAAI Workshop (pp. 103-107). Menlo Park, CA: American Association for Artificial Intelligence. Lebowitz, M. (1984). Creating characters in a story-telling universe. Poetics, 13, 171-194. Lebowitz, M. (1985). Story-telling as planning and learning. Poetics, 14, 483-502. Lombard, M. & Ditton, T. (1997). At the heart of it all: The concept of presence. Journal of Computer-Mediated Communication, 3(2). Riedl, M.O., Saretto, C.J., & Young, R.M. (2003). Managing interaction between users and agents in a multiagent storytelling environment. Proceedings of the 2 nd International Joint Conference on Autonomous Agents and Multi Agent Systems, 741-748. Riedl, M.O. (2004). Narrative Generation: Balancing Plot and Character. Ph.D. Dissertation, Department of Computer Science, North Carolina State University. Riedl, M.O. & Young, R.M. (2004). An intent-driven planner for multi-agent story generation. Proceedings of the 3 rd International Joint Conference on Autonomous Agents and Multi Agent Systems, 41-48. Sengers, P. (2000). Narrative intelligence. In K. Dautenhahn (Ed.) Human Cognition and Social Agent Theory (pp. 1-26). Philadelphia: John Benjamins Publishing. Silva, A., Raimundo, G., & Paiva, A. (2003). Tell me that bit again Bringing interactivity to a virtual storyteller. Proceedings of the 2 nd International Conference on Virtual Storytelling, 146-154.

Swartout, W., Hill, R., Gratch, J., Johnson, W.L., Kyriakakis, C., LaBore, C., Lindheim, R., Marsella, S., Miraglia, D., Moore, B., Morie, J., Rickel, J., Thiebaux, M., Tuch, L., Whitney, R., & Douglas, J. (2001). Toward the holodeck: Integrating graphics, sound, character and story. Proceedings of the 5 th International Conference on Autonomous Agents. Theune, M., Faas, S., Nijholt, A., & Heylen, D. (2003). The virtual storyteller: Story creation by intelligent agents. Proceedings of the 1 st International Conference on Technologies for Interactive Digital Storytelling and Entertainment, 204-215. Weyhrauch, P. (1997). Guiding Interactive Fiction. Ph.D. Dissertation, Carnegie Mellon University. Young, R.M. & Riedl, M.O. (2003). Towards an architecture for intelligent control of narrative in interactive virtual worlds. Proceedings of the 2003 International Conference on Intelligent User Interfaces, 310-312. Young, R.M., Riedl, M.O., Branly, M., Jhala, A.H., Martin, R.J., & Saretto, C.J. (2004). An architecture for integrating plan-based behavior generation with interactive game environments. Journal of Game Development, 1(1), 51-70.