Formalization of Event Perception and Event Appraisal Process

— Integration of emotion in a virtual agent is a topic of research to depict human-like behavior in a simulated environment. For the last few decades, many researchers are working in the field of incorporating emotions in a virtual agent. In the emotion model, the behavior of an agent depends upon how the event is perceived by the agent with respect to the goal. Hence, perception of the event while considering the past experience, importance of event towards achieving goal, agent’s own capabilities and resources is an important process which directly influences the decision making and action selection. The proposed models, till date, are either too complex to adapt or are using a very few parameters to describe the event. So, in this paper, we propose an extension of perception process in an existing emotion model, EMIA and suggest the formalization of event perception and appraisal processes to make it adaptable. This has been carried out using five parameters for event description along-with fuzzy logic which makes the process more effective yet simple.


I. INTRODUCTION
HE world presented to human being is dynamic and continuously changing which persists momentarily and gets change. A state of world at a particular moment of time is perceived by human as a discrete event. There can be multiple angles to look at the happened event. But a person (an agent) perceives the event only from the angle which is more agreeable to his vibes. And hence, different person perceives the same event differently. Also, same person can perceive the same event differently, if occurred at two different moments of time. Moreover, perception is also influenced by a person's current emotion state. In an experiment conducted by OCC [1], they divided the participants in two groups. For the first group they played some "happy" song and for the second group, they played a "sad" song. Then, they asked all participants to guess the steepness of a hill. The participants from group two estimated it as more steeper than estimated by group one. This shows that person with negative emotions percept the environment negatively and hence concludes that emotions influence our perception as well. Nevertheless, our emotions, which are stored as past experience in our long term memory, also influences our perception of an event. The way we percept the event, changes our emotion state and hence our action. For example, suppose a 4 yrs old kid is playing with a toy and broke it. Now, he may percept the event as good or bad, depending upon his past experience in similar event. If, in the past, his mother has bought a new toy to replace this broken one, then he will percept the event as a good event in the hope that he will get a new toy and will express his happiness. On the other hand, if, in past, his mother has scolded him for breaking the toy, then he will percept the same event as bad event in the fear that he will be scolded by his mother and will express sadness. Moreover, one's capability, resources available and importance of event towards achieving the goal also play an important role in visualizing an event occurred in external environment.
On occurrence of an event in the external environment, it is sensed, perceived and is recorded in the perceptual memory which successively elicits the emotion and then decides upon an action. In the percept process, instead of recording the happened event as it is, event is perceived on inquiring the following queries: 1. How much important the event is, towards achieving the goal? 2. From past experience, what belief (good or bad) does agent has for the object involved in the event? 3. Are sufficient resources available with the agent to handle the situation? 4. How much capable the agent is to deal with the event?
In conclusion, the perception of an event depends on various factors: the sensed information, goal importance, the past experience about the object involved in the event, agent's capabilities and the resource available.
Classically, an emotional intelligent agent follows the percept-appraise-elicit-act cycle. Since, the entire cycle is depending upon the information extracted from perception process; it is a crucial process that needs to be addressed carefully. Incorrect information at perception process may lead to inconsistent action. So, in this paper, we mainly focus on the perception process. For that, we propose an extension of perception process in an existing emotion model, EMIA. Furthermore, we are suggesting the formalization of event perception and appraisal processes to make the model adaptable. As human cognitive processes are ambiguous in nature and can be defined using soft boundaries only, the use of linguistic variables and fuzzy sets allow us to model the human processes in the way, they are actually formed, organized and handled. Moreover, the constraints with soft boundaries can be obtained by using fuzzy rules.
The paper is organized as follows. In section 2, related work is discussed in brief. Section 3 describes the emotion model, EMIA. Section 4 explains our proposed work, in detail. In section 5, scenario based illustration is demonstrated. Section 6 concludes the paper with a discussion.
El-Nasr et al [11] proposed a computational and adaptive model of emotions based on event appraisal called FLAME. But this model uses only two parameters: the impact of an event on a goal and the importance of this goal for the agent to decide the desirability of the event. Eva Hudlicka [4] proposed a symbolic affective cognitive architecture MAMID (Methodology for Analysis and Modeling of Individual Differences) that models a number of representative constructs and processes to implement many traits (temperament, personality, emotional style) and states (emotion, affective states, moods) based behavioral phenomena. The theory of Emotion and Adaptation of Smith and Lazarus was formalized by Gratch and Marsella [7] into EMA, a model to create agents that demonstrate and cope with (negative) affect. It describes perception as person's interpretation of their relationship with the environment and called is as causal interpretation.
Some of the models are very complex and hence nonadaptable while others use a very few parameters to describe the event. In conclusion, we are proposing a simple yet more effective perception process. For that, we are using the concept of fuzzy logic to maintain the ambiguous and flexible nature of the human processes. Furthermore, five parameters: goalImp, expectedEventResult, resource, sudden and belief (described in detail in section 4) are used to describe an event and to make all subsequent processes domain independent.

