Modelling a Cognitive and Emotional Analysis and Behaviour

Dilyana Budakova, Lyudmil Dakovski

	Abstract. This article reviews a generalized and net model, which presents the stages for performing a cognitive and emotional analysis and for decision making on whether to change the rules for behaviour or to use the preliminary assigned rules by the programmer. Example predicates are given, that show the way according to which a metha-rule for behaviour is applied.
Key words: modelling, intelligent agents, rules, metha-rules, emotions, generalized nets.

INTRODUCTION
A number of circumstances exist, that make it difficult to present the cognitive aspects of emotions [7]. Such, for example is the existence of socially played role, embarrassments in the cognitive interpretation of the environment; not every stimulus, which influence emotionally can be recognized (sometimes cognitive and generalized emotions are displayed only as thoughts).
It is not clear how people reach to set dimensions of decisions to judge which is good, bad, nice, important, unimportant, interesting, uninteresting, etc.
Emotional discretions are crutial for decision making and it is necessary that they be examined and understood better, moreover, that two people can feel exactly in one and the same way physically and despite that to call one and the same feelings with different names depending on their knowledge or on the circumstances. Emotions affect the understandings and cognitive abilities, and the understandings influence the emotions [4]. The neurological examinations confirm the conclusion, that emotions can “obsess” the cognitive centers of brain. For example, upon false alarm it is imeadiately responded, and still later it is made aware, that there has been a danger.  This quick mechanism can be often mistaken, but it has the advantage to keep us away from dangers, thus justifying it [5].
In [7] some decisions to these problems are suggested. In an observed environment or by visual stage analyses, the computer can recognize what is happening in a situation, as computers equipped with mechanisms for emotions could test ways of setting their limits and for decision making under the influence of emotions. Successful cognitive models of emotions are related to factors as individual experience, cognitive capacities, former experience, evaluations and emotional maturity. The easiest way is to work with generalized emotional assessment and in life people often are dealing precisely with it. It is frequently said, that something we dislike or like, but we must think over deeper, if it is necessary to determine exactly what emotion we feel and which shades of it and to what degree. It cannot be expected that the cognitive and predicting model will work perfectly, but when gathering data from different situations, the possibility will get better for the computers to forsee the cognitive emotional answers to them. The affective computers will enable better solving of this task, as collecting data and learning the peculiarities about each individual.
Here, the presentation of cognitive and emotional analysis and decision making for behaviour in different situations is considered through generalized nets. The cognitive analysis will include decomposition of the considered condition, event, action or place of more important aspects and linking them with basic human necessities.
The prompt cognitive and emotional analysis covers forming up a generalized emotional evaluation of aspects associated with physiological demands or with the necessity of security. On the grounds of this emotional assessment, the emotional condition of the agent is being changed and the corresponding rule for behaviour activated. The comprehensive analysis is stated as for every aspect of action, place, event or condition, it is obtained a generalized emotional evaluation from each group of emotions.  Prevailing group of emotions is determined and when necessary, the condition of the agent is altered.  The overall cognitive and emotional analysis is set, as for every aspect of action, place, event or condition, it is obtained an emotional assessment for each emotion from each group and the exact prevailing emotion from each group is determined. 
The aspects of the considered conditions, events, actions or places, the necessities which they are linked to and the emotional assessment that they bring forth differ for different people. Man determines them on the basis of its vital and emotional experience. The agent that we are modelling possesses a data base of knowledge about aspects, associations, facts and emotional evaluations, that they arouse. The base is set up of different groups of people and the evaluations are generalized by importance and frequency of encountering. Therefore, an appropriate evaluation can be selected and the condition of the agent changed according to what is characteristics for the group of people, to which it belongs. 
Following [3], metha-rules we call “principles” or “consciousness” of the agent. They are used when a given rule for behaviour of the agent is distinguished from the incoming new suggestion for action in this situation by another agent. Thus, the agent modifies the behaviour and its state in different periods of time. Upon application of a metha-rule, the agent can change the assigned rule for behaviour by the programmer, as adding, deleting or altering a particular prerequisite or as changing its inference.

GENERALIZED NET MODEL OF A MENTAL PROCESS IN A COMPUTER ENVIRONMENT
The transitions of a generalized net (GN) model of a mental process in a computer environment [6] put forward the stages of a mental process, by which outer tokens – stimuli of the environment are transformed into a thought or a reaction. The mental process in GN-model [fig. 1] is described as a sequence of the following stages, given by a set of transitions of the net A={r1, r2, r3, r4, r5}: registration, recognition and transformation into a thought of a recorded event (r1), comprehension of an event (r2) via prompt, profound and overall analysis, obtaining an emotional evaluation of the event and possible change in the emotional status of the system (r3), decision making (r4) with possibilities to prolong the observation and the analysis and to move forward into a transition choice and performance of a reaction (r5).

r1

l10

l4

l5

l9

l8

r2

l1

r3

r4

r5

l2

l13

l11

l14

l12

l6

l3

l7

Fig.1. GN-model of a mental process for a token-agent

Internal tokens in the net [6] are modelling the knowledge of the agent about the analysis and emotional evaluation of the stimuli of the environment, for self-analysis and emotional self-assessment, knowledge on the rules for behaviour and on the rules for their change. Internal tokens are composite. They are illustrated by feedbacks respectively in transitions (r2), (r3) and (r4) shown in fig. 1. Each of them consist of simple tokens, which present a prerequisite of one rule, aspect of the condition of personality, aspect of a considered event, action or place in the world related to a necessity and an emotional evaluation.
Internal  tokens can be transformed into outer ones and become a stimulus for a choice of behaviour of the agent. Tokens can be realized as a combination of data and programmes for their interpretation. Then, the data can be presented dynamically by relation tables.  Several rows from one table will present the part of the data of one composite token. 
Transition (r3) reflects the change of the emotional condition of the system as it is determined the emotional evaluation of the considered event, action, state or place in the world. Position l6 from transition r3 is brought forward by GN from fig. 2.

Fig. 2.  Cognitive and emotional analysis and change of the emotional condition of an agent

l16

l17

r7

l20

l15

r6

r8

l18

r9

l21

l23

l19

l24

l22

За преходите се получават следните зависимости:

The aspects of a considered action linked to given necessities come into this net as outer tokens and they must obtain an emotional evaluation, since internal tokens are used, indicating the emotional relationship of the agent towards every aspect.

w15,16=(Extensive_AnalyzeComplete_Analyze)(Aspect_N Generalized_Em_Eval_N   EmotionState_Agent  Next_ Transition )

w15,17=(Fast_Analyze)(Aspect_Mphysiological/certainty Generalized_Em_Eval_Mphysiological/certainty   EmotionState_Agent  Transition_r9 )

w16,18=(Complete_Analyze)(Aspect_NGeneralized_Em_Eval_EveryEmGroupN  Next_Transition )
w16,19 = (Extensive_Analyze)  (Aspect_N  Generalized_Em_Eval_EveryEmGroupN  Transition_r9 )

w19,21 = Aspect_N  Em_Eval_EveryEmotion_in_AnyGroup  Next_Transition 

w17,21 = w19,21 = w20,21= Decision_Making  

w22,22 = w23,23 = w24,24 = Class_I_Feel_I_Know 
Class_I_Feel_I_Know are internal tokens in the generalized net, that represents knowledge of the agent about emotions, groups of emotions and about the emotional assessment, that is related to a given aspect of an event, action, condition or a place.

The indexed transition matrixes are showed in fig.3.

		l16	l17	l22
r6 =
l15	w15,16	w15,17	false

l22	false	false	w22,22

fig. 3а

		l20	l24
r8 =
l18	w18,20	false

l24	false	w24,24

fig. 3b

		l18	l19	l23
r7 =
l16	w16,18	w16,19	false

	l23	false	false	w23,23

fig. 3c

		l21
r9 =
l17	w17,21

l19	w19,21

l20	w20,21
fig. 3d

GN-model of the process for decision making on activation or change of a rule for behaviour
Transition (r4) from fig. 1 models the decision making on whether to continue the analysis of the same context, whether to move forward to analyzing another theme, whether to prolong the observation of a given event or it will be rejected, how often to switch over between  different context, whether to come to a choice of reaction. The frequency of change of the analyzed subject defines the degree of “absent-mindedness” of the agent. transition (r4) is used for decision making on implementation of a given action by the agent and on change of behaviour.  This application is being reviewed as position l7 is presented by a generalized net model given in fig. 4.
Outer token in this net can be a suggestion for action received by another agent, learning about the characteristics of a new place in the modelled world, revision of the condition of the agent in a former and present behaviour (on the basis of the saved history of each token).  They correspond to the circumstances, under which one rule for behaviour can be changed. Internal tokens for this net are the rules and metha-rules for behaviour.

The following dependencies are obtained for the transitions:
W25,26=(RevisionNew_Suggestion_for_Behavior)Decision_for_Use_Meta_Rule
W25,27 = Use_Usual_Rule_Behaviour 

