{"id":86,"date":"2014-10-21T11:03:35","date_gmt":"2014-10-21T19:03:35","guid":{"rendered":"http:\/\/ice-bound.com\/news\/?p=86"},"modified":"2016-01-11T10:28:30","modified_gmt":"2016-01-11T18:28:30","slug":"shifting-story-text-combinatorial-narrative-part-three","status":"publish","type":"post","link":"http:\/\/ice-bound.com\/news\/shifting-story-text-combinatorial-narrative-part-three\/","title":{"rendered":"Shifting Story Text: Combinatorial Narrative, Part Three"},"content":{"rendered":"<p>In <a href=\"http:\/\/ice-bound.com\/news\/combinatorial_narrative\/\">part one<\/a> and <a href=\"http:\/\/ice-bound.com\/news\/combinatorial-narrative-part-two\/\">part two<\/a>\u00a0of this series on the combinatorial narrative system behind <a href=\"https:\/\/www.kickstarter.com\/projects\/1850151847\/ice-bound-a-novel-of-reconfiguration\"><em>Ice-Bound<\/em><\/a>, we gave an overview of\u00a0<a href=\"http:\/\/ice-bound.com\/news\/combinatorial_narrative\/\">how stories are constructed<\/a> from narrative fragments, and <a href=\"http:\/\/ice-bound.com\/news\/combinatorial-narrative-part-two\/\">how the player uses the printed book<\/a> to communicate to the AI KRIS which themes are most important. In this installment, we&#8217;re going to dive into the actual story text itself: how we make hand-authored prose that&#8217;s still responsive to a changing\u00a0narrative context.<\/p>\n<p>While most of the reader&#8217;s interaction takes place in\u00a0the map view, by rotating the iPad (or clicking the appropriate icon in the PC version), you&#8217;re taken to the page view, a mode where each story fragment you&#8217;ve assembled turns\u00a0into a paragraph of text: &#8220;excerpts&#8221; from\u00a0Kris Holmquist&#8217;s novel\u00a0in its current configuration. While this text looks static, it actually can vary\u00a0in both obvious and subtle ways, based on the player&#8217;s interaction with it, and how the pieces are reconfigured in the other view.<\/p>\n<p>Most of these fragments are not written for a specific story, but for a global pool of content available when the system builds a &#8220;level&#8221; of Carina Station. <a href=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/portrait-leve.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-93\" src=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/portrait-leve.jpg\" alt=\"Ice-Bound portrait mode combinatorial story text\" width=\"400\" height=\"506\" srcset=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/portrait-leve.jpg 500w, http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/portrait-leve-237x300.jpg 237w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a>This means the system must be able to &#8220;cast&#8221; a fragment with a particular story&#8217;s characters, and use appropriate names and pronouns throughout. The system\u00a0uses\u00a0the casting call to reject fragments inappropriate for a certain story: for instance, discarding a fragment requiring three characters in a story that has only two. We can also request a character\u00a0who appeared in an earlier fragment or type of fragment. For example, a scene might\u00a0require\u00a0a character who was\u00a0previously in a fragment where something tagged as &#8220;unsettling&#8221; happened.<\/p>\n<p>Once the cast has been determined, we need to make sure names and pronouns appear correctly throughout the text. You don&#8217;t quite realize how often we use pronouns in English, and how many subtle variants there are, until you need to hand annotate each one! Not only is this prone to mistakes (do you mean his\/her as in &#8220;her book,&#8221; or him\/her as in &#8220;give it to her&#8221;?) but an awkward syntax makes it nearly impossible to write creatively: constantly having to interrupt the prose\u00a0to call a function or insert curly braces can be a real cognitive drain that makes it hard to stay in a creative zone. We\u00a0devised an authoring syntax that tries to\u00a0minimize\u00a0mental overhead. For instance, when you reference a character you tag which alphabetical &#8220;cast position&#8221; it&#8217;s referring to, but subsequent pronouns will assume you&#8217;re still talking about the same character unless you say otherwise, simplifying the syntax:<\/p>\n<blockquote><p><strong><span style=\"color: #339966;\">_name\/a\/<\/span><\/strong> tried and tried to get to sleep. <strong><span style=\"color: #339966;\">_They<\/span><\/strong> rolled over and clasped <span style=\"color: #339966;\">_their<\/span> pillow over <span style=\"color: #339966;\">_their<\/span> ears, hummed lullabies to <span style=\"color: #339966;\">_them~<\/span>self.<\/p><\/blockquote>\n<p>(Why &#8220;they&#8221; and not &#8220;he&#8221; or &#8220;she&#8221;? It&#8217;s\u00a0because third person plural\u00a0is the one of the few\u00a0pronoun forms in English that has <a href=\"http:\/\/en.wikipedia.org\/wiki\/They\">a distinct\u00a0word for each possible pronoun<\/a>. We also have tags like _himher, but found\u00a0the\u00a0&#8220;they&#8221; form more natural once we got\u00a0used to it.)<\/p>\n<hr \/>\n<p>But\u00a0slotting characters interchangeably into stories doesn&#8217;t do much to make those stories feel personalized. We also have more complex replacements triggered via additional\u00a0underscore-prefixed keywords. One example is &#8220;mix-ins,&#8221; a technique borrowed from <a href=\"http:\/\/eis-blog.ucsc.edu\/2012\/02\/prom-week-authoring-crafting-procedurally-driven-narratives\/\">Aaron&#8217;s work authoring stories for the game Prom Week<\/a>. By giving each character a word or phrase that they&#8217;d use in a particular context, such as saying hello or in a moment of shock, you can personalize dialog written for any character. So for instance:<\/p>\n<blockquote><p>&#8220;<strong><span style=\"color: #339966;\">_mixin\/thanks\/a\/~<\/span><\/strong>, <strong><span style=\"color: #339966;\">_mixin\/friend\/a\/~<\/span><\/strong>,&#8221; <span style=\"color: #339966;\"><strong>_they<\/strong><\/span> said.<\/p><\/blockquote>\n<p>&#8230;might produce &#8220;Thanks, comrade&#8221; from one character, or &#8220;Thank you, my dear&#8221; from another. While this technique seems simple, it&#8217;s a remarkably effective injection of a particular character&#8217;s sensibilities into a\u00a0narrative moment, and makes\u00a0the rest of the scene seem written\u00a0just for them.<\/p>\n<p>These replacements can get rather complex. The\u00a0underlying system is actually a full <a href=\"http:\/\/en.wikipedia.org\/wiki\/Context-sensitive_grammar\">contextual expansion grammar<\/a>, meaning a replacement can expand to a more complex form containing additional replacements, ad infinitum, and that each replacement can execute code\u00a0referencing the full state of the system to decide what text to produce. (Aaron actually used Ice-Bound&#8217;s system to write <a href=\"http:\/\/aaronareed.net\/if\/NaNoGenMo13\/generate.html\">a procedurally generated novel<\/a>\u00a0in a couple of hours for <a href=\"https:\/\/github.com\/dariusk\/NaNoGenMo-2014\">NaNoGenMo<\/a> last year.) Some of the other tricks this system enables\u00a0include using different text\u00a0based on how many other characters are present, using specific language for specific time periods (such as changing an &#8220;email&#8221; to a &#8220;letter&#8221; or a &#8220;telegram&#8221;), or even changing text based on the way\u00a0the reader ended a previous story.<\/p>\n<figure id=\"attachment_94\" aria-describedby=\"caption-attachment-94\" style=\"width: 400px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/icebound-story-variants.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-94 size-full\" src=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/icebound-story-variants.jpg\" alt=\"icebound-story-variants\" width=\"400\" height=\"348\" srcset=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/icebound-story-variants.jpg 400w, http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/icebound-story-variants-300x261.jpg 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><figcaption id=\"caption-attachment-94\" class=\"wp-caption-text\">Example of the same story fragment appearing in two different contexts.<\/figcaption><\/figure>\n<p>These techniques get even more powerful when combined with conditions that let us guarantee certain things about the story state before even selecting a narrative fragment. For instance, we can request that an event card only appear when the character we&#8217;ve cast in Slot A has an active &#8220;personal&#8221; socket, regardless of what it is. Since each personal socket corresponds to an item connected to that character, we can then write some story text where that item plays an important role:<\/p>\n<blockquote><p><strong><span style=\"color: #339966;\">_They\/a\/<\/span><\/strong> held <strong><span style=\"color: #339966;\">_item<\/span><\/strong> clenched tight in one hand, the can of kerosene in the other. &#8220;What are you doing?&#8221; <strong><span style=\"color: #339966;\">_name\/b\/<\/span><\/strong> asked.<\/p><\/blockquote>\n<p>This strikes a nice balance for our purposes between\u00a0hinting at a dramatically consistent story, without actually doing all the\u00a0<a href=\"http:\/\/scholar.google.com\/scholar?q=story+generation&amp;btnG=&amp;hl=en&amp;as_sdt=0%2C5\">incredibly difficult<\/a> work of generating narrative from whole cloth.\u00a0Why would Katrin burn her prized college diploma? Was it\u00a0Bjorn&#8217;s trip below that led him to give up his drug addiction? Humans are remarkable meaning-making machines, and Ice-Bound&#8217;s fragments provide just enough leverage to imagine connective tissue between our isolated fragments, without us actually having to generate it.<\/p>\n<p>Another example of this weakly-connected cause and effect is conditions that can require fragments to appear in conjunction with others sharing the same tag and cast members.\u00a0For instance, readers who enjoy horror stories and start showing KRIS creepy Compendium pages might start seeing horrific symbols in their story maps. One set of these\u00a0introduce some sort of monstrous force\u00a0loose in the station: these are given the\u00a0&#8220;monster&#8221; tag. We can then have ending fragments that require a &#8220;monster&#8221; tag to be already present: so, feeling in an actiony sort of mood, we might write a\u00a0dramatic conclusion (perhaps involving a flamethrower) that could be the end to any of the various &#8220;monster&#8221; intros. This is some of what we mean when we say the system feels like playing with Legos: &#8220;monster&#8221; events become\u00a0a block type that can attach to &#8220;monster&#8221; endings to produce something with narrative coherence. (We also do this in\u00a0less melodramatic ways, too:\u00a0creating emotional setups and payoffs involving a character dealing with loss, a romance, or a journey of self-discovery.)<\/p>\n<hr \/>\n<p>One of the most visually pleasing aspects of the system is what we call &#8220;shimmer text,&#8221; that wriggles into other forms even as you&#8217;re reading it. We\u00a0author\u00a0this quite simply by including a run of alternatives set off by curly braces:<\/p>\n<blockquote><p>Katrin was <strong><span style=\"color: #339966;\">{only seven|nine|eleven|just thirteen|already fifteen}<\/span><\/strong> when the accident happened.<\/p><\/blockquote>\n<p>As the text changes between options, the reader can tap one to &#8220;freeze&#8221; it in that configuration. We use this to create the feeling that KRIS is constantly exploring permutations of the story, even down to individual words, and also to give the reader a sense of editorial control: any writer can relate to the feeling of agonizing over the right word for the right moment. The speed and frequency of the changes can also be tuned with a special control tag\u00a0for authorial effect: frantic constant shimmers suggest text KRIS is worried about, while slow, contemplative changes make him feel more musing. The choices themselves don&#8217;t mechanically affect the rest of the story, but can sometimes have a profound effect on your perception of an entire scene:<\/p>\n<blockquote><p>McKinley stared down at the bloody knife, <strong><span style=\"color: #339966;\">{eyes filling with tears|feeling nothing at all|and his grin eventually turned into giddy laughter}<\/span><\/strong>.<\/p><\/blockquote>\n<p>Pulling all these tools together, we have a flexible system for authoring Ice-Bound stories that lets them adapt to the particular context the system decides to use them in, without becoming overwhelming for us as authors. Here&#8217;s an example of a complete story fragment, appropriate for a moment where one character has &#8220;gone below,&#8221; and when themes of despair and futility are not prevalent in the current story configuration:<\/p>\n<blockquote>\n<pre>\"foolhardyRescue\": {\r\n\tconditions: \"tag_goingBelow &amp;&amp; !tag_manIsWicked &amp;&amp; !theme_futility\",\r\n\tcast: \"\/tags_goingBelow\/anyone\/anyone\/\",\r\n\tname: \"_name\/b\/ sets out Below to search for _name\/a\/~.\",\r\n\ttext: \"<strong><span style=\"color: #339966;\">_name\/b\/<\/span><\/strong> was hefting the expedition pack onto <strong><span style=\"color: #339966;\">_their<\/span><\/strong> parka-covered shoulders when <strong><span style=\"color: #339966;\">_name\/c\/<\/span><\/strong> found <strong><span style=\"color: #339966;\">_them\/b\/~<\/span><\/strong>. \\\"What <strong><span style=\"color: #339966;\">_mixin\/swearmodifier\/c\/<\/span><\/strong> are you doing?\\\" <strong><span style=\"color: #339966;\">_they<\/span><\/strong> asked <strong><span style=\"color: #339966;\">{frantically|calmly|angrily}<\/span><\/strong>. \\\"<strong><span style=\"color: #339966;\">_name\/a\/~<\/span><\/strong>'s gone, <strong><span style=\"color: #339966;\">_name\/b\/~<\/span><\/strong>. <strong><span style=\"color: #339966;\">_They\/a\/~<\/span><\/strong>'s not coming back. Even if there wasn't <strong><span style=\"color: #339966;\">_timeGate\/anything strange about this place\/1992\/any weird shit going down\/~<\/span><\/strong>, <strong><span style=\"color: #339966;\">_they\/a\/~<\/span><\/strong>d be dead by now in this <strong><span style=\"color: #339966;\">_mixin\/swearAdjective\/c\/<\/span><\/strong> cold.\\\" <strong><span style=\"color: #339966;\">_name\/b\/~<\/span><\/strong>'s face was a mask as <strong><span style=\"color: #339966;\">_they<\/span><\/strong> kept loading <strong><span style=\"color: #339966;\">_their<\/span><\/strong> pack. \\\"For god's sakes, <strong><span style=\"color: #339966;\">_mixin\/friend\/c\/~<\/span><\/strong>, <i>why<\/i>?\\\"&lt;br&gt;&lt;br&gt;<strong><span style=\"color: #339966;\">_name\/b\/<\/span><\/strong> pulled a strap tighter and finally looked at <strong><span style=\"color: #339966;\">_them\/c\/~<\/span><\/strong>. \\\"Because,\\\" <strong><span style=\"color: #339966;\">_they\/b\/<\/span><\/strong> said simply, \\\"there's a chance <strong><span style=\"color: #339966;\">_they\/a\/~<\/span><\/strong>'s still alive.\\\"\",\r\n\tthemes: [\"doingWhatsRight\", \"humanDignity\", \"trialByFire\"]\r\n}\r\n<\/pre>\n<\/blockquote>\n<p>While this isn&#8217;t exactly free writing in a notebook, it&#8217;s simpler than a lot of interactive narrative environments we&#8217;ve worked in in the past, and once we got the format down, we can more or less just write, staying in a creative zone but still ending up with content that can be flexibly used by our combinatorial narrative system.<\/p>\n<hr \/>\n<p>We&#8217;ve got one more post in this series scheduled, talking about the visualization tools we built to help manage the space of possible narratives, so stay tuned. In the meantime, check out <a href=\"https:\/\/www.kickstarter.com\/projects\/1850151847\/ice-bound-a-novel-of-reconfiguration\">our Kickstarter page<\/a>, or follow the <a href=\"http:\/\/www.ice-bound.com\/\">official site<\/a>, <a href=\"https:\/\/www.facebook.com\/IceBoundtheGame\">Facebook<\/a>, or <a href=\"https:\/\/twitter.com\/IceBoundGame\">Twitter<\/a>\u00a0accounts to keep up with the project. More\u00a0soon!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In part one and part two\u00a0of this series on the combinatorial narrative system behind Ice-Bound, we gave an overview of\u00a0how stories are constructed from narrative fragments, and how the player uses the printed book to communicate to the AI KRIS which themes are most important. In this installment, we&#8217;re going to dive into the actual &hellip; <a href=\"http:\/\/ice-bound.com\/news\/shifting-story-text-combinatorial-narrative-part-three\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Shifting Story Text: Combinatorial Narrative, Part Three<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-86","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/posts\/86","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/comments?post=86"}],"version-history":[{"count":1,"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/posts\/86\/revisions"}],"predecessor-version":[{"id":174,"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/posts\/86\/revisions\/174"}],"wp:attachment":[{"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/media?parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/categories?post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/tags?post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->