From Affect Theoretical Foundations to Computational Models of Intelligent Affective Agents

: The links between emotions and rationality have been extensively studied and discussed. Several computational approaches have also been proposed to model these links. However, is it possible to build generic computational approaches and languages so that they can be “adapted” when a speciﬁc affective phenomenon is being modeled? Would these approaches be sufﬁciently and properly grounded? In this work, we want to provide the means for the development of these generic approaches and languages by making a horizontal analysis inspired by philosophical and psychological theories of the main affective phenomena that are traditionally studied. Unfortunately, not all the affective theories can be adapted to be used in computational models; therefore, it is necessary to perform an analysis of the most suitable theories. In this analysis, we identify and classify the main processes and concepts which can be used in a generic affective computational model, and we propose a theoretical framework that includes all these processes and concepts that a model of an affective agent with practical reasoning could use. Our generic theoretical framework supports incremental research whereby future proposals can improve previous ones. This framework also supports the evaluation of the coverage of current computational approaches according to the processes that are modeled and according to the integration of practical reasoning and affect-related issues. This framework is being used in the development of the GenIA 3 architecture.


Introduction
The simulation of human-like affective behavior has been a challenge of artificial intelligence (AI) for decades [1]. Theory and technology have evolved in order to provide effective tools for this purpose. Research conducted in the area of embodied agents, embodied conversational agents, and intelligent virtual agents makes it possible to create more natural human-machine interaction [2][3][4]. Computational agents have been provided with the capacity to reason, act proactively, achieve goals, sense, and plan (among others) [5]. Nevertheless, some domains need more than this. For example, in the simulation of human behavior or human social organizations, it is necessary to include not only their reasoning and thinking capabilities but also their affective processes. In this article, we use "affect" or "affective" as a generalized concept that is in line with the definition of Core Affect in [6], which is defined as "states experienced as simply feeling good or bad, energized, or enervated" regarding emotionally charged events such as emotions or mood [7][8][9]. When using emotions, we are referring to specific affective states that can be tagged with terms such as "joy", "sadness", or "anger", which are in line with the classification in [10]. Fields such as psychology, neuroscience, and economics have also tried to address the influence of personality and emotions in human behavior, with their results correlating with each other and reaching important achievements in several application areas such as education or entertainment [11]. Many current agent models use practical reasoning. Aristotelian practical reasoning begins with an intention to reach a goal. To achieve that goal, a reasoned decision-making process is performed to select an action (or plan of actions) from a set of possible actions that allow the achievement of the goal [12]. Our view of the relationship between emotions and practical reasoning is in line with what contemporary philosophy proposes [13].
"Contemporary philosophy of emotion attempts something stronger, however, in according emotions a role in practical reasoning. Making this an integral roleunderstanding emotions as functioning within practical reasoning rather than just as spurs to it-means interpreting emotions in normative terms, as providing or expressing potential reasons for action, and as themselves subject to rational assessment and control, contrary to the traditional view of emotions as 'passive' phenomena" [14].
In this view, emotions are very linked to rationality, which is a view shared by research areas such as psychology and neuroscience. For example, Antonio Damásio's neurological studies [15] showed that emotions play an important role in rational thought, unlike Descarte's philosophy, which separates the mind from the body. Damasio used a real story about a man called Phineas P. Gage who had suffered an accident where an iron rod passed through his head causing a wound in the ventromedial prefrontal cortex. After the accident, this man suffered from disinhibition and inability to make decisions, making it impossible for him to decide between equivalent options due to his lack of emotions. With this analysis, Damásio demonstrated the link between the physical and feeling and how important emotions are in rational thought and decision making.
On the other hand, psychological and cognitive sciences have laid the foundations for further research in affective computing, which is considered by R. W. Picard to be "computing that relates to, arises from, or influences emotions" [16]. Theories, such as evolutionary, cognitive, existential, social cognition, or social-behavioristic theories (among others) [17], have inspired current computational approaches to a greater or lesser extent. Some of the most important theories in the affective computing field are P. Ekman's "basic emotion" theory [18], theories of dimensional representation of affect, such as the PAD (pleasurearousal-dominance) model [19], or models centered on appraisal theories, such as the OCC model [10]. In addition, neuroscience methods such as neuroimages and unicellular activity records have been used to develop a physical description of processes that are associated to emotions. Authors like Joseph E. LeDoux [20] and António Damásio [15] made important neurological contributions by investigating the idea that emotions come from ancient parts of the brain that have evolved to generate appropriate responses to certain stimuli.
Affective computing application areas include education, entertainment, disaster situations, training, and therapies, which have been improved through simulations with virtual humans [21,22]. In addition, the modeling of agents with an affective component as an element that influences their behavior may improve the simulation of social interactions such as negotiation, and, in general, the simulation of the human decision making process. Researchers have offered comprehensive solutions trying to address as many problems as possible when modeling affective processes, and they have also provided simplified solutions for specific application domains [23]. These solutions are diverse in their definition but share common basic representations and supporting theories. Unfortunately not all of these solutions are suitable for use in a computationally feasible model. For this reason, it is necessary to carry out a detailed study to identify the most suitable theories to be used for the development of affective intelligent agents.
Our goal is to focus on those common concepts shared by computational approaches that strive to model and simulate agents whose affective features influence their behavior and cognitive processes. These agents may be involved in social interactions, negotiation processes, or decision making involving risk. This is a subject in which other sciences like social sciences and economics are involved, and the present study will help to build and explain models and tools that support these sciences. When modeling intelligent and social agents, two main issues spring to mind: the agents' practical reasoning and the agents' interactions. We want to study what affective processes are related with both as well as how they are related. Considering that agents are situated in environments where they interact with similar but not identical entities, we also want to analyze what personality factors need to be considered in order to establish differences between agents, their behavior, and reasoning. We first make a review of the psychological literature that is relevant from a computational perspective (some of which is supported by neurological findings) in order to describe how practical reasoning and affective features are related. Then we determine what affective features/processes are related to agent cognition and practical reasoning. The identification of these general concepts supports the creation of computational models and languages of affective agents with practical reasoning that are general enough to fit a wide range of domains and that are able to provide basic structures that allow the creation of approaches with different implementations of affect-related theories. This is a step towards the creation of "standards, modeling tools, and model re-use" in order to "help to address these fundamental questions regarding the nature of emotions" [24]. In fact, agents capable of simulating, in a certain degree, different affective and social abilities are establishing as an improvement of the human-machine paradigm. Different experiments conducted with humans and social and affective agents have shown that these agents are more credible and reliable, improving the experience of human users [7,25]. The work presented in this paper provides a foundation for the improvement of the simulation of human and human organizations behavior either by affective intelligent agents or by embodied conversational agents endowed with affective and social abilities.
This work is organized as follows. Section 2 presents a review of the main emotion and affect-related issues that are addressed in psychological theories. The theories that allow an individual to be differentiated from others are analyzed in Section 3. Section 4 presents our selection of the main affect-related processes and concepts covered by psychological theories that need to be supported by computational affective models (Section 4.1). Examples of computational approaches that model specific affective phenomena in agents with practical reasoning are analyzed in Section 4.2. Section 5 describes the GenIA 3 architecture that is being developed using the framework proposed in this paper. In Section 6, a discussion of existing models and their relationship to the theoretical framework is performed. Finally, a conclusion is presented in Section 7.

Analysis of the Influence of Emotions in Cognition and Practical Reasoning
Philosophical, psychological, and neurological studies discuss the relation between emotions and cognition and between emotion and practical reasoning. For example, emotions may influence memory enhancement, and the evaluation of the situation may play an important role in social interactions or may help to narrow the set of possible options in decision making [26]. Emotions "serve as a powerful organizing force, not just for behavior, but for perception, judgment, and memory" [27]. Having been inspired by philosophical and psychological studies on affect-related issues and their relationship with rationality and cognition [28], we have made a selection of affective phenomena, each of which are described in Sections 2.1-2.7. In these sections we mainly analyze the relation between these affective phenomena and cognition and these affective phenomena and behavior, by emphasizing the changes produced in the individual informational state (represented by beliefs), motivational state (represented by desires), and deliberative state (represented by intentions). Some of the descriptions of these relations are also supported by widely accepted neurological theories.

Emotions and Memory
There is evidence that people better remember events that have been emotionally significant (i.e., those with more vividness) than non-emotional events [29]. Studies have shown several results related to what information is remembered and how it is remembered as well as whether or not emotional memories are indelible. It has been traditionally believed that highly emotional events lead to indelible memories [30], although other results have demonstrated that these memories may not necessarily be accurate or consistent [31] or that they may even fade over time. In [32], it is suggested that this happens because individuals' information encoding and retrieval is performed by matching this information with the corresponding elicited emotional state. These facts confirm that the primary function of memory is to guide future behavior in order to either avoid or promote familiar situations, without the need of keeping an exact record of past events.

The Influence of Emotions on Behavior
An important and influential contribution regarding the influence of emotions on behavior was the one made by Damásio [15]. He stated that there is a strong link between the physical and feeling and that emotions are significantly important in rational thought and decision making. Damásio proposed the definition of the somatic marker, which is the mechanism by which emotions guide behavior and decision making. This is contrary to Descarte's view of pure reason, which considers emotions to be more of a hindrance than an aid for reasoning.
The way emotions and affective states determine or influence behavior has been widely discussed. One of the debates has been centered on whether emotions exert a direct causal influence on behavior, or, on the contrary, if they are an input into the processes of decision and behavior regulation as a feedback system [33]. In line with these ideas, Damásio discussed the concepts of primary and secondary emotions. He stated that primary emotions were innate or "wired in at birth" and dependent on "limbic system circuitry, the amygdala and anterior cingulate being the prime players"; they allow having reactive responses in the case of immediate danger (which is a direct causal influence on behavior). If primary emotions become conscious, then this can make the response more flexible, also allowing past interactions with the environment to be considered. On the other hand, secondary emotions, also known as social emotions, are conscious, and are more elaborated (e.g., jealousy, guilt, or pride) [15]. According to [33], "conscious emotion commands attention and stimulates analysis, learning, and adaptation". One way of describing this conscious influence of emotions is through the principle of learning by reinforcement, where positive or negative emotions are associated to similar events depending on past outcomes for these events [34]; hence, future behavior is guided by anticipated emotional outcomes. In addition, experiments in [35] demonstrate that a specific dimension of the affective state of an individual is a significant indicator of the level of risk that is associated to the decisions that are made.
Another interesting theory that describes how emotions guide behavior, specifically in social interactions, is the social psychological affect control theory [36]. It proposes that human decisions (as well as perceptions and emotional experiences) respond to the need of minimizing deflections between sentiments about social situations that are culturally shared and the evaluations resulting from interactions in those situations. For example, when a professor decides to advise a student instead of yelling at him, he is behaving according to the cultural expectations of professorial behavior. This allows building models and simulating interactions that can be both goal-directed and affect sensitive [37].

Emotions and Their Evolutionary Account
Two important exponents of the evolutionary account of emotions are Charles Darwin and William James. In his work titled "The Expression of Emotion in Man and Animals" [38], Darwin states that emotions are a survival function (that comes from an evolutionary process) to solve the problems we have as species. This is why there are similarities between our emotions and those of closely-related species. The work focuses on emotional expression and shows a relation between the movements and facial expressions of humans and those of other animals. In his theory, Darwin insists on the idea that emotions have an important function and therefore a survival value. On the other hand, James defined emotions as the feeling that arises from bodily changes following the perception of an exciting fact [39]. He stated that bodily changes come first, and, after them, we experience emotions in such a way that it would be impossible to have emotions without bodily changes. As Darwin did, James considered emotions to be a survival factor. The Jamesian theory had many followers, but many people supported the opposite position. For example, authors like Walter Cannon thought that we feel emotions and experience physiological reactions such as sweating or muscle tension simultaneously in such a way that emotions arise when the thalamus sends a message to the brain after perceiving a stimulus. This results in a physiological reaction which is known as the "Cannon-Bard" theory [40].
Other researchers have followed these evolutionary perspectives by disagreeing to a greater or lesser extent with Darwin's point of view. This is the case of William McDougall, Robert Plutchik, Paul Ekman, and Carroll Izard (among others) [18,[41][42][43]. Some of those authors have identified a set of fundamental or primary emotions that are common in every species [18]. These emotions represent survival patterns of responses to events in the history of evolution, and they play an "adaptive role in helping organisms deal with key survival issues posed by the environment" [42]. Based on this, a set of universally recognized facial expressions has been identified, which may vary in number but that maintains the idea that emotions respond to an evolved adaptive response pattern.
The evolutionary account of emotions also has neurological roots [44]. For example, in [45], LeDoux tries to explain that emotions are part of a complex neural system that has evolved in order to survive. Therefore, the emotional responses are hard-wired into the brain's circuitry, which is built through learned experience. He explored the mechanisms that produce emotions underlying the brain, and he found that, for example, the brain can detect danger even before experiencing fear, leading to physiological responses like sweaty palms or muscle tension.

