May 23, 2007

Transparency in the Behavior of and Interface to NPCs

by Andrew Stern · , 3:28 am

This post, like the previous one asking “what do non-gamers want?”, is a spinoff from a recent discussion about natural language interfaces for games.

I find the topic of transparency in behavior and interface for NPCs particularly interesting, because it is actually a big problem for interactive drama.

A transparent user interface is one where it is totally clear what the user’s actions are, and how those actions are interpreted and used by the system. UI designers strive for transparency in their designs, because transparent interfaces are so easy to learn, understand and use. A similar notion is a white box system, in which how the system works is totally exposed and understandable — as opposed to a black box system where users have no idea what’s going on under the hood.

Games often involve physical action, such as driving a vehicle, shooting a weapon, making your avatar run and jump, or selecting a tile or a card. The UIs for straightforward physical actions such as these tend to be transparent — move the joystick forward to run, click this button to fire, etc. Game interfaces become less transparent when there are bizarre control schemes to activate the action, such as arbitrary button combinations or keypress sequences, or if there is a complex menu system where it’s hard to know what all the actions are, or where the options change depending on the circumstance.

Physical action directed at NPCs likewise can be transparent: click this button to shoot the NPC, click this button to punch the NPC. NPCs tend to react in obvious ways: fall down and die if fatally struck, lose health points if injured.

Dialog with NPCs, typically via mulitple-choice lists that lead to more multiple-choice lists in an overall branching-tree structure, as described earlier, can actually be somewhat transparent because of their simplicity. The branching structure of the conversation is often kept simple and easy to decipher, enhancing transparency. I should have mentioned this point earlier when discussing the ostensible pros of multiple-choice dialog conversations.

Now, in my post about what non-gamers would want from games (implying what we intend our interactive drama and comedy games to deliver), I suggested that they would want to gain experience about people’s lives, culture, and especially human behavior and psychology. For these games, we want to build humanistic NPCs, capable of conversations richer and deeper than what branching-tree structures can offer. I made a case for natural language interfaces for these conversations.

In short, we want to make games about people.

The thing is, people are messy. They’re complicated, mysterious, nuanced, moody, fickle, often surprising and unpredictable when under pressure. They change their minds, they sometimes act illogically and irrationally.

So how are we supposed to make a transparent user interface to humanistic NPCs?

As I hinted, this is a big problem for building interactive drama, because ideally we do want transparent interfaces for games. Ideally we want it to be clear what the player’s moves are, and how those actions will be interpreted and used by the game. Breslin commented in the NLU discussion, “I hold that the primary enjoyment of AI in games is learning the AI mechanism and how to mess with it.”

In an ideal world, we would have a game system with a natural language interface that, under the hood, flawlessly understood the meaning of anything the player typed/spoke. Yet, if the NPCs are to act like fascinating people, in order to serve the performance of interesting drama, at best they’re going to be unpredictable, surprising, at times confounding, even frustrating in response. Compelling characters are not transparent. You can’t control them, and that’s the point. That’s why they’re interesting to interact with.

As an example, the same words spoken by the player at different times can lead to drastically different results. Saying “I like your apartment” upon greeting NPCs is a friendly thing to say, but saying “I like your apartment” later when the NPCs are at each other’s throats and forcing you to take sides can be destructive to your friendship with them.

Testing / QA departments at game companies should be scared shitless of interactive drama.

I should note, this inherent, interesting messiness in communication between people is no excuse for unnecessarily confusing interactions with NPCs, as happens sometimes with Grace and Trip in Façade, and often in interactions with chatterbots. As described in the NLU post, misinterpretations, and/or the lack of the ability to respond properly, abound. At the end of the day, Façade was a drama about miscommunication and its consequences — but too many of the moments of miscommunication experienced by players were unintentional and undesired by us developers. Just because human communication is messy, is no excuse to allow interfaces to NPCs to become overly obtuse. As described, we’re working on improving that for The Party.

Also, characters can be both consistent and unpredictable. With humanistic NPCs, Breslin may still be able to have some of the pleasure of learning how they tend to behave, although he probably won’t be able to “game the system” like he’s used to. People aren’t machines that can be fiddled with once you understand their mechanism. In fact we should build our NPCs to get annoyed if you try to break them or crack them!

