• No results found

Investigating and Modeling the Emergent Flocking Behaviour of Sheep Under Threat with Fear Contagion

N/A
N/A
Protected

Academic year: 2022

Share "Investigating and Modeling the Emergent Flocking Behaviour of Sheep Under Threat with Fear Contagion"

Copied!
50
0
0

Loading.... (view fulltext now)

Full text

(1)

Investigating and Modeling the Emergent Flocking Behaviour of Sheep Under Threat with Fear Contagion

GABRIEL CHANG

MICHAELA STJERNDAL

KTH ROYAL INSTITUTE OF TECHNOLOGY

SCHOOL OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE

(2)

Investigating and Modeling the Emergent Flocking

Behaviour of Sheep Under Threat with Fear Contagion

GABRIEL CHANG

MICHAELA STJERNDAL

Bachelor in Computer Science Date: June 7, 2019

Supervisor: Christopher Peters Examiner: Örjan Ekeberg

School of Electrical Engineering and Computer Science

Swedish title: Undersökning och modellering av fårs emergenta

flockbeteende under hot med rädslespridning

(3)

Abstract

Virtual environments can feel lifeless or robotic, and a way to combat this

is the inclusion of living creatures with life-like behaviour. Wanting to

bring this into computer animation, Craig W. Reynolds formulated a model

to simulate the flocking behaviour of birds. Delgado-Mata made exten-

sions upon Reynolds’ flocking model, and his model has in turn been used

to simulate a sheep herding scenario. The herding scenario can extend

into many peripheral fields, where an effective strategy for a single agent

to maneuver a large group of unwilling agents can have many applica-

tions.This study investigates whether Delgado-Mata’s model is able to sim-

ulate the emergent behaviour of a herd of sheep under threat more re-

alistically with or without fear contagion. This was done by comparing

the results from the simulations, made with and without contagion, with

the empirical data of another experiment. A modified version of Delgado-

Mata’s model was implemented in Unity 3D. A simple fear contagion model

was used. The parameters used in the flocking model were chosen through

manual trial and error. Analysis of the positional data of the virtual sheep

and dog showed that including fear contagion increased the realism of the

simulation. A higher resemblance between the simulation with the fear

contagion model and the empirical experiment was found. The difference

between the two model simulations was however not large, and the sub-

ject can be further investigated.

(4)

iv

Sammanfattning

Virtuella miljöer kan kännas livlösa eller robotiska, och ett sätt att motar-

beta detta är att inkludera levande varelser med verklighetstrogna beteen-

den. Med mål att införa detta i datoranimation skapade Craig W. Reynolds

en modell som simulerar fåglars svärmande flockbeteende. Delgado-Mata

har byggt vidare på Reynolds modell och hans utökade modell har i sin tur

använts för att simulera fårvallnings-scenariot. Vallnings-scenariot kan an-

vändas i många relaterade användningsområden, där en effektiv strategi

för en individ att manövrera en stor grupp ovilliga individer kan ha många

tillämpningar. I denna studie undersöks huruvida Delgado-Matas modell

kan simulera fårs emergenta flockbeteende under hot mer realistiskt med

eller utan rädslespridning inkluderat. Undersökningen gjordes genom jäm-

förelse av resultaten från simuleringarna med och utan rädslespridning

med data från en empirisk undersökning. En modifierad version av Delgado-

Matas modell implementerades i Unity 3D. En simpel rädslespridnings-

modell användes. Parametrarna som användes i den modifierade model-

len valdes via manuell trial and error. Analys av positionsdata från de vir-

tuella fåren och den virtuella hunden visade att inkluderandet av rädsle-

spridning ökade realismen av simuleringen. En större likhet hittades mel-

lan simuleringen med rädslespridningsmodellen och den empiriska un-

dersökningen. Skillnaden mellan modellernas prestation var dock inte stor,

och ämnet kan undersökas vidare.

(5)

1 Introduction 1

1.1 Purpose . . . . 2

1.2 Research Question . . . . 3

1.3 Scope . . . . 4

2 Background 6 2.1 Three Approaches to Crowd Simulation . . . . 6

2.2 Flocking Models . . . . 7

2.2.1 Reynolds’ Flocking Model . . . . 7

2.2.2 Delgado-Mata’s Extended Model . . . . 9

2.3 Animal Behaviour and Emotion Contagion . . . . 9

2.4 An Empirical Study on Sheep Cohesion . . . . 10

2.5 Similar Projects . . . . 11

3 Method 12 3.1 Model . . . . 12

3.1.1 Steering Rule Vector Components . . . . 12

3.1.2 Emotional State Multiplier . . . . 14

3.1.3 Calculation of the Resultant Vector . . . . 14

3.1.4 Fear Contagion Model . . . . 15

3.2 Implementation . . . . 15

3.2.1 Unity 3D and Simulation Architecture . . . . 16

3.2.2 Scenario . . . . 17

3.3 Method of Evaluation . . . . 18

3.3.1 Obtaining Empirical Data . . . . 18

3.3.2 Scenario Simulation . . . . 19

3.3.3 Evaluating the Realism of the Models . . . . 20

v

(6)

vi CONTENTS

4 Evaluation 22

4.1 Results . . . . 22 4.1.1 Parameters . . . . 22 4.1.2 Scenario Simulation . . . . 30 4.1.3 Analysing the Relative Realism of the Models . . . . 34 4.2 Discussion . . . . 37 4.2.1 Limitations and Reflections . . . . 39 4.2.2 Future Work . . . . 40

5 Conclusions 41

Bibliography 42

(7)

Introduction

Computer simulations can play a big role in understanding complicated systems, making virtual experiments and predictions [1]. There are soft- wares that can be used to make such simulations, Unity being one that is easily accessible [2]. Virtual environments can feel lifeless or robotic, and a way to combat this is the inclusion of living creatures with life-like behaviour [3]. Animals who live in groups have a tendency to move in complex flocking motions that can be beautiful to watch, starlings being a famous example. Wanting to bring this into computer animation, Craig W. Reynolds formulated a model, Reynolds’ flocking model, to simulate the flocking behaviour of birds [4]. It consists of a set of three rules which together steer the movement of each bird in a flock.

Figure 1.1. Example of a flocking model in action. [5]

1

(8)

2 CHAPTER 1. INTRODUCTION

Extending the model to include reactive emotions, such as fear, further enhances a virtual environment. Animals typically experience fear when they are under threat of a predator, but are also able to communicate fear amongst each other [3]. The phenomena of fear spreading in a group of individuals is called fear contagion. It is an area largely discussed in the field of crowd simulation and evacuation. Delgado-Mata has made exten- sions upon Reynolds’ model to include fear and fear contagion in order to enhance the experience of a virtual environment by increasing its degree of realism. Simulated environments with a high degree of realism can be used with advantage in, among others, the entertainment industry, psy- chological therapy in health care [6], and city and architectural planning.

