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:

When you meet a new character, that character tries to work out which script you’re on. He may have some starting assumptions (a shopkeeper will assume that you’ve come to buy something), but your behavior might change his mind (if you walk into a shop and ask for directions, he’ll decide you’re in a lost-tourist script rather than a buy-stuff script). Once he’s ascertained which script he thinks you’re on, he’ll usually try to help you along towards its conclusion — say by giving you directions and some general advice about town. And when he thinks he’s fulfilled the obligations of the script, he’ll expect you to go away again, unless you initiate a new one.

Of course, there are some scripts that some characters don’t want to be in. A shy person, or a tourist who himself doesn’t know his way around, might not be able to play the other role in your lost-tourist script. Moreover, some scripts (aggressive evangelizing about politics or religion, discussing sensitive topics, hitting on a stranger) might be unacceptable to nearly everyone. When this happens, instead of participating to the end point, the character will try to explain that he’s not interested, or even excuse himself and leave if that’s suitable.

The current script may even determine whether the character is willing to answer certain questions, even if there’s no real difference in friendliness or intimacy level, because the questions that fit the script are more acceptable than ones that don’t.

In describing this model I’ve probably made it sound fancier and more simulationist than it actually is under the hood — essentially various characters have quips they can use to try to find out what you want, and certain triggers that will make them think they’ve figured it out, and they will then follow rules appropriate to their assumptions. But I’m finding that, for casual encounters, this approach is more effective than trying to model things like friendliness, trust, attraction, etc. The latter tend to be more useful in long and intimate conversations or in a relationship that develops over many scenes.

12 thoughts on “The conversational “script”

  1. Interesting. I’d never really thought about that issue but I have the same experience when traveling in areas that speak French. The basic scripted nature of interactions allows my tiny level of remembered French to carry me though most interactions.

    • “What was that last word?” Grandpa-Grumble asked, having been sitting with his paw to his ear the whole time. There was nothing wrong with his hearing as long as he knew what people were going to say. One almost always knows what people are going to say.
      –Tove Jansson, Moominvalley in November

  2. This sounds very like Roger Schank’s work on scripts for natural-language understanding.

    See e.g. http://www.jimdavies.org/summaries/schank1977-2.html

    [Schank] describes scripts as groups of causal chains that represent knowledge about frequently experienced events (e.g. going to a restaurant). In other words, a script is a stereotyped sequence of actions that defines a well-known situation and has associated with it:
    a number of roles for the actors (different points of view on the situation, e.g. customer vs waiter vs cook),
    different tracks (e.g. restaurant, fast-food),
    different scenes (e.g. enter, order, eat, pay); each scene has a MAINCON, i.e. a main conceptualization, which must have happened if the scene is instantiated,
    as well as props, entry conditions, results, branches and loops etc.
    Using scripts requires two mechanisms.
    Script retrieval: A script is retrieved if a state is mentioned that constitutes a precondition for the script (e.g. the customer is hungry and has money) and there is a direct reference to a MAINCON or a prop in one of the scenes (e.g. order a dish or step to the counter).
    Script application: An active script allows one to infer actions that were not stated (nor contradicted) as well as to instantiate roles etc. Hence the predictive power of scripts in conventional situations.
    The restaurant script is called a situational script (standard social situation in a specific locale etc.). Other types of scripts include personal scripts (e.g. hitting on the waitress) and instrumental scripts (e.g. lighting a cigarette).

    Many interactions can arise in script-based understanding, because several scripts are active at the same time (interference e.g. train and restaurant scripts), or because an action has an unexpected outcome which prevents the script from continuing normally or invokes another script recursively (within an existing script) – script in abeyance.

    Of course, script-based understanding is only relevant when understanding stereotyped situations. Beyond these, it is necessary to have a model of the actors’ goals and of the available plans to satisfy these goals.

  3. Yes, good interesting stuff. I don’t know how interested we are in this context about reality, but I’ll point this out–

    As you say, communicative scripts are about context, and specifically they are about being able to impute intention to others’ minds. We understand people (or think we do) by assessing their agendas, and once we have identified their agenda, we begin bargaining with them. Especially by communicating our own.

    I’m in a country were many people don’t speak English, and where people have different presuppositions about what agendas others are likely to have, and it’s very illuminating.

    I had a beer with an American co-worker tonight, and halfway through the conversation I snagged our waitress — who didn’t speak any English.

    But I had a bilingual dictionary, and I showed her the entry for “pretty” and, with sign language, made her understand my co-worker thought she was pretty. This was only semi-made up: he would have told her himself if it occurred to him.

    When she finally got it, she said, “I don’t understaaand!” and, beaming, walked away. She was super-friendly to him for the rest of the night.

    Now, the communication changed context, but the way it changed context was by changing her understanding of the communicator’s agenda. It was no longer about ordering drinks, but about getting a random compliment.

    Conversely, the taxi drivers will often try to conceal their agendas, and draw you into a conversation, or pretend they’re giving you directions, before — surprise! — they offer you a solution to your transportation problem. That’s because taxi drivers hassle you so much you get used to turning them down. Any ‘in,’ they figure, is a good thing.

    (Then when their ruse is exposed they instantly start calling out prices to the temples that tourists go to — “Angkor Wat, $5!” — or, “Have a good time, I show you!” etc.)

    Most basic problems of communication can be resolved into trying to identify the others’ agenda.

    Also, this —

    I had a random conversation with two Taiwanese high school girls, who were eating breakfast at the same place as me. Apparently they’re not afraid of strangers, as are American girls (although they did travel in a pair).

    I wanted to know what dialect of Chinese they spoke, and it took a bit of trouble to communicate the question. Finally one said, “Taiwanese.” Then added, “Why, do you want to learn it?”

    In other words, why are you asking us about our language? What’s your agenda?

    We don’t usually communicate without an agenda, and when we can’t get a grip on what someone’s agenda is, we feel we don’t understand them.

    In my opinion, the “script” that conversations tend to have is less convention and more a manifestation of the micro-agendas that we understand each other to have.

    But having said all that, I’m not at all certain there’s anything in it for better game-play.

    Conrad.

    • What I want it to do for the gameplay is:

      1) to introduce structure into otherwise potentially structureless conversations with minor characters. This (I hope) makes for things that will feel like scenes, rather than like random encounters that drag on ’til the player gets bored and then fizzle out;

      2) to steer the player towards the kinds of interaction appropriate to each character; but yet

      3) do that without actually cutting off the player’s ability to ask characters *some* odd/unusual/probing questions.

      In other words, I want it to be possible for the player to go up to the guy that takes tickets at the theater and ask him his opinion on politics. But that character will be puzzled by this unexpected interaction, and act puzzled. From a gameplay point of view, what I want to communicate is that, yes, the player is allowed to do exploration like this if he wants, and he may get interesting answers, but it’s just that, exploration, not a required puzzle component.

      • The current implementation is really pretty simple — the conversation system is already, in a sense, atomized at the level of quips, but the rules that determine what a character will say next consult the current script to figure out what to queue up, and those scripts tend to be for fairly broad things like the “lost-tourist” script suggested in the example.

  4. So, what I’m getting at is this —

    And this may be entirely moot, in that it has no influence on game-play. But on the other hand, it may not be.

    It seems to me that the deep structure, the underlying whats-going-on, to the scripted conversations you’re seeing people engaging in, is the identifying of the interlocutor’s agenda, and declaring one’s own agenda to the interlocutor.

    And you can see the micro-agendas in the conversation: this person needs to know who I am (“Hi, my name is Conrad.”); this person needs to know I care about them as a person (“How are you?”); this person needs to know my business (“I’m looking for a power adapter.”)

    The reason I say that is that such an approach may allow you, if you think it’s worth tinkering with, to create more flexibility in the way the NPCs use script elements. So, if an assumption about a higher-priority understanding of the others’ agenda is violated, the NPC may back up. (“Wait a minute, I thought you said you were a tourist?”)

    Again, I don’t know if the investment is worth it. But it seems it might result in more interesting NPC behavior than just a scripted approach. And, you may be able to recycle script elements.

  5. English seems to me sooo script-way. You have phrasal verbs, do pattern-matching natural lenguage analysis, even some correct ways to say hello, and whatever…

    Buff.. i feel that in Spanish all that is basically different. I almost cannot think that a conversation is about a ‘script’ and that the proper approximation is try to guess the correct ‘script’ that you are trying to use… All that seems to much simple to me, sorry.

    Maybe in English is in that way…

  6. Pingback: The conversational “script” « Emily Short's Interactive Fiction Scripts Rss

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