In real life, everything people do is for a reason, even if they are not consciously aware of it: motivation is the source of behaviour. If we can give NPCs a reasonable set of motivations, they can act in consistent ways that are more flexible than scripts and more believable than random activity.
So ... why does anybody do anything, ever? To answer this we will turn to a deeper question: what does it mean to be human?
We’ll return to human nature in the next blog entry. First, though, a look at basic motivations.
People’s fundamental desire is for positive (beneficial, desirable) outcomes to happen, and for negative (detrimental, undesirable) outcomes not to happen. Positive things include feeling happy, achieving goals and overcoming obstacles. Negatives include physical pain, unfair treatment and a guilty conscience.
Human beings are influenced by all kinds of emotions, desires and beliefs, and so can have goals that don’t always lead to positive outcomes. Pride, shame, fear, jealousy, naivety or presumption can easily keep someone from seeing what would be in their true best interests. (This makes for a better narrative though; if everyone in a game was reasonable all the time, there would be no conflict). So we could say that people’s motivation is to do what they believe at some level will lead to a positive outcome or avoid a negative one.
More powerful motivations override weaker ones. Death is a very negative outcome, making self-preservation a major motivation – although the risk of death can be overridden by an even stronger motivation, such as the desire to protect a loved one.
Motivations are related to the idea of felt needs, as shown in Maslow’s hierarchy of needs (originally described in A Theory of Human Motivation, 1943). The theory is that lower level needs must be satisfied before higher ones:
- Physiological needs: air, food, water, shelter, sleep.
- Safety needs: security, health.
- Social needs: love, acceptance, belonging, intimacy.
- Esteem: achievement, respect.
- Self-actualisation: creativity, altruism, spirituality.
Maslow’s hierarchy has been used in The Sims, as described in Needs Based AI (pdf). “Your Sim won’t enjoy a movie if she’s hungry. Aesthetic appreciation of a movie is a higher-order pleasure – and she can’t do it if her stomach is growling” (source).
This list of motivations is still very general, however. The aim here is to go much deeper: to be able to take a scene from a book or a movie and answer the question, “Why did the characters say or do that?”, to the level that something like it could be reproduced in a game world generatively rather than using a script.
As an exercise, pick a moment in a story when a character says or does something dramatic, and analyse their motivation for doing that. What would a computer model look like that could produce a similar response from an NPC?