Presentation is loading. Please wait.

Presentation is loading. Please wait.

UC SANTA CRUZ Story generation I: Morphemes & grammars  Morphemes – story events or “functions”  Vladimir Propp analyzed Russian folk tales  Example.

Similar presentations


Presentation on theme: "UC SANTA CRUZ Story generation I: Morphemes & grammars  Morphemes – story events or “functions”  Vladimir Propp analyzed Russian folk tales  Example."— Presentation transcript:

1 UC SANTA CRUZ Story generation I: Morphemes & grammars  Morphemes – story events or “functions”  Vladimir Propp analyzed Russian folk tales  Example morphemes: The hero leaves home, the hero is given a difficult task, the hero defeats the villain  Grammars – hierarchic combination rules  Story grammars – use story functions by analogy to linguistic elements

2 UC SANTA CRUZ  Model authorial knowledge beyond story structure  Examples: Authorial goals, plans, knowledge about the world  We’ll look principally at two systems:  Universe (author plans)  Minstrel (models story goals, plans, creativity via reuse) Story generation II: Author simulation

3 UC SANTA CRUZ Story generation III: World modeling  Model the a dynamic world and autonomous characters  Stories emerge from the interaction of characters in the world  We’ll look at Tale-Spin, the classic world modeling story generator, as well as more recent character-based AI research  A challenge for this approach: autonomous characters running around in a world don’t necessarily create compelling stories

4 UC SANTA CRUZ once upon a time there lived a dog. one day it happened that farmer evicted cat. when this happened, dog felt pity for the cat. in response, dog sneaked food to the cat. farmer punished dog. Joseph story generator – R. Raymond Lang story  setting + episodes episodes  episode + episodes episode  story_event + emotional_response + action_response Sample output & story grammar

5 UC SANTA CRUZ Propp – Proto Grammar  Structuralist analysis of the Russian folk tale  Morphemes (story events)  Rules for combining morphemes  Work in AI story grammars builds on this tradition  Much work in AI-based storytelling references back to Propp

6 UC SANTA CRUZ Propp noticed regularities in folk tales  Wanted to come up with a taxonomic system for describing folk tales  Consider the regularities in…  “A tsar gives an eagle to a hero. The eagle carries the hero away to another kingdom.”  “An old man gives Sucenko a horse. The horse carries Sucenko away to another kingdom.”  “A sorcerer gives Ivan a little boat. The boat takes Ivan to another kingdom.”  “A princess gives Ivan a ring. Young men appearing from out of the ring carry Ivan away into another kingdom.”  He wanted to capture these regularities in a formal notation

7 UC SANTA CRUZ Examples of Proppian morphemes  An interdiction is addressed to the Hero  “you dare not look in this closet”  “Take care of your little brother. Do not venture from this courtyard.”  “Don’t pick up the golden feather.”  The villain makes an attempt at reconnaissance  A bear says “What has become of the Tsar’s children?”  A priest during confession: “How were you able to get well so quickly?”  The villain causes harm or injury to a member of the family  The villain abducts a person  The villain seizes or takes away a magical agent  The villain pillages or spoils the crops

8 UC SANTA CRUZ Example analysis A tsar, three daughters (  ). The daughters go walking (  3 ), overstay in the garden (  1 ). A dragon kidnaps them (A 1 ). A call for aid (B 1 ). Quest of three heros (C  ). Three battles with the dragon (H 1 -I 1 ), rescue of the maidens (K 4 ). Return (  ), reward (w°).

9 UC SANTA CRUZ The master folktale equation ABC  DEFG HJIK  Pr-RsL LMJNK  Pr-Rs QExTUW*

10 UC SANTA CRUZ Story grammar systems  Starts with the taxonomic impulse of Propp and uses formal grammars to capture story structure  Formal grammar reminder  Regular expressions: A  a, A  aB  Context free: A    Context sensitive:  A     Universal:     Most story grammars tend to be context free  Context sensitive grammars may be useful for rewriting the story (explicit story/discourse distinction)

11 UC SANTA CRUZ Joseph  Story grammars have largely been dropped by the AI community because of the problems of over and under generation  Joseph is a more recent system that attempted to show the story grammar project can be successful  To generate concrete stories, adds a world model to instantiate primitives  Models plan execution and its effects in the world  Models all the actions and plans within the story space

12 UC SANTA CRUZ Joseph

13 UC SANTA CRUZ Event list in Joseph

14 UC SANTA CRUZ Rules from Story Grammar

