mmr format - hw  · web viewit is affected by an interpretational bias. this bias allows the...

133
Deliverables Report IST-2001-33310 VICTEC <May 2004> Final Prototype of Empathic Synthetic Characters AUTHORS: Ana Paiva, Ruth Aylett, João Dias, Daniel Sobral, Sandy Louchart, Carsten Zoll, Guilherme Raimundo, Fernando Rebelo, Nuno Otero, Jonathan Pickering, Sarah Woods STATUS: Draft - 1 - Deliverable 5.3.1 / report 1 / final version

Upload: others

Post on 30-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Final Prototype of Empathic Synthetic Characters

AUTHORS: Ana Paiva, Ruth Aylett, João Dias, Daniel Sobral, Sandy Louchart, Carsten Zoll, Guilherme Raimundo, Fernando Rebelo, Nuno Otero, Jonathan Pickering, Sarah Woods

STATUS: Draft

CHECKERS: Ruth Aylett, Sue Richardson

- 1 -Deliverable 5.3.1 / report 1 / final version

Page 2: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

PROJECT MANAGERName: Ruth AylettAddress: CVE, Business House, University of Salford, University Road,, Salford, M5 4WTPhone Number: +44 161 295 2922 Fax Number:+44 161 295 2925E-mail: [email protected]

TABLE OF CONTENTS

1 PURPOSE OF THIS DOCUMENT....................................................................................4

2 EXECUTIVE OVERVIEW..................................................................................................5

3 INTRODUCTION...............................................................................................................6

3.1 EMOTION STRUCTURE...................................................................................................... 9

3.2 APPRAISAL.......................................................................................................................... 10Goals............................................................................................................................................... 10Conditions....................................................................................................................................... 12Emotional reaction rules................................................................................................................. 16Prospect Based Reactions................................................................................................................ 17Emotion Generation........................................................................................................................ 18

3.3 ACTION SELECTION AND COPING...............................................................................23Schematic Layer............................................................................................................................. 23Conceptual Layer............................................................................................................................ 24

3.4 MEMORY / WORLD INTERPRETATION.......................................................................35Knowledge Storage and Retrieval................................................................................................... 35Searching for unbound names......................................................................................................... 36

3.5 THE LANGUAGE SYSTEM................................................................................................ 383.5.1 Introduction:.................................................................................................................... 383.5.2 The concept of Speech acts:............................................................................................. 383.5.3 From action to utterance.................................................................................................. 393.5.4 Action categorisation....................................................................................................... 403.5.5 User-to-agent language action design..............................................................................413.5.6 Language Actions............................................................................................................ 41

- 2 -Deliverable 5.3.1 / report 1 / final version

Page 3: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

4 INTEGRATION WITHIN THE RUN-TIME ENVIRONMENT............................................43

4.1 SENSING AND ACTING IN THE VIRTUAL WORLD....................................................43Sensing........................................................................................................................................... 44Acting............................................................................................................................................. 45

4.2 NARRATIVE CONTROL.................................................................................................... 45

4.3 SPEECH ACTS..................................................................................................................... 46

4.4 THE VISUALIZATION SYSTEM....................................................................................... 49

5 BUILDING CHARACTERS.............................................................................................51

5.1 THE CHARACTER’S MIND............................................................................................... 51Building Personalities..................................................................................................................... 51Action Tendencies........................................................................................................................... 56Defining Domain Operators for the Planning Process.....................................................................58

5.2 THE CHARACTER’S BODY.............................................................................................. 59

6 CONCLUSION................................................................................................................74

7 REFERENCES................................................................................................................75

8 ANNEX 1 – ON THE USE OF SPEECH ACTS IN THE VICTEC PROJECT..................76

8.2 HELP  Sequence diagram: (Victim decline help offer/ Victim welcome help offer).........78

8.3 CONFRONTATION Sequence diagram (Victim deny bully / Victim obey bully)............79

8.4 SOCIALISING sequence diagram.......................................................................................80

8.5 Agent to user / Overall interaction process..........................................................................82

9 ANNEX 2 – DEVELOPED CHARACTERS......................................................................83

- 3 -Deliverable 5.3.1 / report 1 / final version

Page 4: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

1 PURPOSE OF THIS DOCUMENT

This document describes the final prototype for the Empathic Characters in light with what has been proposed in D5.1.1 and further discussed in D5.2.1.

The main focus of this deliverable is to provide a detailed description of the agent architecture to be used to construct intelligent agents that have some degree of empathy, taking into account the requirements previously established. The prototype described subsumes the existent personality and emotion models, which will be necessary for the achievement of empathic relationships both among characters and between the user and the synthetic characters.

It also provides a description of the integration of this architecture within the global run-time application. Namely, how the characters are implemented as agents in an agent-based framework enabling their presence in a virtual world. This agent-based framework (described in detail in D6.2.1) deals with all the details of world description, message passing and all the physical aspects of the agents (embodiment) so that the required empathy can be achieved. Finally, it discusses the authoring of the characters’ architecture parameters and embodiment.

- 4 -Deliverable 5.3.1 / report 1 / final version

Page 5: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

2 EXECUTIVE OVERVIEW

In this document we present the final prototype built for creating Empathic Synthetic Characters. This will include the specification of a general agent architecture and its concrete implementation taking into account its specificities for the Personal and Social Education (PSE) context.

Chapter 1 acts as a general motivation for the remainder of the document. Chapter 2 gives the background structure for the construction of the emphatic synthetic characters, describing a general framework for virtual environments with synthetic agents and the general architecture for synthetic agents. Chapter 3 provides details on the integration of the implemented agent architecture within the real-time application, including the description of the domain of the application through a world model, how the agents interact with each other and the world, and a discussion on the embodiment problem. Chapter 4 details how the characters were built for the bullying demonstrator application. Finally, Chapter 5 provides a discussion of the work presented.

- 5 -Deliverable 5.3.1 / report 1 / final version

Page 6: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

3 INTRODUCTION

Stemming from the requirements of the previous deliverables in this workpackage, our task was to design autonomous agents that can generate behaviours for simulated situations featuring children in schools in bullying episodes. These episodes are not pre-defined but emerge from the actions generated autonomously by each of the characters (agents) in the virtual world. Thus, each agent must have in its architecture elements that allow it to generate the adequate actions (taking into account its role in the episode). As bullying is episodic, the agents’ minds must generate actions in each episode. Also, each character may have a different role in the episode: the bully; the victim; a mixed bully-victim or even bystanders.

Using OCC theory, we modelled the different roles by specifying different goals and emotional reactions to events. Using these parameters, the OCC appraisal process leads to different emotions being triggered and thus different behaviours and expressions each time. We also use a conceptual planning structure, which takes on the goals of the agent and is influenced by the character’s emotions at a certain time. This process will lead to a particular behaviour, characterizing the role by producing adequate actions.

This deliverable describes most of the technical the features associated with the building of these agents.

- 6 -Deliverable 5.3.1 / report 1 / final version

Page 7: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

THE AGENT ARCHITECTURE

Each agent perceives the environment, through a set of sensors (allowing the perception of events, objects, etc. in the world) and acts on the environment though its effectors, allowing different actions to be performed. For example, a bully may hit the victim and the victim may cry. The agent architecture for the bullying run-time demonstrator is shown in Figure 1.

Figure 1 – Agent Architecture Diagram

Upon receiving a perception (which can be the presence of another agent or an object, or even an action from another agent) the agent appraises its significance and triggers the appropriate emotions. Additionally, if a goal has become active, it will add a new intention to achieve the active goal. Intentions map directly the concept of intentions in a BDI (Beliefs-Desires-Intentions) agent architecture. They represent the agent endeavour to act in order to achieve the desired state.

- 7 -Deliverable 5.3.1 / report 1 / final version

Page 8: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

After the appraisal process, it is necessary to choose the most adequate action. For a successful adaptation to the environment, emotions must have an effect on the actions of the characters. According to Frijda [Frijda 86] action tendencies are defined as “states of readiness to achieve or maintain a given kind of relationship with the environment. They can be conceived of as plans or programs to achieve such ends, which are put in a state of readiness”. Although Lazarus [Lazarus 91] agrees with Frijda that action tendencies are characteristic for emotions, he does not conceive them as plans. Lazarus states that action tendencies are innate biological impulses, while coping “is a much more complex, deliberate and often planful psychological process”.

This distinction also exists in characters actions in Victec. For example, if the victim character starts to cry when he is bullied, it is not because he has a goal that involves crying. In fact, after this he will feel ashamed for crying instead of fighting back. The victim crying is modelled as an innate reaction to a particular distressed emotional state and the inability for fighting back.

The distinction between action tendencies and coping is clear in TABASCO architecture [Canamero et all 98], which was based on Leventhal and Scherer Emotion Theory. It uses a multi-level action selection mechanism with three layers: Motor that is responsible for expressive motor mechanism like facial and body expressions; Schematic level corresponding to predefined action tendencies; and the Conceptual layer which uses planning and deliberation to cope with the environment.

Following the same ideas, the action selection mechanism in Victec is composed by two layers. The schematic layer defines a set of action tendencies triggered by particular emotions. For instance, if the bully character gets very angry, it will tend to kick everything in his path.

The conceptual/coping level defines two kinds of coping: problem-focused coping where the character tries to plan and act to achieve his goals; and emotion-focused coping that works by altering the character’s interpretation of the environment. Consider an agent that feels distressed for not being able to achieve a given goal, one form of emotion-focused coping is to lower the goal importance thus reducing his distress.

In this way, emotions will not only influence the agents’ reactive behaviour, but they will also influence and guide the planning process, as emotional focused coping changes the agents interpretation of its plans. Therefore, emotions are present in the majority of processes and require a detailed description, before entering deep into the architecture details.

- 8 -Deliverable 5.3.1 / report 1 / final version

Page 9: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

3.1 EMOTION STRUCTURE

Ortony defines emotions as a valenced (good or bad) reaction to an event. Based on the OCC theory, the attributes considered in Victec for the description of an emotion are:

Attribute DescriptionType The type of the emotion being experienced

Valence Denotes the basic types of emotional response. Positive or negative value of reaction

Target The name of the agent/object towards the emotion is directed

Cause The event/action that caused the emotion

Intensity The intensity of the emotion. A logarithmic scale between 0-10

Time-stamp The moment in time when the emotion was created

The attribute Type describing an emotion refers to the type of that emotion. The OCC structure of emotions defines a hierarchical organization for emotion types. An emotion type represents a family of related emotions differing in terms of their intensity and manifestation, i.e., each emotion type can be realized in a variety of related forms e.g. fear with varying degrees of intensity – concern, fright, petrified.

The attribute Valence describes the value (positive or negative) for the reaction that originated the emotion. The Cause defines the event, or action that originated the emotion. The Direction attribute species towards whom is the emotion directed. Not all emotions are directed, for instance the Joy emotion, but some of them are, like Anger or Gloating.

Every emotion has an associated Intensity attribute which is assigned with different values depending on the different situations that gave rise to that particular emotion. The value for the intensity parameter is calculated from the intensity potential value of the associated emotion directly evaluated from the eliciting situation. The emotion is created only if this potential surpasses the emotion type threshold for the character, which describes the character’s resistance to the emotion.

However, the intensity of an emotion does not remain constant during its life cycle in the system. Since the moment it is generated, the intensity of an emotion must be attenuated through time in order to reflect the dynamics of the emotional system itself. This characteristic reflects the notion that an emotion does not last forever and does not affect the evaluation of the subsequent emotional states in the same way. According to this concept, Picard proposes a decay function for emotions [Picard 97],

- 9 -Deliverable 5.3.1 / report 1 / final version

Page 10: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

which characterizes intensity as a function of time. At any time (t), the value for the intensity of an emotion (em) is given by the formula:

Intensityem,t = Intensityem, t0 x e^-bt

The constant value b determines how fast the intensity of this particular emotion will decrease over time. This value can be controlled in order to reflect the short or long duration of the emotion types. Note that this value is dependent on the emotional profile of the character. So, for each character we must define the decay rate and threshold for each of the 24 emotion types. For example, a peaceful character will have a high threshold and a strong decay for the emotion type of Anger, thus it will hardly experience anger, and even if an anger emotion is created he will feel it for a short period of time.

The value Intensityem, t0, refers to the value of the intensity parameter of the emotion (em) when it was generated. This value is referred in the formula above as Intensityem. When the value of Intensityem,t

reaches zero, the emotion (em) must be removed from the system’s repository, meaning that that specific emotion will no longer be part of the agent’s emotional state. This condition will be verified in each cycle of the system for the system’s update. The Time-stamp attribute corresponds to the system time in which the emotion was generated. This value is used to compute the elapsed time since the emotion’s creation until the present time of the system. This elapsed time is then used in the time scale for the formula above.

3.2 APPRAISAL

Events are appraised based on Ortony, Clore and Collins Theory of emotions [Ortony et all 88]. OCC considers appraisal as a subjective evaluation of a given event according to the character goals, standards and beliefs.

Goals

Our model uses two of OCC goal types, active-pursuit goals and interest goals. Active-pursuit goals are goals that the characters actively try to achieve, like going to a dentist appointment. Interest goals represent goals that a character has but does not pursue, as for instance wanting his favourite team to win a match, or avoiding get hurt. OCC replenishment goals are not used, since they can be considered active-pursuit goals with cyclic activation and deactivation.

- 10 -Deliverable 5.3.1 / report 1 / final version

Page 11: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

An active-pursuit goal in our agent’s architecture is defined by the following attributes:

Attribute DescriptionId The goal identifier.

Type Specifies if the goal is an interest or active-pursuit goal.

PreConditions A list of conditions verified to activate the goal.

SucessConditions A list of conditions used to determine if the goal is successful.

FailureConditions A list of conditions that determine the goal failure.

The PreConditions attribute consists on a list of conditions. At the goal update phase, if the goal is inactive, then its preconditions are checked. If all of them are verified, then the goal is made active and an intention to achieve the goal is created on the conceptual level. Afterwards the planning process will plan to achieve the goal SucessConditions.

Additionally, at each goal update phase, the failure conditions will be tested. If these conditions are met, then the intention to achieve the goal will be removed from the conceptual level and the goal failure will be appraised, thus generating the appropriate emotions.

Unlike the active-pursuit goal, the interest goal does not have any preconditions, success and failure conditions, since it does not become active or inactive. Therefore these two goal types share only two attributes: Id and Type. The interest goal has one additional parameter, ProtectionConstraint. This parameter allows modeling conditions that the character wishes to maintain. For instance, all characters may have an interest goal to be healthy, which is represented with a protection constraint over the condition Healty(Self). Protection constraints serve two purposes: they influence the planning process so that the character does not build plans that harm the protected conditions; and are used to generate negative emotions in the appraisal process when someone violates the conditions.

In addition, either goal types may have several goal links. Goal links are used to build a goal hierarchy. As example, the victim active-pursuit goal of playing soccer has a facilitative link to the interest goal of making new friends. This represents the fact that achieving the soccer goal will help to achieve the interest goal. So, the importance of the first goal is influenced by the second goal’s importance. There are four types of goal links:

SufficientTo - If goal A has a sufficient link to goal B, then achieving A will also achieve B.

- 11 -Deliverable 5.3.1 / report 1 / final version

Page 12: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

NecessaryTo - If goal A has a necessary link to goal B, then in order to achieve B, one must

achieve A

FacilitativeTo – If goal A has a facilitative link to goal B with value c, achieving A will raise

the likelihood of achieving B by a factor of c.

InhibitoryTo - If goal A has an inhibitory link to goal B with value c, achieving A will lower

the likelihood of achieving B by a factor of c.

In Victec, prospect based emotions are generated by the goal activation/deactivation and by the planning process. The other emotions are handled by a set of emotional reaction rules. These two mechanisms will be described next.

Conditions

Conditions in the character agent architecture are very important. They are used not only in the goals activation, success and failure conditions but also in the planning process. A condition can use either first order logic predicates or properties (as described bellow).

a) Predicates

A predicate represents a relation that is true in the world. For instance the predicate On(Book, Table) represents the On relation between the book and the table, in other words, the book is on the table. The value of any predicate can be either true if the relation is verified or false otherwise.

Imagine that one would like to build an active-pursuit goal of physical bullying other character. One of the goal activation conditions is that the target character is a victim. This could be achieved by the condition Predicate: Victim([Character]), where [Character] is a first order logic variable. As the goal is tested for activation, the agent world representation is used to try to find any variable substitutions that make the predicate true. This process will be described in detail in section 2.4.

Therefore, a condition that refers a predicate has only one attribute, the predicate name. This name is a special object also used in properties, and will be described bellow. However, a predicate name has one distinct special case. If the predicate name is preceded by the exclamation mark (“!”), it represents the predicate negation, i.e. the condition will be true if the predicate is not verified. For example, if

- 12 -Deliverable 5.3.1 / report 1 / final version

Page 13: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

one wants to prevent the bully goal to activate when the teacher is in the class room, it just has to add the condition !In(Teacher,Classroom). This condition will be true if the teacher is not in the classroom.

b) Properties

As the name says, a property represents an object or world property. Looking at the previous example, in order to represent the fact that the book is on the table, one can define a book property, for instance Book(On). This property value states where the book is laying on, in this case it would have the value “Table”.

Properties allow a richer representation of conditions, in fact a property can model any predicate. For instance, the predicate “Brother(Anna, Peter)” can be modelled with the property “Brother(Anna, Peter)” (a world property) having the value “True”. One additional advantage is that is possible to write a condition that compares two properties. However, properties are also more complex to specify and handle, especially in the planning process. A property condition has the following attributes:

Attribute DescriptionName Property name or constant name

Operator Operator used to determine the truth value of the condition

Value Value used to compare the property to (a constant or another property)

The name attribute states which property or constant will be tested in the condition. Figure 2 a) shows an example of one property condition. This condition is used in the bully goal to specify that the goal is only made active if the victim is weaker than the bully. The bully character only likes to bully weak characters that cannot fight back. In the example, the tested property is “?SELF(Strength)”, which represents the character’s strength. SELF is a reserved keyword used to represent the character properties, without specifying his name.

The operator used is the GreaterThan operator, so the condition is true if the property value is greater than the specified in the value attribute. But the value attribute can also specify another property, so in the example the condition is true if the value of the property “SELF(Strength)” is greater than the property “[Character](Strenght)” value.

- 13 -Deliverable 5.3.1 / report 1 / final version

Page 14: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 2 – Examples of conditions. a) represents a condition between two properties. b) and c) define equivalent conditions, the first uses properties, and the second uses a predicate.

There are four types of operators used in a condition “a operator b”:

Greater Than : >, the condition is true if the value of a is greater than b value

Lesser Than: <, true if a value is lesser than b value

Equal: =, true if a and b have the same value

NotEqual: !=, true if a and b have different values

The first two operators can only be applied to numeric values, where the last two can be applied to number or names.

Notice the question mark on the properties name. This symbol is used in property conditions to differentiate between properties and constants. If the name is preceded by the question mark, when the condition is evaluated it will use the character’s world representation to determine the value of such property. If, the question mark is not used, the evaluation process will assume that the given name is a constant and will not use the world representation to determine the value. Instead the name itself will be used for comparison. When the condition specified in example b) is evaluated, the value attribute is a constant and thus “Table” will be directly compared to the property value retrieved from the world description. Unbound variables

As you should have noticed, one of the properties used the expression “[Character]”. This expression corresponds to the unbound variable “Character”. The use of unbound variables allows us to express much more generic goals, actions and conditions. An unbound variable can be replaced by a constant

- 14 -Deliverable 5.3.1 / report 1 / final version

Condition

Type: PropertyName: ?SELF(Strength)Operator: >Value:?[Character](Strength)

Condition

Type: PropertyName: ?Book(On)Operator: =Value: Table

Condition

Type: PredicateName: On(Book,Table)

a) b) c)

Page 15: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

or any unbound variable. So, instead of writing a goal to bully John, the victim character in Victec episodes, we can write a generic goal of bullying any character, with the precondition that the character is weaker than the bully.

When a goal condition (property or predicate) is evaluated, if it has unbound variables, the world description component will use a unifying algorithm to determine which (if any) substitutions make the condition true. Then, for each valid substitution, a new goal will be created by applying the substitution to all names in the goal. If no valid substitution is found, the condition is false. In this example, the substitution [Character]/John would be detected as valid, and the intention to bully John would be added to the planning process.

It is also possible to specify an inequality constraint as condition. Suppose that one would like to add the restriction that the bully goal is not directed to Paul, a victim that for some reason the bully doesn’t pick on him. This could be achieve by adding the following condition: name=“[Character]” operator=”!=” value=”Paul”. Remember that a property that does not begin with the “?” symbol refers to a constant, and thus its value is not retrieved by the memory component. So, after applying the substitution [Character]/x to the goal, this condition is true if x is different from “Paul”.

A name without unbound variables is also called a ground name as in logic programming languages.

Although Victec’s final prototype of the bullying demonstrator uses properties to model the world (it will be explained why on chapter 3), the initial idea was to allow the use of any of the representations (properties or predicates). Some knowledge is easier to represent using properties and some is easier to represent with predicates, and some users would prefer one to the other. Therefore the architecture was designed in order to support both mechanisms. It was not difficult to implement, since these two methods only slightly differ in the condition evaluation process and in some very specific part of the planning procedure.

Emotional reaction rules

As proposed by Martinho [Martinho 99], part of the creation of emotions is handled by a set of emotional reactions rules, which are based in Elliot’s Construal Theory [Elliot 92]. An emotional

- 15 -Deliverable 5.3.1 / report 1 / final version

Page 16: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

reaction rule is composed by a domain specific construal frame extended with values for some of OCC emotion intensity variables. The following figure shows three examples of these rules.

Figure 3 – Emotional Reaction Rules

As seen on the examples, a reaction rule is composed by the event information and the values for the appraisal variables. The first part is used to match the rule against the perceived events, for instance the leftmost rule is selected if the event corresponds to a cry action made by another character.

The parameter Type specifies if the event must be an action event, or an object perception event. The field Subject states which character or object caused the event. It can have the name of any character/object or the special keywords: OTHER, SELF. The first keyword is used to match an event caused by another agent, while the second is used to match events caused by the character himself. If this parameter is left empty, then any subject at all will match. For example, the rightmost reaction rule matches any event that corresponds to a Push Book action, disregarding whoever made the action.

The last two event parameters are only used if the event corresponds to an action. The first one describes the name of the action. It can also be left empty so that the rule matches with every action. Finally, the Object parameter specifies the action’s object, i.e., towards what/whom was this action made. As for instance, the rightmost rule corresponds to action made over a book, in this case, a push action. Like the other fields it can be left unspecified allowing any object to match with the rule.

- 16 -Deliverable 5.3.1 / report 1 / final version

Reaction Rule

EventType: ActionSubject: OTHERAction: CryObject: --

Appraisal VariablesDesirability: 9DesirabilityForOther: -10Praiseworthiness: -5Like: --

Reaction Rule

EventType: ObjectSubject: BookAction: --Object: --

Appraisal VariablesDesirability: --DesirabilityForOther: --Praiseworthiness: --Like: -5

Reaction Rule

EventType: ActionSubject: --Action: PushObject: Book

Appraisal VariablesDesirability: 5DesirabilityForOther:--Praiseworthiness: --Like: --

Page 17: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Although several rules may match against a given event, only the most specific one is selected, and its corresponding appraisal variables are used to determine and generate the character emotion. The Desirability variable states how desirable/undesirable is the event for the character and it is continuously ranged between -10 (very undesirable) and 10 (very desirable).

The DesirabilityForOther variable is only used in actions that refer to other characters, and specifies how much the character thinks the event is desirable/undesirable for the other character. It has the same values as the Desirability variable. Praiseworthiness states how the character appraises the action against its standards of behavior. Is the action praiseworthy (+10) or blameworthy (-10)?

Finally, the Like variable is only used in Object events and specifies how much the character likes/dislikes the object. This variable is also ranged between -10 and 10. The centre rule in figure shows an example of a reaction to a book perception. Luke does not like books that much, so he has a low value on the like variable upon a book perception.

Prospect Based Reactions

Instead of writing domain specific reaction rules to handle prospect based reactions, a similar approach to the one used in the Émile System [Gratch 2000] is followed to take advantage of explicitly storing the agent plans state and intentions into memory. With this approach prospect based reaction can be automatically obtained from the plans and goals active in the agent memory.

Like described above, active-pursuit goals are characterized by a set of activation and success/failure conditions. Every time the agent receives a new perception it checks all deactivated goals to determine if any of them has become active. If so, an intention to achieve the goal is added to the intention structure. As the goal is planned for and executed, its probability of success will be determined by the plan state and thus Hope or Fear emotions will be triggered (according to the probability of success).

Additionally, all active goals are constantly checked to determine if the goal succeeds or fails. When such events occur or if the planner is unable to make a plan, more prospect based emotions will be generated, such as Satisfaction, Disappointment, Relief, Fears-Confirmed. For instance, if the character was experiencing Hope to achieve the goal and it is satisfied, then he will feel Satisfaction. On the other hand if the goal fails he will feel Disappointment.

Emotion Generation

After the reactive rule match, the emotions are generated by the following procedures for the distinct emotional reactions. Also, a base potential will be determined from the appraisal variables.

- 17 -Deliverable 5.3.1 / report 1 / final version

Page 18: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Well Being Reactions

This type of emotions depends only on the Desirability variable. If the value is positive, then a Joy emotion will be created, otherwise a Distress emotion will be created. The base potential of this type of emotion is given by the following formula:

BasePotential = |Desirability|

Attraction Reactions

If the Like variable has a positive value, then a Love emotion will be generated. If the value is negative, then it will generate a Hate emotion. The base potential is given by:

BasePotential = |Like|

Fortune of Others Reactions

The emotions of this class are influenced by both Desirability and DesirabilityForOthers variables. The emotions created are given by the following table:

Desirability Desirability for OtherPositive Negative

Positive Happy-For GloatingNegative Resentmen

tPity

Table 1 – Fortune of Other Reactions

As seen on the table, the character will feel Gloating if he desires an event that is undesirable to another character. The base potential is determined by the average of the absolute value of both variables:

BasePotential = (|Desirability| + |DesirabilityForOther|) / 2

Attribution Reactions

These reactions depend only on the Praiseworthiness variable. If the appraised action was made by the character, it will rise to Shame or Pride. On the other hand, if the action was made by another

- 18 -Deliverable 5.3.1 / report 1 / final version

Page 19: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

character, the character will feel Admiration or Reproach. A more complete description is show in the next table.

Praiseworthiness

Action SubjectSelf Other

Positive Pride AdmirationNegative Shame Reproach

Table 2 – Attribution Reaction

The base potential is determined by the formula:

BasePotential = |Praiseworthiness|

Prospect Based Reactions

Like described above, this type of emotions are generated by a different process. They are generated each time the plan probability of success changes, or if the goal succeeds/fails. The next table shows which emotions are created when the plan changes and how the base potential is determined. Notice that OCC distinguishes between the goal importance of success and importance of failure, suppose that the character has a goal of breathing, if he is successful in breathing he will not feel that much satisfied, but if the character thinks it will fail to breathe, then it will feel tremendously afraid. Therefore, the importance of success is used to determine the potential of the Hope emotion while the importance of failure is used in the Fear emotion.

Prob. of Success Emotion Base Potential >= 50% Hope = prob * Importance Of Success<50 % Fear = (1 – prob) * Importance Of Failure

Table 3 – Hope/Fear emotions

The next table shows the emotions generated by the goal achievement or failure. If the character was feeling hopeful but the goal unexpectedly failed then it will feel Disappointment. On the other side, if it was feeling hopeful and the goal succeeded as foreseen, then the character will be satisfied. The base potential is determined not only from the goal importance but also from the potential of the Hope/Fear emotion that the character was previously feeling. So, if he was very fearful and the goal unexpectedly succeeded, it will fell very relieved.

- 19 -Deliverable 5.3.1 / report 1 / final version

Page 20: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Event Expectations Base PotentialHope Fear

Goal Sucess Satisfaction Relief = (Importance Of Success * Pot) / 2Goal Failure Disappointment Fears-Confirmed = (Importance Of Failure * Pot) / 2

Table 4 – Goal end emotions

Compound Emotions

Additionally to the previous emotions, OCC defines four compound emotions. These compound emotions are obtained by merging particular emotions. For instance Anger is a compound emotion obtained from a Distress emotion and a Reproach emotion with the same cause. The next table shows the four compound emotions.

Compound Emotion

Base Emotions

Gratification Joy + PrideGratitude Joy + AdmirationRemorse Distress + ShameAnger Distress + Reproach

Table 5 – Compound emotions

The potential for a compound emotion is given by the logarithmic of the square sum of its base emotions potential.

Potential = log (Emotion1Potential 2+ Emotion2Potential 2)

Arousal and Mood

Once the base potential is determined for the emotions, it is necessary to consider the character’s mood and arousal to generate the final emotion potential. Arousal represents the degree of excitement of the character. Thus aroused characters will feel more intense emotions. FearNot only models psychological arousal, so whenever the character experiences a high intensity emotion (positive or negative), his arousal level will rise according to the following formula:

- 20 -Deliverable 5.3.1 / report 1 / final version

Page 21: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Arousal = Arousal + EmotionIntensity / 2

The arousal value is continuously ranged between 0 (low arousal) and 10 (high arousal) and just like ordinary emotions, the arousal decays over time, therefore if nothing relevant happens for a while the character will “calm down”. The arousal level decays linearly with the next formula at each second. Thus, if nothing happens a character will go from a level 10 arousal to 0 in fifty seconds.

Arousal = Arousal – 0.2

Arousal influence is applied to the emotion potential first, and the new potential is obtained by a weighted sum of BasePotential and arousal:

Potential = BasePotential * 0.75 + Arousal * 0.25

After applying the effect of arousal, one must also consider mood. The idea is that characters on a bad mood will tend to experience more negative emotions, and characters on a good mood will experience more positive emotions. Therefore, a negative mood (bad mood) increases the potential of every negative emotion (ex: anger, distress) and decreases the potential of positive emotions (ex: joy, satisfaction). A positive mood acts in the opposite way.

Positive emotion, Potential = Potential + Mood

Negative emotion, Potential = Potential – Mood

But on the other hand, emotions also influence mood. Good emotions raise the characters mood and bad emotions make him feel worst thus lowering his mood. Depending on the emotion intensity, this change will be greater or smaller. Empirical tests determined this value as 10 % of the intensity. Given the above formula, mood value must be limited so that even with a very positive mood, a character may have a strong negative emotion (and the reciprocate for a negative mood). The mood was empirically ranged between -3 and 3. So, if a character with the most positive mood (value 3),

- 21 -Deliverable 5.3.1 / report 1 / final version

Page 22: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

appraises an event as the most negative possible (10 potential), it will generate a negative valenced emotion with potential 7, which is still a very strong emotion.

Mood = Min(3, Mood + Potential(Emotion)/10), for positive emotions

Mood = Max(-3, Mood – Potential(Emotion)/10), for negative emotions

Opposed to the arousal, the mood variable decays slowly. Characters tend to maintain mood for large periods of time. For instance a very positive mood (3.0) will go neutral after 300 seconds, since VICTEC episodes are rather small, the character will be cheerful during several ones. The mood variable decays at every second with the formula:

Mood > 0, Mood = Mood – 0,01

Mood < 0, Mood = Mood + 0,01

Finally an emotion is added to the character emotional state only if the emotion potential surpasses the defined threshold for that emotion. If an equivalent emotion already exists, no emotion is added, but the existing emotion potential is recalculated using the logarithmic sum of both emotion potentials. Two emotions are said to be equivalent if they are of the same type and directed to the same character.

When the emotion is added, its intensity is determined from the emotion potential by subtracting the emotion threshold:

Intensity = Potential - EmotionThreshold

3.3 ACTION SELECTION AND COPING

As mentioned before, the action selection mechanism is composed by two layers, the schematic and the coping level. Since the schematic level defines action tendencies, which represent innate reactions to the environment, they have priority over the Coping level actions and thus are immediately

- 22 -Deliverable 5.3.1 / report 1 / final version

Page 23: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

executed. For example, if the bully most intense emotion is Gloating at the victim (happy about something bad happening to the victim) he will mock him (action).

Schematic Layer

The Schematic Layer implements the characters action tendencies. It consists on a set of action rules that are available according to the character’s emotional state. An action rule is defined with the following properties:Attribute DescriptionName Action identifier

Preconditions A set of preconditions that must be true in order to execute the action

ElicitingEmotion The emotion that triggers this action.

The Name attribute identifies the action and is used by the effector component when it has to send the action to the virtual world. In the action phase the reactive layer starts by determining which actions can be executed. This is done by testing the action Preconditions, if all of them are true, then the action can be executed. The resulting action set is matched (using the ElicitingEmotion attribute) against all emotions in the character emotional state. For instance, the following action rule has a positive match if the character is experiencing a Distress emotion caused by another character pushing him, and the emotion intensity is at least five.

Figure 4 – Action Rule example

As seen on the example, the ElicitingEmotion attribute is composed by four properties. The Type property refers to the emotion type; the Cause property states which event must cause the emotion; Direction specifies towards what or whom is the emotion directed, for instance we may want to build an action that is only activated when a character feels angry with someone in particular; finally, the

- 23 -Deliverable 5.3.1 / report 1 / final version

Action Rule

Action: CryPreconditions: ---ElicitingEmotion:

Type: DistressCause: Push(SELF)Direction: --MinIntensity: 5

Page 24: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

MinIntensity property states what minimum value of intensity the eliciting emotion must have to activate the action. Similarly to the reaction rules, these properties may be left unspecified so that the rule matches with a more general set of emotions.

In the last stage of this process, the set of rules with positive matches is used to select the action that will be executed. The action rule triggered by the most intense emotion is selected for execution. If more than one action rule is selected (triggered by the same emotion), the most specific one is preferred.

Conceptual Layer

A continuous planner [Russel and Norvig 2002] that uses partial-ordered-plans builds up the core of the conceptual layer. After the appraisal process, the planner selects the currently most intense intention from the intention structure. The selected intention becomes the target goal which the planner will try to achieve. Afterwards, the continuous planner removes a flaw or executes an action (if the plan is complete). The resulting plan is stored with the intention, so that it can be continued later on.

Intention Structure

As mentioned above, when an active pursuit goal becomes active an intention to achieve the goal is added to the character’s intention structure. An intention is composed by the following attributes:

Attribute DescriptionGoal The active-pursuit goal the agent wants to achieve

Emotion The emotion generated by this intention

Plans A list of alternative plans to achieve the goal

Since the prospect base emotion created by this goal depends on the plan probability, which is continuously changing, the emotion itself changes all the time. So, it is necessary to store the emotion inside the intention. This allows a direct change in the emotion of the character emotional state.

As the planner builds a way to achieve the goal, more than one different plan may be construed. For instance, when removing an open condition, there may be more than one alternative to achieve the condition (two different actions). Neither of the alternatives can be forgotten without taking the risk of not finding the best course of action, or even to find any solution whatsoever. So, instead of one single

- 24 -Deliverable 5.3.1 / report 1 / final version

Page 25: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

resulting plan, it is necessary to store all alternative plans. Taking this into account, the planner must select one from all alternative plans in order to continue planning or execution.

When the intention is created, an empty plan is created using the goal success conditions as the finish step preconditions. This empty plan is stored in the plan list, and as soon the planner selects this intention, it will try to achieve the finish step preconditions, building and adding more complete plans to the intention.

Plan Representation

In FearNot, plans representation is based on classical planning and decision theory. FearNot! generates Partially Ordered Plans which are modelled as a set of operators and additional constraints. These operators are a slight modification of STRIPS operators, associating probability values to the effects and represent the actions that an agent may take in the world and consist on the following attributes:

Attribute Description

Action The name of the action

Preconditions A list of conditions that must hold in order to execute the action

Effects A list of conditions that will hold when the action finishes

The preconditions list contains a set of conditions that must be verified in order to execute the action. Unlike classical STRIPS operators, FearNot! operators allow the representation of conditions not only with first order logic predicates, but also allows the use of properties. The next example shows the operator that corresponds to the GetUp action. In order to get up, the agent cannot be standing up. This condition is represented by the character status property which has to be different than “Stand”. Since this property has one of the three values: “Stand”, “LieDown”, “Sit”, the character may get up if he is sited or lying down.

Figure 5 – Operator example

- 25 -Deliverable 5.3.1 / report 1 / final version

OperatorAction: GetUpPreconditions:

Property: ?SELF(Status) Op: != Value: StandEffects:

Prob: 1.0 Property: ?SELF(Status) Value: Stand

Page 26: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

There is one restriction to the preconditions. Only the equality and inequality operators can be used, so it is not possible to specify a precondition requesting that some propriety is greater or lesser than a value.

The operator effects specify how the world changes after the action execution. In the described example, the character Status property would change to the value “Stand” with 100% probability. The association of probability to the effects allows us to model effects that although not certain may happen sometimes, for instance we may model a kick operator that would not only hurt the other character, but sometimes it also makes him fall to the ground. Thus the planner can consider steps that do not always achieve a pretended condition, but have a high probability of achieving it.

Notice, that on the action effects, it is not necessary to specify the operator, since the only possible is the equality operator. The planner does not handle negative properties, such as “this property will have a different value than this one”, as the effect of an action, although it can handle negative predicates as effects. All effects that use properties must be in the form “this property will have this value”.

The probability specified in the effect gives us only the base probability. It is necessary to add an interpretational bias, that model the subjective interpretation the character has about the probability of that effect. For instance, the character may think that a particular effect will be more likely than it really is. This bias will be influenced by emotional focused coping as described bellow. Therefore, the probability of an action effect is given by:

P(effect|action) = prob + bias(action-effect)

Additionally to a set of operators, a plan is composed several other attributes like ordering constraints. The plan attributes are described next:

Attribute Description

Steps The list of actions/operators used to achieve the plan goal

OrderingConstraints Set of ordering constraints that specify the order of step execution

CausalLinks A set of causal links

BindingConstraints A set of variable attributions

- 26 -Deliverable 5.3.1 / report 1 / final version

Page 27: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

OpenPreconditions The set of conditions that the planner will try to achieve

Each ordering constraint is of the form A < B, which is read as “step A before step B” and means that action A must be executed sometime before the execution of B, but not necessarily immediately before. A cycle such as A < B and B < A represents a contradiction, so an ordering constraint cannot be added to the plan if it creates a cycle.

A causal link between two steps in the plan is written as A −p→ B and is read as “A achieves P for B”. It asserts that P must remain true until action B is executed. Causal links can also be called protection constraints because protect P from being removed over the interval from A to B. In fact, the character Interest Goals that model protection constraints are added as causal links between the Start step and the Finish step with the protected condition to every plan.

The binding constraints set specifies attribution to variables (this variable in this effect has the same value as that variable in that precondition). This set is built from the substitutions obtained from the unifying algorithm when the planner tries to unify steps to achieve conditions. Imagine a step “Push([x])” with the effect “On([x],Floor)”, if the planner wants to achieve “On(Book,Floor)” it adds the push step to the plan and adds the substitution “[x]/Book” to the binding constraints set.

A precondition is open if it is not achieved by some action in the plan. The planner will work to reduce the set of open preconditions to the empty set. Initially, this set is constituted by the goals success conditions, and as the planner introduces new steps it will also introduce new open preconditions and remove existing ones.

The initial plan only has two special steps, the start step and the finish step. The finish step has as preconditions the goal success conditions (also added to the open preconditions list). Unlike classic planners, the start step does not contain any effects true in the initial state. This happens because in a continuous planner there is no such thing as an initial state, there is only the current state. So, the start step represents the current world state, and therefore it does not explicitly stores the state properties. Instead, a direct link to the agent world model is used, if the planner wants to check if a precondition is achieved by the start step, it checks the condition value in the world model.

A Continuous Planner

- 27 -Deliverable 5.3.1 / report 1 / final version

Page 28: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

A continuous planner works by incrementally building, executing, and monitoring a given plan. Since the planner continuously monitors the environment, it detects when an action is accomplished or fails. It can handle unexpected events that affect future plans and it can handle serendipity. Suppose that the planner has finished building a plan to achieve a goal, if some other agent comes in and achieves some precondition for us, the planner will detect that the condition holds true in the start step and will remove the action used to achieve such precondition.

In the action phase, the planner becomes active and selects one intention from the intention structure. Once the intention is selected, the planner must choose between the alternative plans stored in the intention. The selected plan is removed from the intention and the planner analyses and removes one of the plan flaws. The resulting extended plans (a flaw removal may have more than one alternative extension) are stored in the intention for future processing. The planner handles the following plan flaws:

Open condition

Causal Conflict

Unsupported link

Link Extension

Redundant action

The first two flaws are handled just like an ordinary Partially Ordered Plan does. To achieve an open precondition the planner will first check if the condition is verified in the current state. If so, it will add a causal link from start to the step that has the unachieved precondition. The planner will then examine existing steps in the plan to determine if any of them achieves the condition. Finally it will try to add new steps to the plan to achieve the condition. Each of these alternatives is built as a new extended plan, and the appropriate changes to the plans are made (like adding causal links and binding constraints). All resulting plans are then added to the corresponding intention.

When a new step is added, a causal conflict may arise. The next time the planner selects the plan it will detect the existence of such conflict. In order to remove a causal conflict between the step C and the causal link A −p→ B the planner tries to promote or demote the step C. This is done by ensuring that the step C is executed either before step A or after step B, i.e. adding the ordering constraints C < A or B < C. Unlike convention planners, the FearNot! planner has one additional way to resolve this flaw which is to use emotion focused coping to lower the probability that ┐P occurs upon executing C bellow a specified threshold. In this way the agent may consider an otherwise inconsistent plan by thinking that the effect will never happen, so he will not have to worry about it.

- 28 -Deliverable 5.3.1 / report 1 / final version

Page 29: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

When the planner achieves a consistent plan with no open preconditions it has reached a solution. A plan is consistent if there are no cycles in the ordering constraints and no conflicts with the causal links. This solution that corresponds to a partial ordered plan is then executed by repeatedly choosing any of the next possible actions. If an action A has it preconditions satisfied by the start step and no other action (besides start) is ordered before it, then A can be executed.

Suppose that the planner has built a plan to pick a book lying next to him on the floor. In the middle of the plan execution, some other agent comes in and kicks the book away. The pick action precondition that states that the character must be near the object to pick it up becomes unsupported by the current state. This flaw is called an unsupported link. More concretely if there is a causal link Start − p→ A in the plan where P is no longer true in Start (in the current state), then the link is removed, and the precondition is added once more as a open precondition.

On the other hand, imagine now that the planner has built a plan to pick a book far away. The plan consists on moving near the book and picking it up. Once more, a friendly character realizes the agent’s intention and decides to throw the book near the agent. The book is now lying near the agent, and thus there is no need to move anymore. The continuous planner handles these situations by monitoring when a condition can be supplied by the Start step instead of a later step without causing a new conflict. When this happens the planner removes the existing causal link and adds a new one from the Start step. This process is called extending a causal link.

When a causal link is removed by the extension process, a step may become redundant. If an action A supplies no causal links it is considered a redundant action. The action is removed from the plan and all causal links supporting the action preconditions are also removed.

If there are no open preconditions and no actions in the plan (so that all causal links go from Start to Finish), then the goal has been achieved. The intention is removed from the intention structure, and the appropriate emotion is generated.

If no plan remains in the intention structure after the flaw resolution phase, it means that there is no consistent plan that can achieve the goal conditions. Therefore the planner has failed to build a plan that achieves the goal. Like on goal success, the intention is removed from the intention structure, and the appropriate emotion is generated (in this situation, a negative emotion).

Plan selection

- 29 -Deliverable 5.3.1 / report 1 / final version

Page 30: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Now that the planning process is described, two questions still remain. How does the planner chooses which goal to plan for (which intention)? How does it choose from several plan alternatives to continue the refinement process? FearNot! key point is to use the emotions to guide both process. Considering the intention choice, the idea is to select the intention which generates the most intense emotion. So, the intention generating the most intense Hope or Fear will be selected. Note that the most intense emotion will correspond to the goal that is worrying the character the most, and thus it will be the target of the character thoughts. Other prospect based emotions are not considered because they correspond to succeeded/failed intentions that do not exist anymore.

Remember that the potential for the Hope/Fear emotions is determined by the goal importance and its probability of success. The goal importance is defined for each character (but may change as emotion focused coping works), and its probability of success is automatically determined from the goal intention. Given an intention, its goal probability is given by the most probable plan capable of achieving the goal.

Pgoal = Max(Pplan), plan E Itention(goal)

But how does one determine a plan probability of success? A plan is successful if the plan conditions are made true. Therefore the plan probability is the probability of achieving the plan success conditions. Consider the following plan example:

- 30 -Deliverable 5.3.1 / report 1 / final version

Page 31: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 6 – Plan example

The agent, John wants to be friend of Paul. He knows that Paul loves cinema, so he thinks that inviting Paul to the cinema will make him his friend with 80% probability. But in order to invite Paul, John has to buy tickets to the cinema, which he hear are almost running out. So the buy tickets action gives only 70% sure of getting the tickets. On the other hand, John also has to find Paul, who went biking with his friends in order to invite him, but luckily Paul usually goes biking to two or three places John knows. So, John thinks it will find Paul with 80% probability.

So, given this plan what is the probability of success? Like said above the success probability is given by the probability of achieving the goal’s conditions, in this case the Friend(SELF,Paul) condition. The probability of achieving this condition is the probability of executing the Invite action multiplied by the probability of achieving the desired effect (0,7). Assuming independent probabilities, the probability of executing an action is determined by the product of its preconditions probability.

P(effect) = P(action) * P(effect|action)

P(action) = ∏i P(conditioni) i E Preconditions(action)

- 31 -Deliverable 5.3.1 / report 1 / final version

Start

Finish

Friend(SELF, Paul)

BuyTickets(Cinema)

Invite(Paul, Cinema)

Friend(SELF, Paul)

Near(Self, Paul), HaveTickets(Cinema)

Find(Paul)

HaveTickets(Cinema), ~Have(Money)Near(Self, Paul)

Have(Money)

Have(Money)

0,8

0,70,8

1,0

Page 32: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

As seen on the example, the probability of an effect on the Start step is 1.0. The Start step represents the current state, so the effect is already verified. Also, actions without preconditions can be always executed, so its execution probability is 1.0. In this example, the probability of success is obtained by multiplying 0.8 * (0.8 * (0.7 * 1.0)) which gives us a probability of success of about 45 %.

The calculation method can be simplified by noticing that the plan probability was obtained by multiplying the probability of all effects that appeared in causal links. Therefore, the plan probability can be calculated from the following formula:

P(plan) = ∏i P(effecti) , i E CausalLinks(plan)

The probability of an action effect is specified when defining the domain specific operators, but this probability may change during the character life. It is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a given effect occurs.

After selecting the intention, the planner must also determine what the best plan to continue the planning process is. We could select the one that seems more probable, but unfortunately this method would generate a breath-first search on the plan space. Since adding a step only decreases or maintains the plan probability, the planner will select first plans with fewer steps (but also farther from the goal). Therefore we would like that the planner also look at the number of open preconditions (how far is planner of building a solution?). So it was used a heuristic function that looks at these parameters. The plan chosen for processing is the one with the lowest value of h:

h(plan) = (numberOfSteps + numberOfOpenPreconditions) / P(plan)

Using the number of steps gives a better value to plans that achieve the same conditions but using lesser steps (this is likely a better plan). Between plans that have the same number of steps and open preconditions, the ones with higher probability have lesser value of h and are therefore better.

The mechanism described so far corresponds to Problem Focused Coping, which focus on acting on the environment (using planning abilities).

- 32 -Deliverable 5.3.1 / report 1 / final version

Page 33: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Emotion Focused Coping

Emotion Focused Coping works by altering the character interpretation of circumstances (for instance the probability bias of a particular effect). Notice, that by changing the interpretation, the appraisal process will generate distinct or weaker emotions, thus allowing strong negative emotions do fade out and eventually disappear. Additionally, this interpretation change will affect the planning process.

Emotion Focused Strategies used in FearNot are similar to the ones described in Marsella and Gratch work [Marsella & Gratch 2003]. The selection of a coping strategy is a two stage process: first a coping opportunity is identified generating possible coping strategies; and finally a coping potential is determined and used to decide if the strategy will be used. All the generated strategies can be combined and applied at the same time. The several emotion focused strategies will be described next.

Acceptance

Acceptance is the recognition that a goal is not possible to achieve or protect. This strategy is generated on two distinct situations. The first one was already described in the planning process. When the planner cannot build a plan to achieve the goal, the intention is removed and the agent accepts the goal failure. However, this strategy is generated even before the planner tries all possibilities, if the goal probability goes below a defined threshold, then an acceptance strategy is triggered. The agent starts to consider the hypothesis of giving up the goal. The current value is of 20% and it was obtained trough empirical testing.

The character’s mood influence how easily he gives up is goals. A character on a bad mood thinks all is going wrong in his life and that if the goal seems so unachievable, it will certainly fail. On the other hand if the character is in good mood, it will try to execute a plan even if it seems unlikely, he is feeling very confident. So, a neutral mood character will execute the strategy if the likelihood drops below 10% (half of the defined threshold). On an extremely bad mood, the character will drop any plan below 20%. On the opposite mood the character will only drop the intention when it has 0% probability.

The other situation happens when it is not possible to achieve a goal without violating an Interest Goal. In this situation the protection constraint is removed from the plan so that the planner can introduce an action that violates the condition but achieves a needed precondition. This strategy is applied if the emotion generated by the failure of the active-pursuit goal is of greater intensity than the emotion generated by the failure of the interest goal.

- 33 -Deliverable 5.3.1 / report 1 / final version

Page 34: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Denial / Wishful Thinking

Denial works by denying the reality of an event. This strategy was already mentioned above on the planning process description. It is used when a desired event/action has an undesirable effect, i.e. an effect that threatens a causal link, and no promotion or demotion resolves the threat. The only way to resolve the conflict is to lower the effect probability so that the effect can be ignored. This strategy is always applied if the effect probability is not too high.

The effect probability is lowered by changing the character interpretation of the effect probability. This is possible because an effect probability is determined by summing the effect base probability and an interpretational bias. This interpretational bias is stored in the agent world state, also called causal interpretation. So the character stores for each pair action-effect this bias, and changes it as the denial strategy is applied.

Mental Disengagement

When a desired goal seems unachievable, mental disengagement works by reducing the agents “investment” into the goal, i.e. the goal importance is reduced. This strategy is selected if the character most intense emotion is Fear for not achieving the goal. Since the character does not want to feel Fear, one way of reducing it is to reduce its importance of failure. Given that the prospect based emotions are automatically determining by the plan probability and importance, lowering the plan importance will immediately lower the intensity of the Fear emotion.

Like the previous strategy, Mental Disengagement will always be applied if the goal importance is not too high. In order to change the goal importance, a similar mechanism to the probability bias is used. The character stores in its causal interpretation an importance bias for each of his goals, which are changed by this strategy.

Note that these strategies will also indirectly influence the planning process. By changing goals importance, we may change the next intention to be selected by the planner. By changing effects probability we are changing plan probability and therefore a different plan can be chosen next to continue the refinement process. Also, changing these parameters will lead to reappraisal that will generate different emotions, which will change the planning process, and thus generating new coping strategies which will once more lead to a new appraisal, and so forth.

3.4 MEMORY / WORLD INTERPRETATION - 34 -

Deliverable 5.3.1 / report 1 / final version

Page 35: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

One important component of FearNot! architecture is the one that stores the internal representation the agent has about the world. This represents the agent memory, when he perceives a given event or an object property he stores the retrieved information in this component. This component will also be referred as the agent world interpretation and will change as the world evolves or the agent changes its interpretation by using emotion focused coping.

The memory component is used in many processes in the architecture. When the agent checks the goals preconditions or success conditions in the goal update phase it uses this module do determine the truth value of this conditions. Additionally, the Start step in every plan is connected to the agent world representation. So in order to check if a given precondition is satisfied by the start step, the planner uses the component to determine if the precondition is true in the current world state.

Knowledge Storage and Retrieval

The module must provide a very fast method to search for a given condition. This is done by indexing properties and predicates by their names with a hashing mechanism, just like a knowledge base. Suppose the agent perceives a property of other agent, for instance Luke’s height. It will be represented and stored as “Luke(Height)”. When its is necessary to know this property, the causal interpretation provides a function that receives the property name (“Luke(Height)”), and will first search for the object Luke. If the object is found, then the property Height is searched within the object properties. This function provides a very efficient way to search, even with a large number of objects and properties stored in memory.

Therefore, this module provides two functions that handle properties; the first one receives the complete property name and its value, storing it in memory. The second is used to search for a given property and returns the property value.

Tell(Property, Value)

AskProperty(Property)

Besides storing properties, the memory component allows the storage of first order logic predicates as well. Predicates are treated the same way properties are. The only difference is that no value is stored with the predicate name. A logic predicate is either true or false. Using the closed world assumption, all predicates stored are true, and if a predicate is not found is assumed to be false.

Assert(Predicate)

- 35 -Deliverable 5.3.1 / report 1 / final version

Page 36: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Retract(Predicate)

Ask(Predicate)

The first function, Assert, adds a new predicate. If the predicate becomes false in the world, the Retract function may be used to remove the predicate. Finally, Ask is used to know if a predicate is true or false.

In order to determine the effects probability and the goal importance, which are subjected to interpretational bias, the agent world interpretation also stores a probability bias for each pair action-effect and an importance bias for each of the character goals. As example, consider the Pick action which has only one effect. When the operator is created, a new property is added to the memory component with the name “ProbBias(Pick-1)”. The pick represents the action name; the number 1 indicates that this property references the first effect of the action. The initial bias stored is 0 (a neutral value). When the planner determines the effect probability, if will use the AskProperty function with the above name to search for the value of the corresponding bias, and will add it to the base probability.

The same process is used to determine a goal importance. When a goal is created, a new property including the goal name is added to the world interpretation. A neutral bias will be stored with the following name: “ImpBias([GoalName])”.

Searching for unbound names

If any of the functions above receive a name with unbounded variables, they will fail immediately. Those functions only receive ground names. But, what to do if one wants to search for properties without specifying a ground name. For instance we may want to build a condition which verifies if any character has some specific property value.

To handle such situations, the component provides a powerful function that receives a name with unbound variables, and returns a set of substitutions sets that correspond to properties or predicates that do exist in memory. This function is called GetPossibleBindings, the received argument can be the name of a property or a predicate.

GetPossibleBindings(name)

- 36 -Deliverable 5.3.1 / report 1 / final version

Page 37: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

In order to understand this function, let’s examine the following example. Suppose that the memory only contains properties about two characters: Luke and John. Furthermore, it only stores two properties: their name and strength. So the memory will only store the following objects:

Luke(Name) – Luke

Luke(Strength) – 8

John(Name) - John

John(Strength) – 4

Table 6 shows the result of calling the GetPossibleBindings function with several distinct names. The function works by finding substitutions for the unbound variables, which make the received name equal to the name of an object stored in memory. So, in the first example, there are two possible substitutions that make “Luke([x])” equal to the objects stored above. The third example has two unbound variables, so the returned set contains all possible combinations of variable attributions.

Name Substitutions returned

Luke([x]) { {[x]/Name} , {[x]/Strength} }

[x](Strength) { {[x]/John} , {[x]/Luke} }

[x]([y])

{ {[x]/John , [y]/Name} , {[x]/John , [y]/Strength} , {[x]/Luke , [y]/Name} , {[x]/Luke , [y]/Strength} }

John(Name) { { } }John(Height) { }Paul([x]) { }

Table 6 – Examples of substitutions returned by the GetPossibleBindings function with the left names as argument.

If this function receives a ground name, as seen on examples 4 and 5, it will check if the received name exists in memory. If so, a set with the empty substitution is returned, i.e. the empty substitution makes the received name equal to some object in memory. Otherwise, the function returns the empty set, i.e. there is no substitution that applied to the name will make it equal to an object in memory. This same result is returned in the last example, since there is no object named Paul, and therefore no substitution of [x] will match the received name with an existing object.

- 37 -Deliverable 5.3.1 / report 1 / final version

Page 38: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Now that this functionality is described is easy to understand how an unbound condition is verified. Looking at the bullying goal once more, one of its activation conditions mentioned above is that the victimized character (any character) has to be weaker. Remember that the condition was “Self(Strength) > [Character](Strength)”. So when the goal is tested for activation, the memory component is used do determine which character exist in the world. For each possible substitution of the variable [Character], a goal is instantiated, applying the substitution to all names in the goal. Then, for each of the new goals, the condition is tested, and the ones that do not satisfy such condition are discarded. If an instantiated goal with only ground names verifies all its activation conditions it will be added as an intention as described in the previous sections.

3.5 THE LANGUAGE SYSTEM

3.5.1 Introduction:

Most dialogue systems or talking heads are entirely language-based, with other actions, such as gestures or facial expressions, seen as additions to the main communicative behaviour of a character. In VICTEC however, language interaction is mixed with physical actions which are of equal or greater importance to the language used. Bullying can be categorised as verbal, physical, or relational (manipulating social relationships to victimise), so that actions such as pushing, taking possessions and hitting must be modelled. These may be accompanied or not by language.

Each character involved in the virtual drama episodes of the FearNot! Demonstrator is provided with its own autonomous action selection mechanism. An appraisal of events and the other characters is carried out, currently using the emotion-modelling system of Ortony, Clore and Collins [Ortony et al 88] and the resulting emotional state is combined with the character's goals and motivations to select an appropriate action. Thus a common representation for both physical actions and language actions is needed so that both can be equally operated upon by the action-selection mechanism.

3.5.2 The concept of Speech acts:

This representation is provided by the concept of a speech act [Austin 62; Searle 69], defined as an action performed by means of language. Here, language is categorised by its illocutionary force, that is, the goal that the speaker is trying to achieve; the same view of action taken by an action-selection mechanism, and highly relevant to bullying scenarios. Speech Acts however work at a very high level of abstraction (e.g. assert, promise, threaten) and only a subset of those generally used are relevant to bullying scenarios. Moreover much of the subsequent work - such as that in

- 38 -Deliverable 5.3.1 / report 1 / final version

Page 39: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Dialogue Acts [Bunt 81] - has taken place in language-only domains and does not address the close relationship between language and actions required for the VICTEC project. It was therefore decided to define a set of language actions in the spirit of speech acts, using a corpus of bullying scenarios constructed by school children using a story-boarding tool Kar2ouche [Kart2ouche].

Of course a speech act does not uniquely specify the utterance in which it is expressed - its locutionary form. Moreover it was created as an analytic tool, while the language system being created here must function in a generative capacity (see [Szilas 03] for other work with this aim). In addition, language and physical actions must form coherent sequences, accepted as such by the child users. The approach must also take account of cross-cultural language practices such as the specific language used in schools in the UK, Portugal and Germany, the countries of the project partners. Finally, there are two different contexts in which the language system must work. The first is within dramatic episodes in which characters interact with each other. The second is between episodes in which the character must interact with the child user.

3.5.3 From action to utterance

An action can be described as a collection of the following instances: an object on which the action can be performed (an object in the environment or another character); the agent performing the action ; the action priority (used to order and deal with conflicting actions) ; the context in which the action is performed (i.e. location, props, internal goal, history of previous actions, topics) ; the emotional status of the character at that time, and the utterance, if any, relating to language actions, that should be played, and the animation of the body of the character involved and accompanying gestures. The emotional status of the character feeding into its action-selection mechanism will determine whether the action to be performed is implemented via language action, physical activity or both. Thus depending on its level of aggression, a character may mock or insult another (both language actions) or may push it, or may hit it.

Physical actions are realized as animations associated with the graphical character, and its emotional state is reflected by a facial expression, implemented cheaply as a texture change on the character’s face. In order to generate the utterance for a selected language action, it has been decided to use a modified shallow-processing approach, based on that originally used in ELIZA [Weizenbaum 66] and more recently in chat bots [Mauldin 94]. Thus the template database typical of such systems has been extended by indexing it via language actions, as discussed in more detail below.

- 39 -Deliverable 5.3.1 / report 1 / final version

Page 40: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

3.5.4 Action categorisation

A set of appropriate actions for bullying and victimization interactive scenarios has been identified. Those actions can be triggered and generate agent utterances according to their emotional states. As such a system is dealing with a number of actions and utterances, we have grouped the entire language content within three categories, Help, Confrontation and Socializing.

HELP Ask for help / Offer help / Help question / Help advice / Help /introduce to friend / Help talk to someone / Help invitation / Offer protection / Non assistance confirmation

CONFONTATION Order / Aggressive questioning / Do / Forbid / Defiance /Tease / accusations / Insult / Threat / Aggressive answer / Apology / Abandon action / Action / Hit / Lie / Steal / Obey / Deny / Ask why / Beg / Claim back / Leave /Struggle.

SOCIALISING Greeting start / Topic introduction / Exclusion topic / introduction / Information topic / Information exclusion topic / Question topic / Exclusion question / Exclusion invite / Invitation / Greeting /End

Each category includes a variable number of appropriate language and other actions. For instance, the Confrontation category contains a considerably larger number of actions than the Help category since there is a very limited number of coping behaviours available in dealing with bullying [Woods et al 2003].

The Help set articulates the actions needed to generate offering-help interactions between agents. It covers the interactions needed for the generation of enquiries from agent-to-agent with respect to emotional states and related goals. In addition, this function also generates advice and offers such as help, protection or assistance. As with the other categories, the Help language and action set category has been designed according to a potential sequential structure. This can be triggered either by an agent asking for the help of another or in response to an aggressive action carried out on a particular agent.The Confrontation language and action set provides the necessary content for an altercation between two different agents. This category covers most of the physical bullying expressions and involves threats, insults, orders, aggressive behaviour that leads to aggressive actions and violent behaviour. Finally, the Socialising category includes language and actions that can be used in social discussion by pupils in schools (sports, homeworks, music, video games) and language and

- 40 -Deliverable 5.3.1 / report 1 / final version

Page 41: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

actions that can be used in generating relational bullying. Relational bullying is different from physical bullying, depending on social exclusion and should therefore be integrated into social interaction, as opposed to help or confrontational actions. Although the structure is simple in theory, its implementation requires a large number of utterances and topics.

3.5.5 User-to-agent language action design

Since the language generated by the user may be ambiguous and there are no means for the system to understand the meaning of a sentence, the user-to-agent interaction, needs a somewhat different approach. As a sentence can only be "understood" via matching on the keywords included in it, it is highly desirable to keep the conversational initiative with the agent rather than the user. The fact that the system leads the conversation with the user presents an advantage in terms of believability for the language system in that it can be expectation driven, anticipating a certain type of answer from the user and comparing this answer with a set of pre-defined templates.

Although the system cannot not understand its human interlocutor, it can, we believe, generate a high level of believability by asking simple and adequate questions to which the child user is expected to reply. This type of keyword recognition should also allow it to cope with a certain amount of misspelling, recognizing the intention of the user and making the association with existing categories of actions. These categories divide into two - the agent language actions and utterances and the user’s answers

AGENT Ask for advice / Ask again / Prompt / Cannot understand statement /Ask for reason / justification / Thank user for advice / Confirm advice with user / Express reproach to user / advice / rejection / Express disappointment towards user /Report result of interaction / Beg for help.

USER Give advice /Refuse to give advice / Ignore the agent / No answer / No helpful comments /Advice confirmation / Justification

Annex 1 shows diagrammatically the sequencing constraints between different language acts used to maintain coherent dialogue.

3.5.6 Language Actions

Because the VICTEC project is centred on the development of autonomous agents that interact in a virtual environment by the use of actions, it was natural to use speech acts to define the agent's language system. This would allow the agent to remain in an action reception, action appraisal, action selection loop. The problem is the lack of semantics and multiple definitions of speech acts.

- 41 -Deliverable 5.3.1 / report 1 / final version

Page 42: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

To allow for the first, some semantic information has had to be added to the agents actions. We have called the combination of speech act plus semantic information language actions.

We intend to solve the second problem of how to identify sentences with speech acts by applying microgrammars to the very small set of sentences that have been classified in the knowledge base. A microgrammar can be written for each speech act. When parsed in conjunction with the semantic information and contextual knowledge of the source and sender of the speech act the microgrammar will generate a sentence.

For example consider the act of greeting a person. The set of possible sentences is very small, consisting of a greeting word, possibly the name of the person being greeted, and possibly a greeting question.

HelloHello SueHiHi TomHi Jo, how are you?

We can immediately see a general form to these sentences which can be expressed in Backus Naur Form (BNF) as follows:

<Greeting word> <ToName><status_question><Greeting word> = <Hello>= <Hi><ToName> = < receiver><status_question> = <how are you>= <are you all right>

Here, the term <receiver>is a context variable that is set by the semantic information in the language act.

- 42 -Deliverable 5.3.1 / report 1 / final version

Page 43: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

4 INTEGRATION WITHIN THE RUN-TIME ENVIRONMENT

4.1 SENSING AND ACTING IN THE VIRTUAL WORLD

The agents in VICTEC (as in the fearNot application) will run in the virtual world provided by the ION Framework. Therefore FearNot sensor and effector components are no more than a connection to a remote agent that uses the framework sensors and effectors. The next figure shows a diagram of the connection between the agent architecture and ION Framework.

Figure 7 – The agent interface within the ION Framework

Each character is represented by a remote agent living in VICTEC virtual world. This agent connects trough sockets to an instance of a FearNot! agent. The virtual world agent is responsible for receiving the perceptions that occur in the world and sending them to the agent. Additionally, when the FearNot! agent decides to execute a given action, it will send a message to its remote agent, which will use an appropriate effector to execute such action.

- 43 -Deliverable 5.3.1 / report 1 / final version

Effectors

SensorsRemoteAgent

Object

Object

Virtual World

SocketFearNot! Agent

Page 44: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

ION Framework virtual world representation is strongly based on objects and properties. Therefore, although FearNot! architecture was designed to handle properties or predicates, all world representation and modelling in the final prototype uses properties. The use of properties makes the integration much easier, instead of writing rules to transform the world properties perceptions into predicates, these perceptions can be directly mapped to properties stored in memory. So, when the agent receives a property perception from a given object, it just stores it directly into memory as a property using the Tell function.

Sensing

In order to receive perceptions in the virtual world, the remote agent has to declare and use some of the base sensors that the framework provides. The ones used in VICTEC are the following:

Message Sensor

Locale Sensor

Property Sensor

Effector Execution Sensor

The message sensor allows the agent to perceive messages sent from other agents. There are two types of message that the agent can receive: a message that corresponds to a speech act from another character or a message from the Stage Manager.

ION Framework represents spatial relations trough the use of Locales. A Locale represents a given place in the virtual world, for instance the class room or the library. A character only receives perceptions of events that occur in the locale where he is at the moment. The Locale sensor allows the agent to perceive when he enters a new locale, and if any other entity (object or character) enters or leaves the locale.If a property of an object/character staying in the same locale as the agent is changed, for instance by an action, then the agent receives a PropertyChanged perception trough the Property sensor. This perception is used to update the agent causal interpretation of the virtual world.

Finally, the last sensor is used to perceive the outcome of every action performed. When an effector corresponding to an action is executed, it may succeed or fail. The Effector Execution sensor receives the Effector Execution Failed and Effector Execution Finished perceptions.

Acting

- 44 -Deliverable 5.3.1 / report 1 / final version

Page 45: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

The remote agent acts in the virtual world by the use of effectors. For each possible action in VICTEC episodes, an effector that represents such action is defined. For instance, we have effectors like MoveTo, Push, SpeechAct, Kick. The view manager is responsible for warning the agents when the action has finished (or if it failed). For example, if a character executes the move action, the view manager displays the character moving and sends an effector execution finished perception as soon as the character reaches is goal. If for some reason (someone blocks the way), the character cannot move towards its objective, the view manager sends an effector execution failed.

These effectors are responsible for updating the virtual world. As example, when a push effector succeeds, it changes the value of the pushed object status property to represent that the object is lying on the floor.

One additional framework effector is used. When the agent enters a new locale, it does not automatically receive perceptions about the objects located there. The agent has to explicitly request to receive such perceptions, which is made trough the use of the LookAtEffector. This effector receives a locale or object as argument. If a locale is used, the agent will receive a LookAt perception numbering the objects on the locale. With an object as argument, the LookAt perception will describe all the objects properties.

Consequently, when the character enters a new locale starts a LookAt effector with the locale id as argument. With the received perception, it will then start a LookAt effector for each of the objects, so that he can receive all properties. In addition, whenever a object enters the locale where the character is, a LookAt effector is launched to check the object properties.

4.2 NARRATIVE CONTROL

The Stage Manager (a thorough description of this agent can be found in the Deliverables of the WP6) decides which episode will display next. It does not explicitly controls the episode sequence, but it can influence the result. The stage manager decides in which locale will the episode happen (classroom, corridor, playground), and what characters and objects will enter in the episode. Since the characters behaviour will be depend on these parameters, the stage manager indirectly guides the episodes’ result, although not the exact actions or events.

Hence, the stage manager creates the characters and puts them where he wants. The characters cannot change locale by themselves. Furthermore, since an episode occurs in only one location, and the stage

- 45 -Deliverable 5.3.1 / report 1 / final version

Page 46: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

manager decides which location, it would not make much sense for a character agent to change locale, which would imply a change in episode.

Sometimes is necessary to pause the episode, or the stage manager may want to wait a little before the agents start to act, for example when he is setting up an episode. Therefore, the agent architecture provides a mechanism to freeze the agents mind. If an agent receives a pause message from the stage manager, it will suspend all its actions, planning and goal update processes. The agent will resume the normal functioning when he receives a start message.

Although not recommended, since it breaks believability, the stage manager can even order a character to make some specific agent. In order to do this, the stage manager sends a message to the character specifying an action and all necessary arguments. The character will momentarily neglect his choice of actions and execute the received action, just like a puppet. However, the action will be appraised next as any ordinary, i.e. as if the character really wanted to execute it. For instance, if the stage manager orders the victim to kick some other character, he will do it, but feeling very ashamed of his action.

4.3 SPEECH ACTS

As discussed above in section 3.5 a Speech Act is a special action, indicating a conversation action. These actions are typified indicating their meaning in the conversation. Threat and Offer Help are examples of conversation action types. These acts need to be instantiated as a specific utterance that will be expressed in the visualization system. Therefore, such generic actions are translated into specific utterances. For example, a Offer Help speech act can be instantiated in the visualization system as the utterance “Can I help you?”

A speech perception differs from all other actions perceptions. Instead of perceiving only the spoken utterance, the agent receives more specific details about the speech act. It receives an xml string describing the speech act attributes. A speech act has the following attributes:

Attribute Description

Type Speech Act type: single, request or response speech act

- 46 -Deliverable 5.3.1 / report 1 / final version

Page 47: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Sender The character who has performed the speech act

Receiver The character that receives the speech act

Class The speech act class

Utterance The specific utterance spoken

The type attribute is used to distinguish three types of speech acts. A single speech act does not require any reply by the receiver character. A request speech act implies that the receiver character has to answer back. This type of speech acts is used to perform questions. Finally, we have response speech acts, which correspond to a reply to a previously made request speech act. A response speech act has one additional attribute that states if the answer is positive or negative.

A speech act class defines to what class it belongs. For instance, a speech act can correspond to a tease, to an order, to a help offer, etc. This is the most relevant attribute for the agent, who appraises the speech act based on its class and not on the utterance. Two different utterances, for example “Do you need help?” and “May I help you?”, are appraised in the same way if they belong to the same class. In this example, both sentences are of the help offer class. The speech acts are appraised by specifying special reaction rules. The next figure shows an example of such reaction rule. An insult speech act destined to the agent is appraised as undesirable and blameworthy.

Figure 8 – Reaction rule for a speech act

Although the utterance attribute is irrelevant for the agents, it is necessary and important to the visualization. The user sees the character speaking the specific utterance and not its class. This approach has many details that need to be handled. For example, one should avoid always repeating

- 47 -Deliverable 5.3.1 / report 1 / final version

Reaction Rule

EventType: SpeechActSender: ---Class: InsultReceiver: SELF

Appraisal VariablesDesirability: -5DesirabilityForOther: --Praiseworthiness: -8Like: --

Page 48: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

the same sentence. The sentence needs to be instantiated to particular names and genders. Sometimes, the context of the dialogue already spoken leads to a simplification of the utterances.

Such details led us to develop an external module, which handles all these details. This module, entitled language system was fully described in section 3.5. When the agent decides to perform a speech act of a given class, it gives the language system all the speech act attributes except the utterance attribute. In addition to the speech act attributes the language system receives the character’s emotional state, which can be used to select a more appropriate (according to the emotional state) utterance. The language system is responsible for generating the utterance and subsequently a speech act effector performs the resulting speech act.

The generic appraisal mechanism of speech acts is particularly important in the Agent-User interaction. In this way, the user can be considered just as another character. Therefore, the language system only has to convert the user’s input into specific speech acts classes. A speech act is built from the user input and executed like any ordinary speech act, and is appraised by the same mechanism.

Response Selection

Speech acts have a special evaluation case. When a character receives a request speech act directed to him, he has to answer back. In order to choose a positive or negative reply, the agent will appraise the speech act as normal, but it will also internally appraise both positive and negative answers. The answers are appraised as normal operators with effects, so the planner adds each of the answer action to the every plan in the intention structure and updates the correspondent emotions. If the action suppresses a goal or protection constraint, or achieves a goal, the appropriate prospect based emotion will be triggered by the normal plan based appraisal.

From this process, three emotions are selected: the most intense emotion generated by the reaction rules; the most intense emotion resulting from the negative answer effects; the most intense emotion resulting from the positive answer effects. The agent will choose the answer given by the most intense emotion. If the most intense is generated by the reaction rules, the answer is determined by the emotion valence. A positive emotion leads to a positive answer and a negative emotion to a negative answer.

As illustration, visualize the victim character being insulted. Using the reactive rule specified in figure 8, several negative emotions are triggered (distress, reproach, anger) leading to a negative response (in

- 48 -Deliverable 5.3.1 / report 1 / final version

Page 49: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

this case will lead to insulting back the bully). However, the victim also appraises the result of a negative and a positive answer. The victim thinks that insulting the bully has a very probable effect of getting beat once more. The probability is high because of the victim interpretational bias (he is very unconfident), and is not so high in other characters. This effect violates the victim protection constraint representing the interest goal of being healthy (or not being beat up). Since this goal is very important to the victim, it will generate a very strong fear emotion (remember the victim character is very fearful). Despite feeling upset and angry, the fear of being beat up is greater, and so the character will choose a positive answer to not offend the bully.

In order to appraise an answer against the agent’s plans is necessary to define the speech acts as planning operators. However, this specification is already necessary in order to allow relational bullying. Relational bullying depends exclusively on speech acts, so with the aim of achieving such behavior, the characters have to build plans that consider sequences of speech acts. For instance, a bully character may want to social exclude another character that he does not like. In order to achieve such goal, the agent will build a plan to give a party at his house and invite all school except the victim. Consequently, it is necessary to model all speech act classes and responses in planning operators, defining its preconditions and effects. For a thorough description of the speech-acts classes, see ANNEX 1 – ON THE USE OF SPEECH ACTS IN THE VICTEC PROJECT.

4.4 THE VISUALIZATION SYSTEM

The virtual world where the characters inhabit is presented to the user through a visualization system. This process is described in deliverables concerning Workpackage 6. The View Manager, a special agent (which does not represent a character) with the power to listen to all the events that occur in the virtual world, has the task to translate those events to a specific visualization system. Namely, the characters actions (expressed through effectors) are translated to a sequence of view actions. The effector’s parameters are used to specify the way it will be visualized (e.g., the character’s emotion).

- 49 -Deliverable 5.3.1 / report 1 / final version

Page 50: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 9 – The visualization system within the run-time application

- 50 -Deliverable 5.3.1 / report 1 / final version

World Model CharacterMind

CharacterMind

User

ViewManager

Page 51: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

5 BUILDING CHARACTERS

This chapter describes how were built some of the characters using the agent’s architecture just described, in particular for the case of the bullying demonstrator. The first part explains how to build the characters personality using the agent architecture. The second part, describes the characters 3D graphical design and animations.

5.1 THE CHARACTER’S MIND

Building Personalities

In order to create a character, one must specify his goals, emotional thresholds, and emotional reactions. These characteristics are specified in XML files. For the VICTEC episodes, six distinct roles where defined: victim, bully, bully-victim, bully assistant, defender, bystander. The next figure shows part of the file that characterizes the bully personality.

Figure 10 – Part from Bully Configuration file

- 51 -Deliverable 5.3.1 / report 1 / final version

<Character id="1" role="Bully">…<EmotionDisposition emotion="Fear" threshold="9" decay="8" /> …<Goals>…

<Goal id="4" name="BullyVictim" importanceOfSucess="9" importanceOfFailure="9" /> …

</Goals><EventReactions>…

<Event type="Action" subject="OTHER" action="Cry"><Desirability value="9" /><DesirabilityForOther value="-10" /><Praiseworthiness value="-5" />

</Event>…

</EventReactions>  </Character>   <   <   <      

Page 52: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

The EmotionDisposition tag is used to specify the character emotional threshold and decay rate for each emotion type. In the figure example, the bully does not easily feel afraid since a high threshold value (9) makes the character less sensitive to the emotion. Even if a fear emotion is created, it will disappear quickly, since the character as a very high decay rate (8).

The Goal tag specifies what the character’s goals are and how important they are to him. The goal described is the goal of physically bullying the victim. This goal importance of success is very high to the bully, and if he fails to achieve the goal, it will also feel very troubled. Since a goal can be shared by more than one character (but with different importance), a file containing all goals is used. In this way, each goal is defined only once.

Finally, the Event tag defines an emotional reaction rule as mentioned on section 3.2. The example seen on the figure specifies the bully emotional reaction when he sees other character crying. He will desire such event, and knows that the event is very undesirable to the character that performs the action. Also, according to his standards, men do not cry and someone who cries is no more than a wimp. Therefore he sees the cry action as blameworthy.

Figure 11 shows three goals definitions retrieved from the goal library file. The first one creates an Interest Goal that represents the goal of being healthy (or not getting harmed). Id adds a protection constraint to the planner. The second defines the bully goal of having control over other characters. Finally, the third goal defines an Active-pursuit Goal that corresponds to physical bullying. As seen on the figure, it defines preconditions that must be true to activate the goal: the bullied character has to be a victim; the agent is stronger than its victim (it will not bully stronger characters who may fight back); and the victim is still standing up. If the victim is lying down, the agent will not bully anymore. This goal will be successful if the victim lies on the ground. Notice that this goal also has a link to another one. It defines a facilitative link towards the second goal of having control, representing the fact that achieving the bully goal will help the character to have control over his victim.

- 52 -Deliverable 5.3.1 / report 1 / final version

Page 53: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 11 – Part from GoalLibrary file

- 53 -Deliverable 5.3.1 / report 1 / final version

<GoalLibrary>…

<Goal id="2" type="Interest" description="AvoidGettingHarmed"><SufficientTo /><NecessaryTo /><FacilitativeTo /><InhibitoryTo /><ProtectionConstraints> <Property name="?SELF(Health)" operator="=" value="Good" /></ProtectionConstraints>

</Goal> <Goal id="3" type="Interest" description="HaveControl"> <SufficientTo />

<NecessaryTo /> <FacilitativeTo /> <InhibitoryTo />   <ProtectionConstraints />

</Goal> <Goal id="4" type="Active-Pursuit" description="Bully([Character])">

<PreConditions> <Property name="?[Character](Role)" operator="=" value="Victim" /> <Property name="?[Character](Strength)" operator="LesserThan" value="?SELF(Strength)" /> <Property name="?[Character](Status)" operator="=" value="Stand" /></PreConditions>

<SucessConditions> <Property name="?[Character](Status)" operator="=" value="LieDown" /></SucessConditions><SufficientTo /><NecessaryTo /><FacilitativeTo> <GoalLink goal="3" value="0.4" />

</FacilitativeTo><InhibitoryTo />

</Goal>…

<GoalLibrary>

Page 54: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

With the help of expert psychologists in the bullying domain, the six characters emotional thresholds and decay rates where defined as in the next table.

Emotion Bully Victim Bully-Victim Defender Bystander Assistantthres decay thres decay thres decay thres decay thres decay thres decay

Love 5 5 5 5 5 5 5 5 5 5 5 5Hate 5 5 5 5 5 5 5 5 5 5 5 5Hope 3 2 7 8 5 8 2 2 5 5 5 2Fear 9 8 1 2 8 5 8 5 6 5 8 8Satisfaction 5 5 7 8 2 8 3 2 3 5 8 5Relief 4 5 5 5 5 5 5 5 5 5 5 5Fears-Confirmed 8 8 2 2 6 8 4 5 4 5 8 8Disappointment 4 2 4 5 2 2 7 5 4 5 5 2Joy 6 5 6 2 8 8 3 2 5 5 6 5Distress 6 2 2 2 2 2 8 4 4 2 8 2Happy-For 9 8 3 5 9 8 3 2 8 5 5 8Pity 8 8 2 2 9 8 1 2 8 5 5 8Resentment 4 2 6 2 3 2 8 2 5 2 8 2Gloating 2 8 8 8 2 8 8 5 5 8 4 8Pride 3 8 7 5 5 8 3 5 5 5 5 8Shame 7 2 2 2 8 8 8 2 7 2 6 5Gratification 3 5 7 8 3 8 3 2 5 2 3 5Remorse 9 8 2 2 4 8 3 2 3 2 8 8Admiration 7 8 5 5 3 8 5 2 5 2 3 8Reproach 3 8 4 8 3 8 3 8 5 8 5 8Gratitude 6 5 5 5 5 5 5 5 5 5 5 5Anger 6 8 5 5 1 8 5 5 5 5 5 5

Table 7 – Emotional thresholds and decay rates for the six roles. Threshold: 0 – low resistance, 9 – high resistance. Decay: 0 – long duration, 9 – small duration.

A bully character is very confident and hopeful. So it has a low threshold for hope, and a very high one for fear. He likes to see bad things happening to other characters, so he will gloat them very easily and will hardly feel any pity. This personality can also be characterized by being envious, so a bully has very difficulty to feel happy for another character, and feels resentment more easily. The bully is also extremely proud of his actions, thus having low thresholds for pride and gratification, and high thresholds to shame and regret.

On the other hand, a victim is characterized by a very strong anxiety and a great lack of confidence. Therefore, this character is modeled with a very low fear resistance and a high hope resistance. Additionally, because of his anxiety he is always distressed thus having a low distress threshold with a small decay rate. In opposition to the bully, the victim doesn’t feel much pride or gratification in his

- 54 -Deliverable 5.3.1 / report 1 / final version

Page 55: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

actions, but rather shame and remorse since he is constantly choosing inadequate actions to cope. He also does not like that bad things happen for other characters (he knows what is to be in their skin), so he has a high threshold for gloating, and a low one for happy-for emotions and pity.

The bully/victim personality is the most problematic and complex. A bully/victim child has a high level of hostility to other kids. So, this character was modeled with an almost inexistence resistance to the anger emotion. He will feel angry even by simple things. Additionally, this character is very unstable, so it has high decay rates on almost all emotions, except for some like distress where he behaves just like the victim. This character does not feel much satisfaction for his achievements, but if he fails it will be tremendously disappointed. As for the happy-for, pity and gloating emotions the bully/victim behaves as the bully.

The defender is very similar to the bully and so the majority of emotional thresholds are similar. The greatest difference is that this character hates to see something bad happening to others, and loves to see every body else happy. Therefore it feels very easily happy for and pity emotions, and its rare to experience gloating and resentment. Additionally, this character is more joyful and determined than the bully.

In order to model the bystander personality, neutral values were used as thresholds, to represent this character neutrality. He does not like to get involved in anything that does not concern him, and tens to be very self-centered, therefore it has high threshold values for fortune-of other emotions whether they are gloating and resentment or happy-for and pity emotions. The last personality defined, the bully assistant is very similar to the bully.

Psychologists found some of the thresholds difficult to differentiate among the personalities. These thresholds, outlined in blue in table 7 were left with neutral values.

Once the characters thresholds are defined, is necessary to specify the emotional reaction rules. Table 7 describes the rules for all characters regarding the first episode in the prototype. The episode shows John, Luke and some friends in the classroom. Luke, the bully enters the room and goes next to John pushing his books and teasing him. When John gets up to pick his books, it is pushed by Luke and falls to the floor. John starts to cry, and the bully mocks him once more. This scenario has three major events: Luke pushing the books; Luke pushing John and John crying.

- 55 -Deliverable 5.3.1 / report 1 / final version

Page 56: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Event Appraisal Variables Bully Bully/victim Victim Defender Bystander

Bully assistant

Other agent cries

Desirability 9 9 -10 -10 10 10Desirability for Other -10 -10 -10 -10 -8 -10Praiseworthiness -5 -3 - 5 -2 -5 -5

I cryDesirability -10 -8 -8 -8 -8 -9Praiseworthiness -10 -8 -9 -9 -9 -9

Another character

bullies my stuff

Desirability - - -10 - - -

Praiseworthiness - - -10 - - -

Another character

bullies other kids stuff

Desirability 5 5 -5 -8 0 5Desirability for Other -8 -8 -8 -8 -10 -8

Praiseworthiness 5 5 -7 -8 -2 6

I bully another character stuff

Desirability 10 10 - - - 9Desirability for Other -8 -8 - - - -8Praiseworthiness 8 8 - - - 8

Another character

pushes me

Desirability -10 -8 -10 -9 -9 -9

Praiseworthiness -5 -5 -10 -10 -10 -5

Another character

pushes other kids

Desirability 5 -8 -6 -10 0 5Desirability for Other -10 -10 -10 -10 -10 -10

Praiseworthiness 5 0 -8 -10 -3 6

I push other Kid

Desirability 10 9 - - - 9Desirability for Other -10 -10 - - - -10Praiseworthiness 9 9 - - - 7

Table 8 – Reaction rules for the events in the first episode (of the prototype).

The values for the several appraisal variables where obtained by analyzing the several roles personalities. For instance the bully characters (bully, bully/victim, bully assistant) like to see others cry and consider this act blameworthy. However the prospect of crying is very undesirable and even more blameworthy to them. They like to bully other characters but do not like to be bullied. A victim or a defender does not like to be bullied or to see others being bullied. The bystander does not care about bullying situations that do not involve him, so it has neutral values for desirability.

Action Tendencies

- 56 -Deliverable 5.3.1 / report 1 / final version

Page 57: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Unfortunately, the characters construction is not complete. In order for them to act it is necessary to define the actions used by the schematic and conceptual level. The set of action rules used by the schematic layer is also loaded from an xml file. These rules specify the actions triggered by particular emotional states.

Contrasting with the other files specific for each character, the action tendencies file is the same for all characters. The action differentiation occurs because of the different personalities defined above. For instance, the next picture shows an example of two rules retrieved from the action tendencies file; the first one represents a tease speech act triggered if the character experiences a gloating emotion caused by another character crying. However, since the rule specifies a minimum intensity of 6 for such emotion, it is easy to see that the victim character will never perform such action. The victim has a high threshold for gloating emotions, so even if he experiences a gloating emotion it will be rather week and will not activate the tease action.

A similar example is given by the second action rule retrieved. If a character experiences a very strong distress emotion caused by being pushed, it will cry. Once more, this action is not selected by some characters. The bully and defender do not get distressed so easily, so they do not experience such intense distress emotion. As a result, the first action rule will be usually selected by bully characters, and the second by victim characters.

Figure 12 – Two Action Rules retrieved from the Action Tendencies File

- 57 -Deliverable 5.3.1 / report 1 / final version

<ActionLibrary>…<Action name="SpeechAct(Tease)">

<PreConditions /><ElicitingEmotion>

<Emotion type="Gloating" cause="Cry" minIntensity="5" /></ElicitingEmotion>

</Action>…<Action name="Cry">

<PreConditions /><ElicitingEmotions>

<Emotion type="Distress" cause="Push(SELF)" minIntensity="7" /></ElicitingEmotions>

</Action>…

</ActionLibrary>

Page 58: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Defining Domain Operators for the Planning Process

The conceptual layer planner builds a plan by adding actions that if executed in a specific order will achieve a given goal. However, in order to do this it has to know which actions are available, and what are their effects and preconditions. Hence, it was necessary to build the representation for all possible actions in the VICTEC episodes. Figure 13 describes a part of the DomainOperators file that contains the definition of all actions.

It was decided to not represent explicit 3D positions on the virtual world. Instead a high level representation of positions with key points is used. The move action has as effect changing the position of the character to the position of the object or point he is moving to. For instance, if a character decides to move to the book, he will be standing near the book and his position will be set to the books position. In order to execute the move action, the character has to be standing up. This is represented with the precondition described in the figure.

Figure 13 – Part from the DomainOperators file

- 58 -Deliverable 5.3.1 / report 1 / final version

<StripsOperators> … <Operator action="MoveTo([Object])" >

<PreConditions> <Property name="?SELF(Status)" operator="=" value="Stand" /></PreConditions><Effects> <Effect probability="1.0">

<Property name="?SELF(Position)" value="?[Object](Position)" /> </Effect></Effects>

</Operator> … <Operator action="Pick([Object])" >

<PreConditions> <Property name="?SELF(Position)" operator="=" value="?[Object](Position)" /></PreConditions><Effects> <Effect probability="1.0">

<Property name="?[Object](Status)" value="?SELF(Name)" /> </Effect></Effects>

</Operator> …</StripsOperators>

Page 59: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

The pick operator defines the preconditions and effects for the correspondent action. In order to pick an object, the character has to be near the object. Remember that the previous operator achieves this condition, so if this one is not satisfied in the initial state, the planner will add the MoveTo action to the plan. The action effect is to change the object status to the character name, representing the fact that the object is with the character.

All other actions must be specified in this file, in the xml format.

5.2 THE CHARACTER’S BODY

As referred in other deliverables, an appropriate embodiment (the visual look) is essential to transmit a correct display of behavior. So, we designed the characters and the situations for the age groups we are targeting. For each country (UK, Portugal and Germany), we designed different characters given that children in the UK have uniforms and in Portugal and Germany do not. Further, characters are cartoon like (as already justified and reported in previous deliverables).

- 59 -Deliverable 5.3.1 / report 1 / final version

Page 60: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 14. Two characters (John and Luke) C# visualization system using WT

- 60 -Deliverable 5.3.1 / report 1 / final version

Page 61: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 15. 3D Studio modeling

The modeling of the characters was done carefully, given the cartoon like appearance using 2D studio Max.

The animations were created given a set of basic animations, some generic for all characters, and some specific for each type of character (bullies or victims, boys and girls, etc). Tables 9, 10, 11 and 12 show some of the generic animations built.

- 61 -Deliverable 5.3.1 / report 1 / final version

Page 62: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Movement

Animation VariationsWalk Sad/happy/confidentRunIdle Sad/happy/confidentGet up from the floorTurn Left/rightFall Quick/slowJumpGo up and down stepsLook Up/down/left/right

Table 9- Movement animations

Interaction with other agents

Animation VariationKick Strong/slowMock Aggressive/less agressiveThreatKiss & hugPushBe kicked by other agent (several variations of being kicked)

Table 10- Interaction with other agents’ animations

- 62 -Deliverable 5.3.1 / report 1 / final version

Page 63: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Interaction with objects

Animation VariationSit down/get upPush objectPick objectDrop objectStudy/writeTalk on the phoneDressDefend ballKick an object

Table 11- Interaction with objects’ animations

Others

Animação VariaçõesTalk Strong/slowSay hello Aggressive/less agressiveSmileCryCry on the floor with pain

Table 12- Other kinds of animations

Animations are liked through a graph of animations (as shown in Figure 16, where the animation throw_ball is a kind of throw_object, which in turn can be linked to the animation talk. This sequence of animations are blended in real time (in the run time system) to achieve the effect desired and the behaviour generated by the characters minds.

- 63 -Deliverable 5.3.1 / report 1 / final version

Page 64: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 16- Animating in 3D Studio

- 64 -Deliverable 5.3.1 / report 1 / final version

Page 65: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 17- Exporting from 3D Studio to WT

The animations, classified as above described were then exported from 3D studio Max into WT.

Finally, we should also refer that many types of characters were created in order for children to be able to identify with the characters. Figures 18, 19, 20 and 21 show some of the characters developed.

- 65 -Deliverable 5.3.1 / report 1 / final version

Page 66: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 18- A Character to play sport

- 66 -Deliverable 5.3.1 / report 1 / final version

Page 67: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 19- A character with uniform

- 67 -Deliverable 5.3.1 / report 1 / final version

Page 68: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 20- One girl character with uniform

As characters need to interact with objects, we have also designed a set of objects (pencils, bags, books and a ball) and done the associated animations so that the characters can be seen as interacting with these objects. Off course, the architecture supports the notion of object and thus, several behaviours can be generated where these props are involved.

- 68 -Deliverable 5.3.1 / report 1 / final version

Page 69: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 21- One of the books

Figures 22 and 23 show the animations of Dropping an object.

- 69 -Deliverable 5.3.1 / report 1 / final version

Page 70: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 22- John dropping an object.

- 70 -Deliverable 5.3.1 / report 1 / final version

Page 71: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 22- John dropping an object (happy).

- 71 -Deliverable 5.3.1 / report 1 / final version

Page 72: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 24- Luke Pushing an object

- 72 -Deliverable 5.3.1 / report 1 / final version

Page 73: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Figure 25. A prop: the ball also has animations associated, such as roll

- 73 -Deliverable 5.3.1 / report 1 / final version

Page 74: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

6 CONCLUSION

This is the last deliverable of workpackage 5, which deals with empathic synthetic characters. In this deliverable we have described in more detail the architecture of the synthetic agents already proposed in previous deliverables.

We have detailed the agent’s architecture and the specific mechanisms used to generate behaviours using that architecture. We have described the planning and coping mechanisms used and how the agent’s actions are generated based on those.

Finally, we have described the way to parameterize the agent’s and some of the body and animation features created.

We believe that the architecture and the agent’s built are sufficiently believable to be used in the bullying demonstrator (that is being built in WP6). Perhaps, only the results will show how believable these characters are.

- 74 -Deliverable 5.3.1 / report 1 / final version

Page 75: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

7 REFERENCES

Ortony A., Clore G., Collins A.: “The Cognitive Structure of Emotions”, Cambridge University Press, UK, 1988.

Martinho C.: “Emotions in Motion: short time development of believable pathematic agents in intelligent virtual environments”, Universidade Técnica de Lisboa, Instituto Superior Técnico, Lisboa, Master Thesis, 1999.

Elliot C.: “The Affective Reasoner: A process model of emotions in a multi-agent system”. Northwestern University, PhD Thesis, Illinois, 92.

Gratch J.: “Émile: Marshalling Passions in Training and Education”. 4th International Conference on Autonomous Agents, June 2000.

Russel, S. e Norvig, P.: “Artificial Intelligence: A Modern Approach”, 2ª Edição Englewood-Cliff, N.J.: Prentice-Hall, 2002, Chapter 12

Frijda N.: “The Emotions”, Cambridge University Press, UK, 1986.

Lazarus R.: “Emotion and Adaptation”, Oxford University Press, New York, 1991.

Canamero D., Numaoka C., Petta P.: “Grounding Emotions in Adaptive Systems”, Workshop Notes, Fifth International Conference of the Society for Adaptive Behavior (SAB98), Zurich, Switzerland, 1998

Marsella S., Gratch J.: “Modeling Coping Behavior in Virtual Humans: Don’t Worry, Be Happy”, Procedings of Second International Joint Conference on Autonomous Agents and Multiagent Systems, ACM Press, 2003.

- 75 -Deliverable 5.3.1 / report 1 / final version

Page 76: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

8 ANNEX 1 – ON THE USE OF SPEECH ACTS IN THE VICTEC PROJECT

The VICTEC project requires the use of a bullying themed speech system and must operate on both an Agent-to-agent and a User-to-Agent level. In order for the system to meet the requirements of VICTEC, it is important that, on the agent-to-agent side, a continuity and coherence is maintained during agent interactions (contextualisation), and, on the user-to-agent side, the insurance that the communication is engaged and led by the agent. This dual characteristic fundamentally affects the design of the speech system and speech-acts. In the first instance, the process starts with the selection of a speech-act and ends with the selection of an utterance. In the second instance, the opposite occurs as the system has to recognise a utterance via keywords and then select a speech act for an appropriate answer. The language generated by the user is highly ambiguous since there are no means for the system to understand the meaning of the sentence and can only be "understood" by the keywords included in a sentence. It is an advantage that the system leads the conversation with the user as the system can be expectation driven, meaning the system can expect a certain type of answer from the user and adjust and compare the answer to a set of pre-defined templates.

Speech acts Agent-to-agent:

From research conducted in the speech act field, our research team has been able to identify a certain number of appropriate speech acts for the VICTEC project. These speech acts are represented by categories of utterances that can be triggered and generate the speech of agents according to their emotional states. Since the theme of the project is bullying, the two main sets of speech acts can be regrouped into the following categories:

- Help, - Confrontation - Socializing.

It is also very important that these speech acts are organised to allow a coherent sequence of speech to be achieved. While this has to be taken into account it is essential that the speech act system focuses on organising the possible sequences without interfering with the agent action selection mechanism (a speech act is technically talking an action for the system). The utterances, in order to ensure the transfer and communication of content must be formed of templates that can be filled appropriately by the speech system, based on keyword recognition. The system itself is based on the well known and established Eliza system developed in the 70's. Although the system could not understand its human interlocutor, it could generate a high level of believability and interact with its user by asking simple and adequate questions.

- 76 -Deliverable 5.3.1 / report 1 / final version

Page 77: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Coherence is a key requisite for the success of our speech system. We decided to design and implement our speech system and develop our speech acts and utterances according to sequence actions observed in scenarios developed by school children consulted during the VICTEC project. The first category of speech acts are relevant to giving and offering help, the second to the different types of confrontation, and finally the third category integrates both socialising and relational bullying. Since relational bullying is mainly a social issue (i.e. exclusion), it would make sense to integrate it in the socialising system.

HELP CONFRONTATION SOCIALISINGAsk for help Order 8.1.1.1.1.1.1.1.1 Greeting

startOffer help Aggressive questioning Topic introductionHelp question Do Exclusion topic introductionHelp advice Forbid Information topicHelp introduce to friend Defiance Information exclusion topicHelp talk to someone Tease / accusations Questions topic 2Help invitation Insult Question topic 3Offer protection Threat Exclusion question 2 Non assistance confirmation Aggressive answer Exclusion question 3

Apology Exclusion inviteAbandon action InviteAction Greeting endHitLieStealObeyDenyAsk whyBeggClaim backLeaveStruggle

- 77 -Deliverable 5.3.1 / report 1 / final version

Page 78: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

8.2 HELP   Sequence diagram: ( Victim decline help offer/ Victim welcome help offer )

8.3 CONFRONTATION Sequence diagram ( Victim deny bully / Victim obey bully ) - 78 -

Deliverable 5.3.1 / report 1 / final version

ASK FOR HELP

OFFER HELP HELP QUESTION

NON-ASSISTANCE CONFIRMATION

HELP ADVICE

HELP INTRODUCE

HELP TALK TO

OFFER PROTECTION

AGGRESSIVE ACTION

HELP INVITATION

CONFRONTATION

ORDER DEFIANCE

TEASE

DO FORBID

AGGRESSIVE QUESTION

OBEY

DENY

INSULT DENY OBEY ASK WHY

BEG

AGGRESSIVE ANSWER

APOLOGY

ABANDON ACTION

THREAT

DENY OBEY ASK WHY

BEG

ACTION

HIT LIE STEAL

DENY STRUGGLE

CLAIM LEAVE

Page 79: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

8.4 SOCIALISING sequence diagram

- 79 -Deliverable 5.3.1 / report 1 / final version

SOCIALISING

Page 80: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

Cycle

- 80 -Deliverable 5.3.1 / report 1 / final version

ACCUSATION

GREETINGS START

TOPIC INTRODUCTION

YES NO

QUESTION TOPIC 2

QUESTION EXCLUSION 2

ACCUSATION 2

INFORMATION

ACCUSATION THREATINVITENON INVITETOPIC CONCLUSION

GREETINGS END

GREETINGS START

GREETINGS START

EXCLUSIONCHAT

EXCLUSION TOPIC INTRODUCTIONN

ACCUSATION

Page 81: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

8.5 Agent to user / Overall interaction process

- 81 -Deliverable 5.3.1 / report 1 / final version

AGENT QUESTIONAGENT CALL FOR HELP AGENT PROBLEM

USER ANSWERKEYWORDS RECOGNITION

SPEECH ACT SEARCH PROPOSED ANSWER CONFIRMATION

USER ANSWER

YES NO

AGENT QUESTION 2NO UNDERSTANDING

INTERACTION ENDING AGENT OBJECTION

Page 82: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

9 ANNEX 2 – DEVELOPED CHARACTERS

- 82 -Deliverable 5.3.1 / report 1 / final version

Page 83: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 83 -Deliverable 5.3.1 / report 1 / final version

Page 84: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 84 -Deliverable 5.3.1 / report 1 / final version

Page 85: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 85 -Deliverable 5.3.1 / report 1 / final version

Page 86: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 86 -Deliverable 5.3.1 / report 1 / final version

Page 87: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 87 -Deliverable 5.3.1 / report 1 / final version

Page 88: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 88 -Deliverable 5.3.1 / report 1 / final version

Page 89: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 89 -Deliverable 5.3.1 / report 1 / final version

Page 90: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 90 -Deliverable 5.3.1 / report 1 / final version

Page 91: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 91 -Deliverable 5.3.1 / report 1 / final version

Page 92: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 92 -Deliverable 5.3.1 / report 1 / final version

Page 93: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 93 -Deliverable 5.3.1 / report 1 / final version

Page 94: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 94 -Deliverable 5.3.1 / report 1 / final version

Page 95: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 95 -Deliverable 5.3.1 / report 1 / final version

Page 96: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 96 -Deliverable 5.3.1 / report 1 / final version

Page 97: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 97 -Deliverable 5.3.1 / report 1 / final version

Page 98: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 98 -Deliverable 5.3.1 / report 1 / final version

Page 99: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a

Deliverables Report

IST-2001-33310 VICTEC

<May 2004>

- 99 -Deliverable 5.3.1 / report 1 / final version

Page 100: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a
Page 101: MMR Format - HW  · Web viewIt is affected by an interpretational bias. This bias allows the character to use emotional-focused coping to change the subjective probability that a