{"id":107,"date":"2014-10-31T09:54:03","date_gmt":"2014-10-31T17:54:03","guid":{"rendered":"http:\/\/ice-bound.com\/news\/?p=107"},"modified":"2014-10-31T09:54:03","modified_gmt":"2014-10-31T17:54:03","slug":"visualizing-the-combinatorial","status":"publish","type":"post","link":"http:\/\/ice-bound.com\/news\/visualizing-the-combinatorial\/","title":{"rendered":"Visualizing the Combinatorial"},"content":{"rendered":"<p>We&#8217;ve covered most of <a href=\"https:\/\/www.kickstarter.com\/projects\/1850151847\/ice-bound-a-novel-of-reconfiguration\"><em>Ice-Bound<\/em><\/a>&#8216;s narrative\u00a0system so far in our three-part post, ranging\u00a0from how we make flexible story fragments to the\u00a0combinatorial system that drives the sculptural quality\u00a0of the narrative. Here are links, in case you&#8217;re just now coming across this:<\/p>\n<p><a href=\"http:\/\/ice-bound.com\/news\/combinatorial_narrative\/\">1: General overview<\/a><br \/>\n<a href=\"http:\/\/ice-bound.com\/news\/combinatorial-narrative-part-two\/\">2: Constructing Combinations<\/a><br \/>\n<a href=\"http:\/\/ice-bound.com\/news\/shifting-story-text-combinatorial-narrative-part-three\/\">3: Shifting Story Text<\/a><\/p>\n<p>For the last part of this &#8220;under the hood&#8221; overview, we wanted to talk about how we troubleshoot the narrative possibility space.<\/p>\n<h2>The Setup<\/h2>\n<p><a href=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/09\/landscape-miquel.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-65 size-medium\" src=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/09\/landscape-miquel-300x210.jpg\" alt=\"Ice-Bound story map for Miquel's level\" width=\"300\" height=\"210\" srcset=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/09\/landscape-miquel-300x210.jpg 300w, http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/09\/landscape-miquel.jpg 523w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>As a refresher, each level in <em>Ice-Bound<\/em> has several symbols which can be activated and de-activated by the player, triggering a cascade of events and\/or endings. That&#8217;s what we mean when we say <em>Ice-Bound<\/em> is a combinatorial narrative. Ideally, when the maximum number of symbols is\u00a0active we want to see 3-5 events and 2-3 endings. That&#8217;s our self-defined &#8220;good amount of content&#8221;. It&#8217;s not so much text\u00a0that the string of events run the risk of degenerating into narrative incoherence or overwhelm the UI, and not so low that it can&#8217;t make a story (or afford the player the ability to choose between endings).<\/p>\n<p>But how, when designing a level and writing for it, do we make sure that any possible combination of active symbols makes\u00a0a &#8220;good amount of content&#8221;? It&#8217;s a tough problem, both logically and as a visualization. We can&#8217;t just run a complicated data viz and call it quits&#8211;if it takes too long to immediately grasp the situation, it will bog down the authoring process. We need something we can use as we&#8217;re authoring, which means it needs to show the state of the possibility space in a fast and intuitive manner. We ended up developing two linked visualization tools to address this problem. First up: visualizing the possible combinations in a built level.<\/p>\n<h2>For a Given Build of a Level&#8230;<\/h2>\n<p>Each time you visit a new level in <em>Ice-Bound<\/em>, the system builds a new story, based in part on the way you resolved prior stories. This means each level has a large number of possible &#8220;builds.&#8221; Each build, in turn, has a number of possible states as the player explores it, based on all possible combinations of active\/inactive symbols. To visualize the possibility space for a single level build,\u00a0we use a graph like this:<\/p>\n<p><a href=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/bars.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-108\" src=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/bars.jpg\" alt=\"bars\" width=\"910\" height=\"421\" srcset=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/bars.jpg 910w, http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/bars-300x138.jpg 300w\" sizes=\"auto, (max-width: 910px) 100vw, 910px\" \/><\/a><\/p>\n<p>There&#8217;s a lot of information condensed into this, so let&#8217;s break it down:<\/p>\n<ol>\n<li>Each vertical bar represents one combination of active symbols.<\/li>\n<li>The top of a bar (the lighter bit) shows the number of endings activated by this combination. The bottom of the bar shows events.<\/li>\n<li>If the combination for a bar fails one of the &#8220;good amount of content&#8221; rules, it&#8217;s yellow. If it fails both, it&#8217;s red.<\/li>\n<li>All possible\u00a0symbols, events, and endings for this particular build are shown\u00a0below the graph<\/li>\n<li>The %s next to events and endings tells us what percentage of this build&#8217;s combinations involve those texts.<\/li>\n<li>If you hover over a symbol, event or ending, it lights up the bars involving that text, showing all possible configurations of symbols in which that element is present.<\/li>\n<li>Conversely, if you hover on a bar (like in the picture) it lights up the texts active for that particular symbol combination.<\/li>\n<li>If you click on a\u00a0text, the graph\u00a0re-sorts so that all bars involving that text move to the left, allowing you to see if that text in general needs to be associated with more combinations, or if that symbol doesn&#8217;t have enough triggered events and endings for it.<\/li>\n<\/ol>\n<p><a href=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/icebound-viz-tool-1.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-117\" src=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/icebound-viz-tool-1.gif\" alt=\"Ice-Bound's interactive narrative visualization tool for level builds in action animated GIF\" width=\"480\" height=\"360\" \/><\/a><\/p>\n<p>That&#8217;s a lot, right? What it boils down to, though, is that by just clicking around a bit, we can quickly answer questions like &#8220;do most combinations have enough content?&#8221; or &#8220;if I&#8217;m adding content, where&#8217;s the best place to add new content?&#8221; or &#8220;is that thing I just added getting used enough?&#8221;.<\/p>\n<h2>But there&#8217;s more&#8230;<\/h2>\n<p>There&#8217;s a problem, though. Because\u00a0you can build an <em>Ice-Bound<\/em> level many\u00a0different ways, we author more symbols for a level than there are &#8220;sockets&#8221; to put them in. That&#8217;s how we ensure levels can adapt\u00a0based on what stories the player has built in the past. But this\u00a0adds to the number of possible per-level builds.<\/p>\n<p>It gets worse, too. For maximum flexibility, we also have a large pool of\u00a0what we call &#8220;global symbols&#8221;, which can go in any level. They&#8217;re really <a href=\"http:\/\/ice-bound.com\/news\/shifting-story-text-combinatorial-narrative-part-three\/\">tricky to write<\/a>, but are at the center of what makes <em>Ice-Bound<\/em> deeply responsive to player input, so they&#8217;re also super-important. But because of them, there are even more possible per-level builds.<\/p>\n<p>How many are there? Depends. Currently, one level with eight sockets and a three-symbol activation limit has ~5,000. Another level with nine sockets and a four-symbol limit, though, has ~50,000 possible builds. You could hit refresh and re-load that bar graph, but the graphs differ widely\u00a0depending on the symbols involved, and pressing a button 50,000 times is considered in general a bad workflow.<\/p>\n<h2>Browsing Problematic Builds<\/h2>\n<p>To tackle this problem, we came up with a second\u00a0visualization tool. We started with\u00a0the idea that of all possible builds, the ones we&#8217;re <em>most<\/em> concerned with are those\u00a0with &#8220;red bars&#8221;,\u00a0which\u00a0have at least\u00a0one\u00a0combination of active symbols that doesn&#8217;t produce\u00a0enough events <em>and<\/em>\u00a0endings.<\/p>\n<p>Since this generally happens because a certain symbol isn&#8217;t connected to enough events\/endings, we categorize these problem builds by symbol, using a bubble graph:<\/p>\n<figure id=\"attachment_109\" aria-describedby=\"caption-attachment-109\" style=\"width: 437px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/bubbles.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-109 size-full\" src=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/bubbles.jpg\" alt=\"Ice-Bound combinatorial viz\" width=\"437\" height=\"421\" srcset=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/bubbles.jpg 437w, http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/bubbles-300x289.jpg 300w\" sizes=\"auto, (max-width: 437px) 100vw, 437px\" \/><\/a><figcaption id=\"caption-attachment-109\" class=\"wp-caption-text\">A viz display for a well-authored, balanced level.<\/figcaption><\/figure>\n<p><strong>There&#8217;s a couple things going on here:<\/strong><\/p>\n<ol>\n<li>The black labels are the symbol names<\/li>\n<li>The number \/ size of the bubble is how many &#8220;problem builds&#8221; the symbol is involved in<\/li>\n<li>The color reveals\u00a0what percentage of all possible\u00a0builds\u00a0involving that symbol are problematic&#8230;traffic light style. Green = good, red = bad. If a symbol doesn&#8217;t trigger enough events and endings, it will be redder, indicating it\u00a0needs to be a trigger for more content (or more content should be written that involves it).<\/li>\n<\/ol>\n<p>That&#8217;s pretty good, but what if I want to get more specific?\u00a073 combinations involving &#8220;Romantic&#8221; doesn&#8217;t tell me much. Fortunately, this viz is also interactive. Clicking\u00a0on any bubble rearranges the graph to show only the distribution if\u00a0the symbol you clicked stays active. So drilling down looks something like this:<\/p>\n<p><a href=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/figure1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-110\" src=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/figure1-1024x271.jpg\" alt=\"figure1\" width=\"640\" height=\"169\" srcset=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/figure1-1024x271.jpg 1024w, http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/figure1-300x79.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>This helps you explore a pretty complicated space of possibility by using two criteria: shoot for big bubbles, and shoot for red bubbles.<\/p>\n<p>You might need a bit more info though. So there&#8217;s also a panel:<\/p>\n<p><a href=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/figure2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111\" src=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/figure2.jpg\" alt=\"figure2\" width=\"563\" height=\"377\" srcset=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/figure2.jpg 563w, http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/figure2-300x200.jpg 300w\" sizes=\"auto, (max-width: 563px) 100vw, 563px\" \/><\/a><\/p>\n<p><strong>This tells us that:<\/strong><\/p>\n<p>A: we&#8217;re looking at all combinations involving these three symbols<br \/>\nB: there are 13 total combos with these symbols, 3 of which need content. So if you&#8217;re adding content with these three symbols as triggers, it&#8217;s 23% effective (because you&#8217;re also adding content to things that have enough content, which we&#8217;d like to avoid if possible)<br \/>\nC: here let&#8217;s make that a pie chart\u00a0so you don&#8217;t have to read numbers all the time<br \/>\nD: let&#8217;s keep it in perspective too, so how much of the total combos needing content are we hitting if we author stuff for these?<\/p>\n<p>So for the picture I gave, you could look pretty quickly and think &#8220;huh&#8230;looks like I should maybe de-select one of these symbols and see if I can find a combination with a higher ratio, so the content I author is more effective&#8221;.<\/p>\n<h2>That&#8217;s&#8230;complicated.<\/h2>\n<p>Yes. But the feedback is fast and rather immediate. Crucially, these two visualizations are linked together, so clicking on a specific build in the second viz loads the first viz <em>with that build<\/em>,\u00a0so you can move from a generic &#8220;problem build&#8221; to teasing out the exact cause of the problem.\u00a0Essentially this lets us have a troubleshooting\u00a0workflow\u00a0like this:<\/p>\n<ol>\n<li>Hey &#8220;Lonely&#8221; is\u00a0a big bubble. Is it a little more yellow than the others? *Click*<\/li>\n<li>Huh, yeah. Oh look&#8230;&#8221;dogId&#8221; is bigger than these others! *Click*<\/li>\n<li>Cool. Let&#8217;s try &#8220;shaft&#8221; *Click*<\/li>\n<li>Nooope. All the circles are tiny now. *Click to de-select*<\/li>\n<li>Eh&#8230;that&#8217;s pretty good I guess. Ratio&#8217;s pretty high. Let&#8217;s look at a sample level build with that combo *Click*<\/li>\n<li>[bar graph viz loads] Yeah, I should totally write two events with &#8220;Lonely&#8221; and &#8220;dogId&#8221;&#8230;maybe with a &#8220;not iceAx&#8221; so I don&#8217;t hit these others, since they look pretty good<\/li>\n<\/ol>\n<p><a href=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/icebound-viz-tool-2.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-118\" src=\"http:\/\/ice-bound.com\/news\/wp-content\/uploads\/2014\/10\/icebound-viz-tool-2.gif\" alt=\"Visualization tool for combinatorial narrative in Ice-Bound\" width=\"480\" height=\"250\" \/><\/a><\/p>\n<h2>So that catches everything?<\/h2>\n<p>Not <em>everything&#8230;<\/em>but short of more complicated, involved visualizations, it does the job pretty good! Tools\u00a0like this help us navigate the &#8220;combinatorial wilderness&#8221;, and make sure we have enough content\u00a0to cover all our bases, without requiring that we write a thousand novels of text.<\/p>\n<p>Thanks for reading! If you want to read a more technical write-up, you can check out <a href=\"http:\/\/fdg2014.org\/papers\/fdg2014_paper_10.pdf\">our paper on the viz tools from the 2014 Foundations of Digital Games<\/a>.\u00a0We also want to give a shout-out to Melanie Dickinson, who worked with us in summer &#8217;13 and was instrumental in getting the viz tools off the ground!<\/p>\n<p>Our <a href=\"https:\/\/www.kickstarter.com\/projects\/1850151847\/ice-bound-a-novel-of-reconfiguration\"><em>Ice-Bound<\/em> Kickstarter is in\u00a0its final days<\/a>, and our next stretch goal is open-sourcing the narrative engine behind the game, including these tools. Help us make it happen by <a href=\"https:\/\/www.kickstarter.com\/projects\/1850151847\/ice-bound-a-novel-of-reconfiguration\">becoming a backer<\/a> or\u00a0spreading the word online\u00a0via\u00a0<a href=\"https:\/\/twitter.com\/IceBoundGame\">Twitter<\/a>,\u00a0<a href=\"https:\/\/www.facebook.com\/IceBoundtheGame\">Facebook<\/a>\u00a0or your communication network of choice.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;ve covered most of Ice-Bound&#8216;s narrative\u00a0system so far in our three-part post, ranging\u00a0from how we make flexible story fragments to the\u00a0combinatorial system that drives the sculptural quality\u00a0of the narrative. Here are links, in case you&#8217;re just now coming across this: 1: General overview 2: Constructing Combinations 3: Shifting Story Text For the last part of &hellip; <a href=\"http:\/\/ice-bound.com\/news\/visualizing-the-combinatorial\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Visualizing the Combinatorial<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":109,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-107","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/posts\/107","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=107"}],"version-history":[{"count":1,"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/posts\/107\/revisions"}],"predecessor-version":[{"id":119,"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/posts\/107\/revisions\/119"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/media\/109"}],"wp:attachment":[{"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/media?parent=107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/categories?post=107"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ice-bound.com\/news\/wp-json\/wp\/v2\/tags?post=107"}],"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. -->