15 UC SANTA CRUZ World Model  Hero(Agent)  Fact(Fact, World)  Ep_prim(Event, World)  Effect(Act, Result, World)  Consequence(State1, State2, World)  Plan(Title, Steps, World)  Plan_Effect(Plan_title, Effect, World)  Emot_Reaction(Event, Emotion, World)  Action_Motiv(Emotion, Action, World)  Goal_Motiv(Emotion, Goal, World)  Intention(Prot, Goal, Action, World)

16 UC SANTA CRUZ Output

17 UC SANTA CRUZ Grammar analysis

18 UC SANTA CRUZ Story grammar issues  How to “interactivize” story grammars?  Granularity of morphemes – how should the morphemes be grounded?  How do you represent more complex constraints?

19 UC SANTA CRUZ Author goals and plans in Universe  Universe is an example of an author modeling story system  Author plans and plot fragments  Author goals and plans may make no sense from character viewpoint  Associated with each plot fragment  Author goal it can achieve  Characters  Constraints  Ordered list of subgoals (steps)

20 UC SANTA CRUZ Example character in Universe Name: Liz Chandler Marriages: Don Craig [1980] Tony Dimera Stereotypes: Actor, Knockout, Socialite, Party-goer Trait modifiers: (Sex F) (Age young-adult) (Wealth 3) (Promiscuity -3) (Intelligence 3) Description: Wealth 8Promiscuity 3Competence NIL Niceness 0Self-Conf 6Guile 7 Naiveté 7Moodiness 6Phys-Att 7 Intelligence 7Age young-adultSex F Goals: (Find-Happiness Become-Famous Meet-Famous-People)

21 UC SANTA CRUZ Example plot fragment Plot fragment: forced-marriage Characters: ?him ?her ?husband ?parent Constraints: (has-husband ?her) (has-parent ?husband) ( < (trait-value ?parent ‘niceness) –5) (female-adult ?her) (male-adult ?him) Goals: (churn ?him ?her) {prevent them from being happy} Subgoals:(do-threaten ?parent ?her “forget it”) (dump-lover ?her ?him) (worry-about ?him) (together * ?him) (eliminate ?parent) (do-divorce ?husband ?her) (or (churn ?him ?her) (together ?her ?him))

22 UC SANTA CRUZ Universe algorithm  Loop:  Pick a goal with no missing preconditions  Pick a plot fragment for that goal, achieving extra goals, if possible  Execute the plan, including adding new goals to the goal graph and producing story output  Notice, Universe simultaneously pursues multiple goals  Tries to eventually satisfy all story goals  Tries to opportunistically satisfy several story goals with a single plot fragment  Plot fragments can add new goals

23 UC SANTA CRUZ Recursively solving author goals Plan (plot-fragment) library Goal: (churn ?him ?her) Plan: forced-marriage Goal: (churn ?him ?her) Plan: lovers-fight Goal: (churn ?him ?her) Plan: job-problem Goal: (together ?per1 ?per2) Plan: seduction Goal: (together ?per1 ?per2) Plan: drunken-sneak-in Pursue goal, e.g. (churn neil liz) Find all applicable plans Evaluate constraints Pick from satisfied plans Pursue subgoals, e.g. (together * neil) Find all applicable plans Evaluate constraints Pick from satisfied plans Pursue subgoals – if atomic, add output to story Add daphne seduces neil

24 UC SANTA CRUZ Relationship to story grammars churn  do-threaten, dump-lover, worry-about, together, eliminate, do-divorce, continue “forced-marriage” churn  … “lovers-fight” churn  … “job-problem”  The hierarchical structure can be captured with context free rules  Goals on the left hand side, plot fragment steps on the right  Plot fragments are like story grammars in that they are story-centric rather than character centric  But plot fragments have a precondition, plus a story memory (characters) the preconditions can refer to  Can have much more finely tuned constraints on plot fragment selection  Multiple story goals are active at the same time – story grammars have a single line of expansion  The story is factored in terms of author goals – this may lead to different factoring than story-centric factoring of grammars

25 UC SANTA CRUZ StoryCanvas  StoryCanvas (formerly WideRuled) is a GUI Universe story construction kit  Intended to help non-programmers create generative stories  Differences from Universe  Currently has one goal it’s pursuing (recursive goal descent) – this makes it feel more like a grammar  Has a concept of a “performing” character – used to include player interaction  Doesn’t do any plot fragment generalization – unclear whether this was really implemented in Universe as well


Download ppt "UC SANTA CRUZ Story generation I: Morphemes & grammars  Morphemes – story events or “functions”  Vladimir Propp analyzed Russian folk tales  Example."

Similar presentations


Ads by Google