One interesting scenario with a flock of animals and a predator is the herd- ing scenario, where a dog maneuvers a herd of sheep towards various spe- cific destinations. The interaction between the dog and herd results in an observable emergent flocking system. This study will aim to investigate whether including fear contagion in Delgado-Mata’s flocking model im- proves the realism when used to simulate a herd of sheep under threat.

Figure 1.2. Sheep being herded through a gate. [7]

1.1 Purpose

The purpose of this project is to provide a basis for a simulation of the

emergent behaviour of a herd of sheep with life-like movement when un-

(9)

der threat. This simulation can be built on to include a full herding sys- tem with a herding dog acting as the "threat" to drive the sheep towards specific locations. The herding scenario can extend into many peripheral fields, where an effective strategy for a single agent to maneuver a large group of unwilling agents can have application in “crowd control, clean- ing up the environment, herding of livestock, keeping animals away from sensitive areas and collecting/guiding groups of exploring robots”[8].

Emergent systems are systems of many small entities which together form one big entity. Following this, emergent behaviour is when the behaviour of these individual entities generate an observable behaviour of the one big entity. For example, the movement of individual sheep generate the movement of a sheep herd. The behaviour of emergent systems can be very difficult to predict, even with knowledge of the individual entities.

Simulations is considered one of the best ways to predict emergent be- haviour [9].

Emotion contagion is prevalent in flocking animals such as sheep, and it should therefore be useful to include in a flocking model. Furthermore, emotion contagion is prevalent in many other areas, such as evacuation scenarios where the spread of panic affects the behaviour of an evacuat- ing crowd [10]. The findings of this study may be of use in future research pertaining to evacuation scenarios and other crowd simulations.

Any extension of the flocking model will have an effect on its performance.

Including fear contagion introduces new calculations that must be made in real-time each timestep. Under different circumstances, the perfor- mance may matter more or less. In other words, it can become a balancing act between performance and degree of realism. In order to make this bal- ancing easier, it is valuable to investigate if the addition of fear contagion increases the realism of the simulation and if so, by how much.

1.2 Research Question

Delgado-Mata has made extensions upon Reynold’s model to simulate a

flock of deer in the presence of a predator. His contribution consisted of

three main additions: a fourth steering rule (escape), an emotional state

and fear contagion. The escape steering rule drives deer away from a preda-

(10)

4 CHAPTER 1. INTRODUCTION

tor. Each deer has an emotional state which affects their behaviour. The emotional state of one deer can affect the emotional state of another; if one is panicked, the other gets worried. This is an example of fear conta- gion.

Delgado-Mata’s model has previously been adapted to simulate a flock of sheep in the presence of a herding dog, however it occludes fear conta- gion entirely. They nonetheless concluded that their model had similari- ties with the behaviour of real sheep [11]. The herding scenario is particu- larly interesting as it may have many applications in peripheral fields, but the role fear contagion plays in this scenario requires further investigation.

This paper aims to investigate:

Is the emergent behaviour of a sheep herd under threat simulated with Delgado-Mata’s flocking model more realistic with or without fear contagion?

To answer this question, it is important to clarify how the realism of the sheep herd’s behaviour will be assessed. The realism is assessed by com- paring positional data from the simulated sheep herd and herding dog with data from an empirical experiment of King et. al. [12, 8]. In other words, higher similarity with the experiment of King et. al. will be inter- preted as a higher degree of realism. The empirical experiment is used as a basis for the simulated scenario and the evaluation of the results.

The hypothesis for the research question is that the behaviour of the sheep herd simulated with Delagado’s flocking model including fear contagion will be more realistic than without fear contagion. The hypothesis is based on the fact that fear contagion has been observed in sheep previously [12].

1.3 Scope

The field of crowd simulation and flocking models is vast, and some limi- tations of this study should be noted. This study only investigates the re- alism of the models relative to each other to see which is more realistic.

Only one software, Unity, is used to implement the chosen flocking mod-

els. To judge the degree of realism of both models only the movement tra-

(11)

jectories of the sheep are considered, while things like body movement and language are disregarded. Furthermore, the realism is evaluated by comparison with data from only one empirical experiment with a similar scenario. Perceived realism, i.e. whether or not it looks real, is not given much focus.

Due to time constraints, the fear contagion model made by Delgado-Mata

is not used in this study. Instead, a simpler model of fear contagion is

constructed and implemented. The study is focused on the emergent be-

haviour of the sheep herd and its reaction to a threat. The threat in this

case is a herding dog, which is not implemented as an autonomous agent

but is instead human-steered.

(12)

Chapter 2 Background

This chapter describes the underlying theory and models that are used as basis for the study’s implementation and evaluation.

2.1 Three Approaches to Crowd Simulation

Various techniques used in crowd simulation and group animation can be divided into three more general classes. These may be referred to as:

particle-based system, flocking system and autonomous behaviour sys- tem.[3]

A particle-based system focuses on a crowd as a collection of a large num- ber of unintelligent objects moving as a whole. Due to the lack of individ- uality and intelligence, these systems require relatively few calculations.

This is desirable to maintain stable performance when dealing with enor- mous crowds. It does, however, make for rather unrealistic behaviour if used to simulate living objects, which do have intelligence.[3]

Flocking systems are a step up from particle-based systems in terms of in- telligence. Each flocking object is controlled by a set of simple predefined rules that are applied locally in each object and typically generate an ef- fect on a global scale. This is called emergent behaviour. Flocking systems typically require more calculations than particle-based systems and thus fit better when simulating crowds of more moderate sizes. In return, the rules allow for enough intelligence to simulate living objects with simple behaviour.[3]

6

(13)

Autonomous behaviour systems deal with more sophisticated individuals, also called agents. These agents are typically few, due to the large amount of calculations required to simulate intelligence for each one. They are generally controlled by rules, similar to those in flocking systems, but as the behaviour meant to be simulated is more complicated, so are the gov- erning rules.[3]

2.2 Flocking Models

Flocking models are commonly used to simulate groups of animals that tend to move together as flocks. Fish move in schools in the water, starling birds fly in murmurations in the sky. The movement of each individual contributes to an emergent behaviour that can be observed. This kind of behaviour is what flocking models aim to simulate.

Figure 2.1. Starling murmation in action. Picture taken from KOMO News [13].

2.2.1 Reynolds’ Flocking Model

One famous such model is Reynolds’ flocking model, often referred to as BOIDS. In order to simulate the flocking behaviour of starlings, Reynolds formulated three steering rules: cohesion, alignment and separation [4].

These are all weighted against each other in each individual, also called

boid, and applied as a force acting upon them. Reynolds’ flocking model

has since been used as a basis for simulating many different kinds of ani-

(14)

8 CHAPTER 2. BACKGROUND

mal flocks.

Cohesion handles flock centering, steering the boid towards the average position of its neighbours.

Figure 2.2. The cohesion steering rule. The gray area is the neighbour radius. [14]

Alignment aligns the boid’s velocity with the average direction of its neigh- bours, causing it to head in the same direction.

Figure 2.3. The alignment steering rule. The gray area is the neighbour radius. [14]

Separation steers the boid away from neighbours that are too close in or- der to avoid crowding or collision.

Figure 2.4. The separation steering rule. The gray area is the neighbour radius. [14]

(15)

2.2.2 Delgado-Mata’s Extended Model

Delgado-Mata extended upon Reynolds’ flocking model to fit a different scenario: a deer herd under threat. He introduces a fourth steering rule:

escape. This rule comes into action when the boids are in the presence of a predator, and steer each boid away from the threat. [3]

Furthermore, Delgado-Mata took a step towards autonomous behaviour systems in his model by including an emotional factor [3]. Each boid has an emotional state which affects its behaviour by affecting the relative im- portance of the four steering rules as well as the boids’ maximum velocity.

This emotional state is mainly a measure of its stress or fear level. It de- pends on the distance from the boid to the threat, i.e. predator.

The last major addition made by Delgado-Mata was the inclusion of emo- tion contagion, or more specifically fear contagion. Emotion contagion is the phenomenon of emotions spreading from one individual to others.

He used particle clouds and virtual “noses” to simulate transmission of emotion via airborne hormones [3].

2.3 Animal Behaviour and Emotion Contagion

Many species of animals tend to live in large groups. Examples include starlings, caribou, sheep and some species of fish. These animals not only live in groups, but commonly move together in groups as a defense mech- anism; they flock. King et. al. write:

A major factor in the evolution of flocking behaviour is thought to be predation, whereby larger and/or more cohesive groups are better at detecting predators (as, for example, in the ’many eyes theory’), and diluting the effects of predators (as in the

’selfish-herd theory’) than are individuals in smaller and/or dispersed groups.[12]

The theory that larger groups would be better than small ones at detect-

ing predators rests on the assumption that the animals have some way to

communicate danger. Many animals means many eyes, ears and noses

that can be used for detection of predators. Unless the detection is com-

municated from the individual to the rest of the group, however, large

(16)

10 CHAPTER 2. BACKGROUND

groups will have no advantage in predator detection compared to smaller groups. The second theory, that flocking dilutes the effect of predators is based on the fact that a predator can only reach the animals on the outer edge of a tightly packed group. In other words, the center of a flock is a safe space that would not exist without flocking. This can be used with advantage to e.g. protect weaker individuals, such as the youngest, of the group.[12]

Different species of animals behave and flock differently. They commu- nicate danger in various ways, for instance through visual cue, airborne hormones and sound. The main idea remains the same. If one animal feels threatened, the others can take notice and become worried them- selves despite not necessarily being able to distinguish any threat. As the center of a flock is usually the safest place when under threat of a predator, stressed or worried animals tend to flock together. The communication of stress in this scenario may be seen as a type of emotion contagion.

It should be noted that emotion contagion also exists among humans and is tightly tied to human empathy. Hatifeld et. al. state that “emotional con- tagion is a basic building block of human interaction—assisting in “mind- reading” and allowing people to understand and to share the feelings of others”[15].

2.4 An Empirical Study on Sheep Cohesion

A study on sheep cohesion was conducted by King et. al. [12]. Three exper- iments were made, where a single herding dog was instructed to “herd a flock of initially resting sheep (n = 46 individuals) to a target zone (an open gate) with minimal guidance (given the command “bring them home”)”

[12]. The positions of the dog and the sheep was tracked and logged each

second with a GPS tracker. The findings from the three herding experi-

ments showed that sheep move toward the center of the flock when un-

der threat. The mean sheep distance to the flock centroid was found to

stabilise at about 4 meters in all three experiments, once the dog comes

close enough. King et. al. concluded the sheep have a strong flock cohe-

sion when facing potential danger.

(17)

2.5 Similar Projects

Two previous projects related to simulating the herding scenario should be mentioned. The extended flocking model made by Delgado-Mata et.

al. has been used to make a simulation of the herding scenario in Java [11]. Fear contagion was occluded in this project. A herd of virtual sheep was simulated and their emergent behavior in the presence of a human- steered herding dog was observed. The project concludes that Reynolds’

flocking model can be used as a basis for simulating the herding scenario.

In another project, which worked in close collaboration with King et. al.

[12], created an automatised herding system with autonomous sheep and

herding dog. The herding dog shifts between two phases: a collecting

phase and a driving phase. In the collecting phase, the dog collects sheep

drifting off to keep the herd collected in a tight group. In the driving phase,

the sheep are collected and the dog drives them straight towards the end

destination. They concluded that their simulation reproduced key fea-

tures of the empirical data from the study conducted together with King

et. al. [8]

(18)

Chapter 3 Method

Chapter 3 describes the implementation of the modified Delgado-Mata model. This includes the details of the implementation of the steering rules, the emotional state and the fear contagion. The software and sce- nario used are described as well as the method of evaluation.

3.1 Model

The model used is a modified version of Delgado-Mata’s extension on Reynold’s flocking model. It has four steering rules which are weighted against each other before being applied to the sheep. These formulas are based on the concepts laid out by Delgado-Mata. Each sheep has an emotional state which affects the balance between the steering rules. This is based on a previous similar project which implemented Delgado-Mata’s model [11].

Finally, the modified flocking model is extended with the addition of a simplified emotion contagion model created in this project and is inspired by a panic contagion model formulated for evacuation scenarios [10].

3.1.1 Steering Rule Vector Components

Each sheep has a position vector ~p , a velocity vector ~v and a set of neigh- bours N of size n . Sheep A is sheep B ’s neighbour if and only if |~ p A −~ p B | < r where r is a certain radius. The positions and velocities of each neighbour- ing sheep in N are referred to as ~p i and ~v i respectively. ~p and ~v are used to denote the vectors of the “pivot” sheep, i.e. the sheep whose velocity is currently being calculated.

12

(19)

Cohesion

The cohesion component vector is calculated, with r cohesi on as the neigh- bour radius, using the following formula:

C = ~ ~ p aver ag e − ~ p (3.1) where ~p aver ag e is the average position of all neighbours and calculated as:

~p aver ag e = 1 n

X

~p

i

∈N

~p i (3.2)

Alignment

The alignment component vector is calculated, with r al i g nment as the neigh- bour radius, using the following formula:

~A = ~v aver ag e − ~ p (3.3) where ~v aver ag e is the average velocity of all neighbours and calculated as:

~v aver ag e = 1 n

X

~v

i

∈N

~v i (3.4)

Separation

The separation component vector is calculated, with r sep ar at i on as the neigh- bour radius, using the following formula:

~S = X

~p

i

∈N

r separ at i on − d

d ( ~p i − ~ p) (3.5)

where d is the distance between ~p and ~p i and calculated as d = |~ p i − ~ p| . Escape

The escape component vector is calculated using the position of a threat, e.g. dog, which is denoted ~p d og :

