e motion i n g ames steve foster. e motions w ithin h uman e volution as a product of evolution,...
TRANSCRIPT
EMOTION IN GAMES
Steve Foster
EMOTIONS WITHIN HUMAN EVOLUTION
As a product of evolution, emotions have a particular purpose: They have helped humans become the most successful species on earth
Emotions bypass the need for deliberative thought by providing biases toward the behaviours with better chances of survival
Other kinds of mammals also exhibit emotional capabilities with very similar reactions to humans
EMOTIONS IN HUMANS
Psycho evolutionary scientist Robert Plutchik believes that there are eight primary emotions, associated in complementary pairs Anticipation and surprise Joy and sorrow Acceptance and disgust Fear and anger
His theory states that it's not possible for humans to experience two complementary emotions at the same time; they balance out to provide diversity in the behaviours
EMOTIONS IN HUMANS
In psycho evolutionary terms, each emotion serves its purpose by triggering a reactive behaviour that's appropriate for survival
For example: Fear stimulates the body to release hormones,
awaiting flight (or fight) for survival Surprise awakens the senses and forces the
brain to pay more attention to perceptions Disgust leads humans to reject the object in
question Anger causes humans to destroy obstacles that
prevent them from achieving their goal Sadness encourages humans to seek comfort
BIOLOGICAL MODELS FOR EMOTION Researchers in various fields related to AI attempt
to reproduce different aspects of biological creatures to simulate adaptive behaviours
An emotional component is often hard-coded. With this approach, the designer can impose biologically accurate emotions (for instance, fear, pain, and pleasure) and test their role in the learning. Complementary emotions can be considered as extreme values of a single variable, used to drive the learning toward positive emotions
An adaptive component provides the ability to learn behaviours dynamically during the simulation. Techniques such as neural networks allow the creature to adapt to its emotional status and behave in a better fashion
HUMAN / MACHINE INTERACTION Emotions are certainly a defining characteristic
of all mammals, and particularly humans
They play a crucial role in the interaction between people. By designing our AI to exhibit more human emotions and characteristics we can improve the player’s interaction with our game
The portrayal of emotions in synthetic creatures requires more than just AI. The fields of modelling, animation, linguistics, and speech synthesis are key aspects of the development
HUMAN / MACHINE INTERACTION Humans communicate emotions in a wide variety of
ways. We can attempt to convey artificial emotions in the following forms: Expressions — Static facial expressions carry a tremendous
amount of information about emotions (for instance, smile or frown). In fact, by analysing facial expressions we can distinguish between primary emotions
Gestures — Body language and gestures are also strong indications of emotions. For example, slouching is a sign of depression, and nodding shows acceptance
Behaviours — Over longer periods of time, behaviours are stronger manifestations of emotional state. For example, ignoring someone is a sign of rejection, taking care of people shows affection
Language — The choice of words is an extremely strong indication of mood during a conversation (for instance, familiar or formal). Rhythm in sentences also conveys emotion; shorter sentences are more authoritative and sound angrier
Voice— The tone of the voice the sentence is pronounced with also reflects mood. Loud voices indicate anger, faster speech often implies anxiety
EMOTIONS IN GAMES Failing to accomplishing a task can almost be considered
as a bug in the game AI (for instance, running into a wall). Reactive behaviours can solve such problems without the need for solutions inspired by emotions
On the other hand, when an agent is fully functional, the problem is increasing the levels of realism
Emotions can help tremendously with this by enhancing the quality of the behaviours with a biologically plausible approach. There's particular interest in the following features that emotions will bring to games:
Attachment — Individual characters that can display moods are more believable, and human players become emotionally attached to them. Such bonds can be strong enough to change the course of the game
Storylines — By providing non-player characters with emotions, their interaction with humans is greatly improved. The essence of story lines happens between players, so emotions can greatly enhance the entertainment
Immersiveness — With emotions, all non-player character behaviours would seem more realistic and generally increase the immersiveness of the game environment
EMOTIONS
Emotions arise from complex interactions between the body and the brain. Emotions begin in the body, influenced by stimuli from the environment (such as an explosion)
The brain generally responds to these low-level perceptions, which translate into persistent characteristics of the creature (as fear)
These emotions can potentially become visible externally via behaviours (running away)
SENSATIONS All emotions in embodied creatures are initiated by
sensations
A sensation is an immediate reaction to a creature's current status
By definition, sensations are experienced practically instantaneously, based on changes in the current situation
Two factors may cause sensations: current perceptions (stimuli from the environment) cognitive activity (thinking)
Surprise, Anticipation, Disgust, Attraction, Confusion, Discovery, Pain, Pleasure
PERCEPTUAL SENSATIONS
Typically, a sensation is triggered by perceptions. The body detects stimuli from the environment, and the information causes an immediate reaction in the brain Health and armour lost Blood splat Sparks/explosion Object disappears Arriving lift Door opening Enemy presence Desirable object
COGNITIVE SENSATIONS Sensations may also be triggered by reactions to
the mental state (for instance, knowledge of the world or other emotions). Here, basic processing of information in the brain causes the sensation
For instance, surprise can be caused by an object not being present, when the agent thought it should be there
Sensations based on cognition and perception have common traits: Both are triggered when a pattern is matched in the brain. With perceptions, this pattern is matched instantly based on sensory information. On the other hand, some cognition is necessary before a pattern develops in the brain (by thinking), which eventually engenders a sensation instantly when a pattern is matched
EMOTIONS CONT. Sensations can be considered low level because
they are instantaneous patterns. Higher-level trends arise from cognitive activity too. These are called emotions
An emotion is a lasting characteristic of a person's state
Emotions change relatively slowly over time (compared to sensations, which are instantaneous)
For example, fear and anger are lasting emotions, so are joy and sorrow. The changes in emotions are generally triggered by the agent's sensations. An emotion could also correspond directly to a single sensation (for instance, surprise)
PORTRAYING EMOTIONS IN GAMES The following list of scenarios illustrates the
kind of emotion-driven behaviours that our agents could be capable of portraying:
Jump, wave, or dance of joy Run faster with fear, simulating adrenaline rushes Stop thinking and freeze when affected by panic Diminish accuracy of all actions when boredom
sets in (for instance, sleepiness, complacency) Turn away in disgust (for instance, blood splat), or
focus on attractive other player Insult the enemies when they get killed, or
perform a taunting gesture Run away scared when the enemy is more
powerful Select the enemy to target from personal
vengeance, based on past fight history
METHODS OF PORTRAYING EMOTION Finite State Machines
Advantages Finite-state machines are so incredibly simple. They're easy
to implement, visualize, design, debug, and work with Their theory is extremely well understood. We have formal
definitions of finite-state machines, which can be optimized and manipulated by various algorithms
Finite-state machines have been proven to work well with computer games, and are in fact one of the most popular AI techniques. This is because of the fact that they can be used for control, and almost anyone can create them
Disadvantages Designing finite-state machines can get very complex when
building large machines They are computationally limited to certain problems The design of finite-state machines is frozen at runtime The output of finite-state machines is very predictable, and
not necessarily suited to creating behaviours
DESIGNING ARTIFICIAL EMOTIONS The design phase must decide which
emotions are experienced by the agent, which sensations trigger changes in emotions, and how they are portrayed in the behaviour
To start with we can only include the most important emotions. Namely: Fear and anger Surprise and anticipation
As complementary emotions, only two of four may be observable at any point in time. Each of the emotions is defined as a binary value: either fully active or inactive.
EMOTION FSM
EMOTION FSM
Surprise Anticipation
Fear Precision 0.7Power 0.2Delay 0.0
Accuracy 0.9
Precision 0.9Power 0.4Delay 1.0
Accuracy 0.2
Anger Precision 0.0Power 1.0Delay 0.3
Accuracy 0.8
Precision 0.1Power 0.9Delay 0.8
Accuracy 0.3
EMOTION FSA
EMOTIONAL SYSTEM Memories gathered using statistics
Feelings expressed as a nondeterministic automaton
Sensations represented as fuzzy automata
Emotions are fuzzy-state machines
Mannerisms selected by nested probabilistic automata
Moods modelled with nested states
EMOTIONAL SYSTEM
REFERENCES
AI Game Development: Synthetic Creatures with Learning and Reactive Behaviors Alex J. Champandard Publisher : New Riders Publishing ISBN : 1-5927-3004-3 Part VI: Emotions