Another approach, the kind Will Wright might take, would be to fully expose the inner workings of the NPC’s mind — show the sliders for each emotion and their attitudes towards you and each other. Currently such displays actually serve as the primary means of expression for the NPCs, because their dramatic performance — their acting — is mediocre and hard to read. I argue that “expressing” emotion in this way takes much of the pleasure out of the drama, significantly detracting from that humanistic, naturalistic experience that non-gamers, like me, would need from games.

In sum, I fear we’ll have to sacrifice transparency in interactive drama, and settle for a grey box system, the shade of the ghost in the machine.

Again, I’d suggest non-gamers will forgive this flaw in the interface.

11 Responses to “Transparency in the Behavior of and Interface to NPCs”


  1. josh g. Says:

    Testing / QA departments at game companies should be scared shitless of interactive drama.

    That line really should be framed and put up on a wall somewhere; maybe underneath one of those “inspirational” posters, with a picture of Grace and Trip yelling at each other.

    Of course, for QA you could have debugging functionality that displays more of the internal workings of the characters. Then you can test the game on both levels: test with debugging on to verify how input is being parsed and understood, and then test with debugging off to see if the characters are expressing their beliefs as designed.

  2. andrew Says:

    This post reminds of the time Michael Joyce, at the first Digital Arts and Culture conference in 1997, after seeing my talk on Babyz and Petz, was worried interactive stories with naturalistic NPCs were “creeping towards positivism“. At the time, not knowing what positivism was, I wasn’t sure if it was a compliment or not. ;-)

    Actually I’m still not 100% sure I get what he meant, but I think it is related to the lack of transparency discussed here.

  3. ErikC Says:

    Actually I think being a QA for interactive drama would be a great job!

    “As an example, the same words spoken by the player at different times can lead to drastically different results. Saying “I like your apartment” upon greeting NPCs is a friendly thing to say, but saying “I like your apartment” later when the NPCs are at each other’s throats and forcing you to take sides can be destructive to your friendship with them.”

    Very apt. Thanks for the very interesting article.
    I’d suggest rather than make the NPCs like people, as a first (easier) step we could invert the question of believability, and make the players attempt to pose as NPCs to NPCs or to other players, say an Imposter game, that takes the onus off NPCs to be human-like..

    Positivism, it sounds like he means more naturalistic realism than the strict philosophical definition.
    I think it was in Stoppard’s play ‘Jumpers’ where the main character (a philosopher) said if the world followed logical positivism, it would be a giant field of soya beans…

  4. Nicolas H. Says:

    It seems to me that this black/grey box approach is indeed what players want, because it’s how we deal with other people in real life.

    There is a difference in how we treat physical interactions (like jumping and shooting) compared to psychological interactions (some might want to draw the line between how we treat dead and living things). We can’t read minds. We can’t be in other people’s heads. In fact, we can never leave our own (Yes, I am drifting towards another scientific buzzword here: Constructivism, but I do think it’s somehow appropriate for interactive games – more than Positivism anyway).

    Instead, we have to build mental models of our opponents and we expect them to do the same. That is one of the main reasons why Interactive Games with complex characters will feel more real.
    I know many Non-Gamers (especially women) who think that this is the fun in human interaction: Guessing what other people are up to, how they “tick” inside. And it’s normal to fail with that once in a while. It translates well to the notion that people playing games want to find out how the artificial world works.
    An interactive game with a white box system would take the fun out of this, I think.

  5. Gilbert Bernstein Says:

    I had been thinking about ways to possibly be more clear about this notion of semi-transparency (translucency!) since the last post–actually, that has a really good ring to it… We don’t want transparent interfaces, just translucent ones. Anyways, …

    Maybe it’s worthwhile to try to achieve a lot of transparency in the phase 1 parsing, which I’m reading (possibly incorrectly) as primarily syntactical, relatively context-free, (in the “we’re having an argument” context sense) parsing.

    Another possible translucency goal short of full transparency, is to try to make the boundaries of intelligible input clearer. It could be something like putting big nasty red marks on words that aren’t in the system’s vocabulary, or providing other hints that your message isn’t even representable in the intermediate semantics of the system.

    You could also look at the issue from a perspective after finishing an NLU system for a game. You know that there is going to be some sort of shortcoming of the system that can’t be corrected inside of it. Sticking in meta-communication from the game back to the player to ease the bumpiest and most unrealistic parts of a given NLU system might be a worthwhile concession to make. Since they help you selectively make the interface more transparent you could call them windex wipes, or just windices. (groan)

    Ok, I probably should just get some sleep before I make any more bad name jokes.

  6. breslin Says:

    My previous comment, that my joy in AI comes from gaming it, was aimed at suggesting that the implementation details of the mechanism are highly relevant to the enjoyableness of the agent.

    In short, I think it’s wrong to conceal the mechanism entirely, to try to make the mechanism too smart to be gamed, and so on. Artificiality is inevitable, there’s always going to be cracks in the façade, but the most compelling reason against gameproofing the mechanism is not the impossibility of the task.

    Artificiality is not a weakness to be minimized, but a strength, a necessity — indeed it’s what makes the whole project worthwhile and enjoyable. People won’t play “the party” because it’s fun to go to parties, but because (let us hope, anyway) it’s fun to go to artificial parties.

    The question, of course, is why. Why is it fun to go to artificial parties?

    Let me try to give my own answer this question, which of course will be only partial, and in so doing perhaps clarify my position on the joys of believable-agent AI, especially vis-a-vis “gaming the system.”

    First of all, a necessary correction: I don’t think the black box is in the input mechanism (as Andrew sort-of offhandedly suggested). True, all those Playstation buttons can be confusing, and I can see one might like to conceive of an NL interface as a controller with a few hundred buttons, but in either case I think we’re dealing with a separate issue.

    Rather, I see the black box in the space between cause and effect. Sometimes there’s transparency: I push the door and it opens. Sometimes there’s opacity: I pressed the button… hmm, did anything happen?

    If opacity is to work to the benefit (rather than the detriment) of the experience, it has to be resolvable — you have to be able to learn (through a combination of experimentation, observation, replaying) what in fact is going on when you press the button. Of particular significance: the scenario, the player’s act, and its effect all have to be reproducible.

    Although he didn’t thematize its necessity, Andrew already hit on the first reason for this, in writing that that we “can have the pleasure of learning how [the NPCs] tend to behave,” that is, of how the mechanism tends to work.

    The reason this is crucial is that otherwise you don’t get agency. Sure, you might be able to get the appearance or perception of agency, but you don’t get true agency unless the mechanism behaves according to some logic that is more-or-less intuitive or learnable in one traversal. The various interactions have to behave in roughly the same way, or the whole gameplay will seem arbitrary and capricious.

    Thus I would think that an episodic (multi-NPC) game would be better, because there’s already a form of replay built in. Without some form of replay, the players won’t get a good enough sense of the dynamics of their actions, how actively they participate in the causality and determination of the game.

    If agency is important, it’s because it plays a crucial role in the aesthetic experience. If the player gets a sense that their actions are effecting the behavior of the NPCs in a nontrivial way, a sort-of freak value to the experience immediately accrues. I have heard Andrew carefully saying that there’s no need to pass the Turing test generally, but only within a small context. But I think that misses the point — there’s no need to pass the Turing test at all, and in fact it’s important to fail the test or the whole magic of the experience is lost.

    What you need to do more precisely is pass the Turing test for brief moments in time, to make that fleeting emotional connection, but then pull the curtain back and show for all to see that it was a trick. — And perhaps even show how it was done.

    The second reason is to give value to replay, which is the main aesthetic justification beyond the freak value of artificiality. The reason artificial parties are fun is because you can do what you’ve always wanted to do with real parties: you can replay them and do better this time! In other words, you can learn how to masterfully navigate the (initially opaque/undisclosed) lines of possibility.

    If the game has replay value, it’s because it allows for the possibility of you getting good at the game, and I mean get super-humanly good at the game, like by the end of the movie Bill Murray has almost entirely gamed Groundhog Day, or like Neo can do all kinds of nifty gymnastics because he’s gamed the Matrix.

    It’s not necessary that the re-player fantastically game the system, but replayability implies super-knowledge of the game’s possibility, and that super-knowledge is, at that point, a principle ingredient in the aesthetic experience. As soon as you’re making a decision because you know what surprise lurks around the other corner, you’re gaming the system, and a major part of what you’re enjoying is the superhuman mastery of and familiarity with lines which in life are opaque.

    One way to defeat this — if that were desirable and I think it is not — would be randomly generated behavior. But that will probably have to wait until we have a great NL-generation program. Until then, I agree that the single biggest problem in this field is the production of a sufficient amount of content.

  7. DocMara Says:

    “If the game has replay value, it’s because it allows for the possibility of you getting good at the game, and I mean get super-humanly good at the game, like by the end of the movie Bill Murray has almost entirely gamed Groundhog Day, or like Neo can do all kinds of nifty gymnastics because he’s gamed the Matrix.”

    Strange choice of examples here. Certainly, one group of people got vicarious pleasure from Keanu’s gaming of the Matrix, but it was a reclaiming of a mass hallucination from a machine that made it satisfying. Keanu wasn’t mastering the Matrix because it was fun. He was fighting a war. The Groundhog Day example is even more problematic on two levels. First of all, the “I can control the world if I just understand the physics enough” fantasy ultimately proves hollow. Bill Murray’s initial pleasure at the notion that he can replay his world to greater and greater effect eventually ends up becoming suicidal nightmare. The ultimate realization of the boredom of the “superhuman” comes when his advances on Andie McDowell not only disappear, but regress. Interestingly, the movie benefits from the resistence to the “gaming” you point out. That is primarily the difference between drama and melodrama. Melodrama sells, but it gets boring and only engages part of the population for any length of time.

    We had an EA Sports programmer here on Friday describing how they are trying to crack the nut of more “realistic” NPC interactivity in sports games. Long story short: they aren’t. Instead, the paradigm remains of a fully-tested state-machine based game. They know this is going to have to change–they just don’t know how to do so. In the mean time, the “insufficient amount of content” calls for brute forcing of pre-packaged adventure into consoles and computers that can handle more complex ways of designing and executing games. That approach will have to change, as more autonomous NPCs replace state-based control fantasy games. Drama isn’t control. It’s much more interesting than that.

  8. Gilbert Bernstein Says:

    This is kind of a quick thought. I don’t know if the thread is dead at this point, but in case anyone’s still following it…

    A common theme which seems to surface in arguments against transparency is a belief that transparency will demystify or mechanize the NPCs; that the NPCs must be partially mysterious, not machine-like, in order for them to approximate people:

    “Drama isn’t control. It’s much more interesting than that.” — Doc Mara, above

    “Compelling characters are not transparent. You can’t control them, and that’s the point. That’s why they’re interesting to interact with.” — Andrew, above

    “People aren’t machines that can be fiddled with under you understand the mechanism. In fact we should build our NPCs to get annoyed if you try to break them or crack them!” — Andrew, above

    I don’t think anyone would argue against any of these statements, but it’s worth noting that the subjects are either Drama, compelling characters, or people, not their analogues in a video game/interactive fiction. The NPCs actually are machines, and you are controlling them. Furthermore, controlling things, that is making choices that affect the game state and express agency is a huge part of what a game is.

    Not to say that we shouldn’t try to make NPCs imitate people. Just, it’s worth expecting players to view the NPCs with varying shades of grey between machine and person, possibly even laterally from there if you consider fictional characters to be something else.

    Possible Questions: How humanly do we expect players to view the NPCs? Why don’t we expect players to view the NPCs in a different way?

    It seems like getting player feedback was a really good way to address these questions. Probably better than this whole discussion everyone’s been having.

    So, hopefully that wasn’t too much of beating a dead horse.

  9. Kenneth Stein Says:

    Andrew, you write “…we want to make games about people.”
    Best of Luck :)

  10. Grand Text Auto » Transparency, or Not? It Remains Unclear Says:

    […] is a perfect opportunity for me to revive a discussion from about a year ago, “Transparency in the Behavior of and Interface to NPCs“. A very good discussion was just getting underway at the time, that due to time constraints […]

  11. The aesthetics of IF languages « Emily Short’s Interactive Fiction Says:

    […] But perhaps there is an aesthetic angle from which that is not a positive development. In fact, Breslin himself has said elsewhere: Artificiality is not a weakness to be minimized, but a strength, a necessity — indeed it’s what makes the whole project worthwhile and enjoyable. People won’t play “the party” because it’s fun to go to parties, but because (let us hope, anyway) it’s fun to go to artificial parties. — Grand Text Auto […]

Powered by WordPress