~E = ~p − ~p d og

||~ p − ~ p d og || (3.6)

~E is a normalized vector which points the sheep away from the dog. The escape component vector is only calculated if:

|~ p − ~ p d og | ≤ r f ear (3.7)

i.e. if the dog is within the fear radius r f ear . If the dog is outside of the

radius, ~E is the zero vector.

(20)

14 CHAPTER 3. METHOD

3.1.2 Emotional State Multiplier

Each sheep has an emotional state E S which represents its stress level. The range of E S is [0, 1] and it is calculated using a formula based on a sigmoid function:

E S = 1

π arctan ( r f ear − x

m ) + 0.5 (3.8)

where x = |~ p − ~ p d og | , i.e. the distance between the sheep and the dog, and m is a multiplier which changes the steepness of the sigmoid curve. This formula is used to make a smooth transition between a fully relaxed state ( E S = 0 ) to a panicked state ( E S = 1 ).

3.1.3 Calculation of the Resultant Vector

The resultant vector V ~ is a weighted sum of all component vectors, where multipliers are used to represent the importance of each. It is calculated with:

V ~ = C f × (1 + ES ×C e f ) × ~ C

| {z }

Cohesion

+ A f × (1 + ES × A e f ) × ~ A

| {z }

Alignment

+ S f × (1 + ES × S e f ) × ~ S

| {z }

Seperation

+ (ES × E e f ) × ~ E

| {z }

Escape

(3.9)

where C f , A f and S f are the multipliers representing the importance of C ~ ,

~A and ~S respectively. When the sheep is under stress and E S > 0 , the multi- pliers C e f , A e f , S e f and E e f begin to affect the resultant vector. They rep- resent the importance of each component vector respectively when the sheep is in a panicked state.

The final vector V ~ f i nal has a maximum magnitude, M axSpeed , which it is not allowed to surpass. As sheep tend to move faster (run) when panicked as compared to when they are relaxed, the maximum velocity is depen- dent on the emotional state, E S . Thus the maximum velocity is calculated with:

V ~ max = ES × M axSpeed × V ~

||~ V || (3.10)

Using V ~ max , we can determine the final velocity, V ~ f i nal :

(21)

V ~ f i nal =

( V , ~ if V ≤ ~ ~ V max .

V ~ max , otherwise . (3.11)

3.1.4 Fear Contagion Model

The flocking model is finally extended to include a simple emotion conta- gion model which focuses on fear. Each sheep has a set of neighbours N , of size n , containing all other sheep within the contagion radius r cont ag i on . The emotional state of each sheep in N are referred to as E S i . E S cont ag i on

is the average emotional state of all neighbouring sheep in N : E S cont ag i on = 1

n X

E S

i

∈N

E S i (3.12)

The final emotional state of the sheep, E S f i nal , is a weighted sum of:

1. the emotional state dependent on the sheep’s distance to the dog as calculated in equation 3.8, E S d og , and

2. the average emotional state of the neighbours, E S cont ag i on .

In the contagion model, E S f i nal replaces E S in the resultant vector V ~ as seen in formula (3.9). The multipliers m d and m c represent the impor- tance of E S d og and E S cont ag i on respectively. m c may in simpler terms be considered the sheep’s susceptibility to the emotional state of its neigh- bouring sheep.

E S f i nal = m d × ES d og + m c × ES cont ag i on (3.13)

3.2 Implementation

In this section, the details of the implementation of the previously intro-

duced models and the construction of the scenario are described. The

models were implemented using the software Unity 3D and the program-

ming language C#. Unity 3D is mainly used to visualize the simulation and

is not considered to have a great impact on the findings.

(22)

16 CHAPTER 3. METHOD

3.2.1 Unity 3D and Simulation Architecture

Unity 3D is a real-time 3D development platform, or a game engine, which is available for free for anyone to use. This accessibility is one reason for why it was chosen as the platform for this study. Another reason is the fa- miliarity that comes with experience from previous use of the engine. As it is easily accessible, Unity has many users. This large community provides readily available technical support on the web. Unity is able to run simu- lations with multiple agents and fairly sophisticated calculations, which is appropriate for this study. The version of Unity used in this study is 2018.3.7f1.

As our study concerns only movement trajectories and sheep may only move along ground (as opposed to birds or fish), the study was conducted in two dimensions and from a top-down view. Reynolds’ original flocking model handled three-dimensional vectors, but has previously been con- cluded to work well in two dimensions as well [11].

To implement the modified version of Delgado-Mata’s extended model, a total of five scripts were written. The function of each is shortly described below.

• Boid Manager: This script handles the instantiation and update of the sheep and the dog. It keeps the sheep in an easily iterable list. All sheep have access to the Boid Manager and thus to this list which is used to find their neighbours. It also handles the logging of the sheep and dog positions to files which are used for evaluation.

• Herd: The Herd script contains and serializes most of the parame- ters affecting the behaviour of the sheep. It holds information about how the sheep and dog spawn.

• Boid: This script does all calculations described in the Model sec- tion, including the steering rules, emotional factor and contagion.

It updates the velocity and position of each sheep every timestep in accordance to these calculations.

• Sheep: This script updates the rotation of the sheep objects so they are turned towards the direction in which they are moving.

• Dog Control: Dog Control handles the control of the dog’s move-

ment and contains its speed.

(23)

The simulation updates 50 times per second. Each timestep after instan- tiation the following is done:

1. The new emotional state and velocity of each sheep is calculated 2. The position of each sheep is updated in accordance to its velocity 3. The position of the dog is updated in accordance to user input Every 50 timesteps (once per second) the positions of the dog and sheep are logged to files.

3.2.2 Scenario

To minimize influences outside what the study aims to investigate (the dif-

ference between including contagion and occluding it), a single scenario

is used. This scenario is based on one of King et. al.’s experiments. The

simulations are in a 1:10 scale; 10 meters in real life is 0.1 meters in the

simulations. The scenario is composed of 46 sheep and a single herding

dog, matching the empirical experiment. The sheep spawn in a spread

out group, such that the mean distance from each sheep to the flock cen-

troid is approximately 2.2 meters. The dog spawns approximately 12.3 me-

ters away from the flock centroid. Both distances are approximately one

tenth of the starting distances in the empirical experiment. The starting

positions of the sheep were randomly generated, within a certain radius,

and are the exact same each time the simulation is run. This is in order to

maintain a level of determinism in the study.

(24)

18 CHAPTER 3. METHOD

Figure 3.1. Spawn positions of dog and sheep. The black square is the herding dog and the white objects are the sheep. Sheep model made by Vertex Cat [16].

The herding dog is human-steered. The steering of the dog attempts to mimic the behaviour observed in the results of the experiments of King et. al. [12]. As the scenario is a simulation of the interaction between the sheep herd and the herding dog, it is important that the sheep react to the behaviour of the dog and the dog reacts to the behaviour of the sheep. Any- thing else would not be consistent with reality. Therefore, the dog cannot be set to move in a predetermined path. Due to time constraints, an au- tonomous herding dog with life-like behaviour that adapts to the situation is not implemented. The next best option found is to have the dog steered in real-time by a human who tries to emulate the observed behaviour of a real-life dog, even if that does introduce human error.

3.3 Method of Evaluation

In this section, the methodology of the the evaluation is outlined. How the empirical data was obtained, the simulated experiments are conducted and the datasets from both are compared and evaluated is described.

3.3.1 Obtaining Empirical Data

In order to obtain the empirical data necessary to evaluate the degree of

realism of the simulations the main author, Dr. Andrew King, of a study of

(25)

sheep cohesion was contacted. Access to the data and Matlab scripts from the study was granted. Due to time constraints only one (Trial 2) of the empirical experiments is used for comparison. More specifically, the data points of 40 seconds from Trial 2 was used. The 40 seconds were selected to include the approach of the dog from a long to a short distance to the sheep herd, as that is when much of the interesting action happens.

3.3.2 Scenario Simulation

A single experiment is conducted as follows:

1. Sheep and dog spawn (as described in Scenario)

2. Dog approaches sheep herd diagonally, heading for the herd’s east flank

3. Shortly after passing the vertical height of the sheep centroid, the dog turns toward it, driving sheep north-west

Each experiment takes 40 seconds. The positions of all sheep and the dog are logged each second. Both of these decisions are made to match the dataset from the empirical experiment as closely as possible.

The scenario is run with two different models. They are henceforth re- ferred to and defined as:

Non-contagion Model This is the implementation of Delgado-Mata’s ex- tended flocking model without fear contagion. I.e. it is the implementa- tion of the Model section (see Section 3.1) with the exception of the con- tagion model detailed in Section 3.1.4.

Contagion Model This model is the complete implementation of the modified Delgado-Mata flocking model, fear contagion included.

For each model, the simulation is attempted 5 times. The mean of the re-

sults of all five attempts was taken and used to compare with the empirical

data obtained from King et. al.’s Trial 2. The intention of this is to reduce

experimental errors and increase the accuracy of the results. More than 5

attempts would further increase accuracy. However attempting the sim-

ulations takes a certain amount of time, and to find near-optimal param-

eter combinations, the simulations have to be attempted a great number

(26)

20 CHAPTER 3. METHOD

of times. Finding good parameter combinations is prioritised over reduc- ing the experimental error, as bad parameter combinations could make for biased or even non-consequential results.

3.3.3 Evaluating the Realism of the Models

The focus of this study is on the emergent behaviour and movement tra- jectories of sheep under threat. The kind of data chosen to investigate and evaluate this is the mean sheep distance to the flock centroid (the cen- ter of the herd) relative to the distance of the dog to the flock centroid.

This demonstrates the cohesive shifts of the sheep herd and corresponds to how King et. al. visualized their results. The software Matlab [17] is used to plot the data.

Figure 3.2. Mean sheep distance to flock centroid over dog distance to centroid, Trial 2 from the experiments of King et. al. and Strömbom et. al. [12, 8].

The graph in figure 3.2 demonstrates the ratio between the mean sheep distance to flock centroid and the dog’s distance to the centroid. The graph in figure 3.3 investigates this ratio further, and how it changes over time.

This format of representing the datasets eliminates the influence of scale.

As the scale of the simulations of this study is 1:10 and not perfectly matched

to the scale of the empirical data, this is desirable and was chosen as the

dataset and graph to use for further comparisons.

(27)

Figure 3.3. The ratio of dog distance to centroid to mean sheep distance to centroid over time of Trial 2 from the experiments of King et. al. and Strömbom et. al. [12, 8]

To evaluate the realism of both models, the absolute difference between the ratio dataset of each model and Trial 2 of King et. al. is calculated and plotted. For each second i , the difference between the ratio of the model simulation and the ratio from Trial 2 is calculated as:

d i = |m i − t i | (3.14)

where d i is the difference, m i is the datapoint from the model and t i is the

datapoint from Trial 2, all at second i . The area under the curve of both

the difference plots is calculated using the trapezoidal method. This gives

a measure of the total difference between the simulation results and the

empirical experiment, and thus in this study a measure of realism. The

closer this area value is to zero, the more similar the model result is to the

empirical experiment.

(28)

Chapter 4 Evaluation

This chapter presents the results of the study. The results and the method of obtaining them are evaluated and discussed in regard to the research question.

4.1 Results

The following sections present parameters used in the simulations, the results and the analysis of the achieved realism of both models.

4.1.1 Parameters

The flocking model used in this study contains many parameters which all affect the behaviour of the simulated sheep herd. Depending on what parameters are used, the simulation may turn out be nothing like the em- pirical data, or much more like it. Through manual trial and error, the parameters ultimately used in the simulations were found. As the num- ber of possible combinations of parameter values are infinite, not all of them have been tested. The risk is therefore substantial that the parame- ters chosen are not optimal in terms of fitting the results to the empirical data. For this reason, intervals within which the optimal values of each parameter are believed to exist are defined. These intervals for the Non- contagion model are presented below in Table 4.1; Minimum and Maxi- mum represent the lower and upper bounds of the intervals respectively.

In the Mean column, the values actually used in the Non-contagion model simulation are listed.

22

(29)

Parameter Intervals for Non-contagion

Parameters Minimum Mean Maximum

C

f

1.0 2.0 3.0

Cohesion force factor

r

cohesi on

3.0 5.0 7.0

Cohesion radius (m)

S

f

0.14 0.17 0.20

Seperation force factor

r

separ at i on

1.0 2.0 3.0

Seperation radius (m)

A

f

0.2 0.5 0.8

Alignment force factor

r

al i g nment

1.0 2.0 3.0

Alignment radius (m)

C

e f

5.0 10.0 15.0

Emotional cohesion factor

S

e f

0 0 0

Emotional separation factor

A

e f

0.1 0.2 0.3

Emotional alignment factor

E

e f

2.0 5.0 8.0

Escape factor

r

f ear

3.6 4.2 4.8

Fear radius (m)

M axSpeed 0.6 1.0 1.4

Max sheep speed

m 0.5 0.7 0.9

Sigmoid multiplier

Table 4.1. Parameter intervals and selected parameters (Mean) for the Non- contagion model simulation. The parameters and their role in the model are de- scribed in Model (see section 3.1).

The addition of fear contagion includes new multipliers and affects the

overall behaviour of the sheep herd. A couple of the parameters listed

above were adjusted to new values which yielded better results in the sim-

ulation with the Contagion model. The parameters which differ from those

listed above for the Non-contagion model and their new values are shown

below in Table 4.2. The parameters not listed in this table remain the same.

(30)

24 CHAPTER 4. EVALUATION

Parameter Intervals for Contagion

Parameters Minimum Mean Maximum

r

f ear

3.4 4.0 4.6

Fear radius (m)

m 0.3 0.5 0.7

Sigmoid multiplier

r

cont ag i on

1.0 1.5 2.0

Contagion radius (m)

m

d

0.4 0.6 0.8

Stress due to dog multiplier

m

c

0.4 0.6 0.8

Contagion susceptibility

Table 4.2. Parameter intervals and selected parameters (Mean) specific to the Con- tagion model. The parameters and their role in the model are described in Model (see section 3.1).

Visualizing the Effect of the Parameters

To make the importance of the parameters more apparent, the effect of some of them are visualized below. The ones visualized are the ones found to have the most influence on the emergent behaviour of the sheep herd.

The emotional state multiplier in formula (3.8) plays a big part in both

models. It affects how the emotional state of the sheep changes relative to

their distance to the dog, a threat. The parameters r f ear and m mentioned

in Table 4.2 are both included in the formula, and they both differ between

the two models. The emotional state multiplier formula is plotted below

in figures 4.1 and 4.2. As the Contagion model has a lower fear radius than

the Non-contagion model, the slope of the formula is slightly shifted to

the left. This effectively means the dog has to come closer for the sheep to

become stressed. The sigmoid multiplier, m , is also lower in the Contagion

model. This causes the slope to be steeper. In other words, the emotional

state of the sheep changes at a faster rate once the dog approaches the fear

radius.

(31)

Figure 4.1. Graph showing the emotional state multiplier for the Non-contagion model where the fear radius r

f ear

is 4.2m and sigmoid multiplier m = 0.7. These parameters are then multiplied by ten to bring the distance up to 1:1 scale with real life for easier interpretation.

Figure 4.2. Graph showing the emotional state multiplier for the Contagion model

where the fear radius r

f ear

is 4.0m and sigmoid multiplier m = 0.5. These parameters

are then multiplied by ten to bring the distance up to 1:1 scale with real life for easier

interpretation.

(32)

26 CHAPTER 4. EVALUATION

The following figures are meant to show the specific effect changing cer- tain parameters have on the actual results of the simulation. To display this, the formats introduced in chapter three, specifically figures 3.2 and 3.3, are used. The graph format which better shows the difference between the lower and higher parameter values is chosen for each. The parameter values plotted in these figures are taken from table 4.1; the data is from simulations run with the Non-contagion model.

The fear radius, r f ear , has a big impact on how the ratio of dog distance to flock centroid to mean sheep distance to flock centroid changes over time. As seen in figure 4.3, a higher fear radius causes the sheep to react earlier to the dog’s presence. A lower fear radius causes the sheep to react later, causing a much lower peak in the graph. The ratio in the latter case also seems to stabilise at approximately the same height as its peak.

Figure 4.3. Graph showing the change in ratio of dog distance to flock centroid to mean sheep distance to flock centroid over time at different values of the fear radius parameter, r

f ear

.

The maximum sheep speed, M axSpeed , has a similar effect on the ra-

tio change over time (see figure 4.4). A higher maximum speed allows the

sheep to flock together into a tight group faster. As the herding dog re-

tains its original speed, the ratio increases and stabilizes earlier; the sheep

reach their minimum distance to each other and the dog has a hard time

catching up, causing the situation to go into an equilibrium-like state. A

(33)

lower speed has the opposite effect. The sheep are slow to gather and the dog distance to centroid decreases faster as the dog now has an easy time catching up. This creates a lower peak in the ratio.

Figure 4.4. Graph showing the change in ratio of dog distance to flock centroid to mean sheep distance to flock centroid over time at different values of the maximum speed parameter, M axSpeed .

Cohesion is the force pulling the sheep close to each other. It is in a con-

stant balancing act with the separation force, which is a force applied in

the opposite direction. When the cohesion force, C f , is lowered, the bal-

ance between cohesion and separation leans more in favor to separation,

causing the sheep to stay further away from each other than before. As

seen in figure 4.5, this causes the mean sheep distance to centroid to level

out at a higher distance. Similarly, a higher cohesion force factor causes

the distance to stabilise at a lower value.

(34)

28 CHAPTER 4. EVALUATION

Figure 4.5. Graph showing the change in mean sheep distance to flock centroid over dog distance to flock centroid at different values of the cohesion force factor parameter, C

f

.

In regards to the ratio change over time, change in the cohesion force fac-

tor mainly affects the height of the peak (see figure 4.6). A higher cohesion

force yields a higher peak and a lower force yields a lower peak. The cohe-

sion force factor C f represents how important staying close together is to

the sheep. When it is higher, their gathering movement will be more ex-

treme and vice versa. The effect of the emotional cohesion factor, C e f , is

very similar (see figure 4.7). The emotional cohesion factor represents the

importance of staying close together when under threat. Note should be

taken that the emotional cohesion factor must be increased or decreased

by a larger amount for the height of the peaks to change substantially.

(35)

Figure 4.6. Graph showing the change in ratio of dog distance to flock centroid to mean sheep distance to flock centroid over time at different values of the cohesion force factor parameter, C

f

.

Figure 4.7. Graph showing the change in ratio of dog distance to flock centroid to mean sheep distance to flock centroid over time at different values of the emotional cohesion factor parameter, C

e f

.

For the contagion radius, r cont ag i on , the Contagion model must be used

(36)

30 CHAPTER 4. EVALUATION

to observe how varying this parameter value alters the simulation. In other words, the parameters from table 4.2 are used. Figure 4.8 shows how the ratio is affected by different radii. A larger radius causes the sheep to have more neighbours whose emotional state they can be influenced by. In practice, this means fear and panic spreads faster and wider among the herd. A shorter contagion radius causes the sheep to have fewer contagion neighbours. With r cont ag i on = 1.0 , some sheep end up having no conta- gion neighbours at all. Having no neighbours means having no contagion influence and with the stress due to dog multiplier, m d , set to 0.6 the high- est emotional state the sheep can reach is 0.6. This in turn means its max- imum speed is 60% of the actual maximum speed. No matter how close to the dog the sheep is, it is unable to get 100% panicked. This causes some sheep to fall behind the rest of the flock, unable to catch up despite being closer to the dog. The blue curve in figure 4.8 fluctuates because the dog must try to gather up the straggling sheep while the rest of the herd moves away at a higher speed.

Figure 4.8. Graph showing the change in ratio of dog distance to flock centroid to mean sheep distance to flock centroid over time at different values of the contagion radius parameter, r

cont ag i on

.

4.1.2 Scenario Simulation

This section describes the results of the simulation runs for each of the

two implemented models. The resulting simulations for the models are

(37)

very similar. However, as the dog approaches the flock the sheep react and flock together faster in the Contagion model simulation. The transition from a relaxed state of the sheep to a stressed and ultimately panicked state looks smoother. In the Non-contagion model, the sheep on the edge of the herd far away from the dog remain inactive for what seems like an unnaturally long time while the sheep close to them are quickly moving towards the center of the herd.

Non-contagion model

As the dog approaches the herd diagonally from above, and encroaches on the fear radius, the sheep closest to it start to move towards the flock centroid as seen in figure 4.9 a). As the dog comes closer, all sheep have noticed it and are moving towards the centroid. The separation rule pre- vents them from walking into/on each other. When the sheep are as close to the centroid as is allowed by the separation rule, they start heading away from the dog. In figure 4.9 b), the dog is just about to start moving straight towards the flock centroid, effectively herding them northwest.

