Psychology and Game AI

This morning I went for a walk in the park, I do this quite often when I’m thinking about something and the suns out. It’s generally pretty quiet there and it helps me to try and zone out the noise of the world.

I recently started working with a bunch of guys on a startup called Namaste, which is focussing on the more fictional/social end of game AI and entertainment. One of the aspects of the product, is that we want players to understand the game worlds characters. This means that we have to focus a lot more on the behavioural realism of the character rather than the graphical realism. We are not trying to create “realistic” characters so much as believable. In the same way that bugs bunny isn’t “realistic” but he is still highly believable.

A big part of that believability comes from fairly subtle cue’s and its that I was experimenting with this morning.

After a few minutes walk (its a big park), I decided to try a simple little experiment for myself. I tried to predict all of the people who would respond to my greeting of “good morning” as I passed them by. The purpose being to see if I could intuitively understand and predict what their behaviour would be prior to eliciting communication.

I suggest you try this out for yourself, its a pretty easy experiment to undertake. Before I tell you the results, I will make it clear that there are a few things I can think of that will skew the results:

So what were the test results?

It turns out I’m about 95% accurate at predicting when people will respond. How can I be this accurate? What were the predictors to interaction? Let me summarize them here:

What were the predictors of non responses?

The point of this was just to while away a little bit of time while walking, but its got a serious element to it as well. Can you ever remember the time in a game, where you could predict the response of a character by such subtle issues? In games, we tend to colour characters in very obvious colours to denote their meaning. So a monster has to look like a monster, rather than actually looking like a very nice character but behaving monstrously (i.e. an attractive murderess). I simply cant remember a game where I could have reasonably predicted the outcome of a social interaction before attempting it, without the character having some obvious affiliation denoted by clothing or due to where it was in the game world.

Game designers will probably tell you that one of the most important things you need to do as a designer is make everything explicit and clear to the player. We use uniforms as a means to denote the function of a particular NPC far more often than we use behavioural character traits. I think its about time we challenged some of these notions, at least to be clear in our own minds where the obvious disjunctions are. How far can we push behavioural believability over simple expression of function? Of course there isn’t an easy answer there. I’m going to be spending a great deal of my time working on such problems, as we push forward with work on animation, characters, expression and emotion in our products.

Why have I brought up this simple experiment? Well, I wanted to put forward the radical notion that the really interesting meat of game AI has nothing to do with what particular flavour of logic structure you use and has far more to do with simple psychology. In fact, I’m proposing that if you are in the field of game AI and haven’t started studying psychology (even at a rudimentary level) then you aren’t doing game AI at all. You’re doing logic programming, which has very little to do with games and has far more to do with linguistics. If you think that state machines, or behaviour trees, or HTN planners are the point of game AI, then I suggest you need to rethink. Ultimately, the goal of most game AI is the creation of either characters for interaction, or systems that support gameplay. Either of those goals I would suggest, are behavioural rather than logical. You want the AI to support a specific set of mechanics, but the goal is the experience of those mechanics from the viewpoint of the player. Similar with characters, we arent necassarily bothered about creating a character so much as the experience the player has when interacting with the character.

In order to understand this experience, you have to at least start taking an interest in how the psychology of the player works and what allows them to understand and interact with your work. Ideally you would also think further and consider the notion that the player already has certain psychological strategies for understanding their world and that if you can tap into those strategies you can provide information in a manner that feels natural and “easy” to understand. Certainly game AI design to me is all about psychology.

If you are interested in getting started on learning more about psychology, I can heartily recommend the book “Understanding Emotions” by Oatley et al which is a good place to start, but trust me once you start down that rabbit hole there really isn’t any stopping.

Anyway, enough of the soapboxing. I’m still thinking about the 12 principles of animation and how they crossover (or not) to games. Will post that another day.