SS04 02 011
SS04 02 011
David J. Hernández and Oscar Déniz and Javier Lorenzo and Mario Hernández
Institute for Intelligent Systems and Numerical Applications in Engineering
Universidad de Las Palmas de Gran Canaria
Edificio Central del Parque Cientı́fico-Tecnológico
Campus Universitario de Tafira, 35017, Las Palmas, Spain
[email protected]
{odeniz, jlorenzo, mhernandez}@dis.ulpgc.es
Tertiary
Secondary Current
E Perceptual Plan
Processes Primary
n
v
i Desires
r S1 1st 2nd 3er
o 0
S2 Decision
l l l
n Sn 1 Making
e e e
m Process
v v v 2
e e e e
n l l l 3
t
Beliefs Priority
level
facial expression. contrast, emotions are the result of other processes which
Figure 3 shows a structural view of the architecture with make such evaluation. These other processes perform the
all the components which will be detailed in the following affective appraisal and cognitive evaluation of input stim-
sections. uli (Castelfranchi 2000). Affective appraisal is a fast and
often unconscious evaluation of the input stimuli, usually
Emotional system implemented by reactive mechanisms trained to act quickly
The emotional system keeps track of the agent’s affective in certain situations. In contrast, cognitive evaluation is a
state. In BDIE the Damasio’s (Damasio 1994) and Slo- more elaborated evaluation of the stimuli and is usually per-
man’s (Sloman 2000) views have been combined. There are formed by high level processes.
three types of emotions: These concepts are mapped in BDIE introducing evalua-
tors. There are first level evaluators, those which perform
• Primary emotions. The primary emotions are related with
the affective appraisal, and second level evaluators, those
fundamental life tasks so that the individual can survive.
that perform the cognitive appraisal. They are associated re-
They are fast and prewired mechanisms that are activated
spectively with primary and secondary emotions. First level
whenever a very specific situation occurs. The primary
evaluators look for first level beliefs (see below) and detect
emotions take control over the normal decision making
special situations that fire a primary emotion. Usually, they
process in order to rapidly execute a behavior that guar-
are simple processes such as threshold exceeding tests. On
antees the agent survival. Examples of primary emotions
the other hand, second level evaluators are more complex
are fear and surprise.
processes that look for several first level beliefs and com-
• Secondary emotions. This emotions are related with high bines them into a second level one. They may probably use
level cognitive processes that interpret the perceptual in- information from other systems such as desires or long term
formation and modify the affective state according to that memory.
information. They are associated with other functions As these processes are in charge of stimuli evaluation,
of emotions such as interaction and communication with emotions are just the output of them. This conceptually
other individuals. Typical examples of this category are fits in both, the psychological and the software engineering
happiness, sadness and anger. fields (allowing a clearer design and implementation).
• Tertiary emotions. Currently not implemented, they are
The Emotional Space Classically, there have been two
included for completeness in the design. They are related
representations for emotions in artificial agents:
to reflective data and may include emotions as shame or
pride. They will be the next step of the BDIE architecture. • A set of discrete emotions where each one is represented
Although this classification exists in BDIE, emotions are separately. This representation comes mainly from the
not viewed as processes that evaluate the input stimuli. In work of Paul Ekman (Ekman 1999) where there is a basic
set of six emotions. This set is the base of a six dimen-
sional space where all the other emotions can be placed A Descriptive
as a combination of the basic ones. Examples of this Point
1998a). E2 E1
Intensity
Minimum
• A continuous two dimensional space with valence and Intensity
arousal as the axes (Breazeal 2002). In this case, the
space has only two dimensions and each affective phe- E3
nomenon has a pair of valence and arousal associated val-
ues that allows to move the current emotional state, a point
in the space, within it. The valence represents how favor- V
able or unfavorable is the stimulus to the agent while the E5
arousal means how arousing is it. Sometimes, a third axis E4
associated with the stance is added to this scheme, repre-
senting how approachable is the stimulus.
Actually, the two representations are not exclusive, that
is, they can be combined. (Breazeal 2002) is an example of
this combined representation. In it, each emotion has an as- Figure 4: The emotional space
sociated area of the space. If the current point, representing
the current emotional state, is inside one of these associated
areas, it is said that the emotion is the current one. We also
have decided to use this type of representation because it is in the space around the origin, where no emotion is de-
allows us to easily obtain emotional information from the fined. This current emotional point is located anywhere in
perceptual information. As each input stimulus has an as- the space and is moved according to the input stimuli. As
sociated pair of valence and arousal values, it can serve as said, it may suffer absolute or relative movements depend-
an input to the emotional system that moves the point in the ing on the output of the affective processes.
space representing the current emotional state according to The emotion’s parameters allow the agent designer to de-
the values of new stimuli. Primary emotions, due to its ne- fine personalities. For example, indicating a lower decay
cessity to act quickly, provide an absolute position in the rate means that an emotion that is active, will remain ac-
space so that the affective state changes immediately. Sec- tive longer than another emotion with a greater decay factor.
ondary emotions provide movements relative to the current Over the time, that means that is likely the agent will ex-
affective state. Thus, it changes gradually from one emotion periment during more time the emotion with lower decay
to another according to the input stimuli. factor. This is a way to model a mood. Also minimum and
In BDIE, the emotional space is divided in emotional sec- maximum intensities determine if the agent is more or less
tors. Each emotion delimits a sector in the space. Figure 4 sensible to certain stimuli, producing a agent which usually
shows an already divided emotional space. Each sector is experiment certain emotions.
described by:
Perceptual processes
• A descriptive point. A point in the space whose module Perceptual processes include all the processes that accept
indicates the emotion’s maximum intensity. The points input from sensors and generates first level beliefs. That
are used to compute the angles that conform each sector. includes any kind of perceptual processing, which makes
The maximum intensity is the sector outer arc’s radius. them compatible with any kind of attention filter or habit-
• A minimum intensity that indicates when the emotion is uation processes. The designer is able to implement differ-
considered to be inactive. This value is the sector inner ent sensors and add to them the functionality he/she wants.
arc’s radius. BDIE supports threaded sensors that run in their own threads
• A decay factor. It is applied to the current point when which are useful in environments as robotics. As indicated
no input stimulus has activated an emotion. In that case, below, the retrieval of sensors’ current values is the first step
the absence of activating stimuli produces that the current in the agent’s update cycle.
emotional point tends to go to the origin. The decay factor
is an amount by which the current point’s components are Beliefs
divided. As said before, beliefs represent the agent’s vision of its en-
vironment and itself. They are a set of elements like percep-
Additionally, each primary emotion has an extra config-
tual information arrived from the perceptual processes. In
uration parameter that does not participate in the emotional
BDIE there are three conceptual levels of beliefs each one
space. This parameter is the name of the desire dissatisfied
with a higher semantic level:
when the emotion is active.
When the system is loaded, the emotional space is com- • First level beliefs represent basic perceptual information,
puted given all the emotion’s descriptions. The neutral emo- basic stimuli come from perceptual processes. They
tion is considered active when the current emotional point have not gone through any post-processing algorithm that
would try to infer more information about the input. uation. For example, in a dangerous situation the high level
Each belief will contain the sensor information and, af- desires should be left away just to invest all the resources in
ter passing through the emotional module, the valence and solving such situation. That is what happens, for example,
arousal evaluation. As an example, an image and an audio if a primary emotion related to a survival task is activated.
signal coming respectively from a camera and a micro- Desire’s priority levels are dynamic, meaning that the de-
phone could be first level beliefs. The image belief could sire can move from one level to another. This allows to cover
have a high arousal value if an object is detected close to cases where the urgency of a given desire, that is, the ur-
the agent. Similarly, the audio signal could have a high gency with which the system has to try the satisfaction of it,
arousal value if the volume is too loud. changes. Thus, the agent is always focused on the most ur-
• Second level beliefs represent more elaborated beliefs. gent desires, that is, the more important ones in the current
They are the output of cognitive processes that combine situation. If a desire is important but not urgent it will be in
several first order beliefs into one or more second level a lower priority level and will receive its opportunity when
ones. Following with the previous example, an alert sec- the urgent ones are satisfied.
ond level belief could be generated from the two first level
belief image and an audio signal. The alert belief would Intentions and the Behavior System
obtain a resultant valence and arousal from a combination The intentions module contains the planning algorithm and
of the source’s two values. the current plan. As said before, the BDI architecture nicely
• Third level beliefs will be the future next step of our ar- separates the different modules of which is composed. Thus,
chitecture and will be related to tertiary emotions (Sloman the planning algorithm is completely interchangeable. In
2000). They will work in a similar fashion to second level our experiments, several algorithms such as a rule system
beliefs. There will be cognitive processes that will com- or a very simple reactive algorithm, have been used. The
bine different second level beliefs into one or more third connection of emotions with intentions through the goals
level beliefs. As tertiary emotions, they are not currently allows to keep this division. In the future, a the dynamic
implemented. reconfigurable behavior network commented before will be
introduced.
Desires
BDIE’s Update Cycle
In BDIE, desires comprise goals and homeostatic variables.
Goals are desires based in a predicate. Whenever a goal’s Finally, the BDIE architecture’s update cycle is presented.
predicate returns true, the systems considers that the goal The following steps are done in each cycle:
is satisfied. The inclusion of homeostatic variables, as an- 1. Sensors are updated getting from them the current input
other element that is able to guide the decision making algo- stimuli.
rithm, is because they are very useful in all kind of agents.
Thus, they can be found in several architectures to model 2. Input stimuli, in the form of beliefs, are introduced in the
concepts like thirst or hunger. Homeostatic variables act like first level of the belief container.
any other goal: when an homeostatic variable is in its nor- 3. First level evaluators are invoked to check for special sit-
mal range, it is considered as satisfied so it does not try to uations that may fire primary emotions.
guide the decision making process. Whenever it goes over
or under the normal range it will be considered as unsatis- 4. If a primary emotion is activated, the emotional space is
fied and will try that the decision making algorithm executes updated, its corresponding desire is unsatisfied and the ex-
a behavior that satisfy it. ecution control passes to the the planning algorithm.
In several cognitive architectures, desires have priority 5. If no primary emotion is activated then, the second level
values that classify them and guide the decision making al- evaluators are invoked. They compute new second level
gorithm to execute behaviors that will satisfy higher priority beliefs given the first level ones.
desires. In BDIE this concept is supported but raised to a
6. The emotional space is updated and the current emotion
higher level. Desires, that is, goals and homeostatic vari-
computed. In case it is a primary emotion, the point four
ables, have an importance value but, besides, they belong to
is executed.
a given priority level. As shown in Figure 3, several prior-
ity levels may exist in a given agent. The decision making 7. The control is transfered to the planning algorithm.
algorithm will try to satisfy the higher importance unsatis- 8. The next behavior is executed.
fied desire in the higher priority level. That means that if
desire A has a higher importance than desire B but B is in a
level with higher priority than A, then the decision making Experiments
algorithm will try to satisfy B first. The architecture has been implemented using the Java pro-
Whenever a desire of a given level is unsatisfied, all the gramming language. It is an object-oriented framework that
goals from the levels with lower priority are deactivated, due to the facilities given by the language is heavily based
even not allowing them to guide the decision making algo- on dynamic load and unload of modules and components.
rithm. This scheme allows the decision making process to For example, it is possible to add a new module to the archi-
be focused on the desires that really matter in the current sit- tecture without having to recompile it. The designer of an
A
Surprise
Fear
Sadness
Happiness
V
Anger
Figure 5: The Casimiro robot head