Keywords

1 Introduction

In this paper, we propose a layer in game engines that could provide more realistic behavior in the serious game environment which can influence the improvement of learning directly. That aspect has been improved in robotics field, especially with social robots. Hence such technology can be employed in games.

There are many (serious) games which deal with social issues which try to promote empathy in a player. Social interactive games such as Marriage [1] and Sims [2] let players interact with virtual characters [3, 4]. Games in the market are now becoming more and more emotionally mature aiming at connecting with the player [5,6,7].

The new trend in games is to try and inject emotions into games [8]. The lack of emotional attachment in gaming is a notion widely accepted. Few games, if any, manage to make the player feel empathy for the character that they are controlling or sympathy for the characters around him. Even though that can be accounted to a number of reasons, a big setback is the fact that virtual worlds do not feel real. The characters which share this world with the player are lifeless, with prefixed static behaviors and actions. An experienced player knows and has grown accustomed to expect just that. NPC’s are there either to provide support, information, give guests or sell items. For example, no matter how many times you ask them the same thing or how badly you treat them; they will still be there to do their assigned task. This expectation automatically lowers the believability of the characters and the world, making the player less concerned about the consequences of his/her behavior, thus subsequently not caring about the players they are meant to feel empathy and sympathy for. In order for games to be taken seriously and used as a tool for education, this problem must be remedied. Play is defined as the navigation of a suite of choices (i.e. decisions), where each decision leads to an action that has a discernable outcome. Currently, the choices that a player makes in a virtual world are reflected in results which are nonrealistic but limited by the Artificial Intelligence of the game. This kind of suspension of disbelief might be acceptable for commercial games but not for serious games, especially if their creators aim to get them approved as a successful learning medium. Creating a world where the people in it have feelings and act according to them can motivate and relate to their emotional Intelligence. Emotional Intelligence is defined [9] as “the ability to monitor one’s own and others’ feelings and emotions, to discriminate among them and to use this information to guide one’s thinking and actions”. This paper argues that Emotional Intelligence can have a significant influence on how successful serious games can be as a learning tool.

2 Implementation of Emotional Intelligence in Serious Games

The emotional intelligence platform is a system that aims to make a virtual world more believable by simulating human emotions and applying them to NPC’s. Looking specifically at Serious Games, the platform can be applied as a base in the creation of a virtual environment. Emotions will play an integral part of how the world functions and offer a great sense of unpredictability to it. This will make the virtual worlds more believable for the player, offer more accurate simulated results and even oppose the general misconception that games are just for fun and can offer nothing more than that. There is currently a lot of research in emotion theory. One notable example is the Gamegdala engine [10], which informs a lot of our methodology.

Our work assumes that each NPC agent has two basic characteristics: goals and beliefs. Furthermore, there is a great emphasis on social interactions between the characters and that is the main method of changing influencing these beliefs as it is explained in the example below:

2.1 User Scenario

Each NPC is assigned with certain random characteristics and an area of influence. As the player explores the world and interacts with the NPC’s these characteristics change according to the actions of the player, whenever he/she is in their area of influence. Furthermore when that NPC whose characteristics changed enters the area of influence of another NPC those player influences are transferred over to second NPC as well. To make things easier to understand, let’s take a simple example. Let’s imagine a game that aims to teach the culture of a country. The player is free to roam in a city market and enters a shop. In the shop there are two NPCs, a female and the shop owner. The player chats politely with the shop owner. The female NPC is in the vicinity of the conversation, therefore because the player was polite, her likability towards the player increased as well. The female NPC then moves away from the shop, entering a second shop. Since she will enter the area of influence of the shop owner of the second shop, the likability influences towards the player are transferred to the second shop owner as well. If the player now enters the second shop, since the shop owner already “heard” positive comments from the female NPC about him, he can offer him a small discount or different dialogue options. We are of course making the assumption here, that the second shop owner has the character trait of trusting people easily and the female NPC has the tendency to talk openly to everyone. Since in the beginning all these character traits were distributed randomly nobody can predict how the situation will play out. Depending on how the player treats the NPCs, there will be a different reaction. The player by realizing that, will no longer treat the people in the world with contempt and will start thinking about their feelings as well. This way the player can learn the importance of good behavior and politeness. Continuing on the example of the cultural game, let us now assume that we want to use the same platform for a different country. In this country the people are less open and more private with their lives. By adjusting some basic values, we can easily control the original random character trait assignment to reflect the change. Therefore now the engine will be more conservative on the values it will assign to each NPC. The aim of this system is to enhance the verisimilitude of the virtual world. Crucial game play objectives which are vital for the continuation of the story will of course not be left at random. They will still be scripted in the world by the game designer. Compared to older systems the Emotional Intelligence Platform can also offer new creative perspectives without the need of scripting everything. For example let us imagine that the objective of the player is to get inside a locked door. The guard standing outside has the keys and in order to let the player in he must have a high trust value towards the player. In order for that trust to be raised, the guard asks the player to perform a task for him. If however, the player did something influential to an NPC who has access to the guard, then the trust level towards the player might already be high, thus offering to the player another way in without having to complete the task. Since the influences platform is already set up, the game designer will only have to script the behavior of the guard when the trust level is high enough, saving valuable time from having to script the event from the beginning. Furthermore, this platform can educate players on the importance of honesty, trust and friendship and show that every action can have an effect on the world around you.

3 Development of Emotional Intelligence

Our proposal is that a character in a game should be equipped with an intelligent emotional module which controls the affective behavior of character in the game. Emotional properties are mathematically modeled to generate a platform for overall feelings in characters. That model would control the affective state of the character. In this section we describe the 3D emotional space and the mechanism for transition in that system. We also explain the possibility of involving artificial endocrine system in that emotional module. We consider interaction area around each agent within the game engine. When two agents locate in the interactive zone, emotional expression values of each agent would be transferred to the corresponding agent.

3.1 Emotional Modeling in the Game Engine

The internal emotional property of a character in a game can be modeled as an affective state system. In this section we describe an affective state model and propose a systematic method for handling changes in such model.

3.1.1 Affective State

Besides realizing the emotional expressions of the interaction, the system may develop the internal state of the character to handle the overall emotional situation.

We present the affective state model in the three dimensional space and then describe a systematic method to demonstrate the changes in affective states of the agent. That comprehensive model provides a complete platform for the emotional state of the character by considering all mixed emotions. Furthermore, a realistic transition system is proposed to control changes in internal affective states which have not been investigated in previous emotional models.

3.1.2 Modeling the Affective State

Tension and energy are believed as two principle parameters for representing the mood of human being in psychological studies [11]. We have considered these two dimensions as Activation (act) and Motivation (mot) axes in the 2D affective state plane in order to categorize affects in a methodical manner.

Affective state areas can be modeled by bean-shaped curves of genus zero with a single singularity with an ordinary triple point at the origin to illustrate their coverage in the affective coordinate system:

$$ (x^{2} + y^{2} )2 = x^{3} + y^{3} + a(x^{2} + x - y), $$
(1)

which gives a crooked egg curve when a is zero, and a bean curve when a is one.

State areas can be modeled by transecting the origin for plotting the above closed curve as \( X_i = x_i - x_{{act_{i}}} \), \( Y_i = y_i -y_{{mot_{i}}} \) in the Activation-Motivation plane. So any affective states can be identified according to its transferred origin as Eq. 2

$$ O_{s} = \left[ {X_{i} = x_{i} - x_{act_{i}} ,Y_{i} = y_{i} - y_{mot_{i}} ,Z_{j}^{i} = z_{{Sub_{j}^{i} }} } \right]\;where\;\left\{ {1 \le i \le 25,1 \le j \le 10} \right\}, $$
(2)

where \( i \) represents state and j shows the sub-state number.

By having the position of the origins, Eq. 1 could utilize in order to specify affective state areas.

Any of the main affective states include several sub-states which represent more details internal state. Sub-states can be represented as the third dimension of the affective state coordinate.

3.1.3 Affective State Transition

To model the system to link interaction and affective state, the transition in the affective state space has formulated as following:

$$ {\overrightarrow{S}}_{{t_{Act - Mot - Sub} }} = {\overrightarrow{S}}_{t - h} + \eta \overrightarrow {\Phi } + \beta {\Gamma} \overrightarrow {\Delta }, $$
(3)

where \( \overrightarrow{S}_{t} \) is the affective state of the agent in the affective space at time t and \( \overrightarrow{S}_{t - h} \) is affective state in time t − h, where h is the processing time gap as discrete system;

\( \overrightarrow {\Phi } \) is the vector field over the states which converges to the certain point in affective state coordinate system. \( \overrightarrow {\Phi } \) can be considered as the gravitational field of a point mass due to a point mass c located at point \( P_{0} \) having position \( r_{0} \) as:

$$ \Phi = \frac{ - kc}{{\left| {\overrightarrow {r} - \overrightarrow r_{0} } \right|}}(\overrightarrow r - \overrightarrow r_{0} ), $$
(4)

\( c > 0 \) is a constant, \( \Phi \) points toward the point \( r_{0} \) and has magnitude \( \left| \Phi \right| = \frac{ - kc}{{\left| {\vec{r} - \vec{r}_{0} } \right|^{2} }}; \)

\( \eta \) is the adjusting parameter for converge vector field;

\( \beta \) is the affective state coefficient which represents the personality of the agent that controls the rate of change in the mood. Larger \( \upbeta \) means that the state would change faster which makes the agent more moody;

\( \overrightarrow {\Gamma } \) is the learning rate. The change in state is different when agent has more interaction and this parameter helps to have more realistic changes in affective state;

\( \overrightarrow {\Delta } = \overrightarrow {\Delta }_{Act - Mot - Sub} \) is the 3D normal vector to transfers the state over time in affective state space based on the emotional input according to the interactions. First two components are in the Activation - Motivation plane which are driven from emotional input:

$$ \overrightarrow {\Delta }_{Act - Mot} = \sum\limits_{m = 1}^{6} e_{{Mot_{m} }} Mot(i) + \sum\limits_{m = 1}^{6} {e_{{Act_{m} }} } Act(j), $$
(5)

where Mot and Act are Motivation and Activation axes and \( e_{i} \)s are 6 values of happiness, sadness, disgust, surprise, anger, and fear in Activation and Motivation directions.

The third component of \( \Delta \) represents the movement in sub-state direction which obtained from the rate of the first two components:

$$ \overrightarrow {\Delta }_{Sub} = \left| {\frac{d}{dt}\Delta_{Act - Mot} } \right|(k). $$
(6)

In this way the vector k \( \Gamma\) \( \Delta \) finds its direction to reach the next affective state.

3.1.4 Artificial Endocrine System

Natural endocrine system is viewed as a network of glands that works with the nervous system to secrete hormones directly into the blood so as to control the activity of internal organs and coordinate the long range response to external stimuli. Hormones which are chemicals released by components of the endocrine system affect other parts of the body and play a significant role in the endocrine system so as to preserve homeostasis. Here, we will introduce the relation of hormones with human emotion and behavior which can be implemented into the emotional layer of the agent in the game.

Virtual biological systems considered as research field of biological inspired computing. Artificial Neural Network (ANN) is one of the well-known tools in computational intelligence techniques. In the same way, the endocrine system could also be a very useful tool.

This paper focuses on the hormones which are related to emotions and biological qualities [12].

In our system all hormones are considered to be secreted by two parameters:

  • The activation function which can be presented by employing the logistic function and

  • The gland bustle that should be considered through all the stimuli channels.

So the glands secretion can be modeled as Eq. 7:

$$ {\Lambda}_{q} = \frac{1}{1 + \exp ( - aq)}\sum\limits_{q = 1}^{m \times m} {p_{i} {\Theta}_{q} } . $$
(7)

Above representing shows that the gland secretion, \( \Lambda \), is the product of the each gland bustle, \( {\Theta}_{q} \), by considering \( \rho_{q} \) as the stimuli weight, which can be activated through the nonlinear activation function \( \frac{1}{1 + \exp ( - aq)} \). The gland bustle should be considered over m emotional values. n is number of different agents in the game environment that considered agent has interaction with them. The coefficient a in the activation function depends on the current volume of the hormone in the system.

4 Experimental Results

We have developed a simulator and applied the mentioned theories to that virtual environment. We designed the emotional layer for that system. The overall platform of this simulator is presented in Fig. 1. At the beginning of the game, 10 agents are placed in random positions in the environment. For each of them, random interaction area is considered as well. Agents generate random emotional values in their interaction area. The user can start the game by navigating through the environment using mouse clicks. When interaction areas of two agents meet, the emotional values are transferring between those agents and according to mentioned theories, the affective state of each one changes. The levels of hormones also change by time base on situations and interaction.

Fig. 1.
figure 1

The game simulator environment

We focus on affective properties of the character in the game and introduce the systematic method in order to generate such affection. The affective state system also developed as it has described in the previous sections. Figure 2 presents the affective state space which includes affective sates that are generated according to the Eq. 1, by using bean shape closed curves. Each of affective sub-states are demonstrated by volume in the 3D space and, as illustrated, several affective states overlap and share the subspace in the affective system which demonstrates the mixture of the emotional states. The state of the agent can be considered as one point inside this space. If the position of that point confined inside any of these volumes, then the internal state of the agent belongs to that category of affective state.

Fig. 2.
figure 2

Affective states are modeled as volumes in the 3D affective coordinate system

5 Conclusion

We have introduced an intelligent emotional layer for serious games in this paper. We believe that such a module can be employed in several serious game platforms in order to benefit learning aspects. A comprehensive emotional model which considers affective state has been presented for the agent. We also presented the system for an artificial endocrine system in order to improve the affective power of the agent. By implementing such emotional agent in a simulator, we have developed the system with realistic emotional behaviors. We believe that such platform could be added to several games in order to improve realistic behavior. Building about the Gamygdala engine, we have introduced an artificial endocrine system which we believe could replicate an even more realistic character simulation. The next steps for this work, will be to conduct even more experiments and evaluate the effectiveness on the emotion engine into more scenarios.