Why Do AI Have Personality?

It’s my favourite example of why I think we need more complex personality AI systems.

While game graphics have leapt to the point where they are absolutely beautiful, smoothly rendered, and almost uncannily real, AI has been left behind. Often, you still get NPCs whose only line is “There’s a dragon over there. And it has treasure.” And you say, “Well, thank you for that information.” But then you go do stuff, and many hours or days later you return, and the NPC still says only, “Dragon. Treasure.” Umm, yeah, thanks, I got that the first time. And he’ll still be saying the same thing no matter how many times you come back. If you’re lucky, if you do go kill that dragon, and then return to that NPC, he’ll say something different, like “Woo-hoo! You killed the dragon!” After which he’ll sing your praises … but then he’ll do that ad infinitum, becoming just a sort of useless speck on the landscape, just a part of the scenery you never want to approach again. Such a simple state machine sort of approach has been in use since the early days of computer RPGs, and often seem little-changed; some of the NPC conversations in, say, Final Fantasy XII are similar to those in the first Final Fantasy games.

FSM-simple-NPC

More extensive scripting can solve some of this, but it’s still very rigid, and can thus become rather unrealistic. Say you kill the dragon, but you destroy half of the NPC’s town along with it. How happy is that NPC going to be with you then? To say nothing of the various conflicting and conflicted feelings of the other NPCs in that town. Scripting has trouble dealing with that in any sort of condensed fashion. And the same responses are going to happen in the same way every time you play the game, or when two different players play the game. Scripting also has trouble with any sort of internal character growth over time.

The solution, it seemed to me, was to make the NPCs more human. And to do this, I wanted to provide them with personalities.

Some games go a bit down this same road. For instance, Xenoblade introduced an Affinity system, a one to five star rating telling you how much an NPC or a town likes a player, and this has an effect on game play. But this is not really giving an NPC a personality; it’s just a one dimensional, like-or-dislike scale. Our personality engine, on the other hand, has this … and 36+ other dimensions on which you can query NPCs’ attitudes, their tendencies toward aggressiveness, or timidity, or impulsiveness, or straightforwardness, or any of the nuances of human interactions.

Better yet, the NPC personalities evolve, depending on how players interact with them, or other NPCs interact with them, or even due to world events. And they can keep track of how individuals interact with them, and have different reactions to different people.

Why do all this? Why should we risk NPCs that run amock (although with our engine this is not a possibility unless you want it to be), that might react in a way differently than planned, that would require extra dialogue and possible changes in future actions?

For me, it’s enough that they react more like a real person. But realistic personality AI is more than just interesting: it’s also more immersive, in the same way a film with more in-depth characters is more immersive. And it adds to the fun of replaying a game, as a player’s interactions can change the course of the game (as they will in SteamSaga).

From a game company’s point of view, this ultimately adds to the profitability of the game; more immersed players leads to more word-of-mouth leads to more buyers, and definitely more repeat buyers when you release the next game using the engine.

I do realise there are potential drawbacks, such as the NPCs reacting in ways that aren’t strictly delineated; this requires more work on the programming side to both account for what the NPCs might want to say or do and to make sure they still function as good game characters (as in, they tell the player necessary information, etc.). But there’s no need to fear that the NPCs will revolt and become an angry mob, marching through the game killing player characters and searching for those who created them (I suppose this is the programmers’ counterpart to the fears of the general public that AI [e.g., Skynet] will rise up and destroy us); it’s relatively easy to create a sort of “Three Laws of AI” to keep games running smoothly, while still giving the NPCs a chance to flourish.

And flourish they should.

This entry was posted in Artificial Intelligence, SteamSaga and tagged , , , , . Bookmark the permalink.