Emotions in the Evaluation of the Situation
It is considered that emotions consist of multiple components [46]. These components include the following: the cognitive component, which involves evaluations of the person-environment interaction; the motivational component, which includes forms of action readiness; the somatic component, which includes physiological responses that are peripheral; the motor component, which deals with instrumental and expressive behavior; and the subjective component, which involves subjective experiences. The cognitive component is underpinned in the cognitive theory, which is the one that deals in great detail with how the "perception of the exciting fact" mentioned by James [39] becomes an emotion. This was called the "appraisal" process by authors like Magda Arnold [47]. There are coincidences as well as differences in the content and number of appraisals (processed appraisal variables) that are made. Theories generally agree on appraisal variables like goal relevance, goal congruence, certainty, coping potential, and agency (whether an event is caused by oneself, other people, or external circumstances) [46]. Other appraisal variables are not considered in all theories (e.g., novelty, pleasantness, type of goal, or norm compatibility) [48]. Theoretical and experimental research on appraisal has deepened the study of the relation between patterns of appraisal values and emotions, action tendencies, physiological responses, and facial or vocal expressions. Some key questions include whether a representation of emotion must be performed, how it must be performed, and how appraisal patterns influence other components.
For example, in [49], Scherer proposed a component process model of appraisal where appraisal consists of an invariant sequence of "stimulus evaluation checks". Specifically, an emotion is defined as "an episode of interrelated, synchronized changes in the states of all or most of the five organismic subsystems (Information processing, Support, Executive, Action, and Monitor) in response to the evaluation of an external or internal stimulus event as relevant to major concerns of the organism" [50]. The possible states of these subsystems are the components of an emotion episode. The role of concerns stands in all appraisal theories. They can be defined as individual needs, ideals, values, norms, and all the individual cares about [51].
Another important appraisal theory is the one proposed by Ortony, Clore, and Collins in their work titled "The Cognitive Structure of Emotions" [10]. One of the most important contributions of their work is that the authors specifically developed their theoretical approach with the aim of implementing it on a computer. This has been the most widely accepted and used proposal by researchers in computer sciences seeking to work in this direction. The authors propose a model of emotions called "OCC". This model not only proposes a classification of emotion types by considering aspects of the situation appraised, but it also proposes quantitative aspects of emotions. Variables such as potentials, thresholds, and intensities are used to describe these quantitative aspects.
Lazarus' work [51] differentiates "primary" and "secondary" appraisal, which may or may not be sequential. He stated that, in a "primary" appraisal, an event is evaluated to determine whether it helps or hinders the achievement of a goal, which fosters or inhibits the desires of an individual. In a "secondary" appraisal, an individual assesses its capabilities and resources to deal with an event. On the other hand, in Roseman's work [52], appraisal patterns are considered to be dimensions. The author distinguished seven appraisal dimensions, including some concepts such as the unexpectedness of an event, its probability, control potential (referring to an individual's capacity to cope with an event), and agency (i.e., responsibility regarding the event).
Some theories, such as the "social constructivist", argue that emotions come from cultural facts, and their meaning and coherence are given by learned social rules. According to Averill [53], emotions can only be analyzed on a social level. They play an important social role at both the interpersonal and social level. Thus, for example, the fact of being wronged may vary among different cultures because it means that a social rule has been violated, which can be different depending on what it means to each individual. According to the social constructivist perspective, if the appraisal that generates emotions is a biological adaptation, then its content is cultural.

Emotion Regulation
Emotion regulation is the process whereby actions are performed to reach a desirable affective state, in either a conscious or unconscious way, by using indirect individual strategies that are oriented to change their affective state [54]. This does not imply that people can directly control moods and emotions, but they can attempt to do so. These strategies may involve maintaining or altering beliefs, desires, intentions, or expectations that motivated the corresponding actions through the appraisal process. For example, these strategies can include suppressing information when confronting an event with low controllability and/or negative impact or focusing attention away from the emotional event. Strategies can also include increasing the probability of a pending outcome that is desirable through wishful thinking [51]. According to [55], two kinds of coping (as ways of dealing with stressful situations) can be distinguished: problem-focused and emotionfocused. Problem-focused coping generally takes place when there is a possible solution to the problem that originated the change in the affective state and a behavior oriented toward the management of the problem is created. Emotion-focused coping is more probable when the individual believes that there is not a solution to the problem, and the behavior is oriented toward the regulation of the corresponding emotional response.
Authors like Sigmund Freud proposed a similar theory called "defense mechanisms" [56]. These are individual resources for preventing the ego from suffering danger (e.g., anxiety). According to Freud, individual instinctual needs set the starting point for the psychic energy that is available. The elements that compete for it are the id, the ego, and the superego. They are systems of the mind that interact dynamically to influence behavior. Freud defined the id as the original aspect of personality, which is located in the unconscious part of the mind; it contains primitive desires such as unconscious sexual and aggressive instincts. The ego and the superego lie in the conscious, unconscious, and preconscious part of the mind. The ego provides realistic direction for the impulses and partially carries out the aims of the id; the superego describes the internalization of social values in the individual. It interacts dynamically with the id and the ego. These individual resources are activated unconsciously and some of their categories are: repression (the ego attempts to keep the undesirable impulses of the id in the unconscious); denial (when the person refuses to perceive unpleasant information from the environment); sublimation (when the unacceptable impulse is transformed into a socially acceptable, even productive form); projection (the tendency to attribute our own unacceptable desires to other people), etc. [57].
Similarly, Carl Rogers argued that when experiencing incongruence between the ideal and the actual self (what you want to be) and the actual self (what you really are now), the individual becomes anxious. To defend against this, Roger suggested that we use defenses that can include the distortion of experience in order to make something acceptable or to prevent threatening experiences from reaching awareness at all [58].

Evaluative Implications of Emotions
Each individual may have different ways of interpreting the strength and content of what they sense, and this process may be influenced by the current affective state. According to [59], emotions influence the "content and the strength of an individual's beliefs and their resistance to modification". It is known, for example, that when we are in a negative affective state, we question our beliefs more than in a neutral affective state, and we are more prone to accept new information. In addition, a positive affective state makes us rely more on our current beliefs [60]. Some other works support these findings [61]. For example, in [62], it is shown that when happy people perform judgments, they are more influenced by stereotypes (i.e., their own beliefs and mental shortcuts about things) than people in a neutral mood. Another example is the act of self-deception, which is commonly known as the internal biasing processes that takes place when we adopt a desired belief in the face of possibly contradictory evidence, assuming that contradictory evidence leads to negative affective states [63].

Emotions and Social Interaction
Emotions greatly help in the understanding of social interactions [64]. When interacting with other individuals, factors like social cognition (e.g., social perception, Theory of Mind, or empathy), emotional contagion, or social learning may take place [65] and hence may generate emotional experiences. Some of these phenomena are grounded in the Theory of Mind [66], which studies the human ability to attribute other people's mental states (like beliefs, desires, or intentions) and to reason or to feel like others would feel. Besides, the capacity of individuals to identify emotional signals in facial expressions or body gestures allows these phenomena to take place (see e.g., [67]). Empathy can be described as the process whereby a perceiver experiences an affective state that matches the affective state perceived in another individual (e.g., [68]). On the other hand, emotional contagion is regarded as "The tendency to automatically mimic and synchronize expressions, vocalizations, postures, and movements with those of another person and, consequently, to converge emotionally" ( [69], p. 153). Nevertheless, in works like [70], contagion is demarcated from mimicry by referring to contagion as the "matching of a subjective emotional experience", while mimicry refers to the "matching of nonverbal displays".

Personality and Affect
Individuals that are part of a social context behave according to specific traits, depending on individual characteristics or other factors like their culture [71,72]. Hence, the emotional experience, which is the relation between affect and cognition, varies from individual to individual. Considering this fact, the representation of these features in believable intelligent affective agents becomes essential in order to highlight their singularities [7,73,74]. According to [75], "among the most important features of a believable agent are a marked personality and emotions".
Personality is considered to represent the long-lasting individual characteristics that influence motivations and behaviors when facing a given circumstance [76]. Researchers of the different perspectives of personality have focused on both describing the personality dynamics within an individual and determining its structure (i.e., the individual's traits that differentiate him or her from the rest) [77]. Approaches that are focused on personality dynamics are concerned with the intrapersonal (also called intraindividual) structure and mechanisms of personality and how they evolve over time, taking into account the individual's interaction with the environment and his or her goals, motives, and beliefs [78]. Structural approaches (also called interindividual) are more concerned with individual differences determined by trait constructs [79]. The analysis of the intraindividual structure of personality is out of the scope of this paper since we are not interested in determining how personality is shaped over long periods of time. We will focus on the interindividual structure instead, which allows establishing the agents' individual characteristics for a computational simulation that is time bounded.
In theories that study the interindividual structure of personality, some researchers tried to find a relationship between physical characteristics and personality traits: for example, the relation between psychological characteristics and facial features such as beauty [80] or the shape and contours of the skull [81] (also called phrenology). Even a classification for body builds was made by William Sheldon [82]. All those theories were too subjective and imprecise. Other accepted theorists in this field were Gordon Allport, Raymond Cattell, and Hans Eysenck [83][84][85]. They studied personality from a traits perspective. Gordon Allport, who is considered to be the father of personality theory, defined a trait as "a generalized and focalized neuropsychic system (peculiar to the individual) with the capacity to render many stimuli functionally equivalent and to initiate and guide consistent (equivalent) forms of adaptive and expressive behavior" [83]. He found more than 4000 words in an English-language dictionary that described personality in a total of nearly 18,000 words. He also categorized the personality traits into three levels [57]: • Cardinal Traits: Those dominant and pervasive characteristics in a person's life. People with these characteristics are often known by their traits, even in their names. • Central Traits: These traits are those that control the person's behavior to a lesser degree, so they do not possess the dominance of a cardinal trait. Nevertheless, they are important. These are major characteristics that we often use to describe another person. • Secondary Traits: They often appear under a specific circumstance and they are related to attitudes or preferences. They are peripheral to a person.
The theorist Raymond Cattell reduced Allport's initial list of words that described personality down to 171 words [84]. This was done mostly by eliminating synonymous words and by combining common characteristics. Then, by using the statistical technique of factor analysis and other data collection techniques, he identified just 16 key personality traits. These traits would be useful to explain personality functioning according to Cattell. He also created the Econetic Model. With this model, Cattell wanted to remedy the deficiency of trait theories since they did not consider the role of the environment in predicting behavior. Therefore, this model postulates the interaction between traits and physical, social, and cultural environments and their influence on behavior [57].
Hans Eysenck defined a typology that is hierarchically organized. It consists of three levels: types, traits, and habits. The types level is the most abstract and is based on the intercorrelations among traits (like sociability, impulsivity, or liveliness). The intercorrelations among habitual responses (e.g., having breakfast immediately after waking up) is what he called traits. Finally, habits are inferred from observable specific responses [57]. Eysenck believed that people could be described in terms of three supertraits with a genetic basis, which are considered to be the ones that best describe the functioning of the personality [85]. These supertraits are: introversion-extraversion (a person that rates high in introversion directs his or her attention to inner experiences, while extroverts focus their attention on the environment or other people), stability-neuroticism (neuroticism refers to the tendency of the individual to become upset or emotional, and a stable individual is emotionally constant), control-psychoticism (psychotic individuals differ from neurotics in the severity of their conduct disorders, like insensitivity to others, hostility, or manipulation of others, and a controlled person does not have these characteristics).
Stimulated by the works of Eysenck and Cattell, other researchers tried to find middle ground between the two studies [86]. They believed that Cattell focused on too many traits and Eysenck on too few. As a result, they derived five relatively strong factors for describing each individual personality [87]. The exact label for each dimension often varies from one researcher to another. In [88], Goldberg proposed a five-dimension classification for personality: Extraversion, Agreeableness, Conscientiousness, Neuroticism, and Culture. Nevertheless, the most common denomination is the one proposed in [86]. The authors describe the traits as follows: Openness is related to culture, intellect, appreciation for art, adventure, curiosity, originality, or unusual ideas; Conscientiousness is related to the will to achieve something, discipline, planned behavior instead of spontaneous behavior, organization, or responsibility; Extraversion is related to energy, positive emotions, search for the company of others and stimulation, a talkative individual; Agreeableness is when an individual is cooperative and compassionate instead of suspicious or antagonistic, a generous, kind, and forgiving individual; Neuroticism is the tendency to experience negative emotions such as anger or depression. An individual with a high level of neuroticism is an anxious, self-pitying, and unstable individual.
Besides adepts, the theory of traits has many critics [89]. This is mainly due to its weakness in that it cannot represent a taxonomy of traits that is really comprehensive. Another commonly mentioned problem is that traits are often poor predictors of behavior since an individual does not always behave as expected according to his or her predominant traits. In addition, this theory does not address how individual differences in the development of personality emerge. Some researchers state that more than five factors are needed to describe personality appropriately [86]. Nevertheless, it is "an important breakthrough in the study of personality" [57].

Affective Agents with Practical Reasoning
In order to propose domain-independent basic computational structures and processes that an intelligent affective agent should have, we propose the use of the affect-related cognitive theories described in Section 2 and a general architecture for autonomous agents. Specifically, we propose a BDI (belief-desire-intention) architecture, because of its suitability to create computational models of emotions [90]. We will first summarize those concepts addressed by the theories of Section 2 required for our proposal. Then, we will discuss the possible links between those concepts and BDI cognitive processes and components [91,92]. Table 1 summarizes the main processes described in Section 2, which are grouped by emotion-cognition or emotion-behavior relations. The table also shows the cognitions involved. In the relation of emotion and memory, two important processes can be highlighted: (1) the process in charge of determining what and how emotional memories are stored as well as the event associated to the process; and (2) the process that determines how these memories evolve over time. According to research on the influence of emotion on behavior, two broad processes are depicted in Table 1. The first one is done for the direct influence of emotion on behavior (the process of generation of reactive behavior), and the second is done for emotions as input for decision making (the process of decision making). Both forms of behavior may generate or modify the agent's intentions. Researchers agree that the generation of reactive behavior is mainly done on the basis of past experiences and emotional memories. The same applies to decision making, which also takes place by mainly evaluating expectations and culturally shared evaluations. On the other hand, theories on the evolutionary account of emotions mainly address behavior that is related to physical manifestations such as bodily changes, body gestures, or the generation of facial expressions. In general, these theories do not emphasize those changes in individuals' cognitions that have evolutionary explanations. The next emotion-related process in Table 1 is the one related to appraisal, which involves the processes of perception and affect generation. According to the different appraisal theories analyzed in Section 2.4, we have identified the cognitive components that are generally used in the appraisal process: percepts, beliefs (as well as the values of associated probabilities), concerns, desires, capabilities, resources, etc. The appraisal process is the main influence on the affective state of the individual. Emotion regulation, on the other hand, implies the generation of coping behavior. Corresponding theories argue for the influence of coping behavior on beliefs, desires, or intentions. Determining the generated coping behavior also involves considering the individual's expectations. The evaluative implications of emotions mainly involve the process of perception. This process evaluates percepts and determines the content and strength of beliefs. Finally, Table 1 shows another process of affect generation that is originated by the relations of emotions and social interactions described in Section 2.7. In this process, the beliefs about other agents and about the situation also play an important role. According to [93], general architectures for intelligent agents can be classified into four classes of agents: logic-based (decisions are taken through logical deduction), reactive (decisions respond to direct mappings of situations to actions), belief-desire-intention (beliefs, desires, and intentions are manipulated in order to make decisions), and layered (where different software layers, which reason about the environment at different levels of explicitness and abstraction, determine decisions to make). Specifically, BDI (belief-desireintention) architectures are grounded on the philosophical roots of practical reasoning, which is the process whereby, at each moment, an agent decides the actions to perform to reach its goals [94]. The BDI architecture is well suited for building computational models of affective agents. Some of the arguments that support this include that it has its foundation in philosophical and psychological theories, it contains the main components of emotions (which are beliefs and desires), and it can be enhanced (along with its logic), extended, and/or combined to account for new structures or processes [90].

Proposal of a Conceptual System for Intelligent Affective Agents
Practical reasoning involves mainly two processes: deliberation (where the agent decides what to do by determining the goals to be attained) and means-end reasoning (which involves how to achieve these goals). Most BDI agents perform these processes through four more specific processes which are: belief revision (which includes perception and determines new beliefs on the base of percepts and current beliefs); option generation (which determines the agent desires, on the basis of its beliefs and current intentions); filter (which determines new intentions on the basis of current beliefs, desires, and intentions); and action selection (which determines the action to perform by considering current intentions).
The option generation process decides how to achieve intentions, and, hence, is the one responsible for the agent's means-end reasoning. On the other hand, deliberation is performed by the filter process. This process which not only adopts new intentions in order to facilitate existing ones or to discover new opportunities, it can also drop intentions (intentions that are either no longer achievable or that diminish the agent's expected gains) that are not workable and can retain intentions that have not yet been achieved [93].

Conceptual Systems
By analyzing the main processes derived from the relation affect-cognition and affectbehavior (note that, hereinafter we will use "affect-cognition" and "affect-behavior" to refer to "emotion-cognition" and "emotion-behavior") presented in Section 2, it is easily observable that the relation of affect with the agent's practical reasoning is mainly established with the processes of practical reasoning related to perception (or belief revision) and deliberation. Therefore, for the development of affective agents, affective processes should be considered as cognitive processes that are integrated into the agent's practical reasoning processes influencing the agent's reasoning and decision making processes. In order to summarize the processes and attributes that should be included in an affective agent, we propose the conceptual systems of Figure 1, which are based on the theories analyzed in Section 2. This figure also shows the above-mentioned relation of affect with the agent practical reasoning.
The left side of Figure 1a shows the processes of practical reasoning. The processes of perception and deliberation are highlighted because they are the processes of practical reasoning that have a relation to affective processes. Their subprocesses show how this relation is established. The right side of Figure 1a shows the main affective processes. Besides the processes of practical reasoning, Figure 1a  Coping behavior: in general, the process of affect regulation leads to processes that are related to coping behavior. It includes processes for producing reactive behaviors, which in turn can include embodied behaviors.
Figure 1b left shows our conceptual system that links the BDI components that are related to the perception and deliberative processes (i.e., beliefs, desires, and intentions) with other affect-related attributes whenever possible. Figure 1b right also includes new attributes that a BDI affective agent should have according to the main affect-related cognitive theories analyzed in Section 2. Figure 1 shows that the attributes "affective memories", "concerns", "affective state", and "belief probability" should be included in the definition of a BDI affective agent besides the beliefs, desires, and intentions components of the traditional BDI components (see Figure 1b). We also state that the agent should include an attribute for representing the agent "personality" if it is part of a society of agents. "Affective Memories" should be used by the related process of memory maintenance. "Concerns" (i.e., interests, motivations, ideals, or standards) are key for the appraisal process, and the "affective state" is the result of the affect generation process. On the other hand, "belief probability" helps in the representation of the agent's expectations and/or in the representation of the strength of beliefs (determined in the affective evaluation process). The probabilities of beliefs are also used by the appraisal process for the generation of prospective emotions [10]. In order to make a more reliable appraisal process, we consider that it would be ideal for the agent to be able to count on attributes like "cultural evaluations", "percepts", "norms", "capabilities", "resources", or "social rules". Since the use of these attributes may vary depending on the appraisal theory used, we have not included them as part of the "main" agent attributes but rather as special representations of the agent's beliefs. Nevertheless, specific implementations can represent these attributes as additional agent attributes instead of being part of the agent's beliefs.

Use of Core Processes and Attributes in Computational Approaches
In this section, we apply our general framework to make a review of recent computational approaches of intelligent affective agents that have included, to a greater or lesser extent, the main concepts and processes identified in Section 4.1. We will evaluate them on the basis of the extent to which these approaches cover the main concepts that should be considered in the design of a BDI affective agent. These concepts are depicted in Figure 2. The upper left side of Figure 2 shows the possible affect-cognition and affect-reasoning relations that can be present in a computational approach. The upper right side shows specific processes, and the bottom shows specific cognitions that can be addressed by a computational approach. The processes and relations depicted in rectangles with double lines are those that may link processes of practical reasoning and affect-related processes. We consider that the extent to which computational approaches model these double line components indicates the extent to which they integrate practical reasoning and affectrelated issues. This will help to determine the concepts and processes that are generally included in computational approaches according to their kind and domain of application.

Affect and Memory
An example that addresses the relation of affect with cognition is the work proposed in [95]. In this work the authors propose LIDA, which is composed of an agent architecture (LIDA I ) and agent model (LIDA C ), for cognition, emotion, and learning that is inspired in cognitive science and empirically grounded in cognitive neuroscience. According to the authors, it is "a plausible candidate for a unified theoretical framework of cognition". Autonomous agents in LIDA I must continually sense the environment, interpret perceptions, and then act, where the actions must be appropriate to achieve the agent's goals. LIDA mainly combines action selection, motivation via emotions, an attention mechanism, and learning. Figure 3 shows the processes related to LIDA C (a conceptual model where the emotion components still require computational testing), which include Perception, Means-end Reasoning, Deliberation, Action Selection, Appraisal, and Affective Memories. In LIDA, both the affect-cognition and affect-reasoning relations are considered. The first relation takes place through the influence of emotion on learning where, up to a point, there is a direct correlation between the levels of arousal that are involved with current emotions and the encoding of information in memory. Beyond that point, arousal becomes a hindrance to learning. The second relation happens when the likelihood for actions to be selected depends on current emotions. In LIDA, "schemes" of possible actions have a context and a result as well as an activation value. Emotions increase or decrease the activation value of actions.
In LIDA C , Affective Memories are stored and maintained. Moreover, memory is categorized according to the type, function, and duration of the structures learned. This categorization includes the following systems: sensory, perceptual, spatial, episodic, attentional, procedural, and sensory-motor. Specifically, in the perceptual system, a perceptual associative memory (PAM) stores "nodes" containing an emotion and its intensity. An Appraisal process links these nodes with "node/links", which include the perceptual structure that represents the event that caused the emotion. Thus, this Appraisal process includes an Affect Generation process.
For Perception, there is an "understanding phase" in the LIDA cognitive cycle, where the representation of the agent relationship with its environment is also stored in the PAM. In addition, in an "action and learning" phase and as part of the Deliberation process, templates (or schemes) of possible actions are instantiated with the current situation by evaluating the intersection of the context of those templates with the situation. Then, an Action Selection mechanism chooses a single action from the instantiated templates. The Means-end Reasoning process in LIDA is performed through procedural learning (where new actions and sequences of actions for accomplishing new tasks are learned). A procedural memory stores the resulting executing behaviors. This procedural learning corresponds to the Option Generation process.
There is not an explicit reference for the processes or cognitions that are not highlighted in Figure 3. Nevertheless, it is argued that some of them can be represented by PAM nodes and their activations.

Affect Influence on Behavior
An example of a relevant approach where affect influences deliberative and embodied behavior is WASABI [96]. WASABI (Affect Simulation for Agents with Believable Interactivity) is an affect simulation architecture that combines cognitive reasoning capabilities with simulated embodiment. This work was used in a Skip-Bo card game scenario for simulating emotion capabilities in a virtual player called MAX. Three agents interact to control the overall functioning of the virtual player: the Emotion-Agent, the BDI-Agent, and a Visualization-Agent. WASABI is BDI-based, and it models intentional actions in the form of plans, which perform the Means-end Reasoning and Option Generation processes. Figure 4 shows the relation between WASABI and the main processes and cognitions presented in this work.
This architecture makes the distinction between primary and secondary emotions following the theories by [10,15,45]. Thus, emotions that are considered to be primary emotions have a direct relation with expressive capabilities like facial expressions, body postures, or voice inflection. They are considered to be infant-like emotions such as "anger", "happiness", or "surprise". Secondary emotions arise as the result of reasoning about current events, taking into account expectations and past experiences; they are "prospect-based" and can be expressed verbally (e.g., hope or relief). In this approach, mood (a core emotional state) is modeled as a background state whose value moves on a bipolar scale of positive versus negative. This value moves toward a neutral value more slowly than emotions. Each primary emotion is located in a PAD space (which stands for Pleasure, Arousal, and Dominance according to [19]) following the values from [6]. The architecture of WASABI has six basic components: the conscious appraisal, the non-conscious appraisal, memory, deliberation, emotion dynamics, and the PAD space. The conscious and non-conscious appraisal components are in charge of the Appraisal of the stimuli which comes from the environment through the Perception process. The Appraisal is based on Ortony's and Scherer's appraisal theories [10,50]. As a consequence, "secondary emotions" and "emotional impulses" are generated by the conscious and non-conscious appraisal components, respectively, in an Affect Generation process. The way the conscious appraisal obtains "secondary emotions" is by evaluating the goal-conduciveness of an event. Then the memory is updated, and Expectations are generated. The level of dominance is derived from this process to be used by the PAD space. Mood is derived from the Affect Dynamics component as well as the Pleasure and Arousal values of the PAD space. Finally, "primary emotions", which lead to "involuntary behavior", are elicited by the PAD space with a specific intensity. On the other hand, the deliberative actions are generated by the Deliberation component. To do this, this component takes the resulting "aware emotions" obtained by the PAD space. This PAD space acts as an awareness filter. This process is done to keep the mood-congruency of the primary and secondary emotions. This congruence is based on the idea that, with a positive mood, we are less likely to experience negative emotions and vice versa. Unlike primary emotions, secondary emotions have a lifetime and a decay function, so their intensity decreases over time until the zero base intensity is reached. The "aware" emotions (with positive awareness likelihoods) may result in different coping behaviors after a deliberative process and a reappraisal.
The approach in [37] is another example of the influence of emotions on agents' social behavior. The authors proposed a method where the behavior of human-interactive agents follows the "affect control principle". According to this principle, affective consistency is maintained in such a way that agent action choices seek to create situations that are consistent with those affective sentiments that are culturally shared or seek to suppress situations that are inconsistent with those affective sentiments that are culturally shared. To this end, the authors propose the BayesAct model, which is a partially observable Markov decision process. This model is a probabilistic decision theoretic generalization of the Affect Control Theory (ACT) [36], which is a mathematical formalization of the interactions between cultural representations, the kind of interactants in social situations, and affective experience. In this approach, the agent not only keeps a record of its current affective state (referred to as sentiments) and what "should be" its affective state, but it also records these same states in relation to the user. These records are called "identities". The BayesAct model is also able to learn about people's identities. Identities are modeled over three dimensions (the EPA dimensions): evaluation, which indicates how good or bad something is; potency, which indicates how strong or weak it is; and activity, which indicates how active or passive it is. These dimensions correspond to the dimensions of Mehrabian's PAD space [19]. Figure 5 shows the relation between BayesAct and the main processes and cognitions presented in our general framework. In BayesAct, Perception gives rise to observations, which include information about the environment and about the user. The Deliberation process is performed by the BayesAct control process, which, in turn, performs the Meansend Reasoning and Option Generation processes by trying to keep affective consistency. The agent behaviors always have a social and communicative purpose. The Appraisal process can be considered to be a sense-making process where the interpretation of observed events is performed by emphasizing the cultural aspects of these interpretations and relying on the role of the language in this process. In this sense-making process, linguistic categories are organized by the EPA dimensions of the affective space. The whole process of BayesAct determines the Affect Dynamic over a continuous dimensional space, which, in turn, behaves as an Affect Regulation process, where deliberation creates behaviors that are oriented towards minimizing affective inconsistency. With regard to agent's cognitions, in this approach, there is not an explicit representation for Beliefs, Desires, or Intentions, but they are somehow present in the model. Moreover, the knowledge (or beliefs) about an agent's own sentiments and about the sentiments other agent is represented as a probability distribution, so we consider that Belief Probability is represented in this approach. Besides, the model performs heuristic prescriptions for the actions of agents that interact with each other, which can be considered as a kind of Social Norm. The model also contains a utility function that is used in the action-choices, which can be considered as the agent's Concerns.

Emotions and Their Evolutionary Account
The work proposed in [97] is an example that shows the role of imitation of emotions in social contexts (specifically in the context of an infant and a caregiver), as part of an evolutionary adaption to improve social interactions. Imitation facilitates forms of social understanding like empathy or social referencing. As part of the imitation process, infants recognize structural congruence between themselves and the adult model, which serves as feedback for learning connections between the sensation of an action and its visual perception. Social referencing is a form of learning which is socially guided. In other words, it is learning in which a person formulates his or her interpretations of a given event and determines how to interact with it by using other people's interpretations. Unlike the approaches described above, this approach models two global issues: the imitation process and the process of social referencing. A robot architecture is proposed for implementing the imitation process in an infant, and a computational model is proposed for social referencing. In the imitation architecture, the "Perception System" extracts information from sensory input, which mainly consists of information that is related to the other person's facial expressions or movements. An "Action System" arbitrates the robot's behavior by selecting the appropriate behavior when required. Behaviors are represented as "Action-tuples".
The decision of what action-tuple will be executed is made by "action-groups, which are groups of action-tuples. The actions selected for execution are goal-directed, where goals mainly include the facial expressions the robot must imitate. Finally a "Motor System" is responsible for carrying out the selected action.
Since the influence of emotions is considered in the model of social referencing (which is called emotional referencing), we focus on this model to find out the relation between this approach and the main processes and cognitions proposed in our framework (see Figure 6). As part of this computational model, two models are proposed: the model of basic emotions and the model of shared attention. In the model of basic emotions, the Appraisal simply tags Percepts and internal states with affective information (e.g., valence or novelty) by following the somatic market theory of Damásio [15]. The association between those percepts with affective information is learned by the infant robot through previous experiences of these affective states by mimicking the human facial expressions. This assumption is made on the basis that some experiments with humans have found that showing a facial expression that is associated with an emotion produces that emotion [98]. An affective state is generated in an Affect Generation process, which is represented through a set of widely accepted "basic emotions" [18]. This change in the affective state may produce expressive or behavioral responses to cope with it. This can be seen as a kind of Affect Regulation, where the Coping Behavior is oriented to establishing a desired relation between the robot and the environment. The model of shared attention mainly keeps track of the referential focus of both the infant robot and the human (e.g., an object they are looking at). The information of shared attention is used by the robot to associate the appraisal communicated by the human with the referential focus (i.e., the last object whose attention was shared by both the robot and the human). The model of social referencing also includes a Perception process (whereby the state of the others and of the world is perceived) as well as a Deliberation and Option Generation process (in order to generate Embodied, Deliberative, or Social behaviors). The robot's main goal is to refine its understanding of the world by using affective information.

Affect in the Evaluation of the Situation
This aspect is directly related to the process of Appraisal, which has probably been the most addressed issue by affective computational approaches. In fact, every approach that has been used as an example in the present work provides a description that is more or less elaborated for the appraisal process. We will describe the approach proposed in [99], using our general framework. This approach purely addresses the appraisal process by offering a formalization of the conditions that trigger emotions for BDI agents. The appraisal theory that underlies this formalization is the OCC model of emotions. The formal model that results from this formalization is an extension of the KARO framework [92]. This is an agent specification framework that can be considered a BDI logic based on dynamic logic. Through this framework, the agents' informational and motivational attitudes can be specified (e.g., Beliefs, Desires, Goals, and commitments). The platform also allows the agent behavior to be described.
This approach assumes the existence of a Perception process where, according to the OCC model, Percepts are grouped as: consequences of events, consequences of actions of agents, or percepts of objects. After the Perception process, the Appraisal may take place, where percepts are evaluated according to criteria that are related to appraisal variables that are hierarchically structured in the OCC model. Some of these variables include desirability/undesirability of the consequences of an event, praiseworthiness/blameworthiness of an action of an agent, and appealingness/unappealingness of the aspect of an object. These variables, along with the structures and the logic provided by the KARO framework, help to derive all OCC emotion types through an Affect Generation process. The processes and cognitions described in this extension of the KARO framework that are common with those proposed in our approach are highlighted in Figure 7.

Affect Regulation
In order to illustrate how a computational approach has addressed the processes whereby individuals perform (reactive or more planned) behaviors in order to manage emotions that are generated for specific stimuli, we describe the model proposed in [91,100] using our general framework. The authors extended a previous work where the process of appraisal was formalized in a BDI framework. Their proposal starts from the concept of coping strategy of [55], which is defined as the behavior that is oriented to the minimization or control of stressful situations. The logical framework of the approach is built on the basis of concepts such as formulas (which are the agent's Beliefs), actions, choices, or preferences (which can be considered the agent's Concerns), Desires, Expectations, Belief Probability, and Intentions. These concepts lead to the formalization of an appraisal process where a set of emotions is derived, specifically, negative emotions, which are considered to be mental states and whose conjunction can be considered as the Affective State of the agent. These concepts are also used in the formalization of some emotion-focused and problem-focused coping strategies. According to the definition of coping actions schemes for these coping strategies, a coping action would take place when a specific emotion is experienced and the context of the situation is appropriate for applying the coping strategy. A formalization is also made in order to determine what coping action will be executed over a set of applicable coping actions, which can be seen as a mechanism of Action Selection. According to the authors' description, the selection of a coping action involves the processes of Perception, Appraisal, Affect Generation, selection of applicable coping strategies, selection of the preferred coping strategy, and, finally, execution of the corresponding coping action. These processes and concepts are highlighted in Figure 8.

Evaluative Implications of Affect
The approach in [60] describes how the Affective State can influence the maintenance of Beliefs. It proposes an affective Belief Revision system whose goal is to keep the consistency of beliefs through tasks of belief revision that are influenced by the affective state. It is a logic-based system that uses the current affective state (or mood) in order to set a preference between new and old information. This preference is determined on the basis of the influence of anticipated emotions in the support or prevention of the acceptance or rejection of information [59]: for example, the "discouragement" of the process of acceptance or the abandonment of a belief, if this process or belief leads to the anticipation of a negative emotion; and the "encouragement" of the process if the process leads to the anticipation of a positive emotion. This can be also seen as a process of Affect Regulation. The influence of affect on the preference between new and old information can also be described by the tendency of individuals to rely on their current beliefs when experiencing a positive mood or to search for new information when experiencing a negative mood. In addition, an ordering is endowed to beliefs regarding their resistance to change (i.e., the strength of beliefs). The strength of beliefs can be determined according to either the anticipation of emotions or according to the credibility/authority of the source of the belief.
In order to model how emotion anticipation influences Belief Strength, a system based on OCC is proposed. It consists of a subsystem for Appraisal and a subsystem for calculating the intensity of emotions through an Affect Generation process. In the Perception process, Percepts related to the environment or to communications from other agents are considered. Figure 9 highlights the processes and concepts addressed in this approach.  [101] because it specifically models a social phenomenon where emotions play an important role. In that model, the authors start from the idea that empathic behavior can be modulated by factors such as the agent's affective state, personality, or level of relationship with the agent's interactant. In this approach, empathy is modeled in a virtual human called EMMA. Two modules are integrated in the EMMA cognitive architecture: an emotion simulation module and a BDI module. The emotion simulation module is based on the approach presented in [102], which was previously discussed in Section 4.2.2. We highlight the same processes and cognitions of Section 4.2.2 in the present example (see Figure 10). The BDI module lies in a traditional BDI architecture, where Perception, Deliberation, and Means-end Reasoning are integrated [94]. This BDI module also has other characteristics. For example, it has a reactive component that connects perception and action in order to generate immediate responses; the process of deliberation also decides what action to take next by composing interaction moves. These interaction moves are actions (e.g., communicative or manipulative like "connect" or "rotate") that are combined to achieve a desired state of the world.
The empathy mechanism proposed in [101] starts from a perceived facial expression and imitates this facial expression through an internal imitation process. Then, an emphatic emotion is elicited, which is followed by an emphatic modulation process. The emphatic modulation process modulates the emphatic emotion taking into account factors like "liking" or "familiarity". When experiencing the emphatic emotion, social behaviors like facial expressions, body gestures, or specific dialogues can be triggered in the virtual character EMMA.

Application
Our theoretical framework provides a foundation for future works focused on the improvement of the simulation of human affective behavior as well as the behavior of human social organizations. As a direct application of our general framework, we are currently developing GenIA 3 [9] A General-purpose Intelligent Affective Agent Architecture that extends the AgentSpeak language [103] for the development of affective agents. That architecture combines psychological, computational, and procedural foundations presented in the generic theoretical framework proposed in Section 4.1 and offers components to represent affective characteristics like personality, emotions, and mood. GenIA 3 is built over a traditional BDI architecture and follows the theories of motivation and action generation, where the course of actions to be executed is decided according to the agent's goals.
Individual differences are represented in GenIA 3 architecture by personality traits, which influence the agent's affective and reasoning cycles. Moreover, affect generation is represented through the appraisal process; affect experience through the affect generator and affect temporal dynamics processes; affect influence on cognition through the affective modulator of beliefs; and affect influence on behavior through the coping and filter processes. The following is a description of the eight core affective processes selected and adapted from the generic theoretical framework proposed in this paper which are been incorporated into GenIA 3 (see Figure 11): • Appraisal. Performs the evaluation of the current situation according to the current state of the world and the agent's concerns (i.e., interests, needs, motivations, ideals, or standards). • Affect generator. It is in charge of generating the agent affective state by using the current affective state and the appraisal variables generated by the appraisal process. • Affect regulation. This process adapts the emotion elicited by the appraisal process to the internal characteristics of the agent (e.g., personality or gender) and its internal mood.

•
Coping behavior. The coping process is tightly linked to the agent personality, since this process determines whether some agent responses or some reactive behavior should be generated and what the responses or reactive behavior should be. • Affects temporal dynamic. It is in charge of determining the temporal variation of the affective state, specifically its duration and decay. These dynamics vary from one individual to another, in such a way that some personality traits can determine the way that these variations are produced. • Affective modulator of beliefs. This process is not executed as an independent process but as a subprocess of either the coping process or the belief revision function process that determines how beliefs are maintained. It follows the idea that the agent affective state contributes to the maintenance of beliefs. • Empathic appraisal. Determine a set of possible empathic emotions based on the perceptions and knowledge that the empathic agent has about other agents. • Empathic regulation. This process adapts the empathic emotions to the affective characteristics of the agent taking into account the knowledge that the empathic agent has about other agent.
The interaction among the components of GenIA 3 , adapted from the generic framework presented in this article, produces an agent behavior biased by the agent affective state and personality. The representation, interpretation, and simulation of affective processes promoted by the GenIA 3 architecture will support the evolution of multi-agent systems, intelligent virtual agents, conversational embodied agents, and systems oriented to the human-machine paradigm through more natural, realistic, credible, and reliable simulations. For example, the work proposed in [74] describes a new empathic pedagogical agent model which extends the GenIA 3 . This pedagogical agent combines different machine learning techniques for recognizing the user emotion [104]. Based on the recognized emotion and the behavior of the user on a social network, the agent estimates the best plan to guide users in the correct use of social media. We also have developed an embodied conversational virtual agent that interacts with the user empathically by modifying its facial expressions according to its internal mood or the emotion elicited through an empathic appraisal process.  Figure 11. GenIA 3 : a General-purpose Intelligent Affective Agent Architecture that integrates BDI and affective processes [9]. Sequences are represented as solid line arrows, subprocess as dashed line arrows, and exchange of information as dotted line arrows.

Discussion
Although several reviews of computational approaches that model affective processes on agents have been performed [7,105], few of these reviews have established in detail the links between these approaches and the philosophical and psychological theories that motivate them [106]. Often these links are discussed in computational approaches that model a specific issue that is related to affect, but these links are rarely addressed in more generic and abstract ways. Computational approaches of this type do not allow a well grounded and generic computational approach to be built. In this work, we have covered practical reasoning and affect-related aspects as well as their integration from a theoretical point of view. These analyses shed light on the processes and concepts that a generic computational approach should model in order to build affective agents with practical reasoning that live in an agent community. We have identified these processes and concepts and their relation, and then we have analyzed some representative examples of computational approaches. These examples are very different regarding the domain of application for which they were built and regarding the kind of approach. However, they jointly cover the main processes and concepts addressed by inspiring philosophical and psychological theories.
The framework proposed in this work to analyze the coverage of computational approaches regarding the processes and concepts proposed has some advantages. First, it can be extrapolated to evaluate how comprehensive and well grounded an approach is regarding the processes and concepts we propose should be modeled in an affective agent with practical reasoning. Second, the incremental development of mechanisms and tools is facilitated since it becomes easier to identify functionalities to be added on the basis of processes that are not modeled. Third, this method makes it possible to determine to what extent practical reasoning and affect-related issues are modeled and to what extent they both are integrated. Specifically, some conclusions have also been extracted from the approaches analyzed using our framework. Table 2 shows a summary of their characteristics, including what they model, application domain, number of processes modeled (practical reasoning processes and affect-related processes), and level of integration of practical reasoning and affect-related issues (see Figure 2). We consider practical reasoning processes to be those shown on Figure 2a (left) except the "Affective evaluation" process. The rest are the affect-related processes.  Table 2 shows that practical reasoning has been modeled by most of the approaches that focus on a specific affect-related issue. Only those in which formalizations (of a specific affective process) are proposed (such as those related to "affective evaluation", "affect regulation", or "appraisal") do not cover the basic processes of practical reasoning. Nevertheless, in order to properly validate these approaches, an agent with a reasoning component that is able to adopt these new features may be very necessary. The approaches analyzed here are representative and not fully comprehensive. However, the method used in this work also allows us to conclude that, from the approaches analyzed, those that model social behavior (such as empathy or mimicry) are the ones that model the largest number of processes, which can be related to practical reasoning, affect, or their integration. As complex phenomena (e.g., mechanisms that involve their own models as well as models of other agents), it becomes evident that their modeling requires considering more processes than those needed by simpler phenomena.
It would be desirable for a generic computational approach to be able to cover, at least basically, the selection of core processes proposed in this work. This kind of generic approach is scarce. The theoretical framework that we have offered allows such generic computational approaches to be built, thus allowing these computational approaches to be philosophically and psychologically well grounded. However, many challenges still remain for these approaches to become applicable and practical. For example, it would be necessary to make a proper selection of default mechanisms for each one of the processes proposed, in such a way that it allows the incremental improvement of these processes individually. In addition, considering that every application domain does not require modeling all the processes proposed (e.g., if agents are not embodied, embodied behaviors would not be required), a mechanism for easily "decoupling" processes that are not necessary may be required. Mechanisms for establishing different kinds of relationships between practical reasoning and affective processes are also desirable (so that agents can be designed to be more or less "emotive" or "rational").
On the other hand, not only are generic platforms uncommon, but agent languages that are able to provide useful structures to program affective agents with practical reasoning are also uncommon. Current research is still focused on models, architectures, and the formalization of specific affective phenomena. However, to the best of our knowledge, no agent language has been proposed to allow the implementation of a wide range of kinds of affective agents with practical reasoning. The concepts (agent cognitions) that we have identified in this work constitute a good starting point to determine what this kind of agent language should include. By delimiting basic processes and concepts (which are related with either the appraisal process or with affect influence on behavior), the effort of researchers and software designers will focus on using or adapting them to specific applications. Therefore, this is a new step towards standardization in emotion modeling, which is one of the current challenges in artificial intelligence.

Conclusions
The development of affective agents needs to be based on the foundations proposed in different areas such as psychology, neuroscience, and behavioral economics. However, not all the proposals from these areas are suitable to be used in a computational model. For this reason, it has been necessary to carry out a detailed analysis to select the most suitable theories for modeling affective agents. From this analysis of the most appropriate theories to be used in a computational model, it is possible to establish the necessary processes that serve as the foundation for building affective agent models with a specific application. These concepts and processes have been used to define the generic theoretical framework presented in this article. This framework provides the foundations for the development of future languages and models in the field of affective computing and the agent-oriented paradigm. We have performed a horizontal analysis of philosophical, psychological, and social theories focused on the study of affective phenomena, emphasizing the concepts shared by the different approaches used in affective computing. Next, we have identified the affective characteristics and processes related to agent cognition and practical reasoning based on the BDI architecture. Finally, this generic framework has been used as the theoretical basis for the design of the GenIA 3 affective BDI agent architecture.
We are currently continuing to develop the GenIA 3 architecture to adapt and incorporate other processes from the proposed generic framework to extend the architecture's affect simulation capabilities. One of the works that we are currently focused on is the incorporation of processes to model empathy-based behaviors. Funding: This work is partially supported by the Spanish Government projects PID2020-113416RB-I00, GVA-CEICE project PROMETEO/2018/002, and TAILOR, a project funded by EU Horizon 2020 research and innovation programme under GA No 952215.

Conflicts of Interest:
The authors declare no conflict of interest.