The Role of Emotions, Mood, Personality and Contagion in Multi-agent System Decision Making

. Emotions have attracted much interest in the MAS community, mainly due to their signiﬁcance in creating simulations that more accurately predict crowd behaviours. Undoubtedly, infusion of agents with artiﬁcial emotions has to be supported by current psychology theories. The present work describes a formal model of artiﬁcial emotions based on the dimensionality theory, together with simulation results of an initial experimental evaluation. The model includes interesting aspects of emotions, such as emotion changes due to perception, long term aﬀects due to mood, and emotion contagion due to social interactions.


Introduction
It is widely accepted that emotions can change crowd behaviour and thus, in order to simulate the latter, one has to simulate the behaviour of each individual agent by taking into account artificial emotional states.Modelling of artificial emotions in multi-agent systems (MAS) is challenging by itself, let alone the fact that emotions are affected by a number of other features, such as mood, appraisal, personality, emotion contagion, etc.All these features convert a MAS rational behaviour to an emotional one with observed differences.
The aim of this paper is to present a complete formal model of agents infused with artificial emotions based on the dimensional theory as well as to demonstrate in practice that the model can result into different crowd behaviours.The main contribution is a new formal model for emotions that includes the interaction of emotions, perception, mood, personality and emotion contagion.This work is an extension of that reported in [12], which did not include an emotions contagion mechanism and effects of personality traits.
The rest of the paper is organised as follows: Section 2 presents a theory of emotions and its relation to moods, personality and contagion as described in Psychology.In Section 3, we discuss how artificial emotions can be formally represented in an agent.Section 4 discusses how emotions change over time.The role of emotions is demonstrated through a simulation of a well-known problem in game theory in Section 5. Related work is discussed in Section 6.Finally, Section 7 concludes the paper and suggests directions for future work.

Emotions, moods, personality traits and contagion
Although every human interaction involves emotion, psychologists have used several different definitions for emotions [3].Some focus on its components, while others on its expressive reactions or functions.For the purposes of the present work, we adopt the definition suggested by [8]: emotions are "passions-as defined as event-instigated or object-instigated states of action readiness with control precedence".These emotional states reflect an agent's readiness to take a particular decision in order to maintain or change the way they relate to the world.Some states may appear as activation states, such as staying apathetic, with the only aim to relate or not to relate.Others involve action tendencies, and are about approaching or moving away from a person, situation or event [8].
Mood is mistaken for an emotion but it is in fact different.Although both are classified as two different categories of affect, the main feature that distinguishes mood from emotion is that mood is long-lasting and not about something or someone.The cause of the mood is not always easy to identify.
Mood affects and is affected by personality traits.Traditional views of personality define it in two alternative ways: (a) internal factors explaining agents' constant behaviors, which are determined by a genetic basis, and (b) interpersonal factors that agents develop to relate to the world [9].The traditional concept of personality has now been replaced by "personality traits"-the idea that someone's character consists of several dimensions that can be better understood not as a whole, but as separate characteristics, all of which constitute what we call personality.A trait (primarily neuroticism and extraversion) can determine the way an individual will emotionally react to particular circumstances.
Emotion can be contagious.Agents tend to mimic others by watching their facial, vocal or bodily expressions and this process is influenced by a number of psychophysiological, behavioural, cognitive and emotional factors.Emotional contagion depends, among others, on perception of emotion in others [5] and how this perception leads to imitating their expression.As perception depends on personality, mood and emotion, emotional contagion can be defined as the result of the relationship between particular personality traits, the mood they can cause on a constant basis and the intensity of emotion that they can trigger, depending on the intensity of the stimulus.

Measuring Emotions
Emotion has only recently attracted the scientific interest it deserved due to absence of reliable measurement.The dimensional approach of emotions is of interest and is widely used for measuring emotion, due to its simplicity in depicting complex emotional situations as well as the economy goals attained by using it [22].Its two dimensions can capture the flow of an emotional episode in real time.The dimensional approach is based on the idea that emotion can be represented and measured by two dimensions in a circumplex [18] (Fig. 1.a): valence (or positivity), which represents how pleasurable it is for an individual to experience this state; -arousal (or activation), which represents how likely an agent is to take some action due to its particular state.
These two dimensions are the "property of affect" representing the "core affect" [19], which is the heart of every emotional experience.It can be described as "feeling good" or "feeling bad", "elevated" or "discouraged".Core affect can be either free floating or can be triggered by some stimulus and begin an emotional episode.Core affect is closely linked to emotion: feeling happy leads to perceiving objects in a congruent way and overestimating their pleasantness as more pleasant than real.The more positive the core affect is, the more pleasant the stimuli are going to be perceived and vice versa.The circumplex is intended for measuring the dominant emotions and not all emotions experienced concurrently.Despite criticism, all opinions converge to the fact that this model is practical and easy to use as well as capable of capturing every day natural emotion.It is also suitable for measuring both object-less (i.e.mood or core affect) emotions as well as object-directed (primitives or basic emotions) states.Ideas about the connection between emotion, mood and particular personality traits have reached a point of convergence, relating all three components to the dimensional approach since emotion can be influenced by mood, mood can be influenced by and can also influence personality traits and personality traits are characterised by arousal and valence.

A Formal Representation of Dimensional Theory
Emotions.Emotions define what we will call the emotional states of an agent e Q.Within the circumplex, specific emotions are characterised by areas (Fig. 1.a) with fuzzy limits.However, in a computational framework specific emotions are areas of points within the circumplex.A point can be formally defined with two equivalent representations (Fig. Moods.Moods are considered as medium term emotions and are more long lasting than emotions.Therefore, moods, denoted by M, can also be represented in the same way as emotions, either as within the circumplex, where the same domains and constraints in values apply. Personality.It is most common that the personality trait is defined with distinct values for the Big Five [4] basic factors that affect personality: P = (Openness, Consciousness, Extraversion, Agreeableness, Neurotism).For example, a female person whose personality is characterised by empathy is defined as P = (0.15, 0.01, 0.09, 0.24, 0.16) [6].In our case, the value of P will be mapped to a factor f p ∈ (0, 1] that will play an accelerating or decelerating role in the emotion update process (Section 4).
Perception.Agents receive inputs Σ from the environment.These are processed by the agent and become percepts that can trigger actions.In the presence of emotions, the inputs are transformed to emotional percepts e Σ.More precisely, an input revision function ρ σ can be defined which given an input in Σ transforms it into an emotional percept taking into account the current emotional state, the mood and the personality, that is, Emotional Contagion.Emotion contagion is the impact that emotions of others have on an agent's emotion.By considering a small neighbourhood for each agent (contagion occurs when agents are in proximity of influence distance d inf ), the total emotional effect that the other n agents within this neighbourhood have on the former may be considered as one aggregate emotional percept (v con , a con ).
We have previously reviewed and experimented with three emotional contagion models [15].In this work, we use the ASCRIBE model [10], where the emotional effect of one agent to another generally depends on the expressiveness of the former, the openness of the latter, and the distance between the two.This model fits naturally with our current work, since Openness and Expressiveness are two of the Big Five [4] basic factors.

Emotional Change
Agent behaviour is characterised by the consumption of inputs Σ that according to some state Q that the agent currently is and its internal representation of the world W (depending on the agent type, e.g.BDI, reactive, etc.), acts in a specific way in order to transform the environment with some output Γ , change its state and revise its internal representation of the world.Actions α that a rational agent does are formally defined as a function: In an emotional agent, however, the above definition of actions can be revised as: with the triple (M, P, C) determining how an emotional state e Q changes over time.This triple defines a mood M, a personality trait P , and a contagion model C. In the e α signature, ρ σ is an input to perception mapping (Section 3).A formal state-based model for emotional agents is analytically defined in [12].
The effect of change in emotions can be thought as the change of the emotion vector − → e c to an updated vector − → e c ′ = (v ′ e , a ′ e ).This is depicted as a shift of the emotions vector towards a direction influenced by mood, percepts, personality and contagion (Fig. 2).The new values v ′ e and a ′ e are determined by functions which will be explained in the following subsections.
Personality trait f p plays an important role in the emotion update process.A higher value indicates a more "perceptive" agent, thus it determines how quickly the emotion vector converges to an emotion percept or mood.
Change due to Mood.As mentioned in section 3, the current agent emotional state is affected by the agent's mood.Given the current emotion vector − → e c = (v e , a e ), the personality trait f p ∈ (0, 1] and the agent's mood − → e m = (v m , a m ), the updated emotion − → e c ′ = (v ′ e , a ′ e ) is given by the following equation: where ∆v me = v m − v e and ∆a me = a m − a e .The use of a logistic function, allows for a shift of the current emotion vector closer to the mood vector, while preserving the properties imposed by the circumplex, i.e. the magnitude of the vector being less or equal to one.In the absence of stimuli, the agent emotion vector will align with its mood vector after a number of iterations, depending on its personality trait.Since mood has a long term effect on the current emotion, this alignment has to occur after a significant number of steps, determined by a factor f 3 p (recall that f p ∈ (0, 1]).Obviously, other parameters can be employed in order to calibrate the model to specific modelling requirements.
Change due to Percepts.Emotional agents receive percepts which can be characterised as positive or negative in the sense that their emotion vector should change towards positive or negative valance, high or low arousal.Each input is associated with an emotional percept that affects the emotional state.Given an emotional percept − − → e prc = (v prc , a prc ) and the current emotion − → e c = (v e , a e ) of the agent, the updated emotion vector − → e c ′ = (v ′ e , a ′ e ) is given by: where ∆v = v prc − v e and ∆a = a prc − a e .If the specific input persists in the subsequent time points, then the emotion vector will eventually align with the corresponding emotion percept vector.Note that emotion change in this case depends on f 2 p to reflect the fact that emotion change due to percepts has a greater impact than that of mood.
Change due to Contagion.Emotional contagion is a form of perception, since agents perceive emotional stimuli that depend on the emotions of other agents in their proximity (Section 3).Thus, each agent is considered to have an influencecrowd (IC i ) that consists of all other agents in its sphere of influence, with the latter having a radius of d inf , i.e.IC i = {Agent j : d(P os i , P os j ) ≤ d inf }.
The contagion model described below is inspired by the ASCRIBE model [10], although simpler, and is adapted to the new vector representation of emotions.Contagion strength w ij determines the strength by which an agent j influences agent i, obviously when j ∈ IC i .It depends on two factors: the expressiveness of agent j, expr j , a measure of how much the agent manifests its emotions, and the channel (channel ij ) that models spatial characteristics of contagion: Channel strength models the fact that the closer agent j is to agent i the larger the impact it has on its emotions: The overall contagion strength w i of agent i by all agents in its influence is: Each emotion contagion vector coordinate is defined as as the sum of the corresponding emotion vector coordinates of the influence crowd by the agents' normalised contagion strength: The vector (v cnt , a cnt ) forms a new kind of percept, and thus should be treated in the same manner as other emotion percepts.However, its effect on the current emotion depends on the openness (opn i ) of the agent i, and not the personality trait f p : where ∆v cnt = v cnt − v e and ∆a cnt = a cnt − a e .The computation of emotion change due to contagion, concludes the mathematical realization of the emotional theory presented in section 3.

Decision making based on emotions and contagion
In order to demonstrate how emotions can affect agent actions, we consider an example scenario, the El Farol bar problem, in which agent behaviour will be governed only by its emotions.This is an extreme case, however it serves as an indicative example of the model's behaviour.It should be noted that preliminary results of the same simulation scenario were presented in [12], however a different emotional perception model was used, and those experiments did not include emotion contagion, which is one of the main contributions of this work.
The El Farol problem is a well known problem in game theory, introduced originally by Arthur [1] as an example of how inductive reasoning, i.e. reasoning based on patterns, can be applied in "ill-defined situations".The problem concerns how each individual from a population of N people will decide on visiting the famous El Farol bar on a specific night, without knowing the intentions of the rest of the population.The decision needs a prediction of the bar attendance i.e. the number of people visiting the bar on that specific night.If bar attendance is below a threshold θ (60%) then people have a good time, i.e. the decision to visit the bar pays off, otherwise the visitors would be better off staying at home.
The approach adopted here was to base the decision only on emotions.Thus, agents decide to visit the bar when they "feel like it", i.e. their valence and arousal both have positive values (v e > 0 ∧ a e > 0).The idea is that the agents must be both in a positive emotional state (valence) and be willing to take action (arousal) in order to decide to attend.The tendency that agents have to visit the bar (not modelled explicitly in the original problem) is modelled by the agents' mood: all agents are initially assigned a mood that lies well in the positive valence, high arousal area of the circumplex: The emotion stimuli that agents perceive depends on the current bar attendance att.If the latter is below the threshold θ, agents do not receive any stimuli, since in this case their tendency to visit the bar (mood factor) is confirmed.However, in the case that the bar is overcrowded, agents perceive a "negative" emotion, i.e. an emotional percept of negative valence, low arousal, whose magnitude depends on how crowded the bar is: In equation 9 the magnitude of the vector ranges between a value above 0.5, when the attendance is just above the threshold θ, to an extreme case of 1, when attendance is 100% and the threshold 0%.We have implemented the model in NetLogo [24], a well established platform for agent modelling and simulation.Agent behaviour was modelled using a formal X-Machine model, as in [12] and the implementation was based on the TXStates DSL [20] that allows easily encoding X-Machine agents.

Results and Discussion
In our experiments, attendance values are computed as the average of ten simulation runs with different initial conditions.Initial agent emotions are assigned to random vectors, thus in the initial steps of all simulations agent emotions converge to their mood, increasing steadily attendance, until the attendance threshold is reached.Agent mood is assigned initially (Eq.8) and remains constant during experiments.The population was set to 100 persons and the attendance threshold was 60%.In the simulation we adopted a three-day period (simulation week), i.e. agents get a chance to visit the bar every three days, in order to allow mood and contagion effects to take place.Personality trait is drawn from a normal distribution with a mean value of 0.5 and standard deviation of 0.1.
The first set of experiments concerns simulations that do not involve contagion.The average attendance value after convergence was 61.46 with a standard deviation of 4.52, i.e. agents did manage to coordinate bar attendance successfully under the model.In Fig. 3 the line marked "No Contagion" depicts the evolution over time of the average attendance in each simulation week.
The second set of experiments concerned agent behaviour under contagion.Agents were divided into 10 clearly separable groups and had a specific influence radius d inf .Clearly separable means that the groups had a distance between them such that no agent from a group could have another agent from a different group in its sphere of influence.Openness and expressiveness values were drawn from a normal distribution with a mean of 0.2 and a standard deviation 0.05.The average attendance value in this case was slightly greater, at 65.87 with a standard deviation of 4.95.Line "Contagion" in Fig. 3 shows the experimental results, as in the previous case.These experiments indicate that the effects of contagion increase bar average attendance and standard deviation.This is attributed to the fact that emotional states of agents tend to align to the "collective" emotion of the group, i.e. the society favours visiting the bar.This is demonstrated by the higher average line.
Probably what affects simulation results the most is the personality characteristics of the crowd.In the third set of experiments, personality trait f p is constrained around different values and openness/expressiveness are drawn from a normal distribution of 0.15 with a standard deviation of 0.05, lower than that in the previous experiments.Table 1 depicts the average attendance over 10 simulation runs for different personality traits.
It is interesting to see that as the average personality trait is increasing, the average attendance and the standard deviation increases as well.Apparently, agents converge to their mood far more quickly leading to an increased average attendance, and are more perceptible to emotion percepts, thus changing their emotional state more rapidly leading to a higher standard deviation.Another interesting observation is that in low personality trait crowds, contagion results to a smaller standard deviation (albeit a constant higher average), possibly signifying that the crowd behaves in a more "coordinated" manner.However, in all experiments agent behaviour does converge to a mean value: emotions acted as a coordination mechanism for this simple society of agents.

Related Work
There are several attempts to model emotion in artificial agents.A number of computational models, logically formalised as BDI agents, have been proposed in [11,13,16].Not surprisingly, the role of agent emotions and personality types has been extensively studied in evacuation simulation scenarios [23,25].Other works involve using emotions to reduce agent communication in decision support systems [13], faster compromises in negotiation settings [21], and modelling of social aspects of emotions and its interconnection with socials norms to improve controllability in MAS [7].Finally, emotions can be seen as a leverage to teamwork and cooperation between agents [14].Unlike any of the related approaches, we attempt to formally model the dimensional theory of emotions including aspects like mood, emotion preception and contagion and personality trait types.The El Farol problem has been widely studied in the literature.In the original work, attendees base their decision on past historical data of attendance and a set of k different strategies [1].The current strategy is selected dynamically and is the one that is most accurate at the specific time point.This inductive approach leads to a mean attendance around the threshold of 60%, with bar attendance values fluctuating around that threshold.An approach to model the problem using cognitive agents with emotions was made in [2].The work is based on the Belief Desire Theory of Emotions (BDTE) [17] in which beliefs and desires are annotated by a degree that is updated by two operations, the Belief-Belief and the Belief-Desire comparators.The former acts as an updating mechanism of beliefs based on new percepts, while the latter updates desires according to the current newly acquired beliefs.These mechanisms act as "internal sensors" to the body, affecting perception and monitoring desire fulfilment, thus model emotions.In [2], DBTE agents model their desire to visit the bar, and update their belief, according to a strategy based on bar attendance.Strategy selection is based on their degree of belief in the adopted strategy.The main difference between our approach and the DBTE theory, is that the latter attempts to explain emotion manifestations based on belief/desire updates, whereas we consider emotions and mood as explicit parameters of the model that guide the reasoning process.

Conclusions and Further Work
Infusing agents with artificial emotions can be a valuable approach in order to obtain more accurate simulations of real life situations, such as evacuations, and various types of economic and social phenomena.The work described in this paper, extends our previous work [12] and presents a formal model of artificial emotions that is based on well established psychological theories (OCEAN and Dimensionality Theory) and covers important functions related to emotions, such as change to the emotional state due to percepts, the effect of mood as a long term emotional state, and the effect of social aspects such as emotion contagion.Through the El Farol example, we attempted to show the effects that the different parameters of such an emotions model have on crowd behaviour.
There is a significant number of future extensions to the current work.One of our first objectives is to experiment with different simulation scenarios that involve the economic phenomena, since those have attracted much interest in the recent years.For instance, it would be interesting to investigate the role of authoritative figures, such as government officials, news agencies, etc. in the creation or avoidance of phenomena such as bank runs.In a different direction we aim to investigate how the emotions model presented can be integrated with BDI agent architectures, leading to richer agent programming platforms.

Fig. 1 .
Fig. 1.(a) The circumplex of the dimensional theory of emotions with example emotions located in the two dimensions: arousal and valence.(b) Emotions as vectors or coordinates within the circumplex.

Fig. 3 .
Fig. 3.The average attendance with and without contagion.
Change of the emotion vector wrt time: case concerns updates due to mood.

Table 1 .
Average Attendance wrt Personality Trait