
Emotions and Behavior
October 21, 2009Why simulate emotions?
Language and “conscious” thought alone are not enough to portray an intelligent alien individual. Pure cognitive systems will not give rise to emotions – without them a simulated being can never seem real or believable. Emotions effect the behavior of many living beings, such as humans and animals (and in this case aliens) and differentiate them from purely mechanical or computer controlled devices. In other words, a simulated being without emotions will seem artificial at best. However it should be obvious that having a huge list of emotional labels and transition states between them would be a daunting – perhaps even impractical task. A system is needed that can not only describe the current emotional state but also describe the personality and moods of an entity. It must be possible for the environment, situations, events and actions to modify the current emotional state – even mood. It must also be possible to transition between emotional states in a sensible and believable manner and finally for the personality of an entity to change slowly over time. For example, a child is naturally curious – easily aroused, easily stimulated and sometimes fearless. As they grow older that curiosity often becomes muted, for some replaced by fear and anxiety.
Modeling Emotion
There are a variety of ways that humans have come up with to categorize personality, using some sort of testing and finally a ranking in various categories. Probably the most famous one, is The Big Five – Openness, Conscientiousness, Extraversion, Agreeableness and Neuroticism. The Revised NEO Personality Inventory then sub-divides each broad category into 6 sub-categories. For example, for Openness, it is Fantasy, Aesthetics, Feelings, Actions, Ideas, Values. As you can see this leads to 30 different categories. How do we track an emotional state with these systems? How do we deal with the fact that these categories often have large amounts of overlap – i.e. they are not orthogonal? Can we break this down into something simpler, which still being able to reconstruct these features? It turns out that we can indeed.
P.A.D.
The PAD emotion model represents the space of emotions as a set of three (approximately) orthogonal axes: Pleasure/Displeasure (P), Arousal/Non-arousal (A) and Dominance/Submissiveness (D). Note that each axis ranges from positive to negative values, which will be normalized between -1 and +1 for my purposes. So pure pleasure would be +1 P, where pure displeasure would be -1 P. So a given emotional state can be given as a three dimensional value within this space. Some examples:
Anger = -0.51*P + 0.59*A + 0.25*D = (-0.51, 0.59, 0.25)
Fear = -0.64*P + 0.60*A - 0.43*D = (-0.64, 0.60, -0.43)
In order to “label” your current emotional state, you’d find the closest matching point. Obviously the actual emotional state is not a discrete label, but a seamless range of values – meaning it’s possible to be “sort of happy” or “a little” sad but “very” angry. What’s more we have implicit transitions. We can start at a given emotional state and have things effect that state in a believable way.
There are a variety of things that can effect a being’s current emotional state:
- Situational Effects (someone steals your favorite hat, you eat a hot meal, etc.)
- Personality or Temperament and Mood.
- Biological effects (are you sick, do you have a headache)
- Drug intake
- Emotional changes due to an entity’s own behavior. (Feeling shame for stealing)
Personality or Temperament
We can use the same emotional space to model an individual’s personality. This personality would define their average emotional state over a variety of conditions – basically their emotional equilibrium. In between personality (or temperament), which changes slowly – more slowly as you get older it seems – and an entity’s moment to moment emotional state are moods. The types of moods that will be experienced are affected by both the personality and exterior events. For example if a disaster occurs (house is destroyed in a fire, friend becomes deathly ill, etc.) then the entity may become depressed. This doesn’t necessarily permanently change their personality, they can snap out of it with time but does change their emotional equilibrium for a long period. Shorter moods may also occur, such as being in a bad mood because of a hard day at work and being in an especially good mood because of a raise. The Personality or Mood will have a large impact on current emotional state of an entity as well as affecting how quickly that state can change. For example, if an entity is depressed it is difficult to feel happy – and even when it does happen it is short lived. Emotional states will tend to decay toward equilibrium, as defined by the mood and personality, so the more extreme the personality or mood the quicker emotions tend to decay from the opposite end of the spectrum.
The Effect of Emotion on Behavior
As I’ve stated above behavior effects emotion and emotion effect behavior. The emotional state of an entity will affect its speech, from the tone of voice to what they say. Emotion effects and sometimes even hinders thought and can cause the entity to be reactionary. For example, if an alien sees something that really scares them they may run away without thinking. Or if something is very funny, they may laugh out loud without meaning to. The difficulty of overriding an instinctive, emotional behavior would depend on the intensity of that emotion. For example, a solider may run from their post. They know that they should stay and fight, they may even want to stay and fight but the fear is too overwhelming. Alien’s will have some measure of willpower that will indicate their ability to control their emotions. Emotions will also have more subtle effects on behavior, helping to govern how they feel about an individual, thus how friendly they are – how trusting they are. They will affect how well an entity does a task or how quickly they run an errand. They will affect the relationships between aliens, animals and the player.
Groups
Obviously rigorous modeling of emotion for all entities in the world all the time is impractical. Thus groups will also have an emotional state, essentially what can be described as the “median” state. For example, a group that is constantly under attack may generally feel afraid and anxious. This will allow for group dynamics at a macro level as well as individual dynamics at an individual level. While a group may have a general emotional state, the state of an individual would vary depending on personality and personal events. A group may dislike a player but an individual of that group, who has nothing but good experiences for example, may love the player. At all times every entity should feel like a unique individual, yet allow groups to interact in a meaningful way.
Later I’ll discuss the emotional modeling in more detail as well as fleshing out the Cognitive/Emotional/Behavior links.
Thanks for reading, any comments are welcome.
Interesting ideas.
Considering this post and the language mentioned in the previous one, are you going to be including inflection and emphasis when communicating with aliens? It strikes me that codified language (words, glyphs, symbols) is only a narrow band form of communication, whereas there is a lot of information in body language and voice during speech. The same sentence, “You don’t want to do that, do you?” for example, can sound intimidating, patronising, guilt-inducing, or goading. Other inflections and emphases can also apply, and these can all serve to affect the emotions of the other party.
Granted, the language is alien, but might these effects also be included in this project?
Body language and vocal changes will be implemented based on the intent and emotional state of the aliens. Without these elements the aliens would appear artificial at best, which is something I’m trying to avoid.
Thanks for the comment.
If I were you, I’d look at the old Creatures games. There’s a free version called Creatures: Docking Station (get it here: http://www.gamewaredevelopment.co.uk/ds/ds_index.php)
It would be worth a good look, it’s not at all like your game, but it’s definitely a prime example on AI done right. And since the game is so damned old, I’m sure more advanced AI is easily possible. Sadly though, it hasn’t been done.
You project feels ambitious, but S.T.A.L.K.E.R. was also ambitious and it carried many similarities. Don’t stop, you have a masterpiece on your hands, I’d recommend selling it if it ever reaches a polished state.