(a) 15s. (b) 25s.

Figure 4.9. Sheep being approached by herding dog in the Non-contagion model simulation. (a) is the simulation 15s in. (b) is the simulation 25s in, the moment before the dog starts actively driving the sheep towards the destination.

When plotted together with the empirical data of King et. al. and Ström-

bom et. al.’s Trial 2, the positional data of the simulation attempts is multi-

plied by ten for easy visual comparison. Figure 4.10 shows the similarities

and differences in how the mean sheep distance to flock centroid changes

relative to the distance of the dog to the flock centroid. The mean sheep

(38)

32 CHAPTER 4. EVALUATION

distance to centroid as well as the dog distance to centroid both start out a little lower than the empirical experiment. The change in sheep cohesion is more gradual and starts earlier, yet the simulated herd ends up reach- ing the stabilised minimum mean distance to centroid later than the real herd. The simulated sheep do however stabilize at about 4 meters, which matches the stabilisation distance found by King et. al.

Figure 4.10. Comparison of Trial 2 from the experiments of King et. al. and Ström- bom et. al. [12, 8] and the mean of five attempts of the Non-contagion model.

Contagion model

As seen in figure 4.11 a), all sheep are turned towards the center of the

herd and have started to move towards it. The sheep closer to the dog

are moving faster than the sheep far away. They have both the cohesion

