November 20, 2008

Story Generation in 1K

by Nick Montfort · , 7:54 pm

Michael’s here at MIT and just gave a great talk. While he was preparing for it, apropos of conversations I’ve had recently with him and Beth Cardier, I wrote something that I think is a story generator, and which is a self-contained 1K python program. Here it is: story1.py (Update: This is a slightly modified version of November 30, which uses the same algorithm but has a streamlined implementation and a few more sentences.)

Let me know if you think it’s a story generator, and, whether or not you think it is, if you think of anything interesting about stories and computation as a result of looking at the program and running it.

8 Responses to “Story Generation in 1K”


  1. Gregory Weir Says:

    It’s definitely a story generator. I like how my interpretation of the story can vary drastically on which cues are included. This is partly due to a few sharply-charged cues: the girl’s smile, the knowing glance, the blank stare, and the police siren. Depending on which of these are included, cues like the girl’s bag or the movement can be erotic or horrific.

    It does depend heavily on the mind’s ability to fill in gaps, which I think would be necessary in most any story generator with such compact source code.

  2. Garrison Benson Says:

    I do not think this generates stories – just sequences of events. Certainly, it’s possible for the reader to make logical connections between the events, which is cool, but it’s not a story if the protagonist does not have a goal and a motive for pursuing that goal, or if there is no opposition to her obtaining that goal.

  3. David Says:

    I think it depends a lot on the reader. I enjoyed running the program over and over again and noticing what kind of images my mind came up with based on the clues that were given. My imagination filled in the blanks in terms of what the girl’s goal and motives were.

    Maybe this idea could be combined with a stretchtext concept to create a more interactive story generator where the reader can pick specific sentences or words to be elaborated upon by the generator.

  4. Ian Bogost Says:

    This is a story generator. Those who would exclude it from such appellation because it is not sufficiently computationally complex, or because the richness of its semantic payload is not known by the generator, miss several crucial points:

    * The technique Will Wright has described and used many times of relying on the player to fill in the blanks left by a system is not fakery or trickery, but as Chris Hecker recently described it to me, a first-order design principle.

    * Story generation need not entail complex system-building to be interesting, and the fetishization of system in such work (I’m talking to you, Andrew and Michael) might ought seem like a Wittgensteinian dream world, so friction-free and replete with knowledge that it remains not just impossible but uninteresting.

    Interesting story generation requires not few, but *correct* instantial assets, and the utility of mild abstraction, something many generators eschew in favor of some perverted, drooling fielty toward a particular kind of dramatic structure, one the world of fiction has long known is no longer king.

  5. Brendan Scully Says:

    Perhaps to call the program a story generator is to misinterpret the creative processes involved?

    While readers can assemble their own story-arcs by stitching the blocks together in their mind, the paths they create are made without knowledge of future “instantial assets.” Instead, they are like navigational actions in a video game: purposeful and creative, but not products of storytelling.

    Nick asked if he had a story generator, I don’t think a “Story” can be randomly generated.

    Call it a poetry generator? Choosing the *correct* snippets was most definitely an act of poetic creation, as he put thought into the atmosphere the generator would create.

    I don’t know. Maybe if he read through every possible iteration and gave each a nod of authorial intent each possible creation could be a story.

    But then they wouldn’t be random, it would just be a jukebox.

    Or perhaps to see the schemings of a human author as more discerning than a random number generator is to miss the point entirely.

  6. Grand Text Auto » Three 1K Story Generators Says:

    […] Brendan Scully on Story Generation in 1K […]

  7. hribek Says:

    I have recently played few visual novels. From what I think a game generally consist of game’s model X player’s model. Same goes to literature where you discover and create your image about story, characters, etc. Your model.

    Best horrors create fear inside you by what you do NOT see.

    That was all for random thoughts.

    Outup of this program is similar to what you’d get from one play trought visual novel. Although there it is not random cutting, but selective cutting. But when choices does not have common sense it blends.

    So I thinkt that you’d create a interactive visual novel if you only added some strings as choices. Might be interesting to investigate how much randomness to such choices woulb be bearable ;)

    And of course it is valid story. If most visual novels can be called stories this is story too ;) .

    Whole fun is that you dont know (if) it is random or whether it has any meaning (without looking at source code, as we “all” did). Like when you read story, listen to music, play game, look at some sculpture, look at picture or listen to your girlfriend.
    And this meta-thing would be good to investigate. Well. Probably there is some -ism in art which does it ;).

    Anyways. Thanks for post & comments.
    Best regards

  8. eeen Says:

    I read the output as stories and it worked every time. If you’re not sure it should be called a story generator, you could call it a story seeder…

Powered by WordPress