The conversational “script”

Something that emerged from my reading on conversational analysis is how many of our conversations in daily life are essentially pre-scripted, not in their details but in their overall shape. Someone you don’t know well calls you on the phone: you identify yourselves to each other, exchange a little small talk, get to the point of the telephone call, resolve that business, and hang up. You go to a movie: you tell the person behind the desk what you want to see and when, that person prints tickets and tells you the price, you pay, you exchange concluding civilities and leave.

It might seem that we can negotiate these scenes because of our natural language fluency, but that’s not really the case (or not all of it): context helps a huge amount. I’m terrible at following a conversation between two French speakers I don’t know anything about, but I’m comfortable ordering a restaurant meal, buying stuff at a store, checking into a hotel, etc. — because those are situations for which I not only have the specific vocabulary but have very clear expectations about each stage of interaction to help me guess what an ambiguous utterance might mean.

It occurred to me that this idea of scripts might help address a particular problem with characters in open/exploratory IF where the player can choose when and how long to interact with each person in a landscape full of (say) shopkeepers, tourists, bus conductors, etc. One usually has a choice of making these interactions either very curtailed or very unrealistic: either you can *only* talk to the shopkeeper about the price of milk, or you’re allowed to ply him with a lot of questions about everything under the sun, which a real shopkeeper would probably try to cut short.

So my current implementation works this way:

Continue reading “The conversational “script””

Modeling conversation flow: multiple people conversing; some closing caveats

[This is part of a series of discussions on the craft of modeling conversation. For previous installments, see my original Homer in Silicon article which lays out the basic elements of the model, and previous blog posts on the issue.]

Modeling conversation flow gets more challenging when there are multiple participants in the scene. I’ve tried two approaches to this.

Model the group as a single entity. If you have a scene where the same set of three or four people are going to be talking — no one entering or leaving at an unpredictable time, everyone involved throughout — then it’s possible to model the conversation much as though it were a conversation with one interlocutor. Quip responses contain whatever is said by every character who isn’t the player. Any member of the group may be narratively responsible for moving the conversation forward.

I’m only partway through writing the game that uses this method a lot, but I would say that it works (where it does work) because the game has a strong narrative shape that isn’t up to the player. The player can affect the outcomes of scenes, certainly, and has considerable agency over what ultimately happens, but has little influence on pacing.

Model each character individually, and allow everyone at least the chance to speak after the player speaks. This is what I did with Fugue, an experimental mini piece in which the protagonist is having a conversation with several friends (who are really several internal voices of her own). Each NPC, once addressed, continues to contribute to the conversation, until all three of their voices are engaged.

Fugue really doesn’t attempt many of the interesting things that could be done with this, because on the technical side it really was just playing with whether I could get the characters to have planned conversation that ran in tandem.

However, the same model is what I’d want if I were writing a conversational sandbox in which the point is to have a number of characters wandering around exchanging information. Conversational facts are known by everyone who has heard them spoken, which means that it’s possible to have characters react to things said in their presence but not said “to” them.

To make a compelling game of this would require a considerable amount of modeling to do underlying the quips, though. The quip model I’ve discussed here is designed to create a sense of context; interpret the player’s input based on that context and provide conversation hints if desired; manage pacing; and assemble the various statements, interruptions, and pauses into continuous prose. It doesn’t provide any kind of conversational goal-seeking, though. It leaves it up to the author to decide by hand what quips should be added to a character’s planned conversation. It allows the author to mark up text to indicate mood changes and facts discovered, but it doesn’t require the use of those elements, and it doesn’t assume anything about the modeled psychology of the characters.

The more sandbox-like the game, the more we’ll need another model beneath the quip model — one that does deal systematically with moods, factual knowledge, and goal-seeking.

Modeling conversation flow: beginnings and endings using scenes

[This is part of a series of discussions on the craft of modeling conversation. For previous installments, see my original Homer in Silicon article which lays out the basic elements of the model, and previous blog posts on the issue.]

The convention that characters should greet one another before launching into other discussion is now pretty well established in realistically conversational IF; for Inform, Eric Eve’s Conversation Framework extension provides this functionality and I’m planning to use something compatible with his work.

There’s no reason, however, why the player should always get to dictate when a conversation begins and ends. Alabaster is not a very good demonstration of conversation beginnings and endings because there are relatively few transitions, but consider, say, Blue Lacuna: other characters move around, begin and end conversations, and generally behave as full partners in talky scenes.

In Inform 7, I rely a lot on the scene mechanism to manage conversations, because they allow me to write natural lead-ins and lead-outs, to set up lists of planned conversation in rules like “when heist planning begins”, and to set complicated conditions for when a scene should end. The conversation system also has a feature that allows quips to be set only to occur within a specific scene, which is a good way to protect against accidentally out-of-context remarks.

Continue reading “Modeling conversation flow: beginnings and endings using scenes”

Conversational analysis studies

[A note: I really appreciate the feedback I’ve gotten on these conversation modeling posts, both in comments and off-blog. My goal here has been to take a first stab at explaining the model of Alabaster, since I’m going to have to write up a bunch of documentation for it; and to get some responses on what people find especially confusing and what features they’d especially like. So it’s been helpful for me. To those of you who don’t find them very interesting, thanks for your patience, and I’ll be back to a more typical blend of content soon.]

Recently I had a chance to reread parts of a book I haven’t looked at in some years, Stephen Levinson’s textbook Pragmatics. Levinson talks about a number of issues to do with how meaning is understood in context and how conversational exchanges are negotiated. When I wrote Galatea, I was guided a bit by Grice’s maxims of conversational implicature picked up from a linguistics class in college; the last time I looked at Levinson’s book it was to remind myself about Grice.

This time I was more concerned with the chapter he devotes to conversational analysis: basically taking a lot of transcripts of ordinary conversations and working out, as far as possible, the principles by which people work out how to take turns, what strategies are used to mark beginnings and endings, why pauses and overlaps occur, etc.

Continue reading “Conversational analysis studies”

Modeling conversation flow: silence

[This is part of a series of discussions on the craft of modeling conversation. For previous installments, see my original Homer in Silicon article which lays out the basic elements of the model, and previous blog posts on the issue.]

If we have an NPC with a long list of things to say, and the player types WAIT or LISTEN rather than selecting any of the possible responses, we might want the character to comment:

“Next, you’ll need to approach the farmhouse from the northwest under cover of darkness. Wolf-cub should already have cut the telephone wires and the electricity, but you’ll still need to be stealthy: they may be armed.”

You could ask whether the enemy will have snipers.

>LISTEN
You listen.

“Then… [stuff]”

>LISTEN
You continue to attend to The Fang’s briefing.

“Next you’ll… [more stuff]”

>Z
The Fang seems to be done.

“You catch all that, Snakemouth? You know I don’t like it when operatives have no questions. It worries me.”

>SMILE
You smile serenely. The Fang mutters something rude under his breath, but it looks like he’s going to let you break for lunch at last.

One simple approach is to keep a counter that resets every time the player speaks, and increments every time the NPC does; thus if the counter hits (say) four, that means the NPC has talked for four turns without any reply, and we can use that information to plan an immediate optional question about why the protagonist is being silent.

Modeling conversation flow: actions in conversational context

[This is part of a series of discussions on the craft of modeling conversation. For previous installments, see my original Homer in Silicon article which lays out the basic elements of the model, and previous blog posts on the issue.]

Giving and showing.

In addition to ASK and TELL, many IF games retain the convention that the player can give or show objects to other characters. Though these are not strictly conversational actions — that is, you can give or show an object without opening your mouth — they involve communication, and therefore we may want to have the NPC’s reactions be affected by the other conversational context that’s going on. Besides, we may often want ASK BOB ABOUT DAGGER to gain the same response to SHOW DAGGER TO BOB, if the point is to get Bob to reveal some specific bit of information about the object.

My preferred way to do this is to have quips to represent what Bob says about the dagger, and then redirect SHOW DAGGER TO BOB to an available quip that mentions the dagger. That means that we can write follow-up questions about the object, cue follow-up comments for Bob, and otherwise track the exchange just as though it were part of the standard conversational structure.

Continue reading “Modeling conversation flow: actions in conversational context”