scieee AI-readable full text Open interactive document viewer

Designing an Affective Intelligent Agent on GenIA³

Alfonso Espinosa, Bexy

Abstract

GenIA³ is a General-purpose Intelligent Affective Agent Architecture, which can be committed with specific psychological theories to create the design of the final agent. Intelligent affective agents can be implemented by using the default design of GenIA³. Also GenIA³ helps experts on fields like psychology or behavioral computing, to provide more precise and refined ways of describing each particular affective process, facilitating the abstraction from irrelevant implementation or design details, and offering a default design for the main processes. Nevertheless an extensive set of domains need to be tested in order to properly validate and refine GenIA³. In this work we describe the default design of GenIA³, and we propose an alternative design which is based on a model of emotions previously proposed. This illustrates the flexibility of GenIA³ and may inspire other alternative designs.

Full text

DEPARTAMENTO DE SISTEMAS INFORM´ ATICOS Y COMPUTACI´ ON UNIVERSIDAD POLIT` ECNICA DE VAL` ENCIA P.O. Box: 22012 E-46071 Valencia (SPAIN) Technical Report Ref. No.: Pages: 21 Title: Designing an Affective Intelligent Agent on GenIA3 Author(s): Bexy Alfonso and Emilio Vivancos and Vicente Botti Date: September 8, 2016 Keywords: Emotions, Affect, Affective architecture, Affective representation, Design VoBo Vicente J. Botti Bexy Alfonso GenIA3is a General-purpose Intelligent Affective Agent Architecture, which can be committed with specific psychological theories to create the design of the final agent. Intelligent affective agents can be implemented by using the default design of GenIA3. Also GenIA3helps experts on fields like psychology or behavioral computing, to provide more precise and refined ways of describing each particular affective process, facilitating the abstraction from irrelevant implementation or design details, and offering a default design for the main processes. Nevertheless an extensive set of domains need to be tested in order to properly validate and refine GenIA3. In this work we describe the default design of GenIA3, and we propose an alternative design which is based on a model of emotions previously proposed. This illustrates the flexibility of GenIA3and may inspire other alternative designs. 2 1 Introduction Research on Multi-Agent Systems (MAS) has traditionally focused on the search for rational solutions that maximize the quality or utility of the result. However, when an agent needs to simulate human behavior, this kind of approach is not the most appropriate. Studies demonstrate that, when facing alternative choices, emotions guide decision making towards an advantageous direction, influencing the subjective utility of the choices [8]. Also studies show that, in human-machine applications, the human-machine interaction is improved when virtual agents express emotions, enhancing human satisfaction [20], and believability [7, 32], among others. These results highlight the importance of affective characteristics in social and cognitive functions, becoming required characteristics for believable intelligent agents. As it has been addressed by recent approaches, several applications can benefit from affective agents, for example video games, education, health care, and simulation of decision-making [6]. Many computational approaches that model affective agents are based on the cognitive perspective of emotions. These proposals may model interconnected phenomena such as the appraisal process, the emotions dynamics, and/or the influence of affect on the cognitive processes and agent behavior. For example, an embodied virtual character that reacts emotionally to some external stimulus requires, not only an emotion-reaction mechanism, but also a mechanism for “interpreting” the stimulus and generating emotions; or for example, an agent that imitates humans when playing a card game that involves gambling, needs mechanisms for making decisions about what play make next, possibly biased by the current affective state of the agent, and mechanism for emotionally react to what happens in the game1. Thus, when modeling a single affect-related phenomena, researchers often should deal with modeling all related processes (and hence making greater “unnecessary” efforts), or focusing on modeling the required phenomena, paying less attention to the rest of processes (and hence maybe missing important details). On the other hand, studies argue for the prevalence on each individual of either emotions or rationality on his behavior, and for the relation between these two aspects [11]. Nevertheless, computationally modeling this relation is difficult. One of the reasons may be probably because, to the best of our knowledge, current computational architectures do not allow to parametrize this relation thus allowing to create artificial entities that are more rational or more emotive. In order to address these issues we have designed GenIA3[1], a Generalpurpose Intelligent Affective Agent Architecture. GenIA3is based on widely accepted psychological and neurological theories, and is built over a traditional BDI (Beliefs-Desires-Intentions) architecture, offering components to represent affective traits like personality, emotions and mood. GenIA3allows to implement various psychological theories relative to: individual differences, affect generation, affect dynamics, and affect influence on cognition and behavior, and comes with a default implementation that can be used in several domains. Besides GenIA3facilitates to set an equilibrium between the rational and the affective sides of an agent according to different psychological theories. Specifically it allows to establish this equilibrium by offering means for adjusting: the level of rationality of an individual, the frequency of rational and affective processes, the way the affective state influences decisions, the way the affective 1Literature argues for the influence of emotions on decisions in this kind of games [3, 9] 3 state influences individual’s believes, and how changes on the affective state generate behaviors. An architecture like GenIA3facilitates “the creation of computational models of specific psychological phenomena of interest” [36], by relieving the modeler of irrelevant implementation choices or design specifications, and providing plausible default values. Our aim is to illustrate the flexibility of GenIA3through two different designs of intelligent affective agents. One is the default design of GenIA3and the other is an alternative design based on the model of emotions for an empathic dialog agent proposed in [29]. This may help readers to get a better comprehension of how GenIA3works, and also, it may inspire researchers to perform alternative designs with other requirements and/or domain applications. 2 Background of GenIA3 In order to improve the reader experience we informally define some terms that will be used throughout the text. Hereinafter we refer to affective state as a generalized representation of all agent attributes that characterize one or more aspects of the agent state in line with the definition of core affect in [38]: “A neurophysiological state that is consciously accessible as a simple, nonreflective feeling (...)”; affective processes as the new processes added to the original BDI processes in order to consider affective characteristics; affective cycle as the cycle which modifies or generates the affective state; and reasoning cycle as the cycle that represents the agent practical reasoning. Moreover we refer to the ranges of values for the variables that define the affective state as affective categories, and to a single emotion as an emotion category (e.g. joy, fear, or anger, in line with classifications like the one of OCC [31]). 2.1 Core Processes of GenIA3 GenIA3includes the core processes that allow to implement different theories relative to: individual differences, affect generation, affect experience, and affect influence on cognition and behavior. First, individual differences are represented through personality traits that may influence the processes of the agent reasoning and affective cycles. Besides, affect generation is represented through the appraisal process, affect experience through the affect generator and affect temporal dynamics processes, affect influence on cognition though the affective modulator of beliefs, and affect influence on behavior is represented through the coping and filter processes. GenIA3also includes the processes of a traditional BDI agent architecture. Figure 1 shows the structure of GenIA3. The reasoning cycle includes the main processes of a BDI agent (bottom side of Figure 1). The architecture has two other cycles: one has only one process that is executed continuously, the affect temporal dynamic, and the other (affective cycle) includes the rest of affective processes. In the implementation of the architecture, it is possible to set a synchronization between the reasoning and affective cycles. The theories that support this customization are the appraisal theories. Some of them such as Scherer’s appraisal theory [40], state that the appraisal is performed at several levels and that several appraisal evaluation checks are performed sequentially. Next we describe the core processes of an affective BDI agent following the GenIA3structure [1]. 4 appraisal affect generator coping affective modulator of beliefs execute filter options brf beliefs affect temporal dynamics actions perceptual input concerns internal events personality current options external events affectively relevant events affective state Affective processes intentions Affective cycle Rational processes Figure 1: GenIA3: a General-purpose Intelligent Affective Agent Architecture that integrates BDI and affective processes. Sequences are represented as solid line arrows, subprocess as dashed line arrows, and exchange of information as dotted line arrows. Five core affective processes are included in GenIA3:appraisal,affect generator,coping,affective modulator of beliefs, and affect temporal dynamics. In order to illustrate how each of these processes work, we will take up the example introduced in Section 1, of an gent that imitates humans when playing a card game that involves gambling. The evaluation of the current situation according to the current state of the world and the agent’s concerns (i.e., interests, motivations, ideals, or standards) is performed in the appraisal process. In GenIA3this process can be committed to any particular appraisal theory (e.g., [43], [40], [37], [31]), and several parameters can be used in order to perform this appraisal (e.g., the agent’s beliefs,concerns,internal events, external events, memories of affectively relevant events,current options). A set of “appraisal variables” result from this evaluation. Consider, for example, that our agent concerns involve to win every single hand, and he looses the current hand; an appraisal variable “desirability” may result from the evaluation of this event in the appraisal process, whose value will be negative. New relevant events (according to their impact on the affective state of the agent), are also stored in the memory of affectively relevant events during the appraisal process. These affectively relevant events may be used in a future appraisal.2. An example of affectively relevant event could be to loose a risky hand where a high bet was made. Although the appraisal process has several parameters, not all of them are necessarily used. For example, following the EMA model [23], the appraisal variable desirability is determined by assessing the value of a proposition. It may imply the use of the agent concerns, and the agent beliefs (in order to evaluate the agent concerns). The affect generator is in charge of generating the agent affective state by using the current affective state and the appraisal variables generated by the appraisal process. The affect generator process can be committed to any psychological theory and the agent affective state can be represented either as a set of emotion categories, appraisal variables, or mood dimensions. For example, when representing affective state through mood dimensions, the Pleasure-Arousal-Dominance or PAD model of mood [27], or the Russell’s bipolar dimensions (hedonism and arousal3) [38] can be used. In our example, if out agent is very depressed, 2We allow this possibility on the base that past personally significant events (which are stored in the autobiographical memory), can have a significant impact on human life, shaping the perception of the upcoming tasks and modifying actual behavior [42, 41, 10]. 3According to Russell’s definition of affective state: “A neurophysiological state that is consciously acces- 5 and he wins a hand, he may feel more happy, but probably not as happy as if his previous affective state were happy already. Determining the way the agent affective state changes is what the affect generator does. The coping process is tightly linked to the agent personality, since this process determines whether some agent responses or reactive behavior should be generated, and what should be these responses or reactive behavior. These agent responses can represent “response tendencies” in line with [30], or can be oriented to take back the agent affective state to a desired state4(also called “coping strategies” [23]). Examples of possible reactive behaviors are facial expressions or body gestures that are involuntary and individual. The agent can have coping strategies like “shift responsibility” (e.g., to think that he received a bad hand because the dealer is cheating), or “wishful thinking” (e.g., to think that he will win all subsequent hands) [23]. These coping strategies may imply a modification on the beliefs of the agent, what involves the process affective modulator of beliefs (described bellow). The process for controlling the affect temporal dynamics 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. The appraisal,affect generator, and coping processes are part of the appraisal-reappraisal cycle (also called affective cycle) that is represented in most appraisal theories5. The affective modulator of beliefs is not executed as an independent process but as a subprocess of either the coping process or the brf process. The brf process corresponds to the “belief revision function” which is explained next. The affect temporal dynamics, on the other hand, is not included in this affective cycle, because it doesn’t depend on any other process and no other process depends on it. Thus, the affect temporal dynamics is controlled in an independent cycle. GenIA3also contains the cognitive processes that take place in a typical BDI agent reasoning cycle. These processes are summarized in brf,options, filter, and execute [45]. The brf process uses a perceptual input along with current beliefs in order to determine the agent’s new beliefs. As a result of this process, new external events (one per percept) may be generated. In line with the idea that the agent affective state contributes to the maintenance of beliefs [22, 33, 18] (e.g., a negative affective state induces an individual to question more his or her beliefs, making him or her more susceptible to accept new information), the brf can use the affective modulator of beliefs to determine how the beliefs are maintained. In order to understand the function of the affective modulator of beliefs let’s consider the agent perceived self-efficacy in the card game: the belief related to “the conviction that one can successfully execute the behavior required to produce the outcome” [2]. If he continuously losses several hands his perceived self-efficacy me be affected. See [33, 14] for a more detailed description of affective beliefs revision. The tasks for options sible as a simple, nonreflective feeling that is an integral blend of hedonic (pleasure–displeasure) and arousal (sleepy–activated) values” [38]. 4The specification of a “desired state” depends on the assumptions or psychological theories used in particular designs. For example according to [17], a desired state is that where emotional distress is reduced, and according to [21] a state where the negative emotional responses associated with stress are reduced. 5Appraisal-reappraisal is the term used in the Scherer’s appraisal theory [40], which is considered one of the most complex and hence, the representation of other appraisal theories could be easily done through it [12]. 6 generation are performed in the options process. These options (or desires) are generated on the base of the agent’s current beliefs,external events,internal events, and intentions. These options represent the means whereby the agent can achieve its intentions (e.g., doubling the bet, standing, or hitting a card). The filter process determines what to do by generating the agent’s intentions (e.g., rising the bet either by 5 or 10 points). To this end, a deliberation process is performed that considers previously-held intentions, current beliefs, and options. Also, as part of this deliberation process, the current agent affective state, and some aspect of the agent personality, are considered. Specifically, in relation to the agent personality, the extent to which the agent decisions are influenced by its affective state can be taken into account. We call it rationality level, which aims to facilitate setting an equilibrium between the rational and the affective sides. Including the affective state and personality aspects on the filter process relies on theories that argue for the need of considering the influence of emotions and individual differences for behaving either rationally or emotionally/intuitively/unconsciously, in order to properly model human behavior [19]. Experimental studies offer evidences that emotions drive deliberative decision making [9]. The execute process contains the “action selection function”, so it uses the current intentions to determine the next action to be executed. The execution of actions can produce internal events that are related to, for example, the action failure or success. For example, if the action “rise bet” is execute, a possible reason for it to fail could be that the bet reached a top value. 3 Extension of the Jason Platform and Language to Include Affective processes In order to offer a formalization of GenIA3we have extended the reasoning cycle and operational semantics used in Jason [4, 44], a well know agent-oriented programming language grounded in a logical computable language (AgentS- peak [35]). Jason is widely accepted on the agents community due to its versatility to be adapted to several kinds of agent applications, thus it becomes a suitable choice for building “customizable” affective agents able to represent a wide set of situations. 3.1 Extension of the Jason reasoning cycle We have extended the reasoning cycle of a Jason agent [4], in order to build human-like agents whose execution and representation consider both affective and rational processes. Figure 2 shows the steps of the three cycles that are part of the agent execution, as well as the relationship between these steps. The colored steps are either new or modified, while the non-colored steps are the ones proposed in [44]. Similarly, the transitions with dashed lines are new or modified, and their corresponding transitions rules are presented in Section 3.2. There is a clear correspondence between these steps and the processes of GenIA3. The affective processes appraisal,affect generator,coping,affective modulator of beliefs, and affect temporal dynamics of GenIA3 are performed in the steps Appr,UpAs,Cope,AffModB, and AsDecay of Figure 2 respectively. The process AffModB has been integrated in the reasoning cycle, since it is closely linked to the addition and deletion of beliefs what takes place in the reasoning cycle. The process SelCs is part of the 7 SelAppl Perceive ProcMsg SelEv ApplPl RelPl AddIM SelInt ExecInt ClrInt ApprSelCs Cope AsDecay AffModB UpAs Figure 2: Extension of the reasoning cycle of AgentSpeak. New and modified steps are colored and new and modified transitions are dashed lines. coping process of the GenIA3architecture, and it is in charge of determining the coping strategies that need to be executed in the current affective cycle. The brf process is performed through the Perceive6and ProcMsg steps; the steps SelEv,RelPl, and ApplPl perform the options process; the filter process is performed through the SelAppl,AddIM, and SelInt steps; and the ExecInt and ClrInt steps are in charge of the execute process. Figure 2 also shows that three possible cycles can take place during the agent execution. These cycles control the affective processes (affective cycle), the rational processes (reasoning cycle) and the temporal dynamics of affect (affect temporal dynamics cycle). Next we describe the steps for each cycle. Before starting with the affective cycle it is worth mentioning that, in an initialization stage, the affective state has an initial value. This value is also the agent “equilibrium state”, which is a neutral state where the agent doesn’t experience any significant emotion. The affective cycle starts with the Appr step, where the appraisal process is performed on the base of several parameters including the agent concerns,personality, and the probabilities associated with agent beliefs (if prospect-based emotions are generated). The Appr also determines whether the event is relevant for the agent from an affective point of view (in case that the new affective state has an event associated). Then, in the UpAs step, the affective state is updated by using the appraisal variables generated in the Appr step. After the updating of the affective state, the SelCs step verifies whether it is necessary to generate new behaviors in the agent according to this change on the affective state, and also verifies which of the agent coping strategies are applicable. The Cope step performs the tasks required to execute the selected coping strategies. The intentions derived from the execution of coping strategies are added as intended means at the end of the base of intentions, which is shared by both reasoning and affective cycles. Both reasoning and affective cycles generate their own intentions independently which are included in this common base of intentions. Intentions generated by the affective cycle are added at the end of the current intentions, as well as the intentions generated by steps of the reasoning cycle. In the default design all intentions are executed by their insertion order in the SelInt step of the reasoning cycle. The default implementation of this step is explained in Section 4. The reasoning cycle contains two new steps (which are the steps Perceive and AffModB), and three modified steps (ProcMsg,SelAppl, and ExecInt). Perceive is 6Although the formalization of AgentSpeak considers that an agent can perceive new information from the environment, to the best of our knowledge, there is no explicit step in the reasoning cycle for this task. We have decided to make this step explicit with the initial step Perceive. 8 (a) Original configuration. (b) New configuration. New components are highlighted. Figure 3: Configuration of a Jason agent. the initial step of the reasoning cycle. In this step the agent beliefs are modified according to what can be observed from the environment and/or according to external events. The Perceive step is followed by the ProcMsg step, which is in charge of processing the messages received from other agents. Next, the information coming from the received messages, and from the perception of the environment (on the Perceive step), can be modified in the step AffModB, which follows the ProcMsg step. In GenIA3the agent affective state also influences agent’s decisions. The SelAppl step performs this task by selecting the next applicable plan; thus it has been modified to consider the agent current affective state, and also the agent rationality level. The step ExecInt may require to execute intentions that imply adding or removing beliefs. Thus it can also be followed by the step AffModB to this end. Finally the affect temporal dynamics cycle contains one step: AsDecay. This step determines the tendency of the affective state to return to its “equilibrium state”. This task may use some trait of the agent personality. 3.2 Extension of the AgentSpeak Operational Semantics In order to build an extension of the Jason platform whose agents try to simulate a human-like behavior, with affect-related processes and characteristics, we extended the AgentSpeak operational semantics, considering that it is the base of the Jason operational semantics. The AgentSpeak agent configuration is defined by a tuple hag, C, M, T, si, whose values can be modified after a transition among two steps. Figure 3(a) shows this configuration as well as the structure of each one of its components. The new Jason agent configuration has the form hag, C, M, T, Ta, Mem, s, asti. The new components of this configuration are highlighted in Figure 3(b), and are described next. •ag represents the agent program, which originally contains a set of beliefs (bs), and a set of plans (ps). Additionally a set of concerns (cc), and a personality (P) has been included in the agent program ag. ◦The agent concerns cc is an agent attribute which is in line with the concerns in GenIA3, and reflects the agent’s ideals, motivations, interests, and/or standards. ◦Personality Pincludes the personality traits tr. It contains a set of numerical values representing the agent personality traits (e.g., the Five Factor Model of personality [24] argues that the traits openness, conscientiousness, extraversion, agreeableness, and neuroticism can differentiate an individual from the rest). In line with the “rationality level” of GenIA3we propose rl, which is also part of the agent personality. The rationality level states the extent to which 9 Affective modulator of beliefs In this transition beliefs to be added and beliefs to be removed in tuple TaUb are modulated according to the agent current affective state Taσ(by the function modB(AddB, DelB, Taσ)), where a new set of beliefs to be added (MAddB) and a new set of beliefs to be removed (MDelB) are obtained. The third component of TaUb indicates the step that requires the addition or deletion of beliefs, helping to determine the next step in the cycle (i.e., SelEv or ClrInt). The corresponding additions and deletions are performed, and the corresponding events of belief addition or deletion are created. TaUb =hAddB, DelB, ProcMsgi modB(AddB, DelB, Taσ)= (MAddB, MDelB) hag, C, M, T, Mem, T a, AffModB, asti → hag0, C0, M, T, Mem, T a, SelEv, asti (ModB1) where for each mdb ∈MDelB:ag0 bs =agbs\{mdb}C0 E=CE∪ {h−mdb, >i} and for each mab ∈MAddB:ag0 bs =agbs ∪ {mab}C0 E=CE∪ {h+mab, >i} TaUb =hAddB, DelB, ExecInti modB(AddB, DelB, Taσ)= (MAddB, MDelB) hag, C, M, T, Mem, T a, AffModB, asti→hag0, C0, M, T, Mem, Ta, ClrInt, asti (ModB2) where for each mdb ∈MDelB:ag0 bs =agbs\{mdb}C0 E=CE∪ {h−mdb, >i} and for each mab ∈MAddB:ag0 bs =agbs ∪ {mab}C0 E=CE∪ {h+mab, >i} Mood temporal dynamic A single cycle controls how the affective state decays over time. It contains the single step AsDecay, which is continuously executed. This task is performed by the AsDec(Taσ, agPtr )function. hag, C, M, T, Mem, Ta, s, asti→hag, C, M, T, Mem, Ta0, s, asti (DecAffState) where: Ta0 σ=AsDec(Taσ, agPtr ) The transition rules that correspond to the steps not previously addressed, have also been modified so that the structure of the agent configuration has been adapted to the new configuration. They are not presented for simplicity. 4 Default design In Section 3.2 we introduced a set of functions that are used in the agent execution cycles, and that can be customized by the programmer. The existence of this set of functions adds flexibility to the agent programmer to adapt the agents behavior to several psychological theories and application domains. We have implemented these functions on the base of widely used psychological theories. This default implementation has been used in several scenarios, and can be extended if required. Next we perform a general description of these functions in order to offer a global understanding of the default implementation, avoiding specific details for simplicity. 16 In our default design, the affective state Taσis represented as the agent mood in a dimensional way, where three values describe the agent mood in a particular moment: pleasure, arousal, and dominance (or PAD, according to Mehrabian’s model [26]). Appraisal variables TaAv can take three possible values (desirability,likelihood, or causal attribution), which were selected from the EMA model proposed in [23]. The traits of the agent personality follow the Five Factor Model [24], which describes individual traits through five dimensions (openness, conscientiousness, extraversion, agreeableness, and neuroticism). We propose a design for the affective cycle steps inspired by the Gebhard’s ALMA model [16]12. The initial (and also equilibrium affective state) of the agent is calculated following Mehrabian’s work [25], which proposes a mapping of the agent five dimensions of personality to the three dimensions of the PAD space. The function Appraise(ε, bs, cc, Mem, Ap)evaluates the event εwhen this event implies the addition or deletion of a belief. This function determines the desirability,likelihood, and causal attribution of the resulting state after the addition or deletion of the belief. Desirability is determined according to the agent concerns (by using its numerical value), likelihood is determined according to the probabilities of the agent beliefs (taking the probability value), and the causal attribution can be the environment (if the belief to be added or removed is a percept) other agent (if the belief to be added or removed is a message), or self (if the belief to be added removed is a mental note). For example, consider an agent that represents a student who wants to pass an exam, and whose concerns value can be calculated as V=Note/MaxNote, where Note is the exam result and MaxNote is the maximum possible result (lets say 5). If he is told by the teacher that he passed with 4, desirability will be 4 5,likelihood will be 1, and the causal attribution will be other agent. Also, in our default implementation, the function AffRelEv(ε, Av)determines that the event εis relevant when the desirability in Av is not in a range of “average desirabilities” (i.e., when it is extremely undesirable or extremely desirable). Besides the affective state is updated through the function UpAffSt(σ, Av) in three steps. First, five possible emotion categories can be derived (hope, joy,fear,sadness, and guilt), starting from the appraisal variables Av following [23]. Secondly, each emotion is mapped into the three PAD dimensions following [16]. Thirdly, mapped emotions are averaged in a single value for each dimension according to [16]13. The function SAp (Ap, σ, Prl) uses the affective state σand the rationality level of the agent personality Prl in order to select the next actions to be performed (by selecting the next applicable plan). It selects an applicable plan by ranking applicable plans with and without considering the affective state; then a general ranking is assigned to each plan by weighing up the two first rankings (the weight for the rank with affect is 1 −Prl and the weight for the rank without affect is Prl). The applicable plan with the minimum value in the general ranking is selected. The function SCs(Cs) always selects by default the first coping strategy from the set of coping strategies to be executed. Also by default the function modB(AddB, DelB, σ)adds beliefs to AddB and removes beliefs from DelB. Offering additional mechanisms to determine the way beliefs may be modu- 12In the implementation of the steps we avoided to introduce too much execution complexity selecting as default mechanisms, those most commonly implemented in computational approaches. 13Considering that the set of emotions in [16] doesn’t contain all emotions in [23] we carefully looked for a similarity assuming sadness as distress and guilt as remorse. 17 lated would make this approach too complex for being included as a default implementation. The default design for the rest of the functions that haven’t been described (such as SM(MIn) or SocAcc(id, ilf, at)), follows the default design of a Jason agent, which can be found in [5]. Some of these function of the original Jason agent (such as the function SI(CI) for selecting the next intention to be executed), could also be customized by using the tools offered by the Jason original platform. 5 An Alternative Design In order to illustrate the flexibility of our approach, in this section we describe an alternative design based on the model of emotions for an empathic dialog agent proposed in [29]. This model starts from BDI-like agents and it is focused on the improvement of the human-machine interaction by endowing an agent with facial expressions related to empathic emotions. This alternative model proposes an appraisal process based on known appraisal theories [39, 31, 37]. In this model the agent personality traits, coping strategies, and emotional memory are not represented. Neither do the related processes or a process for modulating the agent beliefs. On the other hand the action selection is focused on the generation of dialogs and facial expressions. We will focus on the appraisal process. In to this model the agent affective state σcan be represented as a set of five emotion intensities14 corresponding to satisfaction, frustration, irritation, sadness, or anger. The set TaAv would include four appraisal variables, (called intensity variables in [29]), which are computed from an event characteristics with respect to an intention. This event corresponds to Tin our approach, and we represent the intention achievement with a particular belief b15. The affective cycle is executed twice the reasoning cycle, after the step SelEv and after the step ClrInt, in such a way that it is possible to evaluate the mental state at the beginning and at the end of the reasoning cycle by updating different appraisal variables. The appraisal variables are calculated by the function Appraise(T, bs, cc, Mem, Ap)as follows. Potential to cope in case of an intention failure (potential cope): if a plan in Ap with triggering event +bcontains an action −b, and there is an action +bin another plan of Ap then potential cope = 1, if there isn’t an action +bin another plan then potential cope = 0; importance of achieving the intention (imp s): it can be calculated by subtracting the value of concerns cc when the agent doesn’t believe bfrom the value of concerns cc when the agent believes b;importance not to have the intention blocked (imp e): according to [29] the value of imp e may be equal or negatively correlated with imp s according to the nature of the intention; effort invested to try to complete the intention (effort): if the agent believes b, then effort = 0, otherwise effort = 1; degree of certainty before the event concerning the intention achievement (deg cert): it can be evaluated according to the probability of the belief b16. With this design, emotions can be derived according to the formalization in [29], and facial expressions can be integrated, but we mainly wanted to focus on the integration of a different appraisal model. 14The authors point out that one or more emotions may be active at the same time. 15If the agent believes bafter the event T(which has the form +b), we consider that the intention has been achieved. 16These calculations can be improved for example by increasing the search depth for determining whether some action leads the agent to believe b, nevertheless our aim is just to illustrate a possible way to apply other alternatives to implement affective processes through our approach. 18 6 Conclusions In this work we have described the core processes of GenIA3, a Generalpurpose Intelligent Affective Agent Architecture which is based on the BDI agent architecture. We have also presented its formalization and its customizable components. This formalization includes an extension of the AgentSpeak reasoning cycle, and the definition of its operational semantics. With this kind of formalization, comparisons of different psychological theories can easily be performed (thus approaches can be adapted to specific application domains requirements and psychological theories). GenIA3is grounded on widely studied psychological and neurological theories and offers an integral vision of the agent and its behavior considering both rational and affective attributes and processes. In order to offer this integral vision we have not only modeled emotions. We also address the agent affective state in a more generic way allowing to use different psychological theories for its representation. Also different psychological theories can be used in other affect-related processes, since our formalization allows customizing several steps in the reasoning and affective cycles. In order to illustrate this we have described two different designs: the default design of GenIA3and an alternative design based on a previously proposed model of emotions. References [1] B. Alfonso, E. Vivancos, and V. J. Botti. Toward a Systematic Development of Affective Intelligent Agents. Technical report, DSIC, UPV, Spain, 2016. [2] A. Bandura. Self-efficacy: Toward a Unifying Theory of Behavioral Change. Psychological review, 84(2):191, 1977. [3] A. Bechara, H. Damasio, and A. R. Damasio. Emotion, Decision Making and the Orbitofrontal Cortex. Cerebral cortex, 10(3):295–307, 2000. [4] R. H. Bordini and J. F. H¨ubner. Semantics for the Jason Variant of AgentSpeak (Plan Failure and Some Internal Actions). In Proceedings of ECAI’10, pages 635–640, Amsterdam, The Netherlands, The Netherlands, 2010. IOS Press. [5] R. H. Bordini, J. F. H¨ubner, and M. Wooldridge. Programming Multi- Agent Systems in AgentSpeak Using Jason. Wiley, 2007. [6] T. Bosse, J. Broekens, J. Dias, and J. van der Zwaan. Emotion Modeling. Springer, 2014. [7] S. Brave, C. Nass, and K. Hutchinson. Computers that Care: Investigating the Effects of Orientation of Emotion Exhibited by an Embodied Computer Agent. International journal of human-computer studies, 62(2):161–178, 2005. [8] J. R. Busemeyer, E. Dimperio, and R. K. Jessup. Integrating Emotional Processes Into Decision-Making Models, pages 29–44. Oxford University Press, 2007. [9] C. F. Camerer, G. Loewenstein, and M. Rabin. Advances in Behavioral Economics. Princeton University Press, 2011. [10] M. A. Conway. Autobiographical Memory: An Introduction. Open University Press, 1990. 19 [11] R. De Sousa. The Rationality of Emotion. Mit Press, 1990. [12] J. Dias, S. Mascarenhas, and A. Paiva. FAtiMA Modular: Towards an Agent Architecture with a Generic Appraisal Framework, chapter Generic Models and Frameworks, pages 44–56. Springer International Publishing, Cham, 2014. [13] S. Frederick. Cognitive Reflection and Decision Making. The Journal of Economic Perspectives, 19(4):25–42, 2005. [14] N. Frijda, A. Manstead, and S. Bem. Emotions and Beliefs: How Feelings Influence Thoughts. Studies in Emotion and Social Interaction. Cambridge University Press, 2000. [15] N. H. Frijda. The Laws of Emotion. Lawrence Erlbaum Associates, Incorporated, 2007. [16] P. Gebhard. ALMA: A Layered Model of Affect. In Proceedings of the 4th AAMAS, pages 29–36, NY, USA, 2005. ACM. [17] J. J. Gross and R. A. Thompson. Emotion Regulation: Conceptual Fundations. In Handbook of Emotion Regulation, Guilford Publications. Guilford Publications, 2011. [18] J. Ito, D. Pynadath, and S. Marsella. Modeling Self-Deception Within a Decision-Theoretic Framework. AAMAS, 20(1):3–13, 2010. [19] W. G. Kennedy. Modelling Human Behaviour in Agent-Based Models. In Agent-based models of geographical systems, pages 167–179. Springer, 2012. [20] J. Klein, Y. Moon, and R. W. Picard. This Computer Responds to User Frustration: Theory, Design, and Results. Interacting with computers, 14(2):119–140, 2002. [21] R. S. Lazarus and S. Folkman. Stress, Appraisal, and Coping. Springer publishing company, 1984. [22] S. Marsella and J. Gratch. Modeling Coping Behavior in Virtual Humans: Don’t Worry, be Happy. In Proceedings of AAMAS’03, pages 313–320. ACM, 2003. [23] S. C. Marsella and J. Gratch. EMA: A process model of appraisal dynamics. Cognitive Systems Research, 10(1):70–90, 2009. [24] R. R. McCrae and O. P. John. An Introduction to the Five-Factor Model and its Applications. Journal of personality, 60(2):175–215, 1992. [25] A. Mehrabian. Analysis of the Big-Five Personality Factors in Terms of the PAD Temperament Model. Australian Journal of Psychology, 48(2):86–92, 1996. [26] A. Mehrabian. Pleasure-Arousal-Dominance: A General Framework for Describing and Measuring Individual Differences in Temperament. Current Psychology, 14(4):261–292, 1996. [27] A. Mehrabian and J. A. Russell. An Approach to Environmental Psychology. MIT Press, 1974. [28] K. Nelson. The Psychological and Social Origins of Autobiographical Memory. Psychological science, 4(1):7–14, 1993. [29] M. Ochs, D. Sadek, and C. Pelachaud. A Formal Model of Emotions for an Empathic Rational Dialog Agent. AAMAS, 24(3):410–440, 2012. 20 [30] A. Ortony. On Making Believable Emotional Agents Believable. In R. P. Trapple, P. Petta, and S. Payer, editors, Emotions in Humans and Artifacts, chapter 6, pages 189–212. MIT Press, 2003. [31] A. Ortony, G. L. Clore, and A. Collins. The Cognitive Structure of Emotions. Cambridge University Press, July 1988. [32] R. W. Picard and K. K. Liu. Relative Subjective Count and Assessment of Interruptive Technologies Applied to Mobile Monitoring of Stress. International Journal of Human-Computer Studies, 65(4):361–375, 2007. [33] C. Pimentel and M. Cravo. Affective Revision. In C. Bento, A. Cardoso, and G. Dias, editors, Progress in Artificial Intelligence, volume 3808 of LNCS, pages 115–126. Springer Berlin Heidelberg, 2005. [34] G. D. Plotkin. A Structural Approach to Operational Semantics. Technical Report DAIMI FN-19, Aarhus University, 1981. [35] A. S. Rao. AgentSpeak(L): BDI Agents Speak Out in a Logical Computable Language. In R. Van Hoe, editor, Seventh European Workshop on Modelling Autonomous Agents in a Multi-Agent World, Eindhoven, The Netherlands, 1996. [36] R. Reisenzein, E. Hudlicka, M. Dastani, J. Gratch, K. Hindriks, E. Lorini, and J.-J. Meyer. Computational Modeling of Emotion: Toward Improving the Inter- and Intradisciplinary Exchange. IEEE Transactions on Affective Computing, 4(3):246–266, 2013. [37] I. J. Roseman. A Model of Appraisal in the Emotion System: Integrating Theory, Research, and Applications, pages 68–91. Oxford University Press, 2001. [38] J. A. Russell. Core Affect and the Psychological Construction of Emotion. Psychological review, 110(1):145–172, 2003. [39] K. R. Scherer. Criteria for emotion-antecedent appraisal: A review. In V. Hamilton, G. H. Bower, and N. H. Frijda, editors, Cognitive perspectives on emotion and motivation, volume 44 of NATO ASI Series, pages 89–126. Springer Netherlands, 1988. [40] K. R. Scherer. Appraisal Considered as a Process of Multilevel Sequential Checking. Appraisal processes in emotion: Theory, methods, research, 92:120, 2001. [41] N. Schwarz. Emotion, Cognition, and Decision Making. Cognition & Emotion, 14(4):433–440, 2000. [42] L. Selimbegovi´c, I. R´egner, P. Huguet, and A. Chatard. On the Power of Autobiographical Memories: From Threat and Challenge Appraisals to Actual Behaviour. Memory, pages 1–8, 2015. [43] C. A. Smith and R. S. Lazarus. Emotion and Adaptation. In L. A. Pervin, editor, Handbook of Personality: Theory and Research, pages 609–637, 1990. [44] R. Vieira, ´ A. F. Moreira, M. Wooldridge, and R. H. Bordini. On the Formal Semantics of Speech-Act Based Communication in an Agent-Oriented Programming Language. J. Artif. Intell. Res.(JAIR), 29:221–267, 2007. [45] G. Weiss. Multiagent Systems. Intelligent robotics and autonomous agents. MIT Press, 2013. 21