force and the escape force acting in the same direction and are therefore

already more tightly grouped than those farther away. 25 seconds into the

simulation (figure 4.11 b)) the herd is nearly as tightly grouped as it can

be and is starting to align, heading away from the dog. Compared to the

Non-contagion model at the 25s mark (figure 4.9 b)), the contagion herd

is notably more tightly grouped at the same point in time.

(39)

(a) 15s. (b) 25s.

Figure 4.11. Sheep being approached by herding dog in the Contagion model sim- ulation. (a) is the simulation 15s in. (b) is the simulation 25s in, the moment before the dog starts actively driving the sheep towards the destination.

The data of the Contagion model simulation attempts is plotted together

with the data of Trial 2 of King et. al. and Strömbom et. al. in the same

way as for Non-contagion - the change in mean sheep distance to flock

centroid relative to dog distance to centroid - in figure 4.12. Comparing

this to figure 4.10, there appears to be little difference between the sheep

cohesion behaviour relative to dog distance of the two models. The slope

of the Contagion model in figure 4.12 is somewhat smoother and gets a lit-

tle more steep before stabilising. Again, the simulated sheep stabilisation

distance is at about 4 meters.

(40)

34 CHAPTER 4. EVALUATION

Figure 4.12. Comparison of Trial 2 from the experiments of King et. al. and Ström- bom et. al. [12, 8] and the mean of five attempts of the Contagion model.

4.1.3 Analysing the Relative Realism of the Models

To eliminate the scale factor, the ratio between the distance of the dog to the flock centroid to the mean sheep distance to flock centroid is calcu- lated for each datapoint (second). The mean of the change in ratio over time of five attempts of the Non-contagion model simulation is plotted with the change in ratio over time of the empirical data in figure 4.13.

The same is plotted with the Contagion model simulation in figure 4.14.

Both models match the empirical data well in the first 20 or so seconds. In

the second half, when the dog comes closer, the Contagion model results

reach a notably higher - and earlier - peak compared to the Non-contagion

model results, which peaks a bit late.

(41)

Figure 4.13. Comparison of the ratio between dog distance to centroid to mean sheep distance to centroid over time of Trial 2 from the experiments of King et. al.

and Strömbom et. al. [12, 8] and the mean of five attempts of the Non-contagion model.

Figure 4.14. Comparison of the ratio between dog distance to centroid to mean sheep distance to centroid over time of Trial 2 from the experiments of King et. al.

and Strömbom et. al. [12, 8] and the mean of five attempts of the Contagion model.

Figure 4.15 shows the absolute difference between the results of both mod-

(42)

36 CHAPTER 4. EVALUATION

els and Trial 2. The data used here is the same as the data used in figures 4.13 and 4.14. In other words, the figure below showcases the difference at each second between the Non-contagion model and Trial 2, and the Con- tagion model and Trial 2. The closer the datapoints are to the x-axis, the smaller the difference between the model and the empirical experiment is at that second in time.

Figure 4.15. Comparison of the absolute difference between the ratio datasets of both models and Trial 2 from the experiments of King et. al. and Strömbom et. al.

[12, 8].

It is not immediately apparent which of the models is the least similar to Trial 2, i.e. the least realistic. Therefore, the area under the curve of both models is calculated which resulted in the following:

Model Area

Non-contagion model 20.5614

Contagion model 18.4236

Table 4.3. The areas under the curves that are shown in figure 4.15; a measure of realism of each model.

These values indicate that the contagion model had a higher similarity

with Trial 2, and thus that it is more realistic.

(43)

4.2 Discussion

The findings show there is a slight difference between the results of the two models. The research question driving this study is whether the in- clusion of fear contagion increases or decreases the degree of realism of the herding simulation. More specifically, the question of this study is:

Is the emergent behaviour of a sheep herd under threat simulated with Delgado-Mata’s flocking model more realistic with or without fear contagion?

The Non-contagion simulation is not considered to be completely realis- tic visually. As described in section 2.3, large groups of animals are better at detecting predators than small groups because they have more sensory receptors and are able to communicate detection of danger. This gives larger groups an advantage in surviving. In the Non-contagion model sim- ulation, the sheep have no way to communicate danger, so until they have detected the dog themselves they remain relaxed. This causes the sheep to have a seemingly unintelligent behaviour; the sheep that have not no- ticed the dog do not care at all that the rest of the herd is quickly flocking together, as they do under threat. Figure 4.9 a) best demonstrates this ob- servation. This is likely a big reason for why the simulation does not look completely realistic.

The Contagion model includes fear contagion, and due to this the sheep seem more intelligent as they react to the actions of each other. This can be observed in figure 4.11 a), where all sheep - including the ones that have not yet detected the dog - are facing and moving towards the center of the flock. This corresponds better to the defensive flocking behavior of herd animals described in section 2.3 as compared to the observed behaviour of the Non-contagion model.

Figures 4.10 and 4.12 both show that the cohesion (closeness to each other)

of the simulated sheep when stationary is similar to the cohesion observed

by King et. al., and that the cohesion stabilizes at the same distance, ap-

proximately 4 meters. In these figures, the Non-contagion model and the