Example for metha-rule for a choice between former and new suggestion for action are predicates w26,28=Part1_from_Meta_Rule, w28,29 = Part2_from_Meta_Rule, which represent first and second part from the methods for realization of a metha-rule. Detailed presentation of this metha-rule is the following. Predicate w26,28 devides the positive and negative sides upon choosing one or another action; the pluses and minuses are count down; the weight of each positive and negative side is determined depending on the basic necessity which it is linked to; it is determined which necessity is the organizer of behaviour of the agent in the moment and which is the highest basic necessity and they obtain the largest weight.
W26,28=Save_Poz_Aspects_1RuleSave_Neg_Aspects_1RuleSave_Poz_Aspects_2RuleSave_Neg_Aspects_2Rule Count_Poz_Neg_Aspects_1Rule Count_Poz_Neg_ Aspects_2RuleDetermine_Necessity_AllAspectsDetermine_Necessity_Organizer_ Behavior  (PutMaxWeight_High_NecessityAspectsPutMaxWeight_Aspects_Necessity_ Organizer)
W28,29=Weight_Poz_and_Neg_Aspects_on_Rules MakeDecide_forChangeOldRule.

fig. 4. GN-model for decision-making concerning a rule for behaviour

l26

r11

l29

l25

r10

r12

l28

r13

l30

l31

l32

l33

l27

Индексираните  матрици на преходите са показани на фиг 5. 

		l29	l33
r12 =
l28	w28,29	false

l33	false	w33,33
fig. 5b

		l26	l27	l31
r10 =
l25	w25,26	w25,27	false

l31	false	false	w31,31
fig. 5а

		l30
r13 =

l27	w27,30

l29	w29,30

fig. 5d

		l28	l32
r11 =
l26	w26,28	false	

	l32	false	w32,32

fig. 5c

Predicate w28,29 presents the second part from the metha-rule, that realizes the measurement itself and depending on the result, a decision is taken whether to change and in what way the already established rule for behaviour.

w27,30 = w29,30 = CanDoAction 	
w27,30 и w29,30  are predicates for implementation of a chosen action.
w31,31 = w32,32 = w33,33 = Rules_Meta-Rules
W31,31, w32,32, w33,33 are predicates which circulate in the feedbacks shown for every transition from the net.

EXPERIMENTAL RESULTS
The models are set out by programs. The program is displayed after assigning the necessary parameters for the operation of the model and it is traced for a given interval of time whether the obtained results comply to the expected ones.  The results can be illustrated by graphics. 
The condition of the agents, rules and metha-rules for behaviour are stated dynamically through relation tables, Thus, it is easy to add, delete or alter their aspects, characteristics, prerequisites or complete rules and metha-rules.

CONCLUSION
This article dwells on a generalized net model for drawing a cognitive and emotional analysis and applying rules and metha-rules for behaviour.
A cognitive and emotional analysis is necessary to determine and change the condition of the agent, its relation towards events, actions or places in the world and in view of activating one of the assigned rules or metha-rules for behaviour. Application of metha-rules for behaviour enables the agent to change the given by the programmer rules for behaviour. Usually, metha-rules are applied upon receiving new information, new arguments, new suggestion for behaviour or when revising the behaviour for past period of time.  Example predicates are reviewed for applying one metha-rule for realizing a prompt, profound and overall cognitive and emotional analysis of an intelligent agent.

REFERENCE 
[1] Atanassov K. , Generalized nets, World Scientific Publ. Co., Singapore, 1991
[2] Budakova D., Dakovski L. Generalized net model of a mental process in a computer environment. Proc. оf the International conference “Automatics and Informatics”’03, 6-8 October, Sofia, Bulgaria, Vol. 1 13-16 pages, 2003.
[3] Budakova D., Dakovski L., Hierarchical Generalized Net Model of Behavior. Forth Int. Workshop on GNs, Sofia, 23 Sept. 2003b, 68-76.
[4] Damasio A.R., Descartes’Error: Emotion, Reason, and the Human Brain. Gosset/Putnam Press, New York, 1994,
[5] Goleman D., Emotional Intelligence. Bantam Books, New York, 1995.
[6] LeDoux J. E., Emotion, memory and the brain. Scientific American, pages 50-57, June 1994.
[7] Picard R.S., Affective computing, The Mit Press, Cambridge, Massachusetts, London, 2000

About the authors.
as. eng. Dilyana Budakova
Department of Computer Systems, Technical University of Plovdiv,
St. Peterburg Blvd. 61, 4000 Plovdiv, Bulgaria,
dilyana_budakova@yahoo.com

prof. d.t.n. eng. Lyudmil Dakovski
Department of Computer Systems, Technical University of Sofia,
Kl.Ohridski Blvd.8, 1000 Sofia, Bulgaria,
seven-in@bulinfo.net