Saucers of Mud

March 27, 2011

Two Stream-of-Consciousness Experiments in Interactive Fiction

Filed under: Interactive Fiction — matt w @ 9:24 pm
Tags: ,

For the recent IF Demo Fair I submitted a piece, called “The Table,” which used procedurally generated text to produce some stream-of-consciousness text. It was based on an earlier exercise I’d done based on Experiment 1 by Aaron Reed. I think “The Table” probably was less successful than the exercise, but it might be interesting to think about why. More discussion below the fold, but before that you can:

Play “The Table” online (using Parchment; requires javascript)
Read its source code (in Inform 7)
Download it (you’ll need a Glulx interpreter)

Play my version of “Aaron Reed’s Experiment 1″ online (using Parchment; requires javascript)
Read its source code (in Inform 7)
Download it (you’ll need a zcode interpreter)

And if you want to see some interesting things other folks did around the same time, you can scroll to the very bottom of the post (or go here for Jason Dyer’s “Renga in Four Parts” or here for Scott Rettberg’s “After Parthenope.”

These originated from Aaron Reed’s Experiment One, designed to procedurally generate associations between objects and ideas in interactive fiction. As Ron Newcomb observes in comments here, Aaron’s textual output is pretty shaky (and probably not designed for anything more), often along the lines of:

Ah, yourself. You remind you of nothing in particular.

or in happier cases

Ah, the stars. They remind you of astronomy, then what’s really important, then the wild, then being lost.

I thought it might be interesting to associate each idea with some prose that was a little more flavorful than “they remind you of” try to string together bits of prose for the different ideas and see if it read a bit more smoothly. And my new version yields responses like this:

The stars here are as rich and full as on the mountain peaks. The stars burn down from the sky, their secrets locked away. Have you been devoting your life to the right things? You’re far from civilization. You wonder whether anyone will ever find you.

Which is nicer, I think, although the joins show a bit even in one turn (the second sentence would begin with “they” if the paragraph had been constructed by a human being). And if you play for more than one turn, you can really tell that the same few phrases keep getting recycled. Also, I wanted to write my own story.

Hence “The Table.” The first thing I wanted to do was to keep cycling through bits of prose so the same bit didn’t appear over and over again. Then I decided not to try to turn the procedurally generated combination of prose bits into smoothly flowing prose, but to use a deliberately fragmented style — cod late Beckett — where the jumps and repetitions would fit in. That was probably a mistake. Anyway, my description of it for the Demo Fair:

“The Table” is an experiment in interactive stream-of-consciousness writing, using procedural recombination of fragments of text.

I wanted to build a framework in which the player and the program can interact with a character in unpredictable ways; the character would react not only to the things that the player types, but to things suggested by what the player types, and things suggested by those things, and so forth. The number of different things that might be output is nearly limitless.

“The Table” is organized around eight themes: the table that the protagonist is writing at, the notebook he (or she) writes in, his house, age (or time), light, the world outside the house, his memory (and family), and writing itself. Each of these themes has a series of associated fragments, which combine to form the story’s output on any given turn. Each fragment suggests certain other themes. The player inputs an individual word from the outputted text — the command might be understood as “think about this” — which is translated into an associated theme, and the game then tries to reach that theme by free association from the last theme thought about: It prints a fragment associated with the original theme, moves to a theme suggested by that fragment, prints a fragment associated with that theme, and so on until it has reached the target theme. The strung-together fragments, with luck, form a map of the protagonist’s stream of consciousness.

Procedurally generated text can be artificial and show the seams where the different fragments are joined. In “The Table” I decided to confront this problem directly, using extremely stylized and intentionally fragmentary prose (inspired by late Beckett). Each individual fragment in “The Table” is unvarying; to produce more sophisticated and naturalistic prose, one would have to write more restrictive rules about which fragments can combine with which fragments, and probably customize the fragments a little (at least at their beginnings and ends) to make sure they flow together more smoothly. Perhaps a system like this could be used for dialogue with a slightly mad or rambling NPC.

We could also explore associations other than those from fragment to theme; a fragment could suggest specific other fragments, or sets of fragments associated with themes, or a theme could always suggest other themes. Another area for exploration would be modifying the associations as the story progressed, so that a certain fragment only suggests a certain theme if another fragment has been revealed. Or we could modify the path-finding algorithm, so that certain associations were strengthened or weakened. (“The Table” uses fairly crude pathfinding; in a given turn it first wanders randomly through the associations, then goes straight to the target theme if it can do so in one step, and past a certain point jumps forcibly to the target theme.)

Aaron Reed’s “Experiment One” suggested the free-association framework, and Andrew Plotkin’s “The Space Under the Window” suggested this particular keyword system.

If I do more with similar systems (and I think I’d like to), I think I’d go for a more natural prose style, perhaps still one that allows for a lot of repetition; and I think it might be a good idea to have the association go from prose fragment to prose fragment rather than from theme to theme (perhaps still using the themes to determine which prose fragment winds up at the end of the association).

Recently I found two other pieces that do some similar things to “The Table.” Jason Dyer’s Renga in Four Parts, another IF Demo Fair entry, seems like it has a very similar input system; you enter single words in or suggested by the text, and it responds with an associative output whose relation to your input is less than predictable. I’m not sure how Jason generates the individual responses; I think each of them was written as a whole, except that some of them will reuse some of your input, but I’m not sure. In any case, both “Renga in Four Parts” and “The Table” are “high freedom of input, user does not control a character in the story” pieces. (Though in “The Table” you might see yourself as directing the character’s thoughts.)

Scott Rettberg’s “After Parthenope” isn’t interactive at all. (This is a link to a video description; the work can be found here, requiring Java I think, and the Processing source code here.) After an introduction (the first part somewhat random, the second not), it produces a sequence of fragmentary thoughts, often seeming as though they might come from a phrase book — which would be thematically appropriate. There are an amazing number of different possible sentences that it can generate, and it looks to me as though its algorithms might be useful for making flowing prose out of a program with a structure like “The Table.” There’d still be something alien about it, but that’s part of the point.

About these ads

3 Comments »

  1. You’re right that the verses are composed whole. I was more interested in interactivity than generativity. (Plus I wanted, to my best effort, good poetry.) I have it respond as much as I can directly to the input, which still leaves enough unrecognized input that the responsiveness sits in an expressionistic stew. That’s really been the main issue.

    The use of unrecognized words is a minor rare thing just tossed in for sake of experiment that doesn’t always even show up in a given session.

    Comment by Jason Dyer — March 30, 2011 @ 1:48 pm

  2. Thanks for the comment, Jason! I thought that you’d probably composed the verses whole, to make the poetry as good as possible — I was more interested in generativity, but I’ve really got to think about whether I can get good prose out of that.

    If you don’t mind my asking more about the workings of your piece — is there a one-one (or one-many) linking of inputs to verses, or does it keep track of a state? How does it determine when to end?

    Comment by matt w — April 1, 2011 @ 9:41 pm

  3. [...] level was interesting to set beside Jason Dyer’s Renga in Four Parts and Matt Weiner’s The Table, both of which might also be identified as interactive poetry of a sort. (Renga certainly; whether [...]

    Pingback by IF Demo Fair: Desiring Flights and other interactive poetry | Emily Short's Interactive Storytelling — April 5, 2011 @ 11:53 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: