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.