{'fraction_non_alphanumeric': 0.029619247839289885, 'fraction_numerical': 0.009577201588413922, 'mean_word_length': 4.536795137092602, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Fundamentals of Mathematical Theory of Emotional Robots

In this book we introduce a mathematically formalized concept of emotion, robot's education and other psychological parameters of intelligent robots. We also introduce unitless coefficients characterizing an emotional memory of a robot. Besides, the effect of a robot's memory upon its emotional behavior is studied, and theorems defining fellowship and conflicts in groups of robots are proved. Also unitless parameters describing emotional states of those groups are introduced, and a rule of making alternative (binary) decisions based on emotional selection is given. We introduce a concept of equivalent educational process for robots and a concept of efficiency coefficient of an educational process, and suggest an algorithm of emotional contacts within a group of robots. And generally, we present and describe a model of a virtual reality with emotional robots. The book is meant for mathematical modeling specialists and emotional robot software developers.

Education of a robot 12 3.
Equivalent educational processes 26 5.1. Mathematical model of equivalent education processes 27 5.2. Alternative to an objective function under coincidence of time steps of real and equivalent education processes 29 5.3. Generalization in case of noncoincidence of time steps of real and equivalent education processes 33 6.
Method of approximate definition of memory coefficient function 34 7.
Mathematical model of forming of tantamount robot sub-groups 35 8.
Algorithm for forming tantamount sub-groups of robot 38 9.
Applying vector algebra rules to investigation of robot sub-group emotional state Generalization of robot's emotional behavior rules in case the number of players interacting with the robot is arbitrary (not specified) 64 16. 1

INTRODUCTION
Emotions represent an essential part of human and animal psychological activity.
Attempts to formalize mathematically the psychological behavior of higher living beings were performed in a book «Гипотезы и алгоритмы математической теории исчисления эмоций» ("Hypotheses and Algorithms of Emotion Calculus Mathematical Theory") edited by Professor Oleg G. Pensky and published by the Perm State University (Russia) in 2009. Although the authors wanted this treatise to be considered as an example of some scientific quest, it encountered strong misunderstanding of psychologists in the city of Perm.
That book suggested mathematical models introducing and applying such terms and concepts as 'emotional education/upbringing', 'reeducation', 'temperament', 'conflict', etc.; also the authors reviewed approaches to modeling of emotional behavior of subjects, estimation of a psychological state in groups; there was as well suggested a new approach to the description of some new economic phenomena based on psychological theories.
The authors of the present paper completely agree that computer modeling of emotions is hindered by ambiguity of living being emotional behavior.
Considering misunderstanding of psychologists, Professor Pensky decided to adapt the results of his studies performed in 2009 to mathematical modeling of emotional robots and give a further development to those ideas.
The treatise of professor Oleg G. Pensky titled "Mathematical Models of Emotional Robots" was issued by the Perm State University printing office in 2010.
In the present book, same as in that one issued in 2010, the authors made an attempt to create and mathematically describe a virtual reality of emotional robots, which is based on such key terms as emotions and education, and includes fellowship/concordance and conflicts between its inhabitants-robots which feature various abilities, temperaments, memory, will-power, emotional work under achieving goals, 'diseases', education process prospects and corresponding concepts and terms.
Currently the American scientists [1] work on creation of an electronic copy of a human being which would be called E-creature. By happy chance the present book touches upon those very topics which are currently studied by our American colleagues. We consider robots with a non-absolute memory, and this kind of memory is a human being's feature.
Of course, the mathematical theory of emotional robots which we call your attention to in this book is far from perfection. But its authors never meant that this theory claims to be global, and once again ask critics above all to consider this book as an example of a scientific quest. modeling problems, for his guidance in advancing and presenting our theory of emotional robots to the scientific community.
The authors highly appreciate useful notes concerning the content of this book made by Tatiana S. Belozerova, PhD (Russia).

ROBOT's EMOTION: DEFINITION
A theory of human psychology defines emotions as an organism response to some stimulus [2]. Concerning robots, let us designate this stimulus as 'subject', and define it as follows: Let t be a time.
Definition 1.1. The function S(t) is referred as a 'subject' if it has the following properties: 1. Function domain of S(t): 2. S(t)>0 for any   * , 0 t t  ; 3. S(t) is the one-to-one function; 4. S(t) is the bounded function.
The paper [3] contains a theorem proving that it is possible for computer software to model human and animal emotions. But psychological features of living beings' emotions are so intricate and ambiguous that we decided to introduce a special mathematical definition of a robot's emotion. In this definition we are abstracting from real human emotions and, at the same time, accumulating general features of human and animal emotions; we are also abstracting from the content of emotions.
2. * 0 t t  (note that this condition is equivalent to emotion termination in case the subject effect is either over or not over yet); 3 is called an ambivalent emotion if it can be presented as the vector which elements are emotions initiated simultaneously by one and the same subject.
We will not focus on the content of emotions, and, according to [4], below we plan to take into account only the following things important to us: 1.
Emotions have a sign (plus or minus).

2.
An object has a finite number of emotions. Based on (2) we conclude that the robot's emotional state can be described by Hereinafter, in case we speak about a single-type emotion, we will omit the corresponding index mark, vector mark and will denote this by M(t).
Assume the emotion-free state of a robot as a zero emotion level. It is obvious, that stimuli can be totally external, partially external (or 'partially memorized') and internal. All of them may become a subject: -totally external stimuli (which are not contained in the robot's memory (see Fig. 1.1)), may serve as a subject; -'partially memorized' stimuli (when some part of information about them is entered into the robot's memory, and some part of it comes from the outside as external experience (Fig. 2.2)) may also serve as a subject; -internal stimuli (when full information about these stimuli is kept in the robot's memory ( Fig. 1.3)) may serve as a subject, as well. This is the case when, e.g., some recollection (past event memories) of a robot may generate emotions.
Robot's Memory Subject  [4]. According to Schechter, the occurred emotional state of a person is effected by his/her previous experience and his/her assessment of the current situation, as well as by perceived stimuli and stimulus-initiated physical alterations.
Let us note, that when describing a subject and its belonging to the robot's memory we used the term 'information' which is measured in bits [5]. So, let us advance the following hypothesis: a subject can be measured in bits of information as well.
It is obvious, that different subjects can initiate one and the same emotion of a robot, i.e. there is no one-to-one dependence between a subject and an emotion ( And also, one and the same subject can initiate different emotions of a robot [4] (Fig.1.5).
Let us introduce the concept of the unit (or specific) emotion, similarly to matter density in Physics [6], Definition 1.5. The specific emotion a(S(t),t) of a robot is an emotion per single subject unit.
Obviously, the specific emotion satisfies the following relation: We can easily see that the sign of the robot's emotion ) ), is determined by the sign of the specific emotion a(S(t),t). Mathematical theory of emotional robots described in this book considers the cases shown in Fig. 1.4 and 1.5.

EDUCATION OF A ROBOT
Let us introduce the definition of emotional upbringing (emotional education) of a robot abstracting from the psychological concept of education/ upbringing. Definition 2.1. The upbringing or education of a robot is a relatively stable attitude of this robot towards a subject.
From Definition 1.3 it follows that the robot's emotion M(t) is the continuous function on the segment   t , 0 , consequently M(t) is integrable on this segment. Considering that, we can work out the following definition.
Definition 2.2. The elementary robot's education r(t) based on subjects S(t) is the following function: The obvious mathematical features of the elementary education are as follows: 1) if a specific emotion sign coincides with a subject sign, then the education is positive; 2) in virtue of Definition 2.3, the function r(t) is differentiable with respect to the parameter t, so the relation dt Let us consider that in the course of time a robot can forget emotions experienced some time ago. Its current education is less and less effected by those past (bygone) emotions. Consequently, past elementary educations initiated by those emotions become forgotten as well.
Hence, the following definition becomes obvious.
Definition 2. 3 The education of a robot R(t) based on the subjects S(t) is the following function: where t is the current time, The current time satisfies the relation , where  is the current time of the current emotion effect from the beginning of its initiation, i t is the total time of all the formerly experienced emotions effect,   i i t R is the education obtained by a robot in the time i t . A verbal definition of education is as follows: it is a value determining motivation stability of the robot's behavior on a certain class of subjects.
It is obvious, that an education can be measured in bits of information similarly to a subject, and, consequently, emotions are to be measured in bit per second (bit/s).

Definition 2.4. Coefficients
are the memory coefficients of events experienced in the past, i.e. coefficients of the robot's memory.
According to (2.2) we can write down a relation specifying the education in the beginning of the i+1 st emotion effect upon the robot: It is easy to see that the eqs.
Definition 2.5. A time step is the effect time of one emotion.
According to results obtained by psychological researches an emotion cannot last more than 10 seconds. Therefore, let us assume that a time step value of any robot emotion is less or equal to 10 sec.
Here and below psychological characteristics of robots corresponding to a current moment of the time step are bracketed after the variable, and psychological characteristics corresponding to the end of time steps are denoted without brackets. For instance, ) (t R i defines a function of education altering for the current time t of the valid time step i, and i R defines a value of education in the end of the time step i.
It is easy to see that the robot featuring the past event memory coefficient identical with 1 remembers in detail all its past emotional educations. This robot can be regarded as autistic. But let us suppose that the robot's memories of the past events are deleted, i.e. the two-sided inequality 1 0   i  is valid for a forgetful robot in the end of each time step. We are now in position to state a theorem for this kind of robot.
Theorem 2.1. Educating the forgetful robot by means of positive emotions only leads to satiety.
Proof: It easy to see that Relation (2.2) is equivalent to (2.4) Since all the emotions are positive, elementary educations are positive, too; since all the emotions are value-limited, and time of emotion effect is also limited, so elementary educations are also limited. This makes us conclude that there are  and q of a forgetful robot for which the following inequalities hold true: Due to (2.4) и (2.5) we can obtain the upper bound of the function R(t) variation. It will have the form The right side of (2.6) defines the sum of geometric progression terms, which yields inequality (2.7) Having passed to the limit under   t or   i in the right side of (2.7) we get the upper bound of the education value: (2.8) Inequality (2.8) makes us conclude that the robot's education based on positive emotions has the upper bound, i.e. it is satiated.
The proof is now complete.
Psychological researches entirely confirm Theorem 2.1. According to their results, it is not possible to bring up and train a person ad infinitum, as at some certain moment he\she gets satiated [4], and passes to the next stage of his\her emotional activity.
Definition 2. 6 , where q is the elementary education value, and i is the order number of the initiating tantamount emotion from a quantity of emotions on which basis this education has been being performed by the current time point. Its proof is evident from Theorem 2.1.
Also let us note the following. When performing a robot's emotion by means of software, it is impossible to predict the subject effect time. Therefore it is expedient to model the emotions after subject effect is over.
Example: Let us take the emotion function in a form 8. Function domain contains an only point z, such that 0 * , Also let us note the following: according to (2.9), replacements of several conditions of belonging of the robot's inner emotional experience function M(t) to emotions do not require the currently considered theory to be revised.
Obviously, the time step  for Emotion (2.9) satisfies * 0 t t    , and the elementary education r is computed by (2.10) We can easily see that during the education process Eq. (2.10) provides Let us consider all the time steps to be equal to each other.
Below we give a theorem which mathematically characterizes deletion of the past\bygone education memory data if those educations are not maintained by emotions with the course of time. In this case the index i is defined by the relation Its proof is evident from (2.11).
Above we noted validity of Assuming that memory coefficients are differentiable functions and taking into consideration (2.12) we get the formula for the sum (i.e. resulting) emotion V(t): (2.13) (2.13) allows us to assert that sum emotions of the robot depend on past educations, memory coefficients and their rate of change.
It is quite easy to see that for the robot with the absolute emotional memory ) current sum emotions are not dependent on past educations.
Let robot's elementary educations satisfy the following inequality: q r j  . (2.14) Under i tending to infinity and the inverse numeration of elementary educations, (2.4) takes the form: Definition 2.9. The robot's education corresponding to (2.15) is an infinite education.
Let us note that the infinite education convergence determines education prospects.
Theorem 2.5. For the forgetful robot, the infinite education corresponding to ends of time steps converges.
Proof. Let us show that Series (2.15) is absolutely convergent.
By virtue of Inequality (2.14), Formula (2.15) and formula for finding a sum of terms of a geometric progression [7] we develop a correlation So, Series (2.15) is absolutely convergent, consequently it converges. The proof is now complete. Quod erat demonstrandum.
By virtue of the theorem given above, the relation is valid for the end of each time step of the continuous education process, and this relation is equivalent to z r z (2.16) (2.16) allows to enunciate the following theorem.
Theorem 2.6. The uniformly forgetful robot's elementary education corresponding to ends of time steps in the course of continuous education process tends to be constant. Proof.
holds true for the uniformly forgetful robot, by virtue of (3.16) the elementary education sequence corresponding to ends of education time steps, has a limit. Thus the theorem is proved.
Corollary 2.1. For the uniformly forgetful robot  z The proof follows from (2.16).
Let us assess the extent of error of the infinite education value provided when k terms of series are used for assessing the sum of Series (2.15).
It is easy to see that the inverse numeration of elementary educations makes the error of under finite summation of k terms of series.
Obviously, an education cannot be performed continuously: after the series of emotional effects there comes a slack period in this education.
Let us introduce a supplementary definition. Definition 2.10. A complete education cycle is a quantity of time steps equal to the sum of time steps under the effect of education emotions and a number of time steps corresponding with the slack period (absence of elementary education effects upon the robot) till the next emotional education effect.
Let us consider the education process of the uniformly forgetful robot with tantamount emotions.
It is easy to see that according to Theorems 2.2 and 2.3 the education 1 1 ,k j F for the first complete education cycle of the uniformly forgetful robot based on tantamount emotions with equal periods satisfies the following relation: where 1 j is the quantity of time steps in the presence of education effects upon the robot, 1 k is the quantity of time steps in their absence. Obviously, the education n n k j F , , obtained by the robot as a result of n complete education cycles is determined by the equality It is evident that the memory function shows to what extent tantamount educational emotions are memorized by the robot in the course of the educational process.
Let U defines the value equal to the maximal (satiated) education. Assuming that emotions are tantamount and memory coefficients are equal to one and the same constant, we pass to the limit in both parts of Equality (2.2) under the quantity of time steps tending to infinity. As a result we get So, the robot's education R, obtained in the first complete education cycle is determined by the formula . It easy to see that the function ) , ( determines deviation of the education from its satiety: the closer is ) , ( 1 1 j k G (with the given values 1 k and 1 j ) to 1, the closer the robot's education is to its satiety, and vice versa.
It is easy to see that the satiety indicator for the fixed 1 k and 1 j has a maximum value when the condition holds true.
Inserting (2.20) to Relation (2.19) we get the formula specifying the maximal value max G of the satiety indicator in the end of the first complete upbringing cycle. In the conclusion of this chapter we give several statements concerning the nonuniformly forgetful robot with non-tantamount emotions.
It easy to see that for this kind of robot in the end of n complete education where   Obviously, for the forgetful robot the following inequalities are valid: 1 .
Let us introduce the following definition.
Based on the definitions given above we conclude that the generalized memory function and the generalized education satiety indicator are unitless functions.
It is obvious that the generalized education satiety indicator satisfies the

PARAMETERS OF A GROUP OF EMOTIONAL ROBOTS
Let us consider a problem connected with studying emotional conditions of the group of robots. The theory given below represents one of attempts to formalize mathematically the solution of this problem.
Definition 3.1. The sum (i.e. resulting) education of the group including n robots belonging to the set Ω n based on the subject S(t) is computed as follows: Suppose we have two groups including p and k robots and forming two sets Ω p , . Let us find out when the utmost psychological conflict between those groups can occur on one and the same class of subjects. It is obvious that, for instance, hatred (odium) is determined by opposite-signed sum educations of rival groups; also it is obvious that the equality ) is to hold true so that the utmost confrontation between robot groups become possible.
The converse proposition is valid: If a sum education of two groups is equal to zero and an education of at least one robot is nonzero, then the utmost confrontation is most likely possible between two groups of robots.
Below we give the proof of this statement: , then k and p can be selected so that k+p=n, as well as Ω k and Ω p can be selected so that 0 , which required to be proved.
Based on this we get Theorem 3.1. The necessary and sufficient condition for the utmost confrontation between robot groups including at least one robot with a nonzero education is that the sum education of those groups equals to zero.
Obviously, the farther is k W  from zero, the worse is the confrontation.
The given theorem helps us to define the most rival pairs of robots or robot groups. To find out the pairs of rival groups it is enough to calculate each robot education and then obtain a set of all possible sum educations (e.g., by enumerative technique, manually or by computer). Sets of robots with sum educations close to zero make up rival risk groups.
It is easy to see that the greater the sum education of a group differs from zero, the more united (or, better say, more serried) this group is.
Suppose the sum education of members of the first group obtained in the course of several complete Definition 3.2. Re-education (re-bringing) is change of the education sign to the opposite one.
Obviously, Group 1 including k robots can re-educate Group 2 including p robots in its favour if the equality Q W holds true by the beginning of the re-educating process. The greater Q differs from -1, the more effective is this re-education. Let us consider conditions of the conflict between uniformly forgetful robots with tantamount emotions.
According to the definitions given above, the limiting education of the first uniformly forgetful robot 1 U educated by tantamount emotions, satisfies the relation Equality (3.2) allows us to compute the approximate interdependence of memory coefficients of two uniformly forgetful robots conflicting on tantamount emotions: It is obvious, that if coefficients 1  and 2  are not connected by Relation (2.6), then Robot 1 and Robot 2 will never come to an education conflict at the limit.
Above in Chapter 2 we showed that in the course of j continuous education effects on Robot 1 and i continuous education effects on Robot 2 the corresponding educations can be described as Then the condition of the onset of the conflict in the education process can be computed by the equality 2 2 2 1 But we can state that if memory coefficients 1  and 2  are not connected by Relation (3.3), then the conflict between robots ceases with time by itself, i.e. without any extra emotional effects different from already existing emotion effects.

FRIENDSHIP BETWEEN ROBOTS: FELLOWSHIP (CONCORDANCE)
This chapter represents an attempt to introduce the term and concept of "friendship between robots", which we prefer to characterize as fellowship or concordance of robots.
Here we introduce a couple of definitions.    Assume that a set of n robots is divided into two sub-groups. Suppose the first Sub-group including m robots is more united and affinitive of the two fellowships, and its fellowship value is 0 P . So, the sum/total fellowship value of the first Subgroup P is computed by the equality 0 mP P  . Assume the second Sub-group includes n-m robots and has a fellowship value 0 R . Then the sum/total fellowship value of the first Sub-group A is defined by the equality . Obviously, the sum/total fellowship value R of two sub-groups is defined by the formula Assume the inequality 0 0 R P  holds true. Suppose members of the second Sub-group are robots with equal tantamount emotions q and uniformly forgetful with equal memory coefficients  .
We state the following problem: let us define the education condition for robots of the second Sub-group, under which it is possible for the fellowship coefficient of the second Sub-group to become equal or more than the fellowship coefficient of the first Sub-group as a result of education of robots in the second Sub-group.
Based on (4.1) we conclude that this condition is determined by the inequality where * R is the education value of each robot in the second sub-group after the education process had started.
It is easy to see that Relation (4.2) is equivalent to the formula 0 * P R  . Let us effect simultaneously on each robot of the second sub-group by tantamount emotions until Condition (4.3) becomes to hold true. Obviously, by the end of the education process the relation 0 0 is to hold true, where j is a quantity of education process time steps for robots of the second sub-group.
So, for finding the least quantity (number) of the necessary education time steps with the given memory coefficients of robots of the second sub-group we are to solve the following problem: Let us prove the theorem.
Proof. Since robots in the second sub-group are uniformly forgetful, then the two-sided inequality 1 0    holds true. So, Theorem 4.2 statement yields a formula valid for any time step value j: This formula implies that the limiting condition in Problem (4.4) is never to hold true. Therefore, this task has no solution under this theorem statement.
This completes the proof.
In other words, the theorem implies the following: "education effects not necessarily make robots achieve equal fellowship (i.e. concordance) between members of the group with the given fellowship value".

EQUIVALENT EDUCATION PROCESSES
Definition 5.1. The equivalent education process is a continuous education process corresponding to an education with tantamount emotions, equal memory coefficients and featuring the minimal deviation at all the education assessment node points from the values of a real continuous education process of a robot.

MATHEMATICAL MODEL OF EQUIVALENT EDUCATION PROCESSES
Suppose education values of a real continuous process are established in the end of each period by values , where n is a total quantity of education time steps. Also suppose conditions (5.1) are valid. Now we approximate the real education process to an equivalent education process. To do this we need to find such q ,  under which the objective function reaches its minimum So, in order to develop the equivalent education process we need to solve the equation set Considering Relation (5.2), Equation set (5.3) in its expanded version takes the form: Since for adequately selected time steps the solutions of Equation sets (5.4) -(5.5) have to satisfy the conditions 1 0    , 0  q , (5.6) then, due to checking on validity of (5.6) we can estimate adequacy of the equivalent process to the real education process.
Coefficients q ,  solved out of Eqs. (5.4) -(5.5) allow us to find approximately the limiting value of the education of the continuous process Z. Obviously, Z satisfies the relation Let us assess the error in calculations of the limiting education in the real continuous process through the equivalent education process.
According to the formula of continuous education in the real process, the relation holds true. In (5.7) we pass to the limit under the time tending to infinity: So the value D satisfies the relation Considering the last inequality and Relation (5.9) we get the following formula: Let us consider the case corresponding to the inequality Obviously, in this case the limiting education error estimate satisfies the relations Relations (5.11) and (5.12) allow us to get the error estimate X of the limiting education under approximation of the real process to the equivalent education process. Obviously, in the general case it can be found by the formula Analyzing Formulas (5.11) and (5.12) we can state that the worse is the robot's emotional memory the less is the error estimate of the limiting education.
Also, (5.11) and (5.12) allow us to state that the formula holds true if the matter concerns a forgetful robot. By virtue of (5.1), Relation (5.13) allows us to find approximately the limiting education of a robot for the real educating process on the basis of the equivalent educating process.
It is easy to see that (5.9) implies the relation which is the upper bound of the education value of the forgetful robot's real education process.

ALTERNATIVE TO AN OBJECTIVE FUNCTION UNDER COINCIDENCE OF TIME STEPS OF REAL AND EQUIVALENT EDUCATION PROCESSES
Let us introduce a simpler objective function such that its minimization can give us the coefficients  and q which define the equivalent education process Validity of this objective function for designing an equivalent education process follows from the formula of education of a robot with tantamount emotions and equal memory coefficients: In order to minimize this function let us solve the following equation set: Now we are to find the corresponding derivatives:

Now simplify this and get
The system is linear relative to  and q so let's express  and q as i R . Out of the second equation we get Substitution of q into the first equation gives are to be valid. If the obtained values satisfy all the limitations mentioned above, then the coefficients  and q define the equivalent education process. If the obtained values do not satisfy those limitations, then it is not possible to develop any equivalent education process with the same time steps as in the real education process and with the corresponding educations n i R i , 1 ,  of the real education process. The obtained coefficients  and q allow us to find approximately the limiting value of the real education process. Let Z be the limiting value; then According to the formula of the continuous education process the relation .
Having passed to the limit in this relation we get . lim lim lim lim According to Theorem 2.1 of forgetful robot's education convergence at positive emotions, the relation ; then we get the following formula: , out of it we get the following formula: The obtained relations are necessary for computing an error of the limiting education under approximation of the real education process to the equivalent education process. The error X is found by Analyzing the inequality described above we conclude that the worse is the robot's emotional memory, the less is the error of limiting education computing.
Example. Let us consider an example of equivalent education process development.
Suppose the real education process includes three education time steps . By the formulas given above we find  and q , and get are valid. So, we obtained an approximation of the real education process including three time steps with the real education 4 , 3 , 1 to the equivalent education process with tantamount emotions under 5 . 2  q and equal memory coefficients 5 . 0   . Based on the obtained values, we can find the approximate value of the limiting education Z . Simple calculations lead to the following relation:

GENERALIZATION IN CASE OF NONCOINCIDENCE OF TIME STEPS OF REAL AND EQUIVALENT EDUCATION PROCESSES
Speaking about generalization, assume that a number of education time steps in the equivalent education process may differ from their number in the real education process. For instance, the end of the second time step of the real education process may coincide with the end of the second or more time step of the equivalent education process.
Noncoincidence of time steps for education processes can occur due to randomness in timing of educations of the real education process. Education values of the real process can be approximately restored for each time step in the course of development of the equivalent education process.
Assuming that the equivalent education process is continuous, we can suppose that during each time step our robot is effected by a tantamount emotion with the elementary education q .
It is easy to see that the objective function can be presented as follows: where i R is the education value of the real education process after the time step i , characterizes the education obtained as a result of the equivalent education process after the time step i j . So, in order to develop the equivalent education process it is necessary to minimize Objective function (5.14). For that we need to solve the following equation set: Then the equation set for finding will take a form hold true and applying the cyclic data search method for Objective function (5.14) minimization with an enumeration step equal to 0.1 for q and  , and an enumeration step equal to 1 for i j , and with variation intervals of q between 0.1 and 2.9,  -between 0.09 до 0.99. i j -between 1 до 100, we get the following values: . Obviously, the limiting education equals 20. The computation results show that under found parameters of the equivalent education process the value of (5.14) equals 0.0056, i.e. the developed equivalent education process approximates the real one quite closely.

METHOD OF APPROXIMATE DEFINITION OF MEMORY COEFFICIENT FUNCTION
In Chapter 2 we proved the following equality for the beginning of each time step: are constants which are not dependent on the current time t of emotion effect.
According to (6.1) and relations for finding the coefficients we can work out the following equations system: 1  , the time of the beginning of the i-th time step;  , the memory coefficient of the equivalent process.
We obtain relations allowing us to find the unknown values in Equation system (6.2) -(6.3) provided that parameters of the equivalent process are found on the basis of The objective function given in Section 5.2.
It is easy to see that the sought-for values are found by the explicit formulas where n is the number of time steps for which successive values of the robot's education i R are known, as well as time step which are defined by the values

MATHEMATICAL MODEL OF FORMING TANTAMOUNT ROBOT SUB-GROUPS
This chapter describes one of the ways to make up groups of robots with equal sum educations.
Let us consider a group of k robots, where each robot has its order number i, 1 . Suppose the robot i has its education i R . Then the sum education of the group of robots A satisfies the relation Problem: Out of the set  including all the robots, let us make up sub-groups which are nonoverlapping subsets , so that sum education values of the obtained sub-groups are least different from each other.
Let us give the following definition and prove the auxiliary theorem.
The proof is complete.
Let us introduce the objective function in a form: Now the problem put above can be mathematically described as follows: solve for Problem (7.2) deals with determination of conditional extremum of function of several variables, so it can be easily solved by the well-known Lagrange method.
As a result of applying the Lagrange method to the solution of this Problem we get the roots of the following equation system: are the Lagrange method auxiliary variables. In the general case, the question about existing and uniqueness of the solution of the nonlinear algebraic equation set (7.3), and about mathematical ways of its solution is still open-ended. Now let us consider the task which is a little bit different, though similar to Problem (7.2) in its statement. In this new problem statement we suppose that the quantity of robots p N in the groups p  is already predetermined. It is quite easy to see that in this case the mathematical statement of the problem will have the following form: solve for According to the Lagrange method, Problem (7.4) solution is reduced to just finding the roots of the linear equation set It is easy to show that the major equation determinant in this equation set is nonzero (e.g., the case when 2  n means that the group is split into two subgroups), i.e. with such n this set always has a unique solution.
which are the solution of Problem (7.4) and which make the objective function J reach its minimum equal to zero are absolutely tantamount sub-groups.
Let us define simple conditions under which the sub-groups being formed are absolutely tantamount.
It is easy to see that under 2  n the sub-groups become absolutely tantamount when the relations The solution of Problem (5.9) allows us to get numerical values of abstract average educations which may not coincide with real average educations of subgroups being formed. This is connected with the fact that average educations of all real sub-groups are known values and, consequently, absolutely tantamount subgroups might not be obtained basing on educations of single robot units. This is also the reason why it is not always possible to split a set of robots into tantamount subgroups.

ALGORITHM FOR FORMING TANTAMOUNT SUB-GROUPS OF ROBOT
Below we give an algorithm for making up real robot sub-groups closest to tantamount ones: Based Note that performing Step 2 on a computer one may use well-known computer algorithms of combinatory analysis given in [8].
Having selected the sets including robot sub-groups with the closest sum educations, we can assess their equivalence, i.e. to what extent those sub-groups are tantamount towards each other, by comparing average educations of those subgroups to the values i F which are the solution result of Problem (7.4). For assessing the closeness V of the formed sub-groups to the tantamount ones, we suggest applying the following formula: are real average educations of each of formed subgroup. Obviously, the nearer is V to zero, the closer are the formed sub-groups to each other.
To detect sub-groups of robots grouped according to their education levels out of a general set we suggest applying well-known algorithms of cluster analysis [9]. These algorithms may, for instance, help to detect either robots belong to leading or lagging sub-groups.

APPLYING VECTOR ALGEBRA RULES TO INVESTIGATION OF ROBOT SUB-GROUP EMOTIONAL STATE
Here and below we use Cartesian rectangular coordinates.
Definition 9.1. A robot's education based on n emotion types is the vector where each element of the vector of education based on single-type emotions is defined according to Relation (2.2).
Introducing vectors of educations and emotions allows us to use rules of vector algebra in mathematical operations with educations and emotions.
Thus, the group education R including m robots can be found by the formula and the group emotion M can be found by where k is an order number of a robot in its group. Note that with m<n the vector of group emotions includes at least n-m zero elements.
By introducing Relations (9.1) and (9.2) we obtained a rule for composition of robots' psychological characteristic vectors.
Below we give the results of theoretical research concerning a pair of emotional robots or their two groups; either of the groups features its education and emotion vector.
Definition 9.2. A single-type psychological vector of a robot is either just an emotion vector or just an education vector.
To unify the records we designate single-type psychological vectors as .
Let us consider psychological properties of scalar product of emotion education vectors.
Suppose  a is the single-type psychological vector of the first robot, or the group of robots, and  b is the single-type psychological vector of the second robot, or the second group of robots (both of robots or the groups belong to a common set).
According to the rules of vector algebra, a scalar product of two single-type psychological vectors is a value satisfying the relation , cos ,  the moduli of vectors, obtained by well-known vector algebra formulas; α the vectorial angle contained by . , , then these effects are directed at achieving opposite goals.
Definition 9.3. is illustrated by Fig. 9.1 and Fig. 9.2.  Theorem 9.1. If a cosine of the angle between two single-type psychological vectors is positive, then psychological effects are directed at achieving one common goal.
Corollary 9.1. If a cosine of the angle between two single-type psychological vectors is equal to 1, then psychological effects directed at achieving one goal are the most effective.
Theorem 9.2. If a cosine of the angle between two single-type psychological vectors is negative, then psychological effects contradict each other and are directed at achieving different (opposite) goals.
Corollary 9.2.1. If a cosine of the angle between two single-type psychological vectors is equal to -1, then the set of robots contains sub-groups with opposite psychological characteristics.
Corollary 9.2.2. If a cosine of the angle between two single-type psychological vectors is equal to -1, and moduli of these vectors are equal to each other, then there is a conflict in the set of robots, and psychological characteristics of this conflict correspond to the considered psychological vectors.
It is obvious, that if Corollary 9.2.2. is valid simultaneously for both emotion psychological vectors and education psychological vectors, then the conflict between two sub-groups gets its acutest form. Thus we can formulate the following theorem.
Theorem 9.3. If cosines of the angles between emotion vectors and education vectors are equal to -1, moduli of emotion vectors are equal to each other, and moduli of education vectors are equal to each other, too, then there is a conflict in its peak point.
Theorem 9.4. If a cosine of the angle between single-type psychological vectors is equal to zero, then there occurs an unstable psychological situation so that any single emotion may tend the set of robots either to one goal achieving or to different (opposite) goals achieving (i.e. either to serrying together and uniting or to dissociating and disuniting).
The proof is obvious.
Theorem 9.5. A set of emotional robots can not simultaneously be in situations when the cosine modulus of angle between single-type psychological vectors is equal to 1, and, at the same time, the set's psychological situation is unstable due to this type of vectors.
Proof. Assume the set of robots is emotional. Then its single-type psychological vector is not equal to zero.
Since the cosine modulus of the angle between psychological vectors is equal to 1, then the vectors are collinear. As the collection of robots experiences an unstable psychological situation, so psychological vectors are orthogonal. But both described cases can simultaneously be valid only if at least one vector is equal to zero, but it contradicts with an assumption that the considered set of robots is emotional. So, the theorem is proved ex contrario.
Corollary 9.5. Theorem 9.5. can be rephrased as follows: a collection of emotional robots cannot simultaneously experience a conflict and psychological uncertainty.

MATHEMATICAL ASSESSMENT OF GOAL ACHIEVMENT EXTENT
Suppose an educator set for a robot a numerically expressed goal of education. In some cases it is possible to assess numerically to what extent the robot manages to reach its goal in the course of this education.

Rule of solving for the extent of goal achievement
Let us introduce the following definitions. Obviously, deviation of the step k direction from the goal direction is characterized by the angle k  equal to the angle between the goal itself and the step k to the goal. The cosine of this angle is defined by the formula [10] 1) and the cosine of the angle k  contained by the robot state vector and the goal (this cosine characterizes deviation from the goal direction after passing through k steps) is defined by the relation After passing through the given number of steps K specified for this goal achievement, it is possible to find the value  showing how close the robot is to the preset goal. A formula defining  is a ratio of the vector projection numerical value K W onto the vector A to the modulus of A.
So, considering (10.2), the relation for evaluating  takes a form It is easy to see that  can possess any values, and the goal is achieved completely if 1   . The cosine of the angle of deviation of the sum state vector from the goal direction  can be found by the relation The formula for evaluating the goal achievement percentage k  at every step k is analogous: and the goal achievement k  after passing through k steps is found by Suppose k t is time necessary for performing the step k, then we can evaluate the total period of time T spent for achieving  . It is found by the formula Comparing members of one sub-group to each other we can find the most talented for education robot according to the following criterion: while his positive  is equal to that value of the rest robots, he must perform the least time T.
The formulas mentioned above can be used for analyzing robot's actions while achieving the goal: for instance, if under some k the values k  are too big (see (10.5)) and angles k  are close to zero (see (10.1)), we may conclude that the robot's actions chosen at the step k provide the most successful achievement of the preset goal.
Obviously, successful actions of the robot at every k-step yield the biggest k   , (see ( Now, based on the relations introduced, we may numerically assess the achievement extent of the sub-group goal by formulas initially developed for a single robot unit by substituting a robot for a sub-group.
Suppose, having achieved some goal a robot sets up another one. That new goal may have a quantity of components different from the previous one. To find the quantitative assessment of the next goal achievement we can apply the scheme described above including there a corresponding quantity of components of a new goal.
But sometimes the goal of robot's actions cannot be seen clearly. In this case the best way to present this goal is by the matrix A: where every line represents one of the goals.
Assessing one by one every line (i.e. every goal achievement) in the matrix А after passing K steps we can find the goal which is achieved best of all the rest. Solution of this problem can warn the robot against aiming at unaccomplishable and unrealizable goals.
Also let us pay attention at a simpler case when the goal and k-steps are scalars. Note, that in this case the goal and k-step to that goal have only two directionseither coinciding with the number axis direction or opposing it. Thus Relations (10.3), (10.5), (10.6) take the form: where А is a value of the goal.
The method of individual assessment of a goal achievement can be used for ranking robots according to their educations, e.g. in descending order. For correct ranking, it is necessary, first of all, to set up the maximally possible accomplishable goal, and then get robots ranked according to numerical values of this goal achievement. If these numerical values appear to be equal for some robots, then a robot with the least deviation from the goal direction has to be put at the first place. This way of education ranking we call goalizing.
Let us consider the case when numerical values of goal vector elements are unknown, but the task is to rank education vectors according to the achievement ascending order (i.e. according to the order of closeness to the goal being achieved). Without breaking the integrity, suppose the robot's goal is to obtain the best result. Then the goal A can be characterized by a vector with m unit elements: Having assigned an order number to each unit element of the education vector set (this is to indicate its closeness to 1), we get the vector   According to (10.7), the less is j  , the closer are the vectors j B to the goal.
Thus these vectors can be ranked in ascending order of j  . If with all this , then the vector corresponding to the biggest cos j  is to be put forward.
where n is a number of elements of the finite education goal vector.
Without breaking the integrity, suppose that at the step i the robot achieved the education   0 ,..., 0 , ..., 1 1 ,..., ,..., , 1 Then in (10.3) the vector i W satisfies the relation 1 , s is the total amount of steps to the goal.

Algorithm for forming tantamount sub-groups of robots according to their goal achievement extent
Based on the rule of solving for the extent of goal achievement given above in Section 10.1 we can suggest the following algorithm of forming two tantamount sub-groups, if goals of each robot are equal to each other and each sub-group includes an even number of members: 1) Make up a general linear array out of goal achievement extent values of each robot; 2) Within the array, define numbers of robots having the maximal and minimal values of goal achievement extent; 3) Robots with these numbers go to the first sub-group; 4) Remove from the general array the elements with maximal and minimal values of goal achievement extent;

5)
If the resulting general array is not empty, then go to Step 6, otherwise go to Step 10; 6) Within the resulting general array, define numbers of robots having the maximal and minimal values of goal achievement extent; 7) Robots with these numbers go to the second sub-group; 8) Remove from the general array the elements with maximal and minimal values of goal achievement extent; 9) If the resulting general array is not empty, then go to Step 2, otherwise go to Step 10; 10) End.

MATHEMATICAL MODEL OF ROBOT's EMOTIONAL ABILITIES
In the previous section we presented formulas for evaluating the extent of education goal achievement based on methods of the vector ranking projective theory.
Now we advance a hypothesis that the ablest 'gifted' robot is the most docile and submissive to education, i.e. by the time t this robot reaches large average extent of education goal achievement per time unit. On the basis of this hypothesis we offer a relation for evaluating the robot's ability F: Eq. (11.1) finds the most capable ('gifted') robot in a group, ranks robots according to their abilities and discloses robots with highly pronounced propensities to this or that scope of activities defined by subsets of education vector elements.
We offer the following algorithm for finding scopes of activities to which a robot has the strongest abilities.

3.
Select subgoal vectors (which are subsets composed of one, two, …, m elements of the goal vector) in series from the goal vector А.

4.
Compute the ability values for each of these composed subsets provided that the considered educations correspond to numbers of elements of subgoal vectors.

5.
Select the maximal ability values corresponding to each of composed subsets.
6. Find numbers of elements of the composed subset goals, corresponding to these maximal ability values. These numbers correspond to education types according to which a robot is considered to be the most successful, i.e. the ablest. For studying robot's abilities it is necessary to introduce the concept of ability range implying the quantity of educations matching the given ability value. We can conclude that, with equal ability values, the wider is the robot's ability range, the more talented is the robot. Thus, general abilities of a robot are defined by B, satisfying the equality , where p is the ability range, F is the ability value.
Theorem 11.2. In a univariate case, with the time infinitely increasing the abilities of a forgetful robot achieving the goal tend to zero.
Proof. Since the relations are valid for n education cycles, then the inequalities In view of the definition of the robot's ability for the univariate case the following formulas can be written: Thus the theorem is proved. This proves the theorem. Corollary 11.3. If there were some forgetful robot existing for an infinitely long period of time, then in the course of time its abilities would tend to zero, i.e. vanish.

WORK AND WILLPOWER OF EMOTIONAL ROBOTS
It is easy to see that in the univariate case (when the goal A is defined by one value) the value of goal achievement by the end of the n-th complete education cycle satisfies the relation A Theorem 12.3, In the multivariate case (the goal is a vector), the education process work of the forgetful robot achieving its goal satisfies the inequality   Proof. Since (12.1) holds true, the forgetful robot's willpower is limited. Hence, the corollary is proved.
Suppose the human's willpower similarly to the robot's willpower is described by Definition 12.2.
Let us introduce one more definition. Definition 12.3. A robot is dangerous to a man when a modulus of its willpower becomes asymptotically (with time tending to infinity) more than a human willpower modulus at any time point of the man's life.

Theorem 12.3, A robot with an absolute memory and tantamount positive emotions is dangerous to a man.
Proof. Since all the memory coefficients of the robot with an absolute memory are equal to 1, then for tantamount positive emotions (considering (11.2)) the robot's education resulting from infinite quantity of education cycles is equal to infinity, i.e. satisfies the relation Even having all his emotions positive, a regular human being does not have an absolute memory, his\her emotions are limited [8], so, according to Theorem 12.4 a human willpower is limited, i.e. it is less than an asymptotic willpower of a robot with an absolute memory and tantamount positive emotions.
The proof is complete.
Since a single person by nature cannot physically exist forever, his\her willpower is always finite. After a forerunning robot rests in peace, the information from its memory can be downloaded to the successive robot's memory (together with the information on numerical values of all the previous generations of robots). This provides continuous existence of a single robot's intelligence with the time tending to infinity. As a result of such continuous existence of generations of robots and passing on positive tantamount emotions from "ancestors" to "successors" provided with an absolute memory we will surely come up to a moment when a robot becomes dangerous to a man. So, we may conclude that in order to avoid this danger for a human being it is necessary at least to design forgetful robots (robots with a non-absolute memory).
Suppose the following relation holds true: It is easy to see that the education process efficiency coefficient has no units of measurement and the condition is valid for it. Obviously, the more is ) (t  under the given memory coefficients, the closer gets a robot to the most effective education.
, which means that directions of real and effective education processes coincide.
It should be noted that the efficiency coefficient makes it possible to assess "natural" robot properties (memory coefficients) in terms of education process effectiveness. Psychological studies say that we can hardly meet a human being with the pronounced temperament of one certain type. As human beings are analogues of robots, let us give the following definition.

ROBOT's TEMPERAMENT MODEL
Definition 13.2. The robot's temperament L is a function satisfying the relation It is easy to see that the suggested rule allows us to find a temperament of some certain robot only relative to its (sub)group.
The results of investigations of human temperament and its numerical values [3] can obviously be applied to robots (see Table 13.1).

. Variation intervals of robot's temperament values
Intervals given in Table 13.1. allow us to introduce a concept of temperament of a group of robots (group's temperament).
In Chapter 2 we mentioned an example which can be described by the function Similarly to this example we define a set of emotions; each of them for the robot i. takes a form: (13.1) Having found N by (13.1), we can define the temperament type by associating values from the right column in Table 13.1 with the left column; depending on what interval N belongs to, the group of robots can be either melancholic, or phlegmatic, or sanguine, or choleric.

INVESTIGATION OF PSYCHOLOGICAL PROCESS DYNAMICS IN A GROUP OF ROBOTS
Here we consider the cases when some processes occur in a group of robots with time. Terms and conventional signs used in this Chapter are the same as in Chapter 9.
The following statements are obvious.
are valid at the moment of time t, then there is an emotional or educational concordance correspondingly between the sub-groups; and vice versa, if , then there is an emotional or educational rivalry correspondingly between the sub-groups within the set of robots. The cases 0 ) obviously hold true.
This allows us also to formulate Theorem 14.5 for two-and three-dimensional vectors: In order , it is necessary and sufficient that conditions hold true simultaneously.
Due to Theorem 14.5 we can generalize Theorem 14.4: under the dimensionality of education and emotion vectors less than four, for the worst confrontation within the set of robots with nonzero vectors of psychoemotional states it is necessary and sufficient that the sum vector of emotions or educations is to be equal to the vector with zero components.
In the conclusion of this chapter we should note that Theorems 14.1, 14.3 and Corollaries 14.3.1, 14.3.2 allow us to assess the tendency of the set of robots to critical emotional situations. And in case these situations are undesirable, the mentioned theorems and corollaries substantiate the necessity of effecting the robots with subjects which are able to kill this tendency.

RULES AND FORECAST OF EMOTIONAL SELECTION OF ROBOTS
Using mathematical definitions of robot's psychological characteristics considered above in this chapter we try to describe one of the algorithms of robot's emotional behavior.
Suppose a robot has got an emotional selection problem: he is supposed to decide in favor of either the first or the second player (educator) depending on his education.
Below we suggest the rules of making an emotional decision for such robots. Assume that the robot has only positive emotions. Now suppose the robot's memory , the equality j = 1 meets robot's memory coefficients for the first educator, the equality j = 2 meets memory coefficients for the second educator.
We adduce the First rule of the alternate selection based on the emotional selection. This rule can easily be implemented in computer modeling of the robot's emotional behavior.
Suppose a robot is simultaneously effected by two players initiating robot's emotions. B then the robot decides in favor of the first player; if the first angle is wider than the second one, it means that the decision is made in favor of the second player; but if the angles are equal the selection is not supposed to be performed.
It is not very difficult to apply the first rule described above in case there are more than two players. For example, if we want to implement this rule for modeling emotional behavior of a robot it is enough to enter the number of momentary sum educations equal to the number of players, and the number of components of the general education vector is to be also increased. The minimal angle between the general education vector and the education vector of each player defines the alternate selection in favor of this or that player.
Note that the first rule is valid not only for scalar values of sum educations and emotions, but also for the cases when they have a form of vector.
Validity of the following statements is proved similarly: if The proof is complete. ,..., , , 0 ,..., 0 , 0 It is obvious that the scalar product of Proof. Let us note that Assume that effects of the first and the second players upon the robot correspond to tantamount emotions yielding the elementary education 0 R . Suppose robot memory coefficients corresponding to emotions resulted from the first player effect are constant and equal to 1  , and coefficients corresponding to emotional effects of the second player are equal to 2  . Also assume that , and robot's emotional memory of the first player effect is fully kept while the second player is making his effect and vice versa.
Then, according to Chapter 3 and the Second rule of alternate selection the following equality is obvious: It is easy to see that under the assumptions mentioned above Eq. (15.4) defines the necessary and sufficient condition for the stupor initiated by a single-type emotion. This condition can be easily generalized in case we need to consider emotions and an education defined by vectors (in this connection it is necessary to consider various pairs of coefficients k Obviously, the robot never comes to this state of stupor if with any j and q (j > 1, q > 1) and given 1 (15.7) Considering that 1 3   j y , Eq. (15.7) takes the form Its proof is evident directly from argumentations given in the proof of Theorem 15.5.
Eq. (15.4) and Corollary 15.5 allow us to forecast the robot's behavior and see whether our robot may get into emotional stupor.
Reasoning from the things said above we can state that the 'resolute' or 'purposeful' robot is a machine for which an alternate selection angle never equals 4  , or Eq. (15.4) never holds true, or its memory coefficients are anti-stuporous, so that this machine does not get stuporous regarding all the components of the education vector.

FIRST RULE OF ALTERNATE SELECTION
Assume a robot is effected by n players nonsimultaneously. Suppose they initiate only positive emotions and the robot performs an absolute emotional memory i.e. its memory coefficients . Correspondingly, j m is the quantity of subject effects of the j -th player. With these designations introduced, the rule of deciding in favor of this or that player can be formulated as follows: the emotional decision is made in favor of a player for which ) , (this emotional decision is made in favor of the player i ). In case the minimum is reached under several i simultaneously, the emotional selection is not supposed to be performed and the decision is not made.
The given rule can be generalized in case the player's effect initiates not just a single emotion, but a full vector of emotions. Thereby at k i t , with Further reasoning are quite the same as those ones given above concerning the case when the player's effect initiates one robot's emotion.

SECOND RULE OF ALTERNATE SELECTION
The Second rule of alternate selection is based on comparison of moduli of vectors of the sum educations i B with n i , 1  . This rule can be re-formulated as follows: the emotional decision is made in favor of a player for which i B max is reached with n i , 1  (this emotional decision is made in favor of the player i ). In case the maximum length is reached under several values of i simultaneously, the emotional selection is not supposed to be performed and the decision is not made.

ORTHOGONALITY OF EDUCATION VECTORS AND EQUIVALENCE OF ALTERNATE SELECTION RULES
As it was mentioned above, in this paper we use Cartesian rectangular coordinates. According to Theorem 15.
is the angle between V and i B .
According to the rules of vector algebra and orthogonality of n B B ,..., 1 the following relation holds true: V is reached under k i  , then according to the First rule of alternate selection the decision is made in favor of the player k . At that from the formula given above it follows that This completes the proof.

EMOTIONAL SELECTION AND CONFLICTS BETWEEN ROBOTS
It is not difficult to see that Eq. (15.4) coincides completely with Formula (3.7) obtained while describing a conflict between two robots with equal tantamount emotions. This fact makes us conclude that inner emotional conflicts of a robot can be described by the same formulas as conflicts between different robots, and consequently, theories applicable for groups of robots can be successfully used for inner emotional conflicts of a single robot without any alterations.
As an example of this we present the following theorem.
Theorem 17.1. If two uniformly forgetful robots have the same (equal) tantamount emotions, then there are such robot memory coefficients that the robots never get into education conflict.
Proof. For conflicting robots Eq. (3.7) holds true; if tantamount emotions are equal (3.7) is transformed into Eq. (15.4). According to Theorem 15.5 there exist anti-stupor coefficients transforming Eq. (15.4) to a strict inequality. But at the same time these anti-stupor coefficients are the memory coefficients of two different robots, and moreover, with these coefficients robots would never get into conflict.
This completes the proof.
Logic makes us introduce a new definition. Definition 17.1. Anti-conflict memory coefficients are memory coefficients of two different robots under which the robots never get into conflict. Now it is time to give the following theorem. Theorem 17.2. Anti-conflict memory coefficients of two uniformly forgetful robots with equal tantamount emotions coincide with anti-stupor coefficients.
Proof is analogous to the one of Theorem 17.1.

DIAGNOSTICS OF EMOTIONAL ROBOT's "MENTAL DISEASES"
Let us introduce a couple more definitions. Definition 18.1. Let us consider a robot to be "healthy" if its inner emotional experience function is an emotion.
Definition 18.2. Let us consider a robot to be "ill" if its inner emotional experience function does not satisfy at least one of the conditions in the definition of emotion.
This definition allows us to introduce such concept as seriousness or severity of a robot's disease.
Since Definition 1.3 includes 10 conditions defining a disease, then the degree of severity of this disease is characterized by H taking on integral values from 1 till 10 to indicate a number of conditions which do NOT hold true (as those are the conditions under which the inner emotional experience function becomes an emotion). The more severe is the disease the greater is Н. X is a special case of a robot's disease with the symptom vector 2 X if all the elements of the symptom vector 2 X occur among the elements of the symptom vector 1 X .
Below we give examples of robots' diseases. 1. Let us take some inner emotional experience function f(t) satisfying all the conditions of becoming an emotion except Condition #2, i.e. the function differs from an emotion and this is described by the relation * 0 t t  . Obviously, in this case the disease severity degree is equal to 1. We consider that a robot having such an emotional experience function is neurasthenic. It is also obvious that for neurasthenia the disease symptom vector has the form X=(2).

2.
Let us take some inner emotional experience function f(t) satisfying all the conditions of becoming an emotion except Conditions #2, 5, 8, 10.
2 ) ( t t f   is a good example of such a function. Obviously, in this case the disease severity degree is equal to 4. A robot which emotional experience function differs from an emotion regarding Conditions #2, 5, 8, 10 is psychopathic. For psychopathy the disease symptom vector has the form Х=(2, 5,8,10).
The forms of vectors in these examples make us conclude that symptoms of neurasthenia and psychopathy have one thing in common, which is Condition #2 unsatisfied, and, according to Definition 18.4 psychopathy is a special case of neurasthenia.
Sometimes one unsatisfied condition of the emotion definition implies that some other conditions get unsatisfied, too.
Let us consider the inner emotional experience function which has the form: At first sight Function (18.1) does not satisfy only Condition #5, and the disease severity degree is equal to 1 and the symptom vector containing only one element has the form Х= (6). But it is not correct. Applying mathematical analysis we can conclude that if Condition #6 is unsatisfied it implies that Conditions #4, 5, 7, 9, 10 are not satisfied for the function f(t), as well. I.e. the disease severity degree is equal to 6, and the symptom vector satisfies the relation Х= (4,5,6,7,9,10).
The example illustrating Formula (18.1) demonstrates the method (based on mathematical analysis) for detection of the major symptom of an emotional robot disease. Elimination of this symptom directly implies that all the rest conditions become valid and satisfied.
Thus for Function (18.1) the major reason of a rather severe disease is that Condition #6 remains unsatisfied. If the education goal is known and it is defined by

MODELS OF ROBOT's AMBIVALENT EMOTIONS
then the value of goal achievement extent  of the education process is specified by the following equality: Differentiating (19.1) with respect to t, we obtain According to Chapter 2 the sum emotion It easy to see that for the robot with an absolute memory this formula is equivalent to But modern vector algebra in the general case does not operate with such terms as "positive" or "negative" vectors. Therefore let us advanced a hypothesis that there is a unified characteristic for ambivalent emotions of the vector which specifies a sign of the ambivalent vectorial emotion. Obviously, this characteristic is a sign of (19.6) Now let us prove the theorem.

ABSOLUTE MEMORY OF ROBOTS
Let us consider robots with memory coefficients satisfying the eqs.
, where n is the number of time steps in the education process.
Obviously, in this case the education n R is defined by the formula   The theorem is proved.
Note one more thing: the education process convergence corresponds to the education satiety presence under an increase in the number of time steps. Taking this into account we can rephrase Theorem 20.2 as follows: if an education process is satiated, then the elementary education in the basis of this process tends to zero with an infinite increase in the number of time steps.
In Chapter 1 we gave an example of an emotion which can be described by the Similarly to this example, we define emotions corresponding to the i-th time step by It is easy to see that this problem always has a solution, what means that robots with an absolute memory at any time can be brought to fellowship with any fellowship value preset. Now let us solve the problem of developing the equivalent educational process (see Chapter 5) for robots with an absolute memory.
Obviously, in order to define the elementary education value q corresponding to the equivalent process, we have to solve the following problem: solve for: Problem (20.9) can be reduced to solving the equation It is easy to see that the solution q of Eq. (20.10) is defined by

ALGORITHM OF EMOTIONAL CONTACTS IN A GROUP OF ROBOTS
In this chapter we suggest a rule of mutual contacts between robots in their group.
In Chapter 2 we showed that the robot's education i R by the end of the i-th time step is specified by the formula It is obvious that   1 ,  j j i k . Assume that when two robots come in contact and start communicating, the education of each of them (according to Formula (2.1)) satisfy the relations This opens a way to software modeling of an emotional behavior of a closed group of intercommunicating robots. The input parameters of the corresponding software for modeling are supposed to be memory coefficients of each of the robots in this group, their initial individual educations and paired suggestibility coefficients. As the software runs the emotions of robots are initiated at random and so occur the corresponding elementary educations due to random contacts of robots. As a result we may obtain the computed sum education specifying conflicts in the group, as well as individual educations of each robot in this group. Due to numerical experiments it is possible to find critical values of suggestibility coefficients and memory coefficients causing conflicts in the group of robots after several paired contacts (contacts between two robots).
An algorithm of a robots' behavior in a group with a leader differs from an algorithm of a robots' behavior in a group without a leader due to the fact that in the first case while selecting a robot-educator which is a major agitator in the group it is necessary to find the order number of the greatest value of robots' individual educations. A robot with this number is supposed to act the part of a permanent agitator-and-leader.

ON INFORMATION ASPECTS OF E-creatures
Currently U.S. researchers discuss the question concerning creation of an electronic copy of a human being which can be called an E-creature [1].
We tried to study this idea of our American colleagues in terms of information. Let us make a series of remarks: 1.
There is no human being with an absolute memory, i.e. he\she always forgets a part of perceived information as this is his\her natural feature.

2.
A human being is able to accumulate information -without forgetting immediately a part of it -by finite portions. Now let us give the following definitions: the human information memory coefficient (characterizes the part of total memorized information which was received during the i previous information time steps).
Obviously the human information memory coefficient corresponding to the end of the information time step satisfies the relation . By virtue of the information property, 0  i s holds true, consequently all the accumulated information is greater than or equal to zero.
Suppose we have an electronic copy of a human created. Let us prove one of the information properties of this copy.
Theorem 22.1.The total information S which can be memorized by the processor of the human-like copy is limited.
Proof. Applying the methods given in Chapter 2, portion properties and Eq.
Thus, the theorem is proved. Corollary 22.1. It is impossible to create an E-creature with a nonabsolute memory which would be able to accumulate information infinitely.
Its proof is evident from the formulation of Theorem 22.1.
So, we can conclude that it is impossible to create the only infinitely existing Ecreature which would be an evolving copy of a human being (at least, in terms of information).
An immortal (infinite) electronic creature able to accumulate information infinitely [1] is possible only in case if it has an absolute information storage (information memory) with the conditions     , 1 , 1 i i  satisfied; but this sort of creature would have nothing to do with a human being, forgetful and oblivious; this sort of creature could be called just a robot unit.
For the infinite information evolution of the E-creature with an absolute memory we can state that it is necessary that the information from a chip of the "ancestor" E-creature with the nonabsolute memory shoul be downloaded to a chip of the "successor" E-creature (also with the nonabsolute memory) when the amount of the accumulated information becomes close to S. For the purpose of further data accumulation by the E-creature (which is a copy of a human being with a nonabsolute memory) it is necessary to re-download all the information from the ancestor's chip to the chip of the successor on a regular basis, i.e. 0 s is supposed to be equal to k S with k the number of information time steps performed by the Ecreature in the full course of its existence.
Let us note one property of memory information coefficients varying during the information time step length t with . It is easy to see that many proposition and provisions of the emotional robot theory given in the previous chapters can be easily adapted to the aspects of data accumulation by the E-creature. We suggest that you, our dear reader, should do it yourself as some brain exercises for pleasure at your leisure.

SOFTWARE REALIZATION OF SIMPLE EMOTIONAL ROBOT's BEHAVIOR
In order to illustrate the theory given in Chapter 2 let us set the task of developing software which would model the emotional behavior of a robot taking and responding audible cues (sounds) which are put in this software through a microphone plugged to a computer. Assume this computer program is to execute the following: according to a sound amplitude the program determines a type of "smile" which is outputted by a computer monitor as a response (reaction) to the sound effect (so finally we will see different "shades" of sad or happy smiles).

INPUT PARAMETERS OF SOFTWARE
Assume the modeled robot is uniformly forgetful. As the input parameters for the model implemented by this software we use the robot's memory coefficient  equal to some constant value from 0 to 1, and the time step.

ALGORITHM FOR MODELLING ROBOT's MIMIC EMOTIONAL REACTION
In this section we suggest an algorithm which helps to model the mimic emotional reaction of the robot effected by a sound (audio signal).
This algorithm represents a sequence of steps which would make a robot (software) emotionally react (mimic) to sounds produced by a human, animal, etc.
Let us present this algorithm as the following sequence of steps with some explanations: At the final step of the algorithm the robot's emotion is to be expressed visually. This can be fulfilled by some of the ways of emotion visualization (e.g. a 'smile').
Also we should note the following. If we want to develop an 'interactive' robot (software) i.e. the robot responding to sounds instantly then data collection and data processing are to be executed simultaneously.
Thus the 2-nd step of the algorithm is to be executed simultaneously to Steps 3 -8.

SoundBot SOFTWARE ARCHITECTURE
Let us examine an architecture of the developed software SoundBot [11] implementing the algorithm given above (Fig. 23.1.). Figures in circles mean the steps of the algorithm.
In most cases capabilities of this interface meet the needs of any multimedia applications used for recording and playing audio or video files. But it has a drawback: the data received from the soundcard cannot be read and processed interactively. It means that this method will not work here.
This approach is based on the MCI command-string interface or MCI command-message interface and the drawback of this method can be overcome if we use a low level interface.
The low level interface can be used for playing wav files as follows. First, the wav file header is read and its format is checked, the output device is opened and the sound data format is specified. Next, the audio data blocks are read directly from the wav file to get prepared by a special function for output and then they are passed to the driver of the output device. The driver puts them out to the soundcard [12,13]. The application totally controls the playback process because it prepares the data blocks in RAM itself.
The audio data is recorded the same way. First, the input device is to be opened and the audio file format is to be specified to the device. Next, one or more blocks of RAM are to be reserved and the special function is to be called. After that, as the need arises, the prepared blocks are passed to the input device driver which fills them with the recorded audio data [12,13].
For the recorded data to be saved as a wav file the application has to generate and record the file header and audio data to the file from the RAM blocks prepared and filled by the input device driver.
The low level interface requires all the record-and-playback details to be very thoroughly considered, as opposed to the MCI interface where most of parameters are just taken by default. These extra efforts are compensated with pretty good flexibility and the opportunity to work with the audio data in real time [12,13].
To provide the interactive mode of the SoundBot, i.e. make it interact with a user in real time, its modules have to operate simultaneously.
Each SoundBot's module is executed as a separate thread and it makes possible the following: 1.
The software can simultaneously receive new data from the soundcard and analyze it for further computing of the education which reflects the emotional state.

2.
The software can simultaneously play, record and select the audio data for its analysis.
Besides, the visualization of mimic emotional response is also executed as a separate thread to make it drawn as fast as possible.
Still the SoundBot considers only one emotional stimulus (subject) which is amplitude of the effecting audio signal. Every audio signal count generates stimulations in the SoundBot system and initiates momentary emotions according to the sine-shaped emotion function. Subjects are matched to emotions by value ranges specifying what subject initiates positive emotions and what subject initiates negative ones.

SoundBot VISUAL INTERFACE
A main window includes two inlays: the first one deals with playback and training of the SoundBot system on .wav samples (Fig. 23.2). The second inlay is used for recording wav files and interactive communication with the SoundBot system ( Fig. 23.3). Besides, the main window shows a smile expressing the emotional response of the modeled robot and the current value of the momentary emotion and education.
In a main menu we may set the major parameters (parameters of the emotion math model, parameters of operation principles and parameters of audio data processing).
Below we show a couple of dialogue windows for setting up different parameters (Fig.23.4 and 23.5). To find out characteristics of pulse-code conversion supported by the soundcard we are to select the option "Info" -> "Driver parameters…" of the main menu (this is strongly recommended for the correct record parameters settings especially when the software is run for the first time).
After you submit the settings you will see a window containing the description of multimedia hardware (Fig.23.6). The suggested algorithm can be used for building emotional robots. But the input audio data should be analyzed more thoroughly to single out as much stimuli as possible. That is why the SoundBot system can be considered as the first approximation of emotional robot software.
Also it should be considered that both the algorithm and Soundbot itself are meant for interaction with only one user. Interaction with several users requires some other much more complicated mathematical model.
The described software can be applied, for instance, for proper communication and rehabilitation of hearing-impaired patients, or used by actors for placing a voice outside an opera house. This software can also be used for predicting the emotional reaction of other people to the user's behavior (the software response shows the possible reaction of the surrounding people).

CONCLUSION
We hope you managed to read this book through. The authors made an attempt to build up and describe the virtual reality of emotional robots.
Concerning real mental processes of living organisms, it is not easy to define dependencies between emotions and time, and, perhaps, in the general case, this problem is unsolvable. But in the process of building robots a roboticist can preset mathematical functions of emotions altering with time (same as memory coefficients, and derivatives of emotion functions). In this case the theory given in this book allows of designing robots with the preset psychological characteristics, with further analyzing and computing of emotional behavior of robots on the basis of numeric data read in their memory.
As an example, below we give a description of a closed chaotic virtual reality of emotional robots based on software implementation of mathematical models shown in this book. In this description we use the terms defined above.
Let the virtual reality include some finite number of robots. Each of robots has its own memory with its special individual memory coefficients. In their virtual reality robots effect upon each other with different subjects in a random way to initiate emotions and alter each other's educations. Robot the educator (the one from which emotions are passed to the educatee) is that with the greatest education modulo. Concordance groups -'fellowships' of robots occur as a result of emotional contacts between robots, the greater their fellowship value, the more united is the group. Some groups may get into conflicts with each other. These conflicts emerge when sum educations of the groups became equal to zero. Each robot has a goal which is common for their reality in a whole. As a result of this goal presence in the course of time the leaders may appear which are robots with the greatest willpower and best abilities. Education effectiveness of each robot is characterized by the education process efficiency coefficient. Finding their efficiency coefficients can help us to select robots with natural characteristics making them the most educationally inclined. Some of robots feature satiated education; when these robots get to some certain level of satiety, emotional effect of other robots upon them stops. If there are robots which do not have education satiety in this virtual reality, then other robots educate them in the most active way, and this causes leaders to occur in the robots' community. Based on equivalent processes developed for each of robots with further ranking of limit educations, a leader of the robots' community defines its distant successor to be a new leader in future. The robots may get ill due to some software faults or computer virus attacks. A physician in this robots' community heals its ill inhabitants by correcting their emotions. As robots-members of this community keep communicating and interacting with each other their educations alter with the course of time. This causes the leaders to change and new fellowships and conflicting groups to occur. This is the way emotional robots live in their virtual reality.
This book appeared as a result of investigations described in [3, 11 -33], it includes new results and prepares a basis for new problems.