AI and Character

June 17, 2011 - Games / Mouthwash

I’m starting to set up some of the basic AI programming in Mouthwash, my work-in-progress conversation system. (Some background here.) I wasn’t planning to get to that stuff so soon, but it became apparent pretty quickly that a lot of other stuff depends on the speakers having “goals.” So I’m having to deal with planning and state spaces and figuring out just what I mean by goals anyway.

This has me thinking about how you can express character through AI in games.  I’ve also been playing Persona 3 lately, which is a squad-based Japanese RPG where all your party members are AI-controlled. I’ve seen some fans theorize that the personalities of the different fighters are expressed through their default AI. They all seem to behave the same way to me, so I’m not sure I buy this. But I think it’s an interesting idea.

I found myself doing some of this with the tactics system in Dragon Age: Origins. Morrigan is selfish, so I would push any tactics that healed or buffed other party members to the bottom of her queue; conversely, I made Wynne help others before she helped herself. When characters fell in love with me, I’d make them defend me more. Zev would do this intelligently, by helping to disable or distract my opponent from a distance, while Alistair would just rush headlong to my side, because he’s an idiot. Things like that.

What I was trying to do, basically, was to get the characters to behave in battle in a way that reflected the personality I saw when I talked to them. In a Mouthwash game, you wouldn’t have this distinction: conversation is the battle.  So it’s necessary to build these kind of personality-based tactics right into the foundation of the game.  Otherwise, it’d be hard to express personality at all. Unlike other games, I won’t have the leisure of telling you about a character through a tightly controlled dialogue scene.  You have to figure out who they are by playing with them.

This means I have to think about the AI of these conversational agents a bit differently. Any intelligent computer agent needs some way of measuring how “happy” it is at a given moment, and what actions it can do to get happier. In combat, these measures are pretty easy to figure out: enemies’ health goes down, that’s good.  Allies’ health goes down, that’s bad. You decide what to do based on moving those numbers in a positive directions.

In a conversation, on the other hand, people can have lots of different goals, some of which might conflict with each other. They can also have different ways of deciding how to get to those goals.  Defining a character’s goals will tell you something about that character’s story arc. Defining their tactics will tell you who they are. Most of this I plan to simplify using character classes, but there’s a lot of room to build personality into AI style in more subtle ways. Do you take a brute-force approach to problems?  How many steps ahead do you look? Are you willing to backtrack if things aren’t working?  These are all questions an AI programmer might deal with that also sound like questions about a person’s character.

Related Posts

  • Difficulty Factors as Character TraitsDifficulty Factors as Character Traits If difficulty is one of the things a game can use to make characters interesting, it's worth asking just what difficulty communicates. For one thing, difficulty isn't just […]
  • The Next StepThe Next Step Fuckin' Shakespeare, I know. But this insipid nonsense represents an important step forward for Mouthwash, because Maryam (an NPC) is now capable of having goals: in this case, making […]
  • Dragon Age 2: The Champion of KirkwallDragon Age 2: The Champion of Kirkwall It took me a long time, but I finally finished my first playthrough of Dragon Age 2. This is the first of a couple posts I'll be writing on it. To get the overall opinion stuff out of […]

› tags: AI / dialogue / dragon age: origins / persona 3 /