Procedural Text Generation in IF

In the Missing Tools discussion some time ago, one of the things people mentioned wanting more of in IF was procedural text generation, which here is meant specifically as the ability to have the computer describe complex world model states or story events without having to hand-author every possible variation.

This is an area where there’s a lot to learn from work going on in academic research, but as far as I’m aware there’s relatively little communication. As I mentioned in my ICIDS writeup, James Ryan at UCSC and Dr. Boyang Li at Georgia Tech’s Entertainment Intelligence Lab are doing work on a) how to better represent a richly complicated world model and b) how to procedurally alter narrative features such as the tone of narration. One of the things we particularly don’t seem to do in hobbyist IF, perhaps for lack of resources, is experiment with large word databases such as WordNet or crowd-sourced work in particular areas like that used on Scheherazade.

Speaking for myself, I’ve also tended to stumble towards solutions in this space based on trial and error and the needs of my own projects, rather than having a strong grounding in the relevant academic work. Most of what we’ve needed — and most of what we’ve done — is pretty much work in the shallowest end of this pool.

And, of course, text generation for parser IF comes with special additional challenges, in that the player usually expects to be able to refer to any generated noun or noun phrase element; therefore if we generate a description of a thing as “blue”, the system also needs to remember how we described that object and accept the input “blue” to refer to it.

Here are the things I’m currently aware of. Unfortunately, I’m inevitably more aware of the internals of my own libraries and games than I am of other people’s work, so if I left out something cool that you did, please by all means say something in the comments: I am eager to know about it. In particular, there may be a lot I don’t know about under the hood in Kerkerkruip.

Continue reading

Elegy for a Dead World (Dejobaan Games)


Elegy for a Dead World is a game almost entirely about aesthetics and interpretation. As the player, you traverse artistically rendered side-scrolling environments, and from time to time you find a place where you’re encouraged to make some sort of annotation. The idea is to develop a story of your own based on the images you see, and then (if you wish) to make your version of the story available to others.

I played the version that the team submitted to IGF last year. At that point, it was a little more freeform than it looks currently (judging by the screenshots); you could stop and annotate anywhere you wanted, rather than having sentence-starters that you need to fill in. I spent quite some time going back and forth over one of the worlds, developing it into a storyline and then returning to edit earlier bits to keep the whole thing consistent. That was a little bit laborious, but also cool, because I could wait until the background and foreground elements were arranged just as I wanted them and then write something that corresponded to that precise spot.

Anti-coloring Book pages provide hooks but ask you to draw based on your own ideas.

Anti-coloring Book pages provide hooks but ask you to draw based on your own ideas.

In any case, even though I haven’t tried the latest version, I feel pretty confident about saying this is a very unusual thing — a bit like a coloring book but for writing. The experience reminded me a little of working with the The Anti-Coloring Book when I was younger.

This is sort of what I was trying for with San Tilapian Studies, but that was such a one-off experience that it was difficult to collect meaningful player feedback; likewise, the (now long ago) Walkthrough Comp, which provided a bare series of commands and invited authors to write games or full stories around those commands.

I’m particularly interested — though I think there’s not yet enough evidence to come to any conclusions yet — in the question of what sorts of prompts and images prove to be most richly productive of different interpretations. Again, I’m going off my experience at the time of last year’s IGF, so things may be substantially different now, but my impression then was that most people’s stories felt somewhat similar: while there were these evocative and non-prescriptive images to work from, they nonetheless tended to suggest roughly similar events and tonalities to the players. Contrast, I suppose, the tarot, which is notoriously fluid and variable in what different cards say to different people; Mattie Brice has written several intriguing articles on this topic.

Is there a form of interpretive game design that consists of coming up with especially resonant, multivalent images? What would skill in this area look like? How much does it matter that the tarot is a system with a built-in structure of relationships between the images?

Speculation aside, Elegy is really one of the only video games I know of to be seriously exploring this area.

Shufflecomp’s Outcast: Barbetween

Barbetween is a Seltani age written for Shufflecomp but excluded from the final competition because it was impossible to archive. Seltani is an online multiplayer text space that combines Twine-like room and object descriptions with the capacity for live chat and exchanges with other players in the same area.

I’d like to talk about Barbetween, but it’s the kind of piece that benefits a lot from being played in more or less complete ignorance of what’s going to happen, so I really suggest you do that. (It doesn’t take long.)

I played with the song that inspired it on in the background, and that proved to be a good choice.

Continue reading

Inform 6L02

Panel15A good deal of my IF-related time in the last couple of months has gone into Inform, and I’m pleased to say that the new build is available today for Windows and Mac (and other apps to follow shortly). There’s an introductory blog post here that gives an overview of what the new build does; there’s also a change log, which is absolutely mammoth, here.

There are loads of new things going on, but I’m particularly excited by Inform’s new adaptive text, which I see as a partial step towards making the system more capable of doing interesting things with procedurally generated text output. The adaptive text allows Inform to inflect verbs according to the current tense and viewpoint of the story, automatically turning “[We] [walk]” into “You walk” or “He walked” or “We will walk” according to the current settings.

But it goes considerably beyond this. The new example “Narrative Register” shows how to associate verbs with different actions, then have the narrator automatically describe what has just happened with a verb that is appropriate to a current “diction” setting. The “Relevant Relations” example associates verbs with relations as well, and shows a way of doing room descriptions in which the author tells Inform which relations ought to be described to the player, leaving the system to assign appropriate verbs and construct sentences around them.

These are all fairly early-days things; there’s a lot that would still need to be done in order to get from here to the kind of text generation I would one day like to see, including (especially) some code designed to do a good job of sorting and concatenating related sentences before printing them.

But Inform can now track the meaning of its output more deeply than it did before, and perform more grammatical functions automatically, and that’s a helpful step.

Love is Zero (Porpentine, Brenda Neotenomie, Sloane)

Love is Zero screenshot

Love is Zero is a Twine piece about vampire high school girls in a tennis school on the moon. It’s not really a piece with plot, per se: instead it’s a sort of meditation on how identities are formed. You have a series of choices — usually “STUDY”, “PLAY TENNIS”, and “BULLY”, though sometimes specialized other choices as well. Every time you make a decision, something new is added to the long sentence that describes who you are. And despite how it may look, all of those choices are rather harsh ones. Bullying is obviously problematic, but playing tennis is about winning and beating other people down, about getting hit with rackets and hurting and not minding. And studying is about kissing up to teachers and gaining knowledge that sounds frightening and dangerous. So the STUDY / TENNIS / BULLY choice is not a PET PUPPY / KISS PUPPY / KILL PUPPY style of moral choice. They’re all sort of KILL PUPPY options.

Sometimes things happen to you outside of your control and those can affect your description too. You belong to a randomized clique with a randomized uniform. The vampirism and the tennis are signs for something else — for the bloody and out of control violence of teen emotions, for the ubiquity of blood in puberty, for competitiveness. The game touches also sometimes on the relationships girls have with their bodies — there are some randomized events that touch on and talk about eating disorders.

That all sounds pretty heavy, but the game is very stylized and cartoony. It manages to talk about the real emotions that underlie teenage female experiences while at the same time not overwhelming the player with hyperrealism. Porpentine’s gift for capturing significant feelings and experiences in single sentences is once again on display here.