1 / 39

Brutus

Brutus . Part I: An Architecture for Automatic Story Generation. Overview. Automatic Story Generators: What makes a good one. Previous Architectures The Brutus Architecture Conceptual Introduction to FLEX The Knowledge Level The Process Level. Interesting Story?.

red
Download Presentation

Brutus

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Brutus Part I: An Architecture for Automatic Story Generation Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  2. Overview • Automatic Story Generators: What makes a good one. • Previous Architectures • The Brutus Architecture • Conceptual Introduction to FLEX • The Knowledge Level • The Process Level Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  3. Interesting Story? • Story: A Natural Language description of objects (agents), their attributes, relationships, beliefs, behaviors, motivations and interactions. • Need not have a message or theme but interesting ones typically do. • And they have themes that are typically interesting • Need not have a particular structure but interesting ones typically do. • Lots of effective ways to tell a story. • Need not even have a plot but interesting ones typically do. • Plot may vary dramatically. Huge space of possibilities but typical high-level structures are also typical. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  4. Story Generators: What Makes a Good One? • Interesting Stories • Arises from theme, structure and language • Creative Distance • “Distance” between input and output • Print statement of canned story would be bad • Turn a collection of assertions about people, places, things, themes and story structures into interesting prose would be good. • Wide Variability • Produces the same story every time with names changed would be bad • Produces different plots, scenes, character behaviors over the same theme would be good. • Architectural Differentiation enables control over variability Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  5. A Story Dave loves the university of Rome. He loves its studious youth, ivy covered clock-towers and its sturdy brick. Dave wanted to graduate. Prof. Hart told Dave, “I will sign your thesis at your defense.” Prof. Hart actually intends to thwart Dave’s plans to graduate. After Dave completed his defense and the Charmin of Dave's committee asked Prof. Hart to sign Dave’s thesis, Prof. Hart refused to sign. Dave was crushed. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  6. Component Configuration Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  7. Component Configuration • Deconstruct an existing story • Store canned text chunks • Assemble according to a Story “Flow-Chart” • No explicit representation of Plot, Theme, Characters, Action etc. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  8. Plot Generation Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  9. Plot Generation • Planning Engines • Classic AI approach • Agents, Goals, Rules, Forward Chaining • Simulation generates series of actions • Actions mapped to natural language • Interestingness was assumed to arise from simulation • But interestingness comes from interesting themes and good story telling (“literature”). • Complex series of events describing osmotic interactions between amoebae just doesn’t cut it. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  10. Story Structure Expansion Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  11. Sample Story Grammar Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  12. Story Structure Expansion • Iterative Expansion of a Story Grammar • Builds increasing detailed outlines. • Plot representations and literary variations are hard to capture • Characters and their behaviors are not explicitly represented • Themes are not explicitly represented • Hard to manipulate anything but story structure. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  13. Brutus: A Theme-Based Composite Architecture • Anchored in an explicit representation of the theme for interestingness • We know what themes interest humans -- observe from classic literature • Build this knowledge into system in a way that is independent of • Plot • Story Structure • Literary devices • Manipulate these independently • Plot Generation through simulation to vary plot • Story Structure Expansion to capturing story telling form • Language generation for text • Explicit representation of literary devices to draw reader Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  14. Brutus Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  15. Knowledge and Process • The Knowledge Level • Declarative representation of different types of knowledge used in story generation. • The Process Level • Computational approach to story generation • Procedures that uses knowledge to construct a story. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  16. Knowledge and Process Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  17. The Process Level Intro • Thematic Concept Instantiation • In Brutus the story is anchored on a theme. • The theme is represented in a way that is independent of plot, story structure and other elements of the story. • This enables architectural differentiation and control over variability. • Interesting themes are not generated they are presumed to exist and are represented formally in the system as part of the knowledge-base • Output is The Stage - Set or characters, places, things and initial events • Plot Generation • Input is the Stage • Extends the stage through time by executing actions associate with characters goals. • Generates The Scenario - a sequence of the detailed events of a plot derived from the cast of characters and initial events identified in the stage • Story Structure Expansion • Given a story structure, selects series of paragraph types drilling down to sentence types • Language Generation • Sentences are instantiated with selected elements from the scenario. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  18. The Knowledge Level • Domain Knowledge • Linguistic Knowledge • Literary Knowledge • Usage in Story Generation Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  19. Domain Knowledge • Not the story itself (no natural language, no story structure, etc.) • Representation of: • Objects and Attributes -- People, Places, Things • Agents and Events • Agent Beliefs and Behaviors • About which a story may be written Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  20. Linguistic Knowledge • Language structures at vary levels of aggregation • Discourse, • Paragraph, • Sentence, • Phrase, • Word • Rules for their valid formation -- e.g., grammars at every level • Discourse Level • Lengthy natural language expression -- discussion, story... • Describes combinations of lower level elements to form a “valid” discourse • In Brutus: A Story Grammar Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  21. Words • Word • Smallest independent unit that can be assigned descriptive meaning • Can be further decomposed into prefixes, roots, suffixes, letters • Word Formation morphology (morphemes) • May be influenced by semantic properties - number, gender, case, tense • Derivational morphology • May taken on different forms based an agreement with other words in more aggregate structures - e.g., number of noun influences form of verb • Inflectional morphology • Lexicon = Set of Words and morphemes (word parts - e.g., -ed) • Lexicon + Morphological Rules Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  22. Sentences • A sentence in a natural language, L, is a string of words taken for L’s lexicon. • A natural language grammar for L is a computational device that distinguishes the grammatical from the ungrammatical sequences of words. • It defines the valid (grammatically correct) sentences of L. • NL Understanding • Robust systems require a full grammar for L to recognize valid sentence. • For most NLs this is non-trivial • In NL Generation (We have it easy) • Can generate over subset of defined grammatically correct sentence types. • These are defined with generative sentence grammars. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  23. Sentence Grammar • Different Generation Procedures can fix different variables • Other variables in Grammar are generated randomly • Examples Fixing Setting = university • The university has its ancient and sturdy brick, its sun-splashed greens, and its eager youth. • The university as its lush green ivy. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  24. Literary Knowledge • Different ways to use words and phrases to evoke particular responses in the mind of the reader. • Generate Imagery • Produce a landscape of psychological consciousness • Producing moods: positive/secure, negative or anxious… • Types of Literary Knowledge in Brutus1 • Literary Associations • Literary Augmented Grammars (LAGs) • Imagistic Expertise Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  25. Literary Associations • Iconic Features • Typical associations found in a literary setting partitioned in psychological positive and negative associations • Literary Modifiers • Typical associations between modifiers and the objects they modify partitioned in positive and negative associations • Literary Analogs • Metaphors • Objects and an analog used to represent it to affect the mind of the reader. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  26. Iconic Features • Typical associations found in a literary setting • ivy and clock towers are iconic features of a university • Positive • brick, ivy, youth, knowledge are positive iconic features of a university. • Negative • tests, competition, ‘intellectual snobbery’, cheating are negative iconic features of a university Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  27. Literary Modifiers • Typical associations between modifiers and the objects they modify partitioned in positive and negative associations • poisonous, lush modify ivy in a university setting • Positive • spreading, green, lush are classified as positive modifiers of ivy • Negative • poisonous, tangled are classified as negative modifiers of ivy Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  28. Literary Analogs • Identify Metaphorical associations between objects • Sun is an analog for an eye • Her eyes were gleaming suns leading the way toward victory • Produce images • warmth • trust • power Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  29. Literary Augmented Grammars • Literary Knowledge is embedded in generative procedures to influence the selection of words and phrased to achieve literary results. • Literary knowledge is embedded as constraints on terminals in sentence grammars that make reference to literary knowledge structures Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  30. The Bizarro World • Bizzaro Modifiers are special modifier-object associations that create a sense of the bizarre. • “bleeding” bizarrely modifies sun, plants, eggs etc. • Shelly’s eyes were like big bleeding suns • Use bizzaro modifiers in LAGs Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  31. Architectural Overview Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  32. Thematic Relation • Captures the necessary ingredients for a story about the theme of betrayal • Used to scour the knowledge base and assemble the stage for a betrayal story. • May be many solutions -- many plots, many characters, may stories depends on contents of KB. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  33. Stage • Betrayer: Professor Hart • Betrayed: Dave Striver • Betrayal_Location: University of Rome • Betrayed’s goal: To Graduate (Acquire thesis committee’s approval and signatures) • Betrayer’s Lie (Promise): Approve and sign betrayed’s thesis. • Betrayer’s Evil Action: Refuse to sign thesis Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  34. Scenario • Plot generation takes initial state of stage and runs characters behavioral rules (forward chaining) • Actions take place • New events including utterances (dialog) occur • This events are used as input to expand the story structure and generate natural language sentences. • Prof. Hart lies to Dave. The utterance is “…” • The Chair request to Prof. Hart: sign Dave’s Thesis • Prof. Hart refuses the chairs request. • Prof. Hart says “….” • and so on... Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  35. Story Structure Expansion • 1. Story  Setting + Goals-and-plans + Betrayers-evil-action + Betrayed's-state • 2. Goals-and-plans  Betrayed's-goal + Betrayer’s-promise + Betrayer’s-goal • 3. Setting  setting-description(betrayal-location,pov,betrayed) • 4. Betrayed's-goal  personal-goal-sentence(betrayed) • 5. Betrayed's-goal  personal-goal-sentence(betrayer) • 6. Betrayers-promise  promise-description(betrayer,betrayed) • 7. Betrayers-evil-action  narrate-action(betrayers-evil-action) • ================================================= • setting-description(Loc, pov, Persion) :- • pc_of(Person, Loc) + parallel_dscrp(Loc,pov,Person) Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  36. A Story • Dave loves the university of Rome. • He loves its studious youth, ivy covered clock-towers and its sturdy brick. • Dave wanted to graduate. • Prof. Hart told Dave, “I will sign your thesis at your defense.” • Prof. Hart actually intends to thwart Dave’s plans to graduate. • Dave completed his defense and the Charmin of Dave's committee asked Prof. Hart to sign Dave’s thesis, Prof. Hart refused to sign. • Dave was crushed. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  37. FLEX Exercises Learn the Basics Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  38. Conceptual Introduction to FLEX • Frames and “isa” • Instances • Relations • Production Rules Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  39. Brutus Part II: Micro Brutus1: An Implementation of the Brutus Story Generation Architecture Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

More Related