Mailbag: Research on Dialogue and Story Generation (Part 2)

This is a continuation of an earlier mailbag answer about research that touches on dialogue and story generation. As before, I’m picking a few points of interest, summarizing highlights, and then linking through to the detailed research. In this section, I’m mostly looking at authoring tools and at academic theoretical work on interactive narrative.

This will not be comprehensive.

Authoring Tools for Dynamic or Procedural Storytelling

Several academic projects focus on building authoring tools for various types of dynamic or procedural storytelling, whether or not those are heavily augmented by AI. Many of these don’t rely on machine learning per se but do explore some other aspect of  the problem; in particular, several attempt to furnish the author with the means to build content for a planner-based storytelling system. But there’s a whole range of functionality here (and this is not a complete list):

Screen Shot 2017-04-23 at 9.26.07 PM

Andrew Gordon has done quite a bit of work around tools designed to assist authors with story creation ideas based on large corpora. I’ve written elsewhere about DINE, his interactive story authoring tool. DINE allows authors to describe the sorts of prompts that they want to understand, but uses its own models of language to determine whether a player’s input qualifies as matching a prompt. The result is less controllable but sometimes more robust than a standard interactive fiction parser. (“Sometimes” is the key word in that sentence.)

Screen Shot 2018-08-26 at 9.39.39 PM.png

Emma’s Journey is a project out of UCSC that combines fragments of choice-based narrative with a planner to create dynamic scenes. Individual pieces feel like they could have been done in Twine, but the selection and ordering of pieces is very dependent on current stats; and there is a distracting minigame for the player that also affects what options are available. This is built with the experimental StoryAssembler tool. There are also several associated research papers.

Continue reading



So I released a new game! Here’s its blurb:

You’ve been haunting old Mrs Fagles for decades. Now she’s sold the house, and the new owner’s moved in. Sylvie’s broke, bad at plumbing, and anxious about everything.  And with a living, breathing, fretting roommate, how are you supposed to rest in peace?

Drink blood. Set fires. Tell lies. Give advice, loan out a wedding dress, reclaim your true name.  Remix your dialogue options to reflect your mood or dig deeper into the topics that interest you.

I mentioned this briefly in yesterday’s link round up, but I wanted to give a little more background on it than a link round up typically allows for.

Restless is a game written for ECTOCOMP, a venerable Halloween-themed IF competition. There are six endings, if you’re counting — though some of those endings mean different things depending on how you get to them.

It’s a purely conversation game. As in a lot of choice-based games, you have up to three options, and you can pick one. But in contrast to the typical dialogue situation, you can do something about it if you don’t like your current menu. Click a mood, and your options will shift to reflect that new attitude. Turn on moods individually or in combinations. Discover conversation topics and you can set your dialogue to explore those too.

Continue reading

TextWorld (Inform 7 & machine learning)

Inform 7 is used in a number of contexts that may be slightly surprising to its text adventure fans: in education, in prototyping game systems for commercial games, and lately even for machine learning research.

TextWorld: A Learning Environment for Text-Based Games documents how the researchers from Tilburg University, McGill University, and Microsoft Research built text adventure worlds with Inform 7 as part of an experiment in reinforcement learning.

Reinforcement learning is a machine learning strategy in which the ML agent gives inputs to a system (which might be a game that you’re training it to play well) and receives back a score on whether the input caused good or bad results. This score is the “reinforcement” part of the loop. Based on the cumulative scoring, the system readjusts its approach. Over many attempts to play the same game, the agent is trained to play better and better: it develops a policy, a mapping between current state and the action it should perform next.

With reinforcement learning, beacuse you’re relying on the game (or other system) to provide the training feedback dynamically, you don’t need to start your machine learning process with a big stack of pre-labeled data, and you don’t need a human being to understand the system before beginning to train. Reinforcement learning has been used to good effect in training computer agents to play Atari 2600 games.

Using this method with text adventures is dramatically more challenging, though, for a number of reasons:

  • there are many more types of valid input than in the typical arcade game (the “action space”) and those actions are described in language (though the authors note the value of work such as that of BYU researchers Fulda et al in figuring out what verbs could sensibly be applied to a given noun)
  • world state is communicated back in language (the “observational space”), and may be incompletely conveyed to the player, with lots of hidden state
  • goals often need to be inferred by the player (“oh, I guess I’m trying to get that useful object from Aunt Jemima”)
  • many Atari 2600 games have frequent changes of score or frequent death, providing a constant signal of feedback, whereas not all progress in a text adventure is rewarded by a score change, and solving a puzzle may require many moves that are not individually scored

TextWorld’s authors feel we’re not yet ready to train a machine agent to solve a hand-authored IF game like Zork — and they’ve documented the challenges here much more extensively than my rewording above. What they have done instead is to build a sandbox environment that does a more predictable subset of text adventure behavior. TextWorld is able to automatically generate games containing a lot of the standard puzzles:

