180 likes | 270 Views
Director Agent. Brian Magerko University of Michigan. IDA: An Interactive Drama Architecture. percepts. user actions. AI Actor. Human player. direction. story content. Author. Haunt 2: Built in Unreal Tournament. AI Director.
E N D
Director Agent Brian Magerko University of Michigan
IDA: An Interactive Drama Architecture percepts user actions AI Actor Human player direction story content Author Haunt 2: Built in Unreal Tournament AI Director Interactive game, populated by human-like AI characters with an AI director that dynamically controls an unfolding story.
Director Execution Cycle predicted behavior threatens an active plot point execute direction timing constraint violated Haunt 2 environment all preconds for an active plot point are true observable game features knowledge maintenance plot monitoring set appropriate descriptors as true / false model player knowledge new plot-relevant fact hypothesize entity knowledge keep track of world state mark plot points as active / done new plot point has been set as active
Knowledge Maintenance predicted behavior threatens an active plot point execute direction timing constraint violated Haunt 2 environment all preconds for an active plot point are true observable game features knowledge maintenance plot monitoring set appropriate descriptors as true / false model player knowledge new plot-relevant fact hypothesize entity knowledge keep track of world state mark plot points as active / done new plot point has been set as active
Plot Monitoring predicted behavior threatens an active plot point execute direction timing constraint violated Haunt 2 environment all preconds for an active plot point are true observable game features knowledge maintenance plot monitoring set appropriate descriptors as true / false model player knowledge new plot-relevant fact hypothesize entity knowledge keep track of world state mark plot points as active / done new plot point has been set as active
Location( Sally, x ) Location( Innkeeper, x ) Proximity( Player, Sally, 2) Timing( <=60 ) Talk( Sally, Innkeeper, small_talk) Talk( Innkeeper, Sally, small_talk) Plot Representation some plot content is instantiated at run-time postconditions are directions given to synthetic characters timing constraints represent pacing of story flow preconditions actions partially-ordered with other plot-points Plots ordered for a scene:
new goal: small talk Story Direction predicted behavior threatens an active plot point execute direction timing constraint violated Haunt 2 environment all preconds for an active plot point are true observable game features knowledge maintenance plot monitoring set appropriate descriptors as true / false model player knowledge • All preconditions are met • Perform plot content new plot-relevant fact hypothesize entity knowledge keep track of world state mark plot points as active / done new plot point has been set as active
new goal: MoveTo(Library) Reactive Direction predicted behavior threatens an active plot point execute direction timing constraint violated Haunt 2 environment all preconds for an active plot point are true observable game features • x is unbound • User is in library • Sally & Innkeeper are in the lounge • Time > 60 (constraint violated) • move Sally & Innkeeper knowledge maintenance plot monitoring set appropriate descriptors as true / false model player knowledge new plot-relevant fact hypothesize entity knowledge keep track of world state mark plot points as active / done new plot point has been set as active
create sound Preemptive Direction predicted behavior threatens an active plot point execute direction timing constraint violated Haunt 2 environment all preconds for an active plot point are true observable game features • User has been moving to new rooms… • Predicted goal: Explore • Predicted timing constraint violation knowledge maintenance plot monitoring set appropriate descriptors as true / false model player knowledge new plot-relevant fact CRASH hypothesize entity knowledge keep track of world state mark plot points as active / done new plot point has been set as active
result {Success, 0.42} Single Modeling Run world state state copy appear explore listen P(e) = 0.6 P(a) = 0.2 P(l) = 0.2 goto-sound goto-light goto-area P(ga|e) = 0.5 P(gs|e) = 0.3 P(gl|e) = 0.2 model
appear explore listen P(e) = 0.6 P(l) = 0.2 P(a) = 0.2 goto-sound goto-light goto-area P(ga|e) = 0.5 P(gs|e) = 0.3 P(gl|e) = 0.2 Probabilistic Player Model …
Player Prediction • Success • Precondition is fulfilled before a timing constraint is violated • Failure • Timing constraint is violated • Probabilistic sampling • Result determines: • if the director preemptively directs • how it directs preemptively
Probabilistic Sampling • Model returns a tuple, M (R, P) • R: success / failure • P: probability of particular sequence of actions chosen • Model runs created iteratively until an author-defined limit ρ is reached
Probabilistic Sampling • Once modeling is complete, director computes confidence in the user fulfilling plot content • -1 <= Cm <= 1 • s / f: individual run which yielded a success / failure • Ps / f: likelihood of run m occurring • Cm > α >= 0 success • Cm < α < 0 insignificant success / failure & preemptive guidance is needed
Connecting Modeling to Director Actions • Preemptive direction chosen by score • Action scores are a fn of modeling result, Cm • Director actions rated by a scoring function Scoreaction = (Sub * Saction + Eff * Eaction) / 2 • Saction / Eaction: authored rating for a particular director action • Sub / Eff: weights assigned as a fn of Cm
Assigning Score Weights • Score for actions computed at run-time: • If 0 < α < Cm, then do not preemptively direct • If 0 < Cm < α, then assign Sub > Eff • If -1 + α < Cm < 0, then assign Sub == Eff • If -1< Cm < -1 + α, then assign Sub < Eff effectiveness no direction 1 -1 0 α subtlety
Nuggets and Coal • Nuggets • IDA is functionally finished • New theory of story direction • Tells a story (“It works!”) • Has influenced interactive training approaches • Coal • Evaluation left to do • Tells a story, just not a great one • Low amount of interaction (“verbs”) in Haunt 2
Questions? www.magerko.org/research brian@magerko.org