III. EMIA: EMOTION MODEL
EMIA [20] is a fuzzy rules based computational model for emotional intelligent agent situated in a virtual environment. It is a generic model, loosely based upon three cognitive theories of emotions: OCC [1], Scherer [9] and Roseman et al. [6]. It uses five appraisal variables <desirable, expectedness, outcomeProbability, causeHarm, and suddenness> to evaluate an event and elicit the primary emotions <happy, sad, anger, fear, and surprise> (as defined by Ekman [13]. The highlighted features of the model are the event appraisal; emotion elicitation; learning; emotion transition; emotion regulation and decay process. Furthermore, the mental state of an agent is represented in terms of belief, goal and action.
It follows three-layer architecture, as shown in Figure 1. The first layer is where the agent interacts with the external environment. Here, the events occur and the behavioral action takes place. The second layer is to convert the domain-specific knowledge into domain-independent information for further processing and vice versa. The third layer is basically responsible for emotion elicitation, transition and regulation. Firstly, an event is perceived from external environment and is recorded in the perceptual memory. Then, the event is appraised using five appraisal variables: Desirability, Expectedness, OutcomeProbability, Suddenness and CauseHarm. These appraisal variables are the linguistic variables defined using fuzzy sets as below:  [20] Once the event is appraised and mapped over the appraisal variables, then, the emotions are elicited based using the following rules: if Desirability(EV_ID,TS) is A1 and

Expectedness(EV_ID,TS) is A2 and Suddeness(EV_ID,TS) is A3 and OutcomeProbability(EV_ID,TS) is A4 and CauseHarm(EV_ID,TS) is A5 then Curr_Emo1 is E1 and …. andCurr_EmoN is EN
Here A1..A5 takes the values from the respective fuzzy sets. Curr_Emo1..N is the list of multiple emotions generated simultaneously and E1 to EN are their intensities. Once the emotion is elicited, it is checked for emotion regulation. If there is next event in sequence to occur, then next emotion is elicited while considering the current emotion (emotion transition) and if no event occurs, and then the current emotion starts decaying. This cycle keeps on repeating throughout the life time of the agent.

IV. EVENT PERCEPTION AND EVENT APPRAISAL PROCESS AND ITS FORMALIZATION
Whenever an event occurs, it is sensed by an intended agent to create its own view of the external world. The agent evaluates the event in terms of various parameters, for example, liking/disliking, expectedness/unexpectedness, resources available, its own capability and the goal to be achieved. Depending upon how the agent looks at the event, emotions are triggered with some intensity. For the same event, two agents can generate different emotions depending upon how they look at the event, how they evaluate it. Hence, the emotion elicitation and action selection depends upon how an agent percepts and appraises the event. Formally, event perception and appraisal results in emotion elicitation (as shown in equation 1):
In the proposed model, an agent is situated in a close environment. It has some beliefs about objects, external environment, its own capabilities and available resources. All these information is stored in the memory as belief-set. Every agent has its own belief-set. The belief-set gets updated each time an event is completed. This way it stores or updates the past experience related to a certain object. It also maintains a tag (good or bad) with every object. This tagging helps the agent to appraise the event on the basis of the past experience about the object. The goal-set keeps the set of goals need to be achieved. The goals are stored in order of priority.
Perception means receiving the event from the external environment and recording it. Same event can be viewed differently from different angles and hence can be perceived differently by different agents. For an event, multiple views can be created by different agents depending upon their beliefs. So, whenever an event occurs, it is received by the perception module in textual form. This module creates its own view of the event while considering the agent's belief-set. It assigns the event a unique event-id Evid and tags it with a time stamp. It recognizes the object/ agent responsible for the event. Then it stores the complete information in the memory as <Evid, EV_NAME, OBJ, TS >and generates a message containing event id, object concern and time stamp <Eid, OBJ, TS>. Then, it passes the message to the appraisal module. It is represented as Per(Aid, Evid, t) in eq(1) which means creation and representation of agents own view of the happened event.
According to the appraisal theories, the event is appraised while considering the importance of the event towards achieving the goal and agents own beliefs and available resources and then, accordingly, emotions are elicited. So, the appraisal process can be formalized as A (Evid, t, φ(ψ, β, ς)) in eq(1) which means appraisal of the perceived event Evid while considering its importance towards the goal (ψ) and agents self-appraisal (β). Suddenness is represented by ς which measures how suddenly an event has occurred.
The symbol ψ represents the goal importance and expected outcome of the event that is whether the happened event leading us towards the goal or not. If the event contributes in achieving the goal then the event is desirable and it will generate pleasant outcome. So, the two appraisal variables: Desirability and OutcomeProbability (used in EMIA) can be mapped over ψ. Desirability is associated with each event as a measure of how desirable the event is in pursuit of the goal. OutcomeProbability is the measure of consequences (pleasant/ unpleasant) of the event with respect to the goal. If the outcome of the event is not leading us towards the goal then a value N will be assigned to it.
Agent's self-appraisal parameter (β) checks the agent's own capabilities in terms of available resources and the past experience (which is now stored in belief set as agent's belief) associated with the object/agent involved, if any. So, the two appraisal variables: Expectedness and CauseHarm (used in EMIA) can be mapped over β. Expectedness is the likelihood of that event to occur according to the agent's world view or past experience. CauseHarm is whether the current event is threatening to agent presently or in future or not. For example, if some event occurs that can cause harm but we have sufficient resources to handle the event, then the event will not cause any harm to the agent.
Since the human emotion process is very complex, it is not possible to assign a crisp value to these variables. To capture the imprecise, ambiguous and subjective information, the concept of linguistic variables is used.
The appraisal variables are defined as fuzzy set of linguistic variables in EMIA. Similarly, the fuzzy sets of linguistic variables for event perception are defined as follows: Example: Upon seeing a snake, if an agent has a past experience (belief) that snakes are dangerous and on assessing the resources it is found that he has a stick which can be used to hit snake. Then, at the time of perception, he will assign goalImp = no, expectedEventResult = bad, belief = Snake "BAD", resource = yes, sudden = medium. Now, a suitable ifelse rule will be fired to determine the linguistic values of the appraisal variables. After applying the rule, the value of the appraisal variables is: D = UD, E = LowE, OP = UP, CH = willcauseHarmL, S=MediumS.
After completing the appraisal process, this module generates a message including event id, time stamp and values of appraisal variable as <Eid, TS, OBJ, D, E, S, OP, CH > and passed it on to emotion elicitation module as described in EMIA [20].

V. ILLUSTRATION
This system needs to work in a variety of applications to prove its advanced features; here, we have designed a prototype model for maze game. The different scenes are designed to test the proposed model. Out of those, following scene is illustrated here.
Scenario: It's a maze game. There are many obstacles in the maze and those obstacles can block the path. In the maze, suddenly some monster can appear that can kill the agent. Moreover, the agent has two powers. Each can be used only once. Power 1 can be used to remove obstacles from the path and power 2 can be used to kill the monster. Goal of the agent is to start from the source and reach the end point of the maze. The agent moving in the maze is having the beliefs as described below.
Belief-Set: {obstacle "BAD"; destroy_obstacle "GOOD"; Monster " BAD"; Kill_monster "GOOD"; Power1; } Event-Set: it is a set of sequence of sub-events as below: The model is simulated in many such scenes taken from real scenario. It is observed that the model simulates with high believability. Since we have designed exhaustive set of rules, the model is performing well in any type of given situation generated in a close loop environment VI. CONCLUSION Perception of the event is an important process which directly influences the decision making and action selection. Moreover, perception is influenced the past experience, importance of event towards achieving goal, agent's own capabilities and resources. The proposed models, till date, are either too complex to adapt or are using a very few parameters to describe the event. So, we propose an extension of perception process in an existing emotion model, EMIA and suggest the formalization of event perception and appraisal processes to make it adaptable. The model is based upon appraisal theories of emotions and OCC elicitation conditions. It is a simple yet more effective perception process as it uses the concept of fuzzy logic to maintain the ambiguous and flexible nature of the human processes. Furthermore, five parameters: goalImp, expectedEventResult, resource, sudden and belief are used to describe an event and to make all subsequent processes domain independent. Finally, the model is simulated for a scenario designed for a maze game.