750 likes | 765 Views
An approach to managing interaction between human users and computer-controlled agents in an interactive narrative-oriented system. This research focuses on interactive narrative systems and how narrative mediation works.
E N D
Managing interaction between users and agents in a multiagent storytelling environmentMark Riedl, C.J.Saretto and R.Michael Young From the Proceedings of the Second International Conference on Autonomous Agents and Multi-Agent Systems, June, 2003.
An approach to manage the interaction of human users with computer-controlled agents in an interactive narrative-oriented system.
Research on Interactive Narrative Systems • John Laird, University of Michigan. Interactive Computer Games. • Michael Mateas & Joe Bates, Carnegie-Mellon. OZ research group: character-based, “believable agents” • Marc Cavazza, University of Teesside. Character-based. Voice recognition. • R.Michael Young, NC State Univ. Liquid Narrative research group. Mimesis project.
Liquid Narrative • Interactive experiences within 3D virtual worlds where the action in these worlds are • Structured as a compelling story, • Generated automatically each time a user interacts with the world, • Conveyed to the user using effective narrative discourse, and • Significantly altered by and adapted to the user’s interaction during the course of the story
How narrative mediation works • Story = a setting + a beginning + an end + series of actions with consequences (coherence: user comprehends the relationships between events) • Setting = the virtual world • Beginning = the state of the virtual world when the user enters it as an actor (initial state) • End = a set of conditions that must all be satisfied (goal state)
How narrative mediation works • User can choose any available action • Most actions do not alter the plan Consistent: matches a prescribed action Constituent: none of its effects interact with any of the plan’s remaining structure • But some do Exceptional: one or more of its effects threatens the conditions in the world required for future actions
Accomodation • Small changes to narrative plan • Requires replanning
Intervention • System must detect exceptions and respond in a manner which preserves coherence of the narrative and preserves the user’s sense of control • Replace user’s exceptional action with an instance of an action called a failure mode • A failure mode has the same nature as the exceptional action, but effects of the failure mode produce results that do not conflict with any of the causal structure of the plan.
An Example The story is set on a small island. There is a vending machine on the island as well as a drawbridge leading off the island. The vending machine and drawbridge are both coin operated. There is a player character named Bob on the island.
The Beginning and End The story begins with Bob on the island. Bob has a coin in his possession. OnIsland(Bob) At(Start, Bob) Has(Coin1, Bob) The story ends when Bob successfully travels off the island. ~OnIsland(Bob)
User’s actions: User (Bob) decides to go to vending machine and put coin in the vending machine.Problem: Bob will need coin later for the bridge
Controller’s choices • Intervene by substituting the failure mode Refund for Buy. • Intervene by substituting the failure mode BrokenBuy for Buy. • Accommodate the action Buy, but create a new subplot that results in the drawbridge being open. Perhaps place a new coin in the world for Bob to find, or create a new character to open the bridge for Bob.
Implementation: The Mimesis System • Mimesis Controller (MC) = the planner and the intelligent controller • A modified version of Unreal Tournament (UT) = Mimesus Unreal Tournament Server (MUTS) UT is procedural (does not utilize any formal model of the characters, setting or actions) modifications to UT are written in UnrealScript which is Java-like (object-oriented)
Longbow hierarchical partial-order causal link planner (or DPOCL: Decompositional Partial-Order Causal-Link Planner) • Generates a plan by determining a series of actions (including user’s) which when applied to the initial a state of the problem space in a given order will lead to the goal state. • Similar to partial-order, causal link and HTN-style planning systems. • Contains explicitly marked temporal relationships between all actions. • Contains causal links between 2 plan steps when the first step establishes a condition needed by the second step. • Temporal and causal structure can be used to determine when a user’s action might interfere with the soundness of the plan’s future actions.
Planning for Exceptions • Mimesis generates a narrative plan specifying all actions of the story world • Causal structure of the narrative plan is analyzed for possible exceptions • For every causal link, MC identifies every action that 1. could be performed by the user during the interval spanned by the link, and 2. the action results in the opposite effect of the causal link. • For every causal link/user-performed action pair, the MC creates an entry in the mediation policy.
Bank Example Sam, the character controlled by the user, is a nighttime guard at a bank. The bank has a vault in which there is a large amount of gold. One night that Sam is on duty, the bank owner comes into the bank, opens the vault and begins removing the gold. Sam’s suspicions are aroused and Sam takes action to stop the bank owner from removing the gold.
Example of accommodation(Policy B) Sam has a key that opens the vault. Sam goes to the vault and opens the vault before the bank owner arrives. If this exception were not detected by the Mediator, the bank owner would attempt to open the vault even though the vault door was open.
Low-level control of Exception Management • Mediator: an UnrealScript object. Intercepts the requests from players to the server for an action. Players inform Mediator of any event that occurs to them, e.g., bumping into a wall, or another character coming into view • Execution Monitor: responsible for driving the story’s action by building a DAG
Mediator • Execution Monitor passes commands for actions from the user to the Mediator. • Compares each user action to the mediation policy for the current plan. • User actions that do not match the action of any entry in the policy whose interval covers the current time point are consistent or constituent and are relayed back to the Execution Monitor. Constituent actions are added to the execution DAG and allowed to execute. • User actions which match an entry are characterized as exceptions and are handled by accommodation or intervention. • Informs the MC of the nature of the exception and its response.
Execution Monitor • Receives the narrative plan from the MC at startup and creates from it a DAG of execution order. • Nodes are the operations that all agents are to perform throughout the duration of the narrative • Arcs represent a restriction that the source node must successfully complete before the destination node’s operation can begin. • Schedules execution based on the DAG: executes actions with no unexecuted predecessors. • Updates the DAG to reflect the completion status of all actions that have finished • Cannot execute user actions. Instead creates a placeholder operation whose execution suspends until the Execution Monitor detects that the user has achieved the intended operation’s success conditions.
Production of New Mediation Policy • When the Mediator accommodates, the MC produces a new mediation policy for the new narrative plan. • When the Mediator intervenes, the MC might produce a new mediation policy because the user might decide to repeat the action that gave rise to the current exception.
Choosing between Accommodation and Intervention • QUALITATIVELY • Accommodation can lead to replanning which could lead to actions that are left with no causal role in the plan. This can damage the overall coherence of the story. • Intervention can cause the user to become aware that his/her actions are restricted (especially true when the user repeatedly attempts to perform the same exceptional action) • QUANTITATIVELY • Whenever a new plan is constructed, a heuristic function is called to rank the narrative structure of the story world that would result from using the new plan against the narrative structure of the story worlds that would result from using the original narrative plan with an intervention. Each possible failure mode is considered.
Heuristic Function Takes 3 arguments: history: the plan fragment that has executed in the story world leading up to the exception action: either the proposed failure mode or the exceptional action future: a plan fragment specifying the action in the story yet to occur. The highest ranked action sequence is added as the response entry in the policy for the exception being analyzed.
Run-Time Management • The MUTS gets a mediation policy at start up and after every exception. • The MC does not generate them as needed. • Instead proactively computes policies for plans other than the one that is currently executing during periods when the user executes sequences of actions that are consistent and constituent (downtimes). • Policy trees are constructed: node = pairs a narrative plan and its mediation policy arc = connects an exception in the source node’s policy to a new plan/policy pair that is to be used as the exception ‘s response. • Trees are searched in breadth-first order (dependent on which exception will occur first) or best-fit order (dependent on which exception is most likely to occur first).
Future work • Dealing with a sequence of actions which build up to an exception • Assisted intervention – other characters, or a sequence of actions
References • R. Michael Young, Mark O.Riedl, Mark Branly, Arnav Jhala, R.J. Martin, C.J. Saretto, An architecture for integrating plan-based behavior generation with interactive game environments. Submitted for Publication in Journal of Game Development. • C.J. Saretto, R. Michael Young, Mediation in Mimeses Liquid Narratives • C.J. Saretto. Mediating User Interaction in Narrative-Structured Virtual Environments. Masters Thesis. NC State University. 2001 • M. Cavazza, F. Charles, S.J. Mead. Character-based interactive story-telling. IEEE Intelligent System, 17(4), 156-162. 2002.