Contagion model both seem very similar. In figures 4.13 and 4.14, the dif-

ference between the models becomes more apparent. It is still difficult to

tell which one is more similar to the empirical experiment, and thus which

(44)

38 CHAPTER 4. EVALUATION

is more realistic. This all indicates no great difference between the models will be found.

A higher resemblance between the Contagion model and the empirical experiment was however found in table 4.3. The area under the Conta- gion curve shows the difference between the Contagion model results and the empirical experiment, and was smaller than the area under the Non- contagion curve. The difference between the two areas is, however, not very large and comes down to approximately 2 area units. This is approx- imately 10% of the area under the Non-contagion curve. In other words, the results do imply that the addition of fear contagion increased the re- alism of the model, though not greatly.

The fear contagion component implemented in the Contagion model is a simple one. The extended flocking model made by Delgado-Mata et. al.

includes a very different implementation of fear contagion (see section 2.2.2), and it is possible this more sophisticated version would improve the model even more.

The hypothesis for the research question was that the sheep herd simu- lated with Delgado’s flocking model with fear contagion included would be more realistic than the model without fear contagion. The findings in- dicate that the addition of a simple contagion model increased the realism of Reynolds’ flocking model with the additions of a fourth steering rule and an emotional state. The increase was however not considerably large. In light of this, the hypothesis is considered correct.

One of the main purposes of this project is to increase the realism and live-

liness of virtual environments. The finding that including fear contagion

when simulating flocking animals improves the realism of the simulation

can be used to achieve this purpose in a grander scale. One field where the

realism of a simulation is of particular importance is psychological ther-

apy in the mental health sector. For example, when treating phobias one

may want to expose patients to their phobia in a safe environment, such

as a virtual environment. In order for this to have a meaningful impact in

the treatment, it may be important that the environment that the patient

experiences is realistic.

(45)

4.2.1 Limitations and Reflections

Certain limitations that may have affected the results of this study should be listed. One such limitation is that the herding dog in the simulations is human-steered. While the dog was steered in an attempt to emulate the observed movement of the dog in the experiments of King et. al. [12], it does introduce a big source of potential human error. It also makes the simulation less deterministic.

A single scenario was used to evaluate the realism of the simulations. There is a risk the models give more or less realistic results in other scenarios, e.g. when the dog stands still faraway or where there are more sheep in the herd. The scenario used in the study is based on one of three exper- iments conducted by King et. al. Had one of the other two experiments been chosen for the comparisons, the study may have arrived at a differ- ent conclusion. Therefore it may have been better to use all three empiri- cal experiments for the comparison and evaluation of the simulations.

Perhaps the biggest limitation of this study is the inability to test all plau- sible combinations of the parameters. This is due to the simulations not being fully automated and time constraints. This means there is a risk the optimal parameter combinations for the Non-contagion and Contagion models have not been found. Other combinations of parameter values may have yielded different results.

There is a risk the data selected for analysis in this study, the ratio between the dog and mean sheep distance to flock centroid, is not the best measure by which to evaluate the emergent behaviour of the sheep herd. Other ap- proaches could be taken, such as the individual movement trajectories of each sheep.

No statistical analysis was performed on the data. The approach used to

evaluate the realism and difference between the models in this study does

give an indication of which is more realistic. It does however not provide a

basis for any conclusions around the statistical significance of the differ-

ences. This means no conclusion can be made in regards to whether the

difference found was actually significant.

(46)

40 CHAPTER 4. EVALUATION

4.2.2 Future Work

The findings of this study show that Delgado-Mata’s extended flocking model, with and without fear contagion, can be used to simulate the emer- gent behaviour of a sheep herd under threat with notable similarity to the real sheep herd observed by King et. al. [12]. The actual degree of similar- ity, and ultimately realism, does however need to be further investigated.

The simplified fear contagion model provided an improvement in realism, however the potential of a more sophisticated contagion model remains unexplored. Following this, this project can be continued in different di- rections. Some suggestions would include:

• making the herding system automatised so brute-force testing can be done to find the optimal combinations of parameters

• make the contagion model more sophisticated

• test the simulation models in different scenarios

• compare the simulation models with the remaining empirical ex- periments of King et. al.

• increase the number of simulation attempts for more accurate re- sults

• investigate the perceived realism of the simulations in a user study

• conduct a statistical analysis to test for statistically significant differ- ences between the models

The purpose of this project is to provide a basis for a simulation of the

emergent behaviour of a herd of sheep with life-like movement when un-

der threat. Future work should aspire to make a more sophisticated and

reliable simulation of a sheep herd in varying scenarios. The possible con-

tributions of this and other similar studies to different aspects of industry,

academia and society can be further investigated.

(47)

Conclusions

The implementation of Delgado-Mata’s extended flocking model with fear contagion was able to simulate the emergent behaviour of a sheep herd under threat more realistically than the model without contagion. The analysis of the results showed that the difference in similarity to the em- pirical experiment of the two models was however not large. These find- ings indicate there is space for further investigation regarding the poten- tial of fear contagion in animal flock simulations. In particular, the model parameters and a more sophisticated fear contagion model need to be ex- plored. More extensive analysis and evaluation of Delgado-Mata’s flocking model could contribute with additional interesting findings.

The findings of this study may be used as a basis for future simulations and research of the herding scenario and emergent behaviour of a sheep herd under threat. Such simulations can be used for predictions and experi- ments that are otherwise difficult or not possible to do in the real world.

It can also be used to improve the virtual experience in e.g. the entertain- ment industry and psychological therapy in the mental health sector.

41

References

Related documents

Stöden omfattar statliga lån och kreditgarantier; anstånd med skatter och avgifter; tillfälligt sänkta arbetsgivaravgifter under pandemins första fas; ökat statligt ansvar

46 Konkreta exempel skulle kunna vara främjandeinsatser för affärsänglar/affärsängelnätverk, skapa arenor där aktörer från utbuds- och efterfrågesidan kan mötas eller

Generally, a transition from primary raw materials to recycled materials, along with a change to renewable energy, are the most important actions to reduce greenhouse gas emissions

För att uppskatta den totala effekten av reformerna måste dock hänsyn tas till såväl samt- liga priseffekter som sammansättningseffekter, till följd av ökad försäljningsandel

Från den teoretiska modellen vet vi att när det finns två budgivare på marknaden, och marknadsandelen för månadens vara ökar, så leder detta till lägre

Re-examination of the actual 2 ♀♀ (ZML) revealed that they are Andrena labialis (det.. Andrena jacobi Perkins: Paxton &amp; al. -Species synonymy- Schwarz &amp; al. scotica while

Industrial Emissions Directive, supplemented by horizontal legislation (e.g., Framework Directives on Waste and Water, Emissions Trading System, etc) and guidance on operating

The ambiguous space for recognition of doctoral supervision in the fine and performing arts Åsa Lindberg-Sand, Henrik Frisk &amp; Karin Johansson, Lund University.. In 2010, a