Screen Shot 2018-08-26 at 2.19.51 PM.png

Continue reading

Narrative Design Toolkit (Gamisolution)

narrativedesignThe Narrative Design Toolkit (available in both English and Spanish) is a deck of cards intended to help the user think through the creation of a new plot, starting with a twelve-card representation of the Hero’s Journey as the basis for elaboration.

As the picture shows, it’s got a simple but stylish design, and includes cards in different colors to represent events and character archetypes, drawing on the writing of Jung and Propp, Campbell, Rodari, and Vogler. Cards include elements such as “the Shadow,” “the Innocent,” “the Grump,” et al. (I think some of the more personality-driven archetypes may have been supplied by the creators of the deck, since they alone don’t have an alternative attribution on them.) Meanwhile, it skips some of Propp’s more specific and startling elements, such as “The hero follows bloody tracks” or “someone pursues the hero, rapidly transforming himself into various animals.” (Though even that’s not as wild as some of the stuff in S. Thompson’s motif index of folk literature, featuring motifs like “Cow drops gold dung” and “Council of fishes decide to get rid of men (who eat fish)” and “Sun and moon born of lizard”. I could page through that stuff all day.)

I myself probably wouldn’t call this a toolkit for narrative design overall so much as a toolkit for plot generation — but that’s still an interesting and useful thing, potentially. Different writers wrestle with different aspects of writing, but “I hate plotting!” is a more common cry than one might think.

Those who’ve been tracking this blog for a while will know that I’m skeptical of the Hero’s Journey and especially of its overwhelming prevalence in game narrative how-to books; also that I’m a total sucker for card decks designed to inspire creativity or to teach IF methods or to tell stories. Likewise tabletop RPGs that offer interesting rules for inventing plots and characters, and the whole challenge of thinking procedurally about the working elements of story. So I went into this unsure whether I’d turn out to like it a lot, or find it very exasperating.

The recommended method for using the Narrative Design Toolkit is perhaps a little underspecified relative to one of those RPGs. It suggests that you:

  1. Lay out cards 1-12 representing the stages of the hero’s journey, then
  2. Swap, remove, and/or replace those cards with other cards in whatever way you wish.

So all in all rather a loose grammar. However, I did sit down and follow these rules.

Continue reading

Notes on the Direction of Inform

Yesterday Graham Nelson spoke to the Oxford/London IF Meetup about what he has been doing with Inform recently, what has and has not been successful (in his view), and where the project is going next. The slides and text are now available here.

Because the talk is intended for a mixed audience, it does explain some things that readers of this blog may already know well, but by the later part of the talk is introducing some new elements.

Generominos (Kate Compton)


Generominos is a deck of cards designed to help the user think of possible generative art and visualization projects. Some of the cards describe input types (words, images, geographical locations, etc); others describe output formats (3D printed shapes, light changing glass, and so on); and then there are a number of cards that describe ways of transforming one type of data into another. The ideas generated would be suitable for lots of applications, from alternative game controllers to computational-creativity crafts to data visualizations to museum installations.

There are additional project modifiers that suggest purposes for the project (making a creative activity for a senior center, for instance, or put it someplace where no humans can see it).

The cards make a cool teaching (or self-teaching) tool, both around process — how might you change one kind of data into another? — and about specific techniques. Kate has a wide experience with generative art forms in both physical and digital space, which means she includes ideas like “express your output in colored fire” or “attach a webcam to a microscope to observe microbes moving” or “get ocean condition data from NOAA’s API”. Even with a fair amount of experience in related spaces, I found a shuffle through the cards suggested a lot of possibilities I hadn’t considered. So it’s an interesting place for beginning-to-intermediate users to start thinking about generative art design. It also provides a bit of framework for more advanced users: you can add your own cards as you think of new methods and inputs, and then play with how those might generate interesting new combinations.

The flip side of this: the cards may suggest a cool project that would be prohibitively difficult or expensive to build at home, or that would require a dive into new code or algorithms to realize. And in some cases, a little more context might be useful. For instance, the card on word2vec accurately explains that you put a word in and get a vector out, but there’s not enough room on the card to talk about the ways word2vec is often used to get from one input word to another, or to calculate analogies.

So actually building a project based on these ideations is possibly not a beginner-level task; or, to be more precise, the cards may not give enough information for a beginner-level user to tell which concepts would be accessible enough for them to implement from scratch. One might need to do some additional research into particular techniques, or be encountering the cards in a classroom or workshop context.

Bonus recommendation: Rich Vreeland gave some great talks at the AI Summit this year about the procedural music for Mini Metro and about sonification in general as a way of understanding data (instead of or alongside visualization). If you happen to have GDC Vault access for 2018, that material is definitely worth checking out.