Mailbag: AI Research on Dialogue and Story Generation (Part 3)

This is a continuation of an earlier mailbag answer about AI 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.

This one is about a couple of areas of natural language processing and generation, as well as sentiment understanding, relevant to how we might realize stories and dialogue with particular surface features and characteristics.

Transferring text style

Screen Shot 2018-08-25 at 2.27.27 PM.png

Style transfer is familiar in image manipulation, and there are loads of consumer-facing applications and websites that let you make style changes to your own photographs. Textual style transfer is a more challenging problem. How might you express the same information, but in different wording, representing a different authorial manner? Alter the sentiment of the text to make it more positive or negative? Translate complex language to something more basic, or vice versa? Capture the distinctive prose characteristics of a well-known author or a specific era? Indeed, looked at the right way, translation from one human language into another can be regarded as a form of style transfer.

Continue reading

Mailbag: AI Research on Dialogue and Story Generation

I’m curious: do you follow much research that happens in stories and dialog these days? In the world of machine learning research, there’s much less in dialog and stories than other areas (e.g. image generation/recognition or translation), but once in a while, you come across some interesting work, e.g. Hierarchical Neural Story Generation (by some folks in Facebook AI).

For some years now I’ve followed work coming out of the UCSC Expressive Intelligence Studio; work done at Georgia Tech around crowdsourced narrative generation; game industry applications introduced or covered at the GDC AI Summit (though it is rarer to see extensive story-generation work here). I’ve also served on the program committees for ICCC and ICIDS and a few FDG workshops; and am an associate editor on IEEE Transactions on Games focused on interactive storytelling applications. Here (1, 2, 3) is my multi-part post covering the book Interactive Digital Narrative in detail.

That’s not to say I see (or could see) everything that’s happening. I tend to focus on things that look most ready to be used in games, entertainment, or chatbot applications — especially those that are designed to support a partially human-authored experience. I also divide my available “research” time between academic work and hands on experiments in areas that interest me.

So with that perspective in mind:

  • I’m not attempting a comprehensive literature review here! That would be huge. This coverage cherrypicks items
  • I will go pretty lightly on the technical detail since the typical readership of this blog may not be that interested, but I’ll try to provide summary and example information that explains why a given item is interesting in my opinion, and then link back to the original research for people who want the deeper dive
  • I’ll actually start by summarizing a bit the paper the questioner linked
  • Even with cherrypicking, there is a lot to say here and I am breaking it out over multiple posts

That Initial Paper

For other readers: the linked article in this question is about using a large dataset pulled from Reddit’s WritingPrompts board and a machine learning model that draws on multiple techniques (convolutional seq2seq, gated self-attention). After training, the system is able to take short prompts and create a paragraph or so of story that relates to the prompt. Several of the sample output sections are quite cool:

Screen Shot 2018-08-25 at 1.41.40 PM.png

But they are generating surface text rather than plot, and the evidence suggests that they would not be able to produce a coherent long-term plot. Just within this dialogue section, we’re talking about a tablet-virus-monster object, and we’ve got a couple of random scientist characters.

Continue reading

Mailbag: Deep Conversation

This one was a follow-up question to the asker wondering whether Blood & Laurels was still available anywhere. (It isn’t.)

If there are any other games (IF or otherwise) that you’d recommend for deeper conversational experiences, I’d love to hear about those… I have a rather broad set of interests there, so anything you find especially exciting, new or odd would be great to hear about, especially where conversation is at the center of the game.

…right, okay. Well, that’s quite a broad field, but here are some possibilities, preferring more recent games (though interesting conversation games go back for quite a while).

Exploration-focused Dialogue

Parser-based conversation games are often designed to let the player explore concepts that interest them, treating the non-player character like a big encyclopedia rather than a goal-oriented partner in dialogue. That tradition goes back — well, back to the 80s, really, since Infocom’s murder mysteries allowed you to ask characters about important subjects and clues.

A few more recent examples that are either carry some of this concept over to a different interface or allow a different spin on it:

Screen Shot 2018-08-25 at 7.34.33 PM.png

Subsurface Circular (above) and Quarantine Circular are both primarily conversation games. Subsurface Circular has some embedded puzzles in the dialogue, including puzzles around manipulating emotional states and the knowledge of both the PC and other characters. As you find out new things, you gain “focus points”, an inventory of topics that you can introduce into conversation.

Speaking of manipulating emotional states, that’s really the primary approach in The Red Strings Club: you mix drinks for NPCs to affect their emotional status, then ask dialogue-tree questions.

Continue reading

Mailbag: World Simulation for Story Generation

Hi Emily,

not sure if this is too specific a question, but I wonder if you can help me out:

Last NaNoGenMo I started out on doing a more sophisticated version of Meehan’s Talespin. I ended up doing lots of planning, but not too much implementation, so I’m going to continue my efforts this year. The biggest part of it all seems to be a world simulator. This would be where all the actions the characters are planning to do get executed. In a way this seems very similar to what is part of every IF/adventure game (locations, objects, etc), and I have programmed some of those in my micro computer days on a ZX Spectrum… But I feel this needs to be more sophisticated (and on a larger scale), and general, as there will be a multitude of possible actions that can modify the world state. And it might also have to be ‘fractal’ (for want of a better word), as there is landscape in the wild, cities (which are in the landscape, but consist of many locations where there would otherwise just be a single location of forest), and rooms in houses in cities, etc.

Are you aware of any systems in existence that I could use for that? I am kind of hoping it would be similar to a physics package for arcade games, a ready-made package that I can slot my content data and planner actions into. Or do I have to write my own?

Any pointers much appreciated!

I’ll try to answer this in its own terms below, but first I feel like those answers should come with some warnings.

This is presumably obvious, but there is no such thing as a generic world simulator. Any simulation is making decisions about what to model and what to ignore, what level of abstraction to use, what kinds of state are interesting to preserve, and so on. It’s misleading to think of “a world simulator” as “like” a physics engine. A physics engine is a type of world simulator, one that focuses on a comparatively well-defined kind of state: position, velocity, acceleration, elasticity, and so on. (I don’t mean it’s easy to write a good one! Just that the domain of simulation is reasonably defined.)

Text adventure world models tend to focus on rooms, furnishings, and items of the proper size to be carried by a human being, but that’s also very much a subset of what you might theoretically want to model. Items that are abstract (“love”, “communism”), intangible (“the smell of grass”, “a traumatic memory”), larger than a room (“Antarctica”), or smaller than a human being could pick up (“ant”, “quark”) are less likely to be simulated — though of course some of us have worked on extending the world model to include support for conversation topics, knowledge, and relationships.

Moreover, the choices you make about what to simulate will very heavily affect what kind of story you get out the other end. Finally, the way in which your simulation is described will affect how easily it can be plugged into a planner system.

I’d also warn against thinking of the content data as a minor aspect of the system. It’s common for research on story generation to focus on the process: is this grammar-based, is it a planner, is it partially ordered or not, are we forward-chaining or backward-chaining (or a little of each), are we planning the events of the story separately from the discourse layer, how are we measuring coherence and novelty (if those are even our concerns at all). Those are all interesting questions to ask, but the features of the content data also make a very significant difference to output quality, and a corpus implicitly encodes a lot of things about the possible story space that may not be inherently required by the generative method.

In every project I’ve worked on where there was a target output quality (as opposed to toy or experimental projects), most of my development time on a first release has gone into working and reworking the content data, rather than refining the process of generation. Once the qualities of a good data set are well understood, it’s possible to make additional data sets that conform to those expectations in significantly less time, and sometimes to support the process with tooling. But I tend to regard experiments in story generation to be fundamentally unfinished unless the experimenter also presents reasonably polished artifacts of their generative process. If they’re just describing a process and leaving high-quality artifact creation as an exercise for the future, then most of the work is (in my experience) still ahead of them.

So. That is the end of my speech. Now that we’re done with warnings:

Continue reading

Mailbag: Two letters about IF and language

This Mailbag post we have two related letters, and I don’t have a super-long answer to either, but I suspect readers may be interested and perhaps have their own comments to contribute:

Are you aware of any IF that has been produced in any endangered, minoritized, or indigenous languages? The only example I’ve come across is Harry Giles’ work in Scots:

I’m not very familiar with the IF world, and your site has been very educational. I’ve tried a few keyword searches to locate works that might not be in the IF databases, but found no other results.

IF would seem to be a useful format for sharing and learning underresourced languages. I’m currently working with folks in the Cherokee and Lakota communities on a handful of translation and localization projects, and I can’t imagine I’m the first to be exploring this area. I would be grateful for any insights. Thanks in advance for your time.

It would be fine to post my note, especially if you thought others might be interested. I’m writing a bit (and curating writing) about work in this area here:

— Derek Lackaff, Ph.D., Associate Director, Center for the Advancement of Teaching and Learning, Elon University

Continue reading

Mailbag: Applying Filters to Character Dialogue

The following letter fits right into this month’s topic on procedural generation. I’ve edited (just a little) for length:

Hi Emily! I read your chapter in the Procedural Generation in Game Design book, and was really impressed. I tried to follow up on some of the sources you mentioned (e.g. the Spy Feet game) but I wasn’t able to get a lot of details, and we have a pretty specific use case, so I’d love to beg a moment of your time to get me pointed in the right direction. Or, if answering my question properly takes more than a moment, I’d be happy to talk about a consulting fee…

We’re doing a bunch of what I’d call dynamic writing, which you can read more about here or on our wiki if you’re interested in the specifics. We have procedurally generated characters (heroes in a fantasy setting) with personality stats tied to their histories, and our system allows writers to take those personalities (and other details) into account in 2 main ways. The first is by picking who takes what role in any given story, (e.g. the highest goofball stat in the party might be picked to be telling the joke in a particular story) and the second way is by inserting markup in the text to add variations for specific personality traits (or relationship status, class, age, etc..) For example we can say things like, if the leader is more bookish, they’ll say something academic, but if they are more hothead, they’ll say something aggressive. This markup is also how we handle gendered words and attraction.

One of the things our game supports (due to the 2D art style and just the stories we want to tell) is really dramatic character transformations, like, to take a simple example, you might find a wolf shrine, and make a deal with the wolf god, and get your head replaced with a wolf head. Now you have a bite attack, cool. But it would be great if we could alter the character’s speech to reflect their condition. Likewise for other conditions or origin stories, or frankly (eventually, maybe) personality quirks.

Continue reading