class: center, middle, inverse layout: true --- ## Building Interactive Stories with Tropes  Matt Thompson, EngD student at University of Bath (CDE) and Sysemia Ltd, Bristol --- class: inverse, center, middle # Emergent vs Branching Narratives Two approaches to non-linear narrative creation --- class: inverse, center, middle background-image: url(img/generative.png) ## Emergent Narratives --- background-image: url(img/interactive.png) ## Branching Narratives --- layout: false ## Why not both? - Emergent elements save authors time and drudgery - However, pre-written branches give the author total control - Is there some way we can get the best of both worlds? --- ## The dominant (academic) approach Majority of academic research involves: - Intelligent Agents as characters - Planners/drama managers to "direct" the agents This is nice, but: - The author must still write lots of goals for the agent and the story - The characters have no agency! --- ## Our crazy idea: Social Norms - If intelligent agents are the characters in a simulated world, what is the story? - Need something abstract, invisible, that gently "guides" the characters How about social norms? - They invisibly govern our behaviour in the real world, why not in a story? --- class: center ## Versu  --- class: center, middle, inverse # How do we describe stories as social norms?! We need a way to model story components! --- layout: false class: center ## Joseph Cambell's Monomyth  --- class: center ## Vladimir Propp  --- ## Propp's story functions 31 story functions, including: - **Absentation**: One of the members of a family absents himself from home. - **Interdiction**: An interdiction is addressed to the hero. - **Complicity**: The victim submits to deception and thereby unwittingly helps his enemy. - **Villainy**: The villain causes harm or injury to a member of the family. --- class: center, middle, inverse # Tropes!  --- layout: false ## Tropes? - Multiple levels of abstraction - A trope can describe a whole story, a scene or just a character or line of dialogue - Can be endlessly combined for plenty of rich possibilities - TVTropes ([tvtropes.org](http://tvtropes.org)) is the Wikipedia of tropes, with a very active community - [The Periodic Table of Storytelling](http://www.designthroughstorytelling.net/periodic/) is one way of organising/visualising tropes --- ### Trope examples **The Hero's Journey**: A hero answers a call to adventure, and leaves home to go on a journey. They defeat the villain along the way, returning back home triumphant. **The Evil Empire**: The villain is part of an empire, which tries to stop the hero at all costs. **The MacGuffin**: There's some object that the hero is after, but which the audience doesn't really care about **Chekhov's Gun**: If a gun appears somewhere in the first act, it must be fired by the end of the third. --- layout: false ### Tropes that even a computer can understand Break them down into three things: - characters (**roles**) - objects (**types**) - places (**locations**) Describe their interactions with (deontic) logic: - permissions: a character **may** go to the cinema - obligations: a character **must** study before the exam, otherwise they will fail --- ## Examples *The Hero's Journey*: The hero **must** leave home when they receive the call to adventure. Then the hero **may** kill the villain. Once this is done, the hero **may** return home. *The Evil Empire*: The villain has an empire, and **may** kill the hero. *MacGuffin*: The hero **must** search for an object. However, the hero **may** find it. --- class: center, middle, inverse # The Nasty Details How all this is actually coded --- layout: false ## Answer Set Programming Loads of tropes can be active at once, so how do we work out what permissions/obligations the characters have? - We use **Answer Set Programming** (logic programming, like Prolog) to describe the story - Then we tell it what events have happened so far in the story - Then we use a **solver** to work out what can happen next --- ## We made a language! We called it TropICAL! - TropICAL: the TROPe Interactive Chronical Action Language - Inform 7-inspired syntax - Compiles to InstAL (a language for deontic logic), which compiles to AnsProlog (ASP) - Double the compilation, double the fun! - (I'll show you some examples) --- ## StoryBuilder StoryBuilder is a tool that makes it simple for authors to: - **Create** and edit their own tropes - **Arrange** tropes to form a story - **Play** the resulting story - **Share** the story with their friends There's still work to be done, as you'll see in my demo! --- ## Summary of our approach: - **Intelligent Agents** to model characters (beliefs, desires, intentions) - **Social Norms** to govern the characters in a narrative - **Tropes** to describe the social norms - Fancy logic programming (**Answer Set Programming**) to work out what norms/tropes hold at any given point in the story Authors spend less time writing but can still structure the story, characters have some autonomy to generate the details. --- ## The missing pieces Plenty of work to be done on StoryBuilder: - It's not very expressive right now! - Want to group tropes into scenes, with pre- and post-conditions - Need a way of creating characters, their dialogue and goals - Then hooking it up to a Multi Agent System - Also a way to describe objects and places, and their characteristics - Populate the DB with pre-written tropes - Share it with the TVTropes community to get more tropes --- class:inverse, middle, center # Questions (I also have some questions for YOU!) m.r.thompson@bath.ac.uk mthompson.org @cblop Slides online at: [mthompson.org/if-talk](http://mthompson.org/if-talk)