# Adaptive Automated Storytelling Based on Audience Response

Augusto Baffa, Marcus Poggi, Bruno Feijó

► To cite this version:

Augusto Baffa, Marcus Poggi, Bruno Feijó. Adaptive Automated Storytelling Based on Audience Response. 14th International Conference on Entertainment Computing (ICEC), Sep 2015, Trondheim, Norway. pp.45-58, 10.1007/978-3-319-24589-8_4. hal-01758442

HAL Id: hal-01758442

https://inria.hal.science/hal-01758442

Submitted on 4 Apr 2018

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Adaptive Automated Storytelling based on Audience Response

Augusto Baffa, Marcus Poggi, and Bruno Feijó¹

Departamento de Informática, PUC-Rio, Rio de Janeiro-RJ, Brazil,
abaffa@inf.puc-rio.br, poggi@inf.puc-rio.br, bfeijo@inf.puc-rio.br

**Abstract.** To tell a story, the storyteller uses all his/her skills to entertain an audience. This task not only relies on the act of telling a story, but also on the ability to understand reactions of the audience during the telling of the story. A well-trained storyteller knows whether the audience is bored or enjoying the show just by observing the spectators and adapts the story to please the audience. In this work, we propose a methodology to create tailored stories to an audience based on personality traits and preferences of each individual. As an audience may be composed of individuals with similar or mixed preferences, it is necessary to consider a middle ground solution based on the individual options. In addition, individuals may have some kind of relationship with others that influence their decisions. The proposed model addresses all steps in the quest to please the audience. It infers what the preferences are, computes the scenes reward for all individuals, estimates their choices independently and in group, and allows Interactive Storytelling systems to find the story that maximizes the expected audience reward.

**Keywords:** Social Interaction, Group decision making, Model of Emotions, Automated Storytelling, Audience model, Optimization application

## 1 Introduction

Selecting the best events of a story to please the audience is a difficult task. It requires continued observation of the spectators. It is also necessary to understand the preferences of each individual in order to ensure that the story is able to entertain and engage as many spectators as possible.

Whereas an interactive story is non-linear, because it has several possible branches until the end, the objective of a storyteller is to find out the best ones considering an audience profile, the dramatic tension and the emotions aroused on the individuals.

Empathy is the psychological ability to feel what another person would feel if you were experiencing the same situation. It is a way to understand feelings and emotions, looking in an objective and rational way what another person feels[2]. Based on the empathy, it is possible to learn what the audience likes. This allows selecting similar future events along the story and, therefore, to maximize the audience rating.
The proposed method aims to select the best sequence of scenes to a given audience, trying to maximize the acceptance of the story and reduce drop outs. The idea behind this approach is to identify whether the audience is really in tune with the story that is being shown. A well-trained storyteller can realize if the audience is bored or enjoying the story (or presentation) just looking at the spectators.

During story writing, an author can define dramatic curves to describe emotions of each scene. These dramatic curves define how the scene should be played, its screenshot, lighting and soundtrack. After the current scene, each new one has a new dramatic curve which adds to the context of the story[1].

The reactions of the audience are related to the dramatic curves of the scene. If the audience readings of the emotions are similar to the emotions defined by the dramatic context, then there is a connection (empathy) between audience and what is being watched[6, 7].

In this work, we propose a methodology to create tailored stories to an audience based on personality traits and preferences of each individual. The global objective is to maximize the expected audience reward. This involves considering a middle ground solution based on the individual options of the audience group. In addition, individuals may have some kind of relationship with others, characterizing an interaction among the audience and ultimately influencing their decisions.

The proposed model addresses all steps in the quest to please the audience. It infers what the preferences are, computes the scenes reward for all individuals, estimates their choices independently and in group, and allows Interactive Storytelling systems to find the story that maximizes the expected audience reward.

This paper is organized as follows. Section 2 discusses on emotion modeling and on its application to audience characterization and behavior expectation. The following section presents the main aspects of automated storytelling. Section 4 is dedicated to modeling the expected audience reward maximization. The interaction of individuals in the audience is the object of section 5. Section 6 proposes a heuristic to solve the optimization model in section 5. Analysis and conclusions are drawn in the last section.

