# Curating Simulated Storyworlds — Chapter 6: James Ryan Generator > NOTE: THIS IS A MARKDOWN CONVERSION INTENDED FOR LLM CONSUMPTION. > IF YOU ARE A HUMAN BEING, READ THE PDF INSTEAD: > https://jamesryan.computer/papers/2018_ryan_curating_simulated_storyworlds.pdf > > The PDF is the canonical document, typeset with every figure and table. This file > is a plain-text conversion of the LaTeX source, published HERE so that software agents > can read the thesis without parsing a PDF. It is lossy and is not meant for humans. > > This file is chapter 6 of 14 only: James Ryan Generator (~2,800 words). > See below for links to markdown conversions of the individual chapters. > > **Structure.** Sections are `##`/`###`/`####` headings. Cross-references are resolved to > their numbers ("Section 3.1.1", "Chapter 5"), so a heading can be searched for directly. > Citations are inline bracketed keys such as `[ryan2017grimes]`; every key used in the text > has an entry in the bibliography, formatted as `- **[key]** Author. Title. Venue, Year.` > Footnotes appear inline as `[Note: ...]`. > > **Conversion limits.** Figures and most complex tables appear as `[Figure omitted]` or > `[Table omitted]`. Code fences carry no language tag. A few diacritics in author names > were simplified from the Latin-1 source. > > **All files.** > > Index (this list, plus the abstract; small): https://jamesryan.computer/thesis/index.md > Whole thesis in one file (large, ~1.6 MB): https://jamesryan.computer/thesis/full.md > > By chapter: > - 01. Introduction (~4,600 words, ~30 KB) — https://jamesryan.computer/thesis/01-introduction.md > - 02. Defining Emergent Narrative (~6,900 words, ~47 KB) — https://jamesryan.computer/thesis/02-defining-emergent-narrative.md > - 03. The Pleasure of Emergent Narrative (~21,000 words, ~135 KB) — https://jamesryan.computer/thesis/03-the-pleasure-of-emergent-narrative.md > - 04. The Pain of Emergent Narrative (~41,000 words, ~268 KB) — https://jamesryan.computer/thesis/04-the-pain-of-emergent-narrative.md > - 05. Refining Emergent Narrative (~11,000 words, ~73 KB) — https://jamesryan.computer/thesis/05-refining-emergent-narrative.md > - 06. James Ryan Generator (~2,800 words, ~16 KB) — https://jamesryan.computer/thesis/06-james-ryan-generator.md > - 07. World (~20,000 words, ~129 KB) — https://jamesryan.computer/thesis/07-world.md > - 08. Case Study: Diol/Diel/Dial (~9,300 words, ~59 KB) — https://jamesryan.computer/thesis/08-case-study-diol-diel-dial.md > - 09. Talk of the Town (~25,000 words, ~162 KB) — https://jamesryan.computer/thesis/09-talk-of-the-town.md > - 10. Case Study: Bad News (~22,000 words, ~132 KB) — https://jamesryan.computer/thesis/10-case-study-bad-news.md > - 11. Hennepin (~32,000 words, ~209 KB) — https://jamesryan.computer/thesis/11-hennepin.md > - 12. Looking Ahead: Sheldon County (~11,000 words, ~75 KB) — https://jamesryan.computer/thesis/12-looking-ahead-sheldon-county.md > - 13. Conclusion (~2,700 words, ~17 KB) — https://jamesryan.computer/thesis/13-conclusion.md > - 14. Bibliography (~29,000 words, ~233 KB) — https://jamesryan.computer/thesis/14-bibliography.md When I was growing up in the suburbs of Minneapolis in the 1990s, I had a vision for what I thought videogames should (and would) become. I yearned for a particular kind of experience that can only be had by living out an entire life, or by doing the equivalent in a computer simulation. For me, the ideal videogame experience would mean being born into a world, growing up in it, going out into it, undergoing trials and tribulations and triumphs, and then contemplating it all, with mixed pride and regret, before finally dying with the knowledge that that world would go on. I wanted to set up shop in a world, to live through seasons and make an impact, to have an authentic experience, to have a modest experience, to make real connections with people and places, to make hard decisions that I would eventually regret, to face tough challenges that I could not overcome. I wanted to be part of a generation, with all its trappings, and I wanted to see my generation percolate out of a previous one and fade into the next. I wanted the world to eventually forget me. This was the kind of narrative that enraptured me—I loved hearing stories about my ancestors and the lives that they led; I loved the generational structure of *Roots* [haley1976roots], for example—and I wanted to experience these kinds of arcs on my own, through the mediation of simulation. I figured everyone else wanted this kind of experience too, and that game designers were hard at work to make it happen. When I first encountered *SimCity* [simcity], I thought it had arrived, but there were no people in these cities, and though time passed in the game it did not seem to itself reflect on this changing of seasons. I read about how *Driver* [driver], then upcoming, would model a real working city, but later I discovered that they were referring to a traffic system (you could not even leave your car). In *Madden NFL 99*'s [madden99] newly introduced *franchise mode* [oates2009new], story time extended for the equivalent of fifteen years, but the players did not live out lives off the football field. I wanted franchise mode for the human experience. *The Sims* [maxis2000sims] was a revelation for me, and it almost scratched my itch, but in the end I felt that the game design was not about authentic experiences or deep connections. Eventually, I realized that other players were perfectly happy with the games that were being made, and they did not seem to need the kind of experience that I needed. Certainly, the designers of these games did not seem to hold the same vision for the medium that I did. I stopped caring about videogames. In the final year of my bachelor's studies at the University of Minnesota (“the U” in our state's parlance), I began working with a research lab that was doing computational linguistics in the clinical domain: natural language processing on patient medical records and the results of neuropsychological tests with linguistic components. I was a linguistics major who could not program, but was qualified to do gold-standard data annotation in support of the group's mission. This mostly entailed tagging up raw clinical text so that it could be used as annotated training data for machine-learning experiments that were carried out by graduate students in the lab. It was a really interesting experience, and I even became coauthor on an academic paper [moon2011automated]. The academic year passed by quickly, and when graduation was just a few months away, I had no idea what would come next for me. Upon discovering my lack of a plan, the lab's codirector Genevieve-Melton Meaux offered me a fully funded spot in a master's program in Health Informatics at the U. I entered that program and continued working with the lab. During my first year as a master's student, the other codirector of our group, Serguei Pakhomov, began to encourage me to learn how to program. He was himself a linguist turned computational linguist, and he was keen for me to expand my skill set not just for reasons of personal growth, but because I could potentially take on more interesting lab projects. I looked into a few free online courses and tried here and there to pick up Python, [Note: At this time, in 2011, Python had recently emerged as the preferred programming language among computational linguistics. Were it 2001, I would have proceeded to Perl, and perhaps thence to *Perl golf* [montfort2009ppg256].] but it did not take. Finally, some months later, I bought a book on Python for beginners [dawson2010python], and it *did* take—and then everything suddenly changed for me. I was hooked on coding, the world flipped on its head, and I knew for the first time what I wanted to do with my life. Almost immediately, I began to apprehend the expressive power of computation. Through an early exercise in my programming book, I learned how to randomly pick an item from a list of items. This was my first authorial encounter with pseudorandomness—it was exhilarating, and it provided the seed for what would become my first actual computer program. First, I downloaded a pair of text files that I found online, one containing a few thousand masculine-coded forenames and the other a few thousand feminine-coded ones. Next, I read the files into my Python interpreter and built two lists, each containing all the names included in one of the files. Finally, I wrote a short program that randomly picked a name from one of the two lists and another name from the masculine-coded list, and stuck them together. Because many masculine forenames are also used as surnames, the resulting creation read like a person's full name. [Note: Of course, not all cultures use this kind of naming practice.] Even though it was only a name, the result was somehow evocative: it felt like I had created a tiny abstract person who lived in my computer. Names denote persons, and I—having a mind and seeing a name—could not help but conjure up ideas about the people behind these generated names. As a child, my grandmother took me along each Memorial Day to place flowers at the gravestones of our ancestors who are buried across a series of cemeteries in Minneapolis and St. Paul. [Note: I am a sixth-generation Minneapolitan on my father's side and a sixth-generation St. Paulite on my mother's side.] To me, the gravestones, with their names and dates, constituted a vast narrative possibility space that was overwhelming to walk through. I wondered what these people had been like, and what this world had been like for them. *What kind of person would have that name?* *What would it be like to have that name?* I was now undergoing this kind of experience again, but through the mediation of computation. And I was not just experiencer—I was author. My next experiment emerged out of the realization that my own name, both first and last, appeared in the corpus of masculine names. I made a variation on the program that generated names over and over again until it generated my name, at which point it would print both my name (as proof) and the number of iterations that it took; a reconstruction of this program is shown in Figure 6.1. I recall it typically taking around nine million iterations—though it took only a few seconds to run, which was flabbergasting—and each time the result was strangely haunting: a little computer person with the same name as me. Or was it actually me—was this a kind of self-portrait? This was the first computer program that I named. I called it *James Ryan Generator*. [Figure omitted] Over the next few months, I became more and more immersed in the aesthetic possibilities of computation, and my name generator evolved into a more complex program that I called *Lineage*. In this system, the generated names were treated as tiny characters who existed in an abstract virtual world where time passed one year at a time. Each year, the characters grew older, and by an act of random selection new characters could be born from existing ones (with a surname being inherited patronymically). Eventually, the characters would pass away, leaving their virtual world, and thereby my computer's memory and all of existence: *for dust you are and to dust you will return*. The ephemerality was powerful. Now there was not merely an abstract person, but a series of them who were interacting across the passage of time—I had built my first *simulation*. Moreover, while the generated names had been evocative to me, like the ones I saw in those Twin Cities cemeteries, the unraveling of tiny little lives across *Lineage*'s simulated epochs had a distinctly narrative quality. It was not just names and dates, but a series of events that unfolded through the passing of time. If this simulative unraveling was a kind of story, or something that contained a story, it was a story with no author. Even though I had crafted the program and fully understood how it worked, I could not claim authorship over the stories that I was recognizing in its outputs. I had embarked on a project in emergent narrative. My nascent computational practice had formulated tiny replications of me, and now it was working to reformulate the actual me. The world looked different than it had before—I took on a computationalist perspective. Systems appeared everywhere, and many of the media experiences that I had appreciated seemed to lack richness. I began thinking again about the kind of videogame experiences that I had yearned for my whole life, and I realized that I had been inadvertently working toward that vision in my first few months of computer programming. After ten years of ambivalence, I became interested in games again, and I was excited to discover that a new category of narratively focused independent projects had emerged in the interim. Most of these were not simulationist, but they were still intriguing to me. One project, however, was clearly in the same spirit of my own burgeoning practice: *Dwarf Fortress* [dwarf], the simulationist tour de force that has appeared throughout this document. It seemed like there were likeminded creators out there who were working to materialize the kinds of narrative possibilities that I had spent my life anticipating. I was invigorated and decided that this was what I wanted to do with myself. In the summer of 2013, one year after learning to code, I arrived at the University of California, Santa Cruz, where I began the doctoral stint that is now culminating in this dissertation. More specifically, I became a member of the Expressive Intelligence Studio, a cultural and technical research lab that is dedicated to exploring new possibilities for art and entertainment that are enabled by techniques from artificial intelligence. [Note: For my first year, I was also a member of the Natural Language and Dialogue Systems lab, which is led by Marilyn Walker. My research agenda was initially limited to the exploration of new techniques for dialogue generation in games, but eventually it grew to encompass my simulation practice and a few other areas.] It was in this context that I discovered the application area of artificial intelligence called *story generation*, in which computer programs are made to tell stories. This was quite an intriguing idea for me, since I had never thought about computational narrative outside of the context of the interactive experience of a videogame. As my horizon expanded in this way, I began to reconsider my vision for the ultimate videogame. I was still interested in being a part of a dynamic virtual world that would be full of meaning and that would change over time, but I realized that I was also just fundamentally interested in the idea of that kind of world and the little computer people who might live in it. This predisposition had led to me being more interested in non-player characters (NPCs) than players, and in story generation I found the purest expression of this philosophy: virtual worlds with no players. By now, my little simulation had evolved into something larger that I called *World*—the subject of Chapter 7—and while I was finding ways to put myself and others into its simulated storyworlds, I was also interested in letting it run without human intervention. I had intended for the framework to serve as the backbone of a simulationist videogame, but now I was beginning to also view it as a potential contribution to the area of noninteractive story generation. This ecumenical view on the issue of interactivity is an idiosyncrasy of mine that has worked to structure both my creative practice and my interpretative work, and that is why this dissertation has not been partial to interactive examples. I do not really care whether a work is interactive. As my simulation practice and conceptual vocabulary coevolved here at UC Santa Cruz, I began to see my work as fundamentally being a contribution to emergent narrative, both interactive (in the tradition of simulationist videogames) and noninteractive (in the tradition of simulationist story generation). Funnily enough, though, I soon realized that I was a protege of a fairly vehement opponent of emergent narrative in my field: my coadvisor, Michael Mateas, tends toward the *interventionist* mode of computational narrative (to use the term introduced in Chapter 5). His approach to interactive storytelling—as exemplified in his collaboration with Andrew Stern, *Facade* [mateas2003faccade]—is one of dramatic remediation: a system, called the *drama manager*, administers the behavior of autonomous characters so that the experience follows a pleasing dramatic arc [mateas2003integrating]. [Note: To be clear, I absolutely love *Facade*—it changed my life and remains one of my favorite works of computational media—but in my own practice I am beholden to an emergentist impulse, as I will explain momentarily.] A more *emergentist* alternative, where a designer trusts that the outcomes generated by a bottom-up simulation will be pleasing enough, is anathema to him: *it's just one damn thing after another*. While I think he is less opinionated on the matter, my other coadvisor, Noah Wardrip-Fruin, has written on potentially inherent limitations of the pure simulationist approach, as characterized by his critique of *Tale-Spin* [wardrip2007three,wardrip2009expressive], which I discussed in Chapter 4. But while I deeply considered the virtues of interventionism, I could not shake my allergy to it. For me, a simulated storyworld is a beautiful thing: it is pure and real—literally real—and the tiny abstract characters who live there are having real and authentic experiences, albeit tiny and abstract ones. When interventions are made, the storyworld is polluted, and the result is less intriguing to me. [Note: As I have noted several times by now, here I am using the charged language of an art manifesto. To be clear, this is not meant as a technical or even an intellectual argument, but rather an artistic one. This is how I feel.] In considering this, I eventually realized that while the near consensus in academia is that emergent narrative is a dead end, it seems to somehow also constitute arguably the most successful approach to procedural narrative in the public consciousness, through its expression in videogames like *The Sims* and *Dwarf Fortress*. How could this be? As I stated in the previous chapter, I believe the answer lies in the tagline *overgenerate and curate*: emergent narrative works in projects whose simulated storyworlds generate an overabundance of narrative material, which some entity (usually a human player) then curates to construct a story. This realization came to me gradually over the course of building three simulation engines and an array of second-order media experiences that are driven by them. In this sense, my framework for curationist emergent narrative—the nucleus of this dissertation—coevolved with my simulation and media practice. This is the story that I will tell in the following chapters. At its heart, this dissertation is about an idea and a series of artifacts that I have developed over the last six years, either in collaboration or independently. For me, this work has always been in pursuit of the vision that I articulated at the beginning of this chapter. I want to encounter stories that recount simulated worlds, and I want to have authentic experiences in those worlds. This is a vision that I have held my entire life, and it continues to drive me today. It has worked to constitute not only my creative and intellectual life, but in a sense my entire life—it is, in its own way, a James Ryan generator.