## 2 Emotions and Audience

During film screening, the audience gets emotionally involved with the story. Individuals in the audience reacts according to their preferences. When an individual enjoys what is staged, he/she tends to reflect the same emotions that are proposed by the story. The greater the identification between the individual and the story, the greater are the emotions experienced.

As an audience can be composed of individuals who have very different preferences, it is important that the storyteller identifies a middle ground to please as many as possible. Knowing some personality traits of each individual helps to get the story closer to the audience.
## 2.1 Model of Emotions

The emotional notation used to describe the scenes of a story is based on the model of “basic emotions” proposed by Robert Plutchik [9, 10]. Plutchik’s model is based on Psychoevolutionary theory. It assumes that emotions are biologically primitive and that they evolved in order to improve animal reproductive capacity. Each of the basic emotions demonstrates a high survival behavior, such as the fear that inspires the fight-or-flight. In Plutchik’s approach, the basic emotions are represented by a three-dimensional circumplex model where emotional words were plotted based on similarity [11]. Plutchik’s model is often used in computer science in different versions, for tasks such as affective human-computer interaction or sentiment analysis. It is one of the most influential approaches for classifying emotional responses in general[4].

Each sector of the circle represents an intensity level for each basic emotion: the first intensity is low, the second is normal and the third intensity is high. In each level, there are specific names according to the intensity of the emotion, for example: serenity at low intensity is similar to joy and ecstasy in a higher intensity of the instance.

Plutchik defines that basic emotions can be combined in pairs to produce complex emotions. These combinations are classified in four groups: Primary Dyads (experienced often), Secondary Dyads (sometimes perceived), Tertiary Dyads (rare) and opposite Dyads (cannot be combined).

Primary Dyads are obtained by combining adjacent emotions, e.g., Joy + Trust = Love. The Secondary Dyads are obtained by combining emotions that are two axes distant, for example, Joy + Fear = Excitement. The Tertiary Dyads are obtained by combining emotions that are three axes distant, for example, Joy + Surprise = Doom. The opposite Dyads are on the same axis but on opposite sides, for example, Joy and Sorrow cannot be combined, or cannot occur simultaneously [11]. Complex Emotions - Primaries Dyads:

- antecipation + joy = optimism

- joy + trust = love

- trust + fear = submission

- fear + surprise = awe

- surprise + sadness = disappointment

- sadness + disgust = remorse

- disgust + anger = contempt

- anger + antecipation = aggression

This model assumes that there are eight primary emotions: Joy, Anticipation, Trust, Fear, Disgust, Anger, Surprise and Sadness. It is possible to adapt the Plutchik’s model within a structure of 4-axis of emotions [13, 1] as shown in Figure 1.

The Plutchik’s model describes a punctual emotion and it is used to represent an individual or a scene in a specific moment. In order to describe the emotions of a scene, the Plutchik’s model is converted to a time series of emotions called “dramatic curve”. The dramatic curve describes the sequence of emotions in a
<figure><img src="image_2.png" /><figcaption>**Fig. 1.** Simplified 4-axis structure - families of emotions</figcaption></figure>

scene in an interval of one second per point. It follows the structure of 4-axis based on Plutchik's wheel and maps the variation of events in a story.

## 2.2 Audience Model

In Psychology, there are many models to map and define an individual's personality traits. One of the most used is called Big Five or Five Factor Model, developed by Ernest Tupes and Raymond Christal in 1961 [15]. This model was forgotten until achieving notoriety in the early 1980s [12] and defines a personality through the five factors based on a linguistic analysis. It is also known by the acronym O.C.E.A.N. that refers to five personality traits.

The personality of an individual is analyzed and defined throughout answers to a questionnaire that must be completed and verified by factor analysis. Responses are converted to values that define one of the factors on a scale of 0 to 100. In this work only two traits are used to create the individual profile: Openness to experience $O \in [0, 1]$ and Agreeableness (Sociability) $A \in [0, 1]$. Each personality trait is described as follows:

**Openness to experience** The openness reflects how much an individual likes and seeks for new experiences. Individuals high in openness are motivated to seek new experiences and to engage in self-examination. In a different way, closed individuals are more comfortable with familiar and traditional experiences. They generally do not depart from the comfort zone.[5]

**Agreeableness (Sociability)** Agreeableness reflects how much an individual like and try to please others. Individuals high on agreeableness are perceived as kind, warm and cooperative. They tend to demonstrate higher empathy levels and believe that most people are decent, honest and reliable. On the other hand,
individuals low on agreeableness are generally less concerned with others' well-being and demonstrate less empathy. They tend to be manipulative in their social relationships and more likely to compete than to cooperate.[5]

## 2.3 Concept of Empathy

According to Davis [2], “empathy” is defined by spontaneous attempts to adopt the perspectives of other people and to see things from their point of view. Individuals who share higher empathy levels tend to have similar preferences and do things together. In this work, he proposes a scale of “empathy” to measure the tendency of an individual to identify himself with characters in movies, novels, plays and other fictional situations. Also, the emotional influence of a movie to the viewer can be considered “empathy”. It is possible to identify a personality based on the relationship between an individual and his favorite movies and books. Furthermore, it is possible to suggest new books or movies just knowing the personality of an individual [7]. Following these ideas, it is possible to relate empathy to a rating index. During an exhibition, if the viewer is enjoying what he is watching, there is an empathy between the show and the spectator. This information is used to predict what the spectator likes and dislikes.

# 3 Interactive Storytelling

In recent years, there have been some efforts to build storytelling systems in which authors and audience engage in a collaborative experience of creating the story. Furthermore, the convergence between video games and film-making can give freedom to the player's experience and generate tailored stories to a spectator. Interactive Storytelling are applications which simulates a digital storyteller. It transforms the narrative from a linear to a dialectical form, creating new stories based on audience by monitoring their reactions, interactions or suggestions for new events to the story.[8] The proposed approach of a storytelling system should be able to generate different stories adapted to each audience, based on previously computed sequence of events and knowledge of preferences of each individual on the audience.

## 3.1 Story Model

A story is a single sequence of connected events which represents a narrative. The narrative context may be organized as a decision tree to define different possibilities of endings. During the story writing, the author can define many different ends or sequences to each event (or scene). Each ending option forwards to a new scene and then to new ending options, until story ends. For example, Figure 2 demonstrates a story of three scenes modeled as a decision tree. Each scene has two ending options: A and B. If the storyteller chooses option A twice, the story ends on End1 by the sequence Scene1, Scene2 and Scene4. In this
<figure><img src="image_3.png" /><figcaption>Fig. 2. Story as a Decision Tree</figcaption></figure>

example, there are 4 different ends. This means that there are 4 different ways to tell the story.

To evaluate the proposed model and algorithm, the tests are performed using an event tree corresponding to a non-linear variation of the fairy tale Little Red Cap[1]. The event tree is described in Table 1 and presented in Figure 3. In some events, there are possibilities of branches such as the moment when the girl meets the wolf in the forest. The original story is represented by the sequence of events $\pi : \{EV1, EV2, EV3, EV4, EV5, EV7, EV8, EV9, EV10, EV17, EV11, EV13, EV15\}$.

<table><caption>Table 1. Little Red-Cap story events</caption><thead><tr><td>Event</td><td>Description</td><td>Event</td><td>Description</td></tr></thead><tbody><tr><td>EV1</td><td>Mother warns the girl</td><td>EV11</td><td>Girl escapes</td></tr><tr><td>EV2</td><td>Girl leaves her home</td><td>EV12</td><td>Wolf devours Girl</td></tr><tr><td>EV3</td><td>Girl is in the forest</td><td>EV13</td><td>Girl finds the Hunter</td></tr><tr><td>EV4</td><td>Girl finds the wolf in the forest</td><td>EV14</td><td>Wolf gets the girl</td></tr><tr><td>EV5</td><td>Wolf cheats the girl</td><td>EV15</td><td>Hunter kills the wolf and saves Grandma</td></tr><tr><td>EV6</td><td>Wolf attacks the girl</td><td>EV16</td><td>Wolf kills the Hunter</td></tr><tr><td>EV7</td><td>Wolf goes to Grandma's house</td><td>EV17</td><td>Wolf attacks the Girl at Grandma's house</td></tr><tr><td>EV8</td><td>Wolf swallows Grandma</td><td>EV18</td><td>Wolf eats the Girl after his escape</td></tr><tr><td>EV9</td><td>Girl arrives at Grandma's house</td><td>EV19</td><td>Wolf devours the Girl in Grandma's house</td></tr><tr><td>EV10</td><td>Girl speaks with Wolf</td><td>EV20</td><td>Wolf devours the Girl in the Forest</td></tr></tbody></table>

Each scene describes what occurs to the characters and the story, and also has an emotional description called “dramatic curve”. The dramatic curves are based on Plutchik’s wheel of emotions and describes how emotions should manifest during the scene. Soundtracks, screenshots and lighting can be chosen based on the dramatic curves.

The sequence of scenes tells the story, describes a complete emotional curve and “tags” the story as “genre”.
<figure><img src="image_4.png" /><figcaption>Fig. 3. Little Red-Cap story as a decision tree</figcaption></figure>

## 3.2 Modeling Emotions to Events

During the story writing, the scenes are described as a tree of events. Each event in the tree is associated to a dramatic curve and must be modeled containing the following information:

- Name: unique name for the event (each event has a unique name);

- Text: describes what happens during the event;

- Dramatic Curves: emotional time series presented on figure 1: Joy/Sadness (axis x), Fear/Anger (axis y), Surprise/Anticipation (axis w) and Trust/Disgust (axis z).

The Tree of events has different paths, connecting to different future events, until the end of the story. When the story is told, it is selected a single branch to each event. The dramatic curves representing the original story sequence of events are demonstrated in Figure 4. Table 2 illustrates the emotions involved in each of 20 events present in the story.

<figure><img src="image_5.png" /><figcaption>Fig. 4. Dramatic Curves of Little Red-Cap original sequence of Scenes</figcaption></figure>
<table><caption>**Table 2.** Dramatic Curves for Little Red-Cap events</caption><thead><tr><th>Event</th><th>Emotion</th><th>Event</th><th>Emotion</th></tr></thead><tbody><tr><td>EV1</td><td>Joy + Surprise</td><td>EV11</td><td>Joy + Anticipation</td></tr><tr><td>EV2</td><td>Joy + Anticipation</td><td>EV12</td><td>Sadness + Angry</td></tr><tr><td>EV3</td><td>Trust + Surprise</td><td>EV13</td><td>Joy + Anticipation</td></tr><tr><td>EV4</td><td>Fear + Surprise</td><td>EV14</td><td>Angry + Disgust</td></tr><tr><td>EV5</td><td>Fear + Trust</td><td>EV15</td><td>Joy + Angry</td></tr><tr><td>EV6</td><td>Angry + Anticipation</td><td>EV16</td><td>Sadness + Surprise</td></tr><tr><td>EV7</td><td>Sadness + Anticipation</td><td>EV17</td><td>Angry + Anticipation</td></tr><tr><td>EV8</td><td>Angry + Surprise</td><td>EV18</td><td>Sadness + Angry</td></tr><tr><td>EV9</td><td>Joy + Fear</td><td>EV19</td><td>Sadness + Angry</td></tr><tr><td>EV10</td><td>Trust + Surprise</td><td>EV20</td><td>Sadness + Angry</td></tr></tbody></table>

### 3.3 Uncovering audience preferences

Every time an individual likes a scene or story, he/she tells what he/she likes and what does not. This information is then used to analyze and determine which are the individual preferences. The information from the dramatic curve indicates the emotion that has been liked and is used to classify genres. The favorite scenes of an individual are used to ascertain which are the emotions that stand out. The genres of the stories are set primarily by the main emotions of the scenes. Throughout readings of emotions which stand out, it is possible to know which genres the individual prefers and which scenes of a new story are emotionally similar.

Considering the personality traits, individuals who score high in “openness” like a greater variety of genres (often opposed) in comparison to others. Individuals low in “openness” generally prefer the same things and choose the same genres. In this case, there are less options to please individuals low in “openness”.

The task of selecting a scene that pleases a person is to find which of the possible options approaches their preferences. The task selection becomes difficult when we try to find the best option that would please the most people in a group. In this case, it is necessary to consider other information about individuals as “agreeableness” and empathy between individuals.

Individuals who score high in “agreeableness” try to approach quickly the choices of others and have more patience than others. They sometimes prefer to accept other preferences and decisions just to please them all.

The empathy indicates the level in a relationship that individuals have. For example, when two people like each other, they may want to do things together, thus it indicates a higher level of empathy. In the other hand, people who want avoid each other have a low level of empathy in this relationship. Generally, individuals in a relationship with high empathy choose the same options or a middle ground.

## 4 Maximizing the Audience

Given a tree of events, each ending (a leaf of the tree) uniquely determines a sequence of scenes or the story to tell. This corresponds to the path from
the root of the tree to ending leaf. Finding the most rewardable path for a given audience amounts to evaluate an utility function that captures how the audience feels rewarded by the scenes and also the choices the audience makes at each branch. The tree of event can be represented as follows:

Let $S$ be the finite set of events (scenes) of a story. Let also $\Gamma^+(s)$ be a subset of $S$ containing the child nodes of node $s$. The utility function is given by $E(s, i)$ which determines the expected value of state $s$ for individual $i$ and represents a measure of similarity between 0 and 1. Finally, let $Prob(s_{l-1}, s_l, i)$ be the probability with which individual $i$ chooses state $s_l$ to follow state $s_{l-1}$. Remark that the probabilities $Prob(s_{l-1}, s_l, i))$ must add one for each branch and for each individual, since one branch must be selected on each state.

Consider now a sequence of states $\pi = \{s_0, \dots, s_k\}$ that represents a path from the root to a leaf. The proposed model evaluates path by computing its expected utility which is given by the expression:

$$f(\pi) = \sum_{l=1}^{k} \sum_{i \in I} (E(s_l, i) \cdot Prob(s_{l-1}, s_l, i)) \quad (1)$$

Let $R(s)$ be the maximum expected utility that can be obtained starting from state $s$. The following recursion determines $R(s)$.

$$R(s) = \begin{cases} \sum_{i \in I} (E(s, i) \cdot Prob(p(s), s, i)) + \max_{s' \in \Gamma^+(s)} R(s') & \text{for } s \text{ a leaf} \\ \sum_{i \in I} (E(s, i) \cdot Prob(p(s), s, i)), & \text{for } s \text{ a leaf} \\ \sum_{i \in I} E(s, i) + \max_{s' \in \Gamma^+(s)} R(s'), & \text{for } s \text{ the root} \end{cases} \quad (2)$$

where $p(s)$ is the predecessor of $s$. By computing $R(s_0)$, the root's reward, an optimal sequence $\pi^*$, with maximum expected reward, can be retrieved in a straightforward way.

We conclude the model by proposing an evaluation for the individual probabilities of choice on each story branch. This is done by assuming this probability is proportional to the expected individual reward of the branches. This leads to the expression:

$$Prob(s, s', i) = \frac{IR(s', i)}{\sum_{s'' \in \Gamma^+(s)} IR(s'', i)} \quad (3)$$

where $IR(s, i)$ is the expected reward at state $s$ for individual $i$, which is given by:

$$IR(s, i) = E(s, i) + \max_{s' \in \Gamma^+(s)} IR(s', i) \cdot Prob(s, s', i) \quad (4)$$

This model allows determining the best sequence of scenes for and audience provided there is no interaction within the audience. We address this case in the following section.
# 5 Audience Interaction

To create tailored stories for an individual it is just necessary to check what he/she likes most, based on its own probabilities but when an individual participates of a group he/she needs to deal a middle ground. The dynamic of choosing the best story to an audience is based on the fact that the individuals will watch the same story, share a minimal intimacy and want spend sometime together. In a similar way, it is possible to say that they are trying to watch television and need to choose a television program that please the entire group. During this interaction, each individual tries to convince others about his preferences. Some individuals may agree with these suggestions based on the relationship they share, but others may introduce some limits. After some rounds, some individuals give in and accept to approach other preferences [14]. The decision of accepting others' do not eliminate personal preferences but introduce a new aspect to the options. According to the proposed model some options that originally are not attractive will be chosen because of the induced social reward imposed by the probability function of choosing it. This means that for some individuals, it is better to keep the group together than take advantage of their preference. Furthermore, as explained in section 2.2, individuals high in “openness” do not care so much about their own preferences because they like to experiment new possibilities. They may be convinced by friends or relatives and will tend to support their preferences.

In order to model the audience behavior, we propose an algorithm based on a spring-mass system. Consider that all preferences are modeled by the real coordinate space $(\mathbb{R}^2)$ and each individual of the audience is represented by a point positioned on his preferences. Each point (individual) is connected to $n$ springs (where $n$ is the number of individuals). A spring is connected to its original position and other $n-1$ springs are connected to the other points. Then, we have a total of $\frac{n \times (n+1)}{2}$ springs. The objective function aims to approach each point, considering the constraints of the springs. Each spring is modeled based on the individual personality traits and relationship levels between them.

Let $K_{ii} = (1 - O_i)$, be the openness level of each individual $i$ and $K_{ij} = A_{ij}$ be the agreeableness level for each pair of individuals $i$ and $j$. In this model, we are assuming that “agreeableness” may also be influenced by the relationship between $i$ and $j$ and it is possible to describe an individual resistance by others' preferences. After some experiments, we realize that it is possible to start an audience from $A_{ij} = A_i$ and fine tuning $A_{ij}$ after some rounds.

Given $e_{ij} \in [-1, 1]$, the empathy level between each pair of individuals, and $x_i^0$, the original position in space for each individual $i$, let $d_{ij}^0 = \|x_i^0 - x_j^0\|$ be the original distance between individuals and let $L_{ij} = (1 - e_{ij}) \cdot d_{ij}^0$ be a weighted empathy level. The objective of the following model is to find the final positions $x_i$ minimizing the distances between the individuals $d_{ij}$, weighted by their agreeableness level $K_{ij}$ and considering $L_{ij}$.

$$ \min \sum_{i \in A} \sum_{j \in J: i \neq j} K_{ij} \cdot (d_{ij} - L_{ij})^2 + \sum_{i \in I} K_{ii} \cdot d_{ii}^2 \quad (5) $$
subject to

$$d_{ij} = \|x_i - x_j\| \quad \forall i, j \in A, i \neq j \qquad (6)$$

$$d_{ii} = \|x_i - x_i^0\| \quad \forall i \in A \qquad (7)$$

The constraints (6) link the distance variables $d_{ij}$ with the coordinate variables $x_i$ and $x_j$ when individuals $i$ and $j$ are different. Constraints (7) are used to obtain the distance $d_{ii}$ which each individual has moved from its original position. Figure 5 describes the operation of the Spring-mass system with 2 individuals.

Since this model is not linear, it is not possible to use a linear solver to obtain the optimal solution. Therefore, we use a meta-heuristic approach based on simulated annealing to obtain a good approximate solution. The simulated annealing algorithm is presented in Section 6.

<figure><img src="image_6.png" /><figcaption>Fig. 5. Spring-mass example with 2 individuals</figcaption></figure>

# 6 Solving the audience interaction model

Simulated annealing is a meta-heuristic for optimization problems based on thermodynamics. Given a large solution space, it solves the optimization problem by finding a good solution near the global optimum[3]. At each iteration of the algorithm, it changes the current solution within a neighborhood and considers the new solution as the current one if there is any improvement on the objective function or, if there is no improvement, it may consider it based on a randomized criteria.

The neighborhood used for the audience problem is defined by all possible movements of each individual in other to minimize the distances between all individuals according to spring constraints. Let $\vec{a}$ be the current position of individual $a$, $\vec{b}$ be the referential position based on all relationships between the individuals and $s_a$ be the “agreeableness” level of the personality of individual $a$. It is possible to calculate the step of a movement $\delta_x$ for individual $a$ using equations (8)–(10).
$$ \vec{b} = \left( \sum_{j=1}^{n} \frac{a_y^j \cdot e_{ij}}{e_{ij}}, \sum_{j=1}^{n} \frac{a_x^j \cdot e_{ij}}{e_{ij}} \right) \qquad (8) $$

$$ \alpha = (b_y - a_y)/(b_x - a_x) \qquad (9) $$

$$ \delta_x = \begin{cases} -\sqrt{s_a^2/\alpha^2 + 1} & a_x > b_x, \\ \sqrt{s_a^2/\alpha^2 + 1} & \text{otherwise} \end{cases} \qquad (10) $$

The final position after moving the individual a is given by $\vec{a}_{final}$ as follows:

$$ \vec{a}_{final} = (\delta_x + a_x, \delta_x \cdot \alpha + a_y) \qquad (11) $$

The simulated annealing method is shown in Algorithm 1. The algorithm receives as input an initial solution $S_0$, limits on the number of iterations $M$, on the number of solution movements per iteration $P$ and on the number of solution improvements per iteration $L$. During its initialization, the iteration counter starts with 1, the best solution $S$ starts equal to $S_0$ and the current temperature $T$ is obtained from the function `InitialTemp()`, which returns a value based on the instance being solved. On each iteration, the best solution is changed within the neighborhood by function `Change(S)` and the improvement is calculated on $\Delta F_i$. This solution is then accepted or not as the new best solution and, at the end of the iteration, the temperature is updated given the factor $\alpha$.

<caption>**Algorithm 1** Simulated Annealing</caption>

procedure SA(S₀, M, P, L)
    j ← 1
    S ← S₀
    T ← InitialTemp()
    repeat
        i ← 1
        nSuccess ← 0
        repeat
            Sᵢ = Change(S)
            ΔFᵢ = f(Sᵢ) - f(S)
            if (ΔFᵢ = 0) || (exp(-ΔFᵢ/T) > Rand()) then
                S ← Sᵢ
                nSuccess ← nSuccess + 1
            end if
            i ← i + 1
        until (nSuccess = L) || (i > P)
        T ← α·T
        j ← j + 1
        until (nSuccess = 0) || (j > M)
        Print(S)
    end procedure
# 7 Analysis and Conclusions

The proposed methodology was initially applied on students of our graduate program in order to evaluate the emotional characteristics of the individuals. This allowed a positive view of techniques and validated the initial hypothesis. Then, the final experiments were conducted using 20 generated audience<fnref n="1" /> instances with 20 individuals each on instances divided in three groups: 8 entirely mixed audiences with 60% of individuals supporting an emotion, 8 audiences with similar individuals and 4 mixed audiences with one opinion leader. The opinion leader instances were generated by describing an influential individual to others<fnref n="2" />. This starting point permitted a qualitative evaluation of the application of the whole methodology based on discussion among the ones involved in the experience.

The resulting story endings for each audience are presented on Table 3. Stories generated to mixed audiences before interaction considered average preferences while stories generated after interaction (SA) tend to select the majority preference. The proposed Red Cap story has a natural tendency for a Sadness + Angry endings (EV12, EV18, EV19, EV20) since there are more final events of these emotional features than Joy + Angry endings (EV15 only). However, the proposed method was able to select expected story endings according to the audience preferences. Also, the preliminary evaluation of an opinion leader suggested there is a sound basis for results that may effectively converge to the choice of audience rewarding paths.

<table><caption>**Table 3.** Selected Story Endings for Audiences</caption><thead><tr><th>Emotion</th><th>Mixed</th><th>SA</th><th>Similar</th><th>Opinion Leader</th></tr></thead><tbody><tr><td>Trust</td><td>EV 12</td><td>EV 15</td><td>EV 15 short</td><td>-</td></tr><tr><td>Surprise</td><td>EV 12</td><td>EV 12</td><td>EV 20 short</td><td>-</td></tr><tr><td>Joy</td><td>EV 12</td><td>EV 15</td><td>EV 15</td><td>EV 15</td></tr><tr><td>Sadness</td><td>EV 12</td><td>EV 12</td><td>EV 12 short</td><td>EV 12</td></tr><tr><td>Disgust</td><td>EV 12</td><td>EV 12</td><td>EV 20 short</td><td>-</td></tr><tr><td>Anger</td><td>EV 12</td><td>EV 18</td><td>EV 18</td><td>EV 18</td></tr><tr><td>Fear</td><td>EV 12</td><td>EV 12</td><td>EV 12</td><td>EV 12</td></tr><tr><td>Anticipation</td><td>EV 12</td><td>EV 15</td><td>EV 15 short</td><td>-</td></tr></tbody></table>

Next step amounts to carrying out more thorough and relevant experiments which requires not only larger groups but also stories that truly draws the audience. In this preliminary analysis, an evaluation of the model parameters also allowed to conclude that their determination may lead to conditions which can represent a wide range of groups, thus leading to a representative model.

<footnote n="1">¹ An audience is a set of individuals</footnote>

<footnote n="2">² We considered that the empathy from others to an opinion leader is near to 1 but his/her empathy to others is low</footnote>
Our evaluation is that the proposed methodology can still incorporate more factors of emotional behavior, group interaction and storytelling aspects. The goal is to experiment thoroughly on a wide spectrum of stories and audiences.

## Acknowledgements

This work was partially supported by CNPq (National Council for Scientific and Technological Development, linked to the Ministry of Science, Technology, and Innovation), CAPES (Coordination for the Improvement of Higher Education Personnel, linked to the Ministry of Education), FINEP (Brazilian Innovation Agency), and ICAD/VisionLab (PUC-Rio).

## References

1. E. T. Araujo and A. E. M. Ciarlini. Verification of temporal constraints in continuous time on nondeterministic stories. In *Proceedings of the 10th International Conference on Entertainment Computing*, 2011.

2. M. Davis. A multidimensional approach to individual differences in empathy. *JSAS Catalog of Selected Documents in Psychology*, 10, 1980.

3. J. Dréo. *Metaheuristics for Hard Optimization: Methods and Case Studies*. Springer, 2006.

4. P. Ellsworth and K. Scherer. Appraisal processes in emotion. In R. J. Davidson, K. R. Scherer, & H. H. Goldsmith (Eds.), *Handbook of affective sciences*, pages 572–595, 2003.

5. P. John and S. Srivastava. The big-five trait taxonomy: History, measurement, and theoretical perspectives. In L. A. Pervin & O. P. John (Eds.), *Handbook of personality: Theory and research*, 2:102–138, 1999.

6. E. Jones and R. Nisbett. The actor and the observer: Divergent perceptions of the causes of behavior, 1971.

7. A. Kallias. *Individual Differences and the Psychology of Film Preferences*. PhD thesis, University of London, 2012.

8. B. Karlsson, A. E. M. Ciarlini, B. Feijó, and A. L. Furtado. Applying a plan-recognition/plan-generation paradigm to interactive storytelling. In *In Workshop on AI Planning for Computer Games and Synthetic Characters*, 2006.

9. R. Plutchik. The emotions: Facts, theories, and a new model. New York, Random House, 1962.

10. R. Plutchik. A general psychoevolutionary theory of emotions. In: R. Plutchik & H. Kellerman (Eds.), *Emotion: Theory, research, and experience*, Theories of emotion, 1980.

11. R. Plutchik. The nature of emotions. *American Scientist*, 2001.

12. E. Rich. User modeling via stereotypes. *Cognitive Science* 3, pages 329–354, 1979.

13. P. Rodrigues. *Um Sistema de Geração de Expressões Faciais Dinâmicas em Aimações Faciais 3D com Processamento de Fala*. PhD thesis, Pontifícia Universidade Católica do Rio de Janeiro, 2007.

14. M. Tortosa, T. Strizhko, M. Capizzi, and M. Ruz. Interpersonal effects of emotion in a multi-round trust game. *Psicológica*, 39:179–198, 2013.

15. C. Tuples and R. Christal. Recurrent personality factors based on trait ratings. Technical report, Air Force Systems Command, 1961.