evolving group behavior - radboud universiteits thesis tom schu… · evolving group behavior...

21
Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager Dr. I.G. Sprinkhuizen-Kuyper Radboud University Nijmegen Artificial Intelligence: cognitive science

Upload: others

Post on 13-Aug-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

Evolving group behavior

Bachelor’s Thesis

Tom Schut(s0362638)

August 29, 2008

Supervisors:Dr. W.F.G. Haselager

Dr. I.G. Sprinkhuizen-Kuyper

Radboud University NijmegenArtificial Intelligence: cognitive science

Page 2: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

Contents

1 Introduction 5

2 Background 62.1 Evolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.1.1 Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.1.2 Reproduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.1.3 Variation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2 Hypothesized evolutionary tract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.3 Neural foundations of behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.4 Genetic algorithms and virtual life . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3 Experimental setup 83.1 World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.2 Creatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.2.1 Morphology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.2.2 Actuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.2.3 Neural network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.3 Evolutionary Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.4 Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4 Results 134.1 Food clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.2 Ability to see others’ success . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.3 Use of the success-sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5 Discussion 165.1 The effect of clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165.2 Effect of the success-sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165.3 Use of the success-sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175.4 Generalization to biology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175.5 Statistics for evolutionary experiments . . . . . . . . . . . . . . . . . . . . . . . . . 175.6 Future research . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

References 19

A Framsticks 21

Page 3: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

Abstract

In this report we present our work on group behavior through an evolutionary algorithm.In nature several factors have been proposed as being responsible for the evolution of groupforming, including the topics of our study: food distribution and the ability to perceiveinformation about other creatures. Two research questions were addressed: what is the effectof food clustering on group behavior and what is the effect of the ability to perceive thesuccess in food gathering of other creatures on group behavior. Two artificial life simulationswere implemented. The first simulation evolved artificial creatures in environments of differentfood clustering, the second evolved creatures with and without sensors to perceive informationabout the food gathering success of other creatures. The creatures of the last generations wereanalyzed by measuring the amount of time they spend in each others smell radius during atest condition. The use of the success sensor was measured by testing for group behavioragainst creatures of different success. It was found that both higher food clustering and theability to perceive food gathering success of others lead to more group behavior.

Page 4: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

Acknowledgements

I would like to thank the following people in helping in the realization of this bachelor’s thesis:Walter de Back, for familiarizing me with the Framsticks environment, Twan Goosen and SaskiaRobben, for giving me advise during my experiments. Furthermore I would like to thank PimHaselager and Ida Sprinkhuizen-Kuyper for their patience and support during the project, andfinally Joris Janssen, for helping me a lot by providing much useful comments during the stage ofwriting.

Page 5: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

1 INTRODUCTION

1 Introduction

People are social creatures, as are many other animals. We spend a lot of our time on interactingwith other people, form groups and feel left out when we a are not in a group. Many animalsdisplay the same kind of behavior, be it they are not as social as human beings. For a long timetheoretical evolutionary scientists have debated the origin of social behavior in animals. Socialbehavior is often defined by the occurrence of group behavior. Alexander (1974) states that “theformulation of any general theory of social behavior begins with a description of the selective forcescausing and maintaining group-living.”

There are two main causes that are proposed to be responsible for group forming: predationpressure (Alexander, 1974) and benefits by feeding in groups (Eisenberg, Muckenhirn, & Rundran,1972). There are several of these benefits, including the ability of defending a large territory fromother groups, and the ability to develop group strategies for food gathering like group hunting inlions (Scheel & Packer, 1991).

In this study we will not go into the theories ascribing predation pressure to be a cause of groupforming. There have been other studies that were concerned with this (Willems & Haselager, 2003;Floreano & Nolfi, 1998) We will instead focus on the effect of food availability and distribution.Crook and Gartlan (1966) and Schradin (2005) consider the dispersity of food a factor in groupforming. Bonabeau, Dagorn, and Freon (1999) proposes a model including the availability of foodas a predictor of group size. Van Schaik (1983) states that “an environment containing food clumpslarge enough to share could favor group living.” (p. 122, see also Ward & Zahavi, 1973; Krebs &Davies, 1981). Inversely, Morgan (1988) defines lack of food to be a factor for the non-occurrenceof shoals in minnows. The first question we want to answer in this study is concerned with theeffect of food distribution on group forming. Our hypothesis is that higher clustering of food leadsto a higher degree of group forming.

An extra question related to social behavior and food consumption deals with the effect ofthe amount of perceived information about food gathering success on group behavior. In theanimal kingdom there are several examples of the use of information about the performance ofother animals. It is known that that chimpanzees are able to extract information about theirenvironment from their group mates (Menzel Jr, 1971). And even in human behavior we can seesocial interaction being guided by information about the success of others (Todd, Penke, Fasolo,& Lenton, 2007). Our hypothesis is that more information about the success of others will leadto a higher degree of group forming. We will also test the specific use of this information byanalyzing the effect of other creatures’ success in food finding on group forming. For this last testour hypothesis is that creatures will evolve to discriminate between peers that are bad at foodfinding and peers that are good at this, so that good finders will cause a higher degree of groupforming than bad food finders.

To answer our research questions we have performed two artificial evolution experiments whichmanipulated respectively the amount of food clustering and the amount of perceived informationon other creatures’ food finding success.

We will first give an outline of natural evolution and evolutionary algorithms in Chapter 2. InChapter 3 we will describe the settings of our experiment, followed by our results in Chapter 4.Chapter 5 contains our conclusions and discussion, followed by future research considerations.

5

Page 6: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

2 BACKGROUND

2 Background

In this section we will outline the basic underlying methods we use in our artificial evolutionalgorithms. We will first explain the basic steps of natural evolution, followed by the way we expectgroup behavior to form evolutionary in our simulations. We will end by describing the method wewill use, which is inspired by natural evolution, and the tool that simulates our artificial evolution.

2.1 Evolution

Natural evolution is a mechanism that allows species to adapt to their environment. It is aprocess that encompasses many generations and is considered to be responsible for the diversity,complexity, and adaptedness of life on earth. The theory of evolution that is generally acceptedwas first proposed by Darwin (1859). Darwins theory is based on natural selection and operatesby three steps being reproduction, variation, and selection. But before explaining this algorithmI will give a short introduction into genetics in the text below.

2.1.1 Selection

(Natural) selection, or more popularly “survival of the fittest” works at the level of one generationand describes how only the fittest individuals in a population are able to reproduce and thuspass on their genes. In nature there are two kinds of selection, natural and sexual. The fitnessin natural selection is determined by the measure of adaptation to the environment, meaningthe individuals that do a better job surviving will have a better chance in finding a partner toreproduce. Sexual selection works on the level of sexual attraction, so an individual that devises away to be more sexually attractive has a higher chance at reproducing. In our simulation we willonly model natural selection.

2.1.2 Reproduction

When two animals reproduce their combined genetic material is passed on into their offspring. Thegenetic code of an organism is what makes up its morphology and nervous system. This meansit contains the entire blueprint of an organisms body and is indirectly responsible for behaviorduring its life.

2.1.3 Variation

Variation is ensured by two mechanisms, crossing-over and mutation1. Crossing over always hap-pens and is the process of recombining the genetic material of mother and father into new offspring.At crossing over random parts of the mothers and fathers genetic material are recombined to formthe double helix, so no genetic material is discarded. This process happens in a fairly random wayso there is no way of predicting whether offspring will inherit from the father, mother or even olderparties present in the genes. Mutation however actually changes parts of the recombined DNA(randomly) to form new structures. This way it is possible for evolution to produce traits in theoffspring that differ from the recombined parental DNA. There are two ways of mutation: pointmutation, where one gene changes its value, and mutations that occur during crossing over. At the

1These mechanisms were first described by Mendel (no reference available)

6

Page 7: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

2 BACKGROUND 2.2 Hypothesized evolutionary tract

(a) Start of evolution (b) First food found (c) First follower

Figure 1: The evolution in a simplified way, the apples represent food, the circles creatures, andthe arrows their paths

latter form of mutation something goes “wrong” at recombination. This could be a simple failurein aligning the two DNA strings (translocation/inversion), but it could also be something morecomplex like deletion or duplication. This broad definition of mutation makes it responsible forall new variation in a population. This means that even though all traits present in a populationcan be optimized by recombination, new traits can only be caused by mutation. One could saythis makes it the motor of evolution.

2.2 Hypothesized evolutionary tract

The main evolutionary tract of our hypothesis is depicted in Figure 1. At first (Figure 1a) none ofthe creatures are able to find food, and are just walking around without increasing their fitness.At this stage there is no increase in fitness so selection will be random. At some point in evolution(Figure 1b) a creature stumbles upon food because of a mutation that changed its behaviortowards being better at finding food. If the creature is really better at finding food its geneswill spread through the population consistently, making the average population better at findingfood. This stage is a critical point in the evolution of group behavior. The better creatures are atfinding food for themselves, the harder it is to take an alternative tract and (evolutionary) learnthe group behavior. So it is our expectation that if group behavior will evolve, it will evolve inthe period at which the food finding behavior is not very well evolved for at least a part of thepopulation. This way creatures with a lower fitness can specialize in following others, or betterput: having a group strategy to find food instead of finding food alone, because both options areabout equally beneficial at this stage. Having a group strategy in this case does not even compareto the complex behavior that is displayed by for example lions, it should be thought of as multiplecreatures combining their line of sight so that when one sees food the other is drawn to it becauseit is following.

2.3 Neural foundations of behavior

Each organism displays behavior because it is equipped with a nervous system built from singleneurons connected by synapses. The interconnectedness and weight setting between neuronsdetermines behavior. The nervous system can thus be considered an information processing unit

7

Page 8: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

2.4 Genetic algorithms and virtual life 3 EXPERIMENTAL SETUP

processing input from sensors into output of actuators. A single neuron works by adding up allincoming neuron potentials and firing a potential when its threshold is reached.

2.4 Genetic algorithms and virtual life

Genetic algorithms (Holland, 1975) are the artificial counterpart to natural evolution. They useexactly the same steps as natural evolution. First a genetic representation is made of differentinstantiations of the problem. Then these instantiations are measured by a fitness function andthe fittest selected for “reproduction”, which results in a new set of instantiations of the problemwhich is different because crossing over and mutation operators are applied during reproduction.

Originally genetic algorithms were introduced as a mechanism for problem solving. This ap-proach is still widely used and mainly focuses on the abstract application of genetic algorithms.For example, a genetic algorithm can be used to optimize a constraint satisfaction problem like thetraveling salesman problem (Fogel, 1993) or for engineering purposes Lohn, Hornby, and Linden(2004).

The main thing these applications have in common that they use the method of evolutionaryalgorithms as a problem solver instead of a simulation. Another application of genetic algorithmsis virtual life (Sims (1994), Langton (1995)). Artificial life focuses less on problem solving andmore on simulation of real life phenomena through artificial ecosystems. So instead of usingabstract genotypes that are evaluated through a preset fitness function, genotypes are simulatedin a virtual environments as virtual creatures with a nervous system and morphology. Havingtheir own nervous system means that virtual life creatures have their own artificial neurons thatsimulate real neurons. The life of these virtual creatures is then simulated and evaluated. Thiscan be done through a fitness function at the end of every generation, or during life by allowingcreatures to reproduce during life. Then the creature with the most offspring can be consideredfittest.

3 Experimental setup

To answer the research questions two artificial life life experiments were done in Framsticks (seeAppendix A). The simulation settings which define the experimental setup are described in thenext section.

3.1 World

The simulations were done in a flat world without boundaries or obstacles. In this world asexualcreatures and food were simulated.

The world is inhabited by creatures and food. The amount of creatures and food is keptconstant, which means every time a creature dies or a food particle is eaten, a new one is placedrandomly in an area of 50 by 50 around the center of the world on a place not yet occupied byanother creature or food. Creatures have a size of four by four, food has a size of two by two.

In all conditions five creatures with a starting energy of 1000 each were simulated at each timestep. Creature specifics are explained in detail in Section 3.2.

8

Page 9: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

3 EXPERIMENTAL SETUP 3.2 Creatures

The number of food pieces and their starting energy depends on the experimental condition.In the unclustered condition four pieces of food of 500 energy units each are simulated and in theclustered condition two pieces of food of 1000 energy units each.

Figure 2: A world with 4 creatures and 2 pieces of food

3.2 Creatures

As said above the world is populated with creatures and food. Creatures can reach each place inthe world, which means they can also occupy the same space as other creatures.

A creature is placed in the world with a starting energy of 1000. Its energy gets drained byidle power consumption, which is the energy it needs to stay alive, and can increase its own energyby eating. Thus its energy equation is stated by Equation 1.

Ec(t) = Ec(t− 1) + fc(t)− ipcc(t), (1)

where Ec(t) = energy of creature c at time step t, fc = food consumtion, and ipc = idle powerconsumption explained in Equation 2.

ipcc(t) = 2 · et−t0a , (2)

where ipcc(t) is the idle power consumption, t− t0 the age of a creature, and a a constant whichcontrols the speed at which a creature ages. In our simulation this is set at 3000 time steps.

To prolong their life creatures have to eat food, they do this by occupying the same positionas the food, at which time three energy units per time steps are transferred from the food to thecreature. A creature dies when its energy falls below zero. At that time, if fitness is high enough,its genotype is stored in the gene pool together with its fitness.

9

Page 10: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

3.2 Creatures 3 EXPERIMENTAL SETUP

Figure 3: A creatures morphology, at the top corners are the sensors, at the bottom corner thewheels

3.2.1 Morphology

Creatures have a simple symmetric morphology depicted in Figure 3. There are three types ofsensors: food sensors, other creature sensors, and success sensors. All of them are ranged sothat creatures cannot perceive further than 1/10th of the world around them. A creature candifferentiate between left and right because of the physical position of the perceiving sensor.

All sensors are implemented to be noiseless, to not interfere with the main task of findingfood. Furthermore, sensors do not have an arc of perception as eyes have, so they can best beconsidered as smell sensors. Food sensors are activated by energy of food through Equation 3.The basic behavior of the sensor is that it gets more activated by food that is closer, and it getsmore activated by food that has more energy left.

actfs(c, t) = 1100

Nfood∑i=1

Ei(t)/Ei(t0)d(i, c)2 + 1

, (3)

where actfs(c, t) is the activation of the food sensor fs of creature c. This activation’s rangeis [0,0.05]. The equation divides the percentage of energy left in the food piece by the squareddistance to the sensor. d is the distance between the sensor and a food piece (fp). The value ofthe sensor is set to 0 when d(i, c) exceeds the preset smell radius (23). 1

100 is a factor to limit theactivation of the sensor, although 1

5 would have been better because the range of the sensor wouldthen be [0,1].

The sensor for other creatures is activated by Equation 4. In contrast to the food sensor it isnot stronger activated by creatures of higher energy. This makes pinpointing of creatures easiersince it is not interfered with by their energy value.

actocs(c, t) = 1100

Nocs∑i=1

1d(i, c)2 + 1

, (4)

where actocs(c, t) is the activation of the sensor for other creatures for creature c. The equationsums the inverse of the squared distance d(i, c) to all creatures (Noc). Its range is [0,Noc100 ].

The success-sensor perceives how good other creatures are at finding food. It exists next to thesensor for other creatures because when success is included in Equation 4 it becomes impossible

10

Page 11: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

3 EXPERIMENTAL SETUP 3.2 Creatures

to determine whether the sensor is activated by success or close distance.

actss(c, t) = 1100

Noc∑i=1

s(i)d(i, c)2 + 1

, (5)

where actss(c, t) = the activation of the success sensor (ss) of creature c at time step t. Theequation sums the success score defined in Equation 6 of every creature (in sight) divided by itsdistance to the sensor.

sc(t) =t∑i=t0

fc(i)(t− t0)

, (6)

where sc(t) is the success of creature c at time step t. This is a sum of all food eaten (fc) in acreatures lifetime divided by the amount of time steps it lived. The success sensor’s range is [0,3]because the maximum of food eaten per time step is 3.

3.2.2 Actuators

A wheel will perform a rigid rotation around the other wheel, like wheels in the natural world.According to its activation, a wheel has a speed between the range [0,0.2] per time step. Speed isa linear function of activation. Wheels can turn both directions.

vw(in) = 0.2 · in, (7)

where vw(in) is the speed of the wheel and in is the incoming activation to the wheel in the range[-1,1].

The arrangement of sensors is dependent on the condition. For the research question manipu-lating the clustering of food, all creatures were implemented with two pairs of sensors (food andother creatures). For the research question manipulating the amount of visible information thesuccess-sensor was added.

3.2.3 Neural network

The sensors are connected to the wheels through a fully connected multilayer perceptron with onehidden layer of four neurons.

Activation spreads through the network by having each neuron summing up the activity oftheir input neurons multiplied by the connection weight by Equation 8

in(j) =N∑i=0

wji · act(i), (8)

where in(j) is the input of neuron j and all activations of incoming neurons are summed by theirweights wji.

Input is transformed into activation by a sigmoid function extended with a bias. The biasensures neurons can also be activated without perceiving anything. Weights between neurons arekept constant during lifetime, but are evolved over generations.

The two different neural networks (with and without success sensor) are displayed in Figure 4

11

Page 12: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

3.3 Evolutionary Control 3 EXPERIMENTAL SETUP

(a) Neural network of a crea-ture without success sensor

(b) Neural network of a crea-ture with success sensor

Figure 4: The two different neural networks. The triangles are neurons as described by equation8, So: sensor for other creatures, Sf: sensor for food, Ss: sensor for food finding success of others

3.3 Evolutionary Control

The fitness of a creature is defined by its lifespan, which in turn is dependent on the amountof food pieces eaten during life. However, lifespan is not infinite due to aging (see Equation 2).Consequently creatures that ate more food during their lifetime have a higher fitness.

At death the fitness and the genotype of a creature is saved into a gene pool, in which amaximum of 200 genotypes are kept. When the maximum is reached and a new individual hasto be added, another is deleted from it with a probability that is inversely proportionate to itsfitness (Rechenberg, 1973). This approach makes it hard to speak of a generation, as it is usualin genetic algorithms to simulate an entire generation of creatures, evaluate them, and constructa new generation out of them. We define a generation as a snapshot of the gene pool. We takethese snapshots after each 1000 creatures that were tested.

Producing a new creature is done in different ways. First an old genotype is selected with aprobability proportionate to its fitness. Then there is a 64 % chance it is mutated, a 16% chanceit is crossed over with another creature that is selected the same way, and a 20 % chance it isdeployed unchanged. Mutation changes one weight of a creature. Cross over recombines the twogenotypes of the selected “parents”, maintaining the size of the genotype, so only the weights willbe changed since the morphology is the same for each creature.

The genetic algorithm will thus search through the weightspace to find the solution that causesthe highest fitness. We stop evolution when fitness does not increase anymore.

3.4 Metrics

We need two types of measurements to analyze the outcome of the evolution. The first one isa quantification of group behavior, the second one is a way of measuring the use of the successsensor.

Since group behavior is not a clearcut concept, and can be defined in different ways likecooperation or competition which both are very hard to quantify in a continuous environment,we have conceptualized group behavior through a few simple assumptions. Firstly, creatures

12

Page 13: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

4 RESULTS

cannot be social without perceiving each other. Secondly, to be in a group creatures have to bereacting to each others behavior. A higher percentage of time spent in each others smell radius(while not eating) is an indication for a higher degree of reaction to each other, which in turncan be interpreted as group interaction being higher. Because without food present there are nodistractors, so every effect on the following score can only be caused by more interaction. Thegroup behavior metric is therefore established as the percentage of time the creatures spent ineach others smell radius. This is implemented as the amount of time steps the two creatures werein each others smell radius divided by their lifespan (which is equal in the test condition).

The way the success-sensor was used was measured by a different test. It was constructed byactivating the sensor with different values. Because the range of the success sensor is [0,3] fourcategories were constructed. Each analyzed creature was tested with all four conditions, i.e. it wassimulated four times with (every time) a creature of different success (0,1,2,3). Of each simulationthe above defined group behavior score was calculated.

The experiment which tests group behavior has the same world as the regular experiment, butwithout food, so no distractors are present. To test for group behavior two creatures are simulatedwith a starting energy of 1000. Of each generation the top 4 creatures were compared tournamentwise to each other and to themselves by a group behavior metric that is explained in the nextparagraph.

4 Results

To summarize, we posed two research questions: what is the effect of food clustering on groupbehavior and what is the effect of the ability to perceive the success of other creatures in the worldon group behavior. We answer these research questions by doing an artificial life simulation. Thereare three different types of simulation: the first condition has a world with unclustered food, thesecond condition has a world with clustered food, and the last condition has both a world withclustered food and creatures with an extra sensor to be able to perceive others’ success in foodfinding. We analyze the resulting genotypes of our evolution by measuring the amount of timethey spend in each others smell radius during a test condition. The use of the success-sensor ismeasured by testing for group behavior against creatures of different success.

The conditions defined in the previous section (unclustered, clustered, clustered & success-sensor) were implemented in Framsticks and run four times per condition in the Framsticks com-mand line environment on Linux. Hardware constraints did not allow us to have more runs. Allconditions were evolved until the fitness had stabilized. The first condition was run for 400 gener-ations, the two latter conditions for 800 generations. We calculated the group behavior scores ofeach simulation by comparing the top four creatures in each generation to each other and them-selves resulting in ten comparison scores per generation. Only the top four was compared becauseof hardware constraints. So four simulations of ten runs makes 40 comparisons per condition.

4.1 Food clustering

In our first experiment we investigated the effect of food clustering on group behavior. We com-pared the group behavior scores of creatures in a world with unclustered food to the scores of

13

Page 14: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

4.2 Ability to see others’ success 4 RESULTS

Figure 5: The mean effect of food clustering on group behavior at generation 411-430. The errorbars represent the standard error.

those in a world with clustered food at the same generation. The mean group behavior scores overthe last 20 generations are depicted in Figure 5.

The average group behavior score over all comparisons in the tournament of the last 20 genera-tions (380 to 400, N = 40) was calculated (see Section 3.4). An analysis of variance (ANOVA) wasdone with between subject factor the level of food clustering (high, low) and dependent variablethe group behavior score. A significant, but weak, effect was found for food clustering on groupbehavior (F(1,78) = 13.508, p < 0.005, η2 = 0.137). Social behavior was higher in the clusteredfood condition (m = 0.254) compared to the non-clustered food condition (m = 0.327).

4.2 Ability to see others’ success

The second experiment focused on the effect of the ability to perceive the success of others ongroup behavior and the use of this ability. We compared the group behavior scores of creatureswithout a success-sensor to the scores creatures with a success-sensor. Because the latter is testedin four different settings as explained in Section 3.4, we need to do four tests comparing havingno sensor to all food finding success values of other creatures we tested the creature with. Havingno sensor was compared to the sensor being tested in a world with unsuccessful creatures, andsubsequently with creatures that had eaten 33%, 66 % and 100 % of their maximally possibleintake.

For this experiment we evolved more generations, because the last condition (with the successsensor) has the more difficult task of coupling the success of others to their own behavior. Theresults of the test for the success sensor are depicted in figure 6.

As explained above we have taken the average following scores over generations [711,730] wereused in an analysis of variance with between subject factor the presence (and activation) of a

14

Page 15: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

4 RESULTS 4.3 Use of the success-sensor

Figure 6: The mean effect of the success sensor on group behavior at generation 711-730. Theerror bars represent the standard error.

success-sensor (not present; 0%, 33%, 66%, 100%) and dependent variable the group behaviorscore. Overall the presence of a success sensor had a significant, strong effect on group behavior(F(4,195) = 12.536, p < 0.005, η2 = 0.205).

An Bonferroni post-hoc test was done to compare the differences between the different ac-tivations of the success-sensor. Having no success-sensor (m = 0.297, SD = 0.109) compared tohaving a success-sensor, but in a world with 0% finding success for others (m = 0.390, SD = 0.082)had a significant effect, p < 0.005. No sensor compared to 33% (m = 0.420, SD = 0.085) had asignificant effect, p < 0.005. No sensor compared to 66% (m = 0.417, SD = 0.102) had a signifi-cant effect, p < 0.005, η2 = 0.246). No sensor compared to 100% (m = 0.426, SD = 0.097) had asignificant effect, p < 0.005. All α’s are Bonferroni corrected.

4.3 Use of the success-sensor

After establishing that the success-sensor has a significant effect on group behavior, we investigatethe way creatures use their success-sensor during their life. This was done, as also explained above,by testing creatures in worlds together with creatures of different food finding success: 0%, 33%,66%, 100% of the maximal possible intake. Figure 6 shows that for the first three types of successof others the group behavior score rises, and drops a little at the last.

To show the effect of the success sensor a repeated measures ANOVA was done. Because allcreatures in the top 4 of their gene pool were subjected to the test condition with all values for thesensor, these measures can be considered repeated scores of the same subject. Thus we have ten“subjects” per condition since there were ten comparisons. There was a strong, significant effect

15

Page 16: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

5 DISCUSSION

of sensor activation on social behavior (F(1,39) = 21.027, p < 0.005, η2 = 0.350). The differencebetween having a sensor in a world with creatures without success with a having a sensor2 in aworld with creatures that ate 33% of their maximum food consumption was significant, p < 0.005.The difference between having a sensor in a world with no successful creatures and creatures havingeaten 66% of the maximum was also significant, p < 0.005. Finally the difference between havinga sensor in a world with unsuccesful creatures and in a world with 100% successful creatures wasalso significant, p < 0.005. There was however no significant difference between 33% and 66%,and between 66% and 100%.

5 Discussion

5.1 The effect of clustering

Our first experiment indicated that there is an effect of food clustering on group behavior. Theeffect is a confirmation of our hypothesis. It could be caused by an increase in cooperation whenfood is harder to find, and rewards for finding food are higher. A possible cooperation strategycould consist of two or more creatures profiting from a combined smell radius. Two creaturestraversing the world in parallel could this way indirectly smell within their teammates’ smellradius, because when one of them finds food, the other will eventually smell it for the first onewill go to the food, bringing it within the smell radius of the other creature. There is howeveran overlap in the smell radii because both creatures have to keep an eye on each other in thisstrategy.

5.2 Effect of the success-sensor

Figure 6 shows that all group behavior scores of creatures with a success-sensor are clearly abovethe line of creatures without one. This is confirmed by the analysis of variance, so we can concludethat in our experiment more information about other creatures’ food finding success led to anincrease in group behavior.

Although the success-sensor has an effect as was predicted - creatures made a distinctionbetween good and bad food finders - , the means of the social behavior scores for bad foodfinders are above the mean of creatures without sensor. This means that having a success-sensor,even when only unsuccessful creatures are present, accounts for more social behavior than nothaving a success-sensor. Since there was no difference in range between the sensors sensing justother creatures’ distance and the success-sensor, it is very hard to explain this effect. A possibleexplanation is in the implementation of the success-sensor. It was implemented in a range of [0,3]which makes it for evolution harder to find a genotype that clearly distinguishes between bad andgood genotypes. This is because a neural network needs a more specific setting to establish areaction that needs to be negative for low input values and positive for high input values. Thus itcould be possible that in none of our simulations this distinction was made. Were the sensor beimplemented in a range of [-2,2] the mean group behavior scores for 0% and 33% might have beenbelow the mean for the simulations of creatures without success sensor.

2Mean social behavior scores for different sensor activations are listed in Section 4.2.

16

Page 17: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

5 DISCUSSION 5.3 Use of the success-sensor

5.3 Use of the success-sensor

As our hypothesis states, we expected increasing values of the success-sensor to have an increasingeffect on social behavior. Figure 6 indicates however, that though increasing values of the success-sensor have an increasing effect on social behavior, this effect is far from linear. This means thatcreatures do use the success-sensor, but that there is a ceiling effect on its effect on social behavior.The effect could be explained by assuming that creatures do not distinguish between the mostsuccessful other creatures, but only use the sensor to separate other creatures that are very badat food finding from the very good ones. Apparently at some point there is no extra informationin extra success.

5.4 Generalization to biology

Because hard to make valid statements about the origins of social behavior in nature with artificiallife simulations, these kinds of experiments can only help in determining factors that can be ofinterest for the evolution of social behavior. Although the simulation parameters are designed tobe as close to nature as they can, it is a very much abstracted representation that considers onlyone variable.

Deriving from the first experiment, an emerging social group could arise because of a differencein the ecosystem which causes food to be less distributed. This change in ecosystem could happenthrough the moving of the creatures or a changing climate. These results are in accordance withthe theories in theoretical biology stated in the introduction (Crook & Gartlan, 1966; Schradin,2005; Bonabeau et al., 1999).

A natural analogue to our second experiment is to be found in e.g. chimpanzees and humansas stated in the introduction (Menzel Jr, 1971; Todd et al., 2007). Of course chimpanzees andhumans have much better sensors than our success sensor but still it is safe to say that the abilityof seeing relevant information about the success of peers is a factor in further group behavior.We consider the effects observed in the second experiment to be further group behavior becausethe first experiment states that in the clustered condition, which was the control condition in thesecond experiment, group behavior was already higher than in the unclustered condition.

5.5 Statistics for evolutionary experiments

One of the problems we ran into was the use of statistics in genetic algorithms. Evolutionarysimulations are quite hard to do in large numbers, and to achieve sufficient power it is necessaryto have at least 20 simulations per condition. This is in most cases very time consuming becausein our case simulations had to run for 6 days. We have used the top 10 comparisons of the meanscores of the last 20 generations as subjects in our statistical test which is statistically speakingnot correct because creatures within each simulation are the product of the same evolutionarytract and thus not independent while statistical tests require subjects to be randomized.

5.6 Future research

As future research it would first be interesting to look at other factors that could have an effect onsocial behavior. For example the introduction of predators into an ecosystem could cause social

17

Page 18: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

5.6 Future research 5 DISCUSSION

behavior through grouping for protection. Another factor could be the introduction of a systemof sexes. This complicates the group dynamics a lot, but could be used to test the hypothesis ofWrangham (1980), which suggests females are a larger factor in group forming than males.

Analysis-wise future research could focus on better ways of measuring social behavior. Ourmeasure, although effective, is rather crude. We have considered using genotype analysis tomake discrete tests to measure activation of the nervous system and actuators upon activationof sensors for other creatures. Other analysis could focus on more sophisticated measurements ofsocial behavior like changes of path upon seeing another creature or the similarity of two creaturespaths.

Vallortigara and Rogers (2005) suggest cerebral asymmetry could be caused by social inter-action. A follow-up study could be done to establish whether in this case there is more cerebralasymmetry in the conditions which led to more social creatures relative to those with less so-cial creatures. Earlier research on cerebral asymmetry in an artificial environment was done byJanssen, Goosen, Spinkhuizen-Kuyper, and Haselager (2007).

18

Page 19: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

References References

References

Alexander, R. (1974). The Evolution of Social Behavior. Annual Reviews in Ecology and System-atics, 5(1), 325–383.

Bonabeau, E., Dagorn, L., & Freon, P. (1999). Scaling in animal group-size distributions (Vol. 96)(No. 8). National Acad Sciences.

Crook, J., & Gartlan, J. (1966). Evolution of primate societies. Nature, 210(5042), 1200–1203.Darwin, C. (1859). On the Origin of Species by Natural Selection.Eisenberg, J., Muckenhirn, N., & Rundran, R. (1972). The Relation between Ecology a Social

Structure in Primates. Science, 176(4037), 863–874.Floreano, D., & Nolfi, S. (1998). Coevolving Predator and Prey Robots: Do “Arms Races” Arise

in Artificial Evolution? Artificial Life, 4(4), 311–335.Fogel, D. (1993). Applying evolutionary programming to selected traveling salesman problems.

Cybernetics and Systems, 24(1), 27–36.Holland, J. (1975). Adaptation in natural and artificial systems. University of Michigan Press,

Ann Arbor.Janssen, J., Goosen, T., Spinkhuizen-Kuyper, I., & Haselager, W. (2007). Embodied modeling of

the organization of the brain. Dastani, M.M., & De Jong, E. (Eds.) Proceedings of the 19thBelgium-Netherlands Conference on Artificial Intelligence, 165–172.

Komosinski, M., & Ulatowski, S. (1999). Framsticks: Towards a Simulation of a Nature-LikeWorld, Creatures and Evolution. Advances in Artificial Life: 5th European Conference,Ecal’99, Lausanne, Switzerland, September 13-17, 1999 Proceedings.

Langton, C. (1995). Artificial Life: An Overview. Mit Press.Lohn, J., Hornby, G., & Linden, D. (2004). An Evolved Antenna for Deployment on NASA’s

Space Technology 5 Mission. Genetic Programming Theory and Practice II , 301–313.Menzel Jr, E. (1971). Communication about the environment in a group of young chimpanzees.

Folia Primatol (Basel), 15(3), 220–32.Morgan, M. (1988). The effect of hunger, shoal size and the presence of a predator on shoal

cohesiveness in bluntnose minnows, Pimephales notatus Rafinesque. Journal of Fish Biology,32(6), 963–971.

Rechenberg, I. (1973). Evolutionsstrategie: Optimierung technischer systeme nach Prinzipien derbiologischen evolution. Frommann-Holzboog, Stuttgart.

Scheel, D., & Packer, C. (1991). Group hunting behaviour of lions: A search for cooperation.Animal Behaviour , 41(4), 697–709.

Schradin, C. (2005). When to live alone and when to live in groups: ecological determinants ofsociality in the African striped mouse (Rhabdomys pumilio, Sparrman, 1784). Belg. J. Zool,135 , 77–82.

Sims, K. (1994). Evolving 3D morphology and behavior by competition. Artificial Life IV:Proceedings of the Fourth International Workshop on the Synthesis and Simulation of LivingSystems, 28–39.

Todd, P., Penke, L., Fasolo, B., & Lenton, A. (2007). Different cognitive processes underliehuman mate choices and mate preferences. Proceedings of the National Academy of Sciences,104(38), 15011.

19

Page 20: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

References References

Vallortigara, G., & Rogers, L. (2005). Survival with an asymmetrical brain: Advantages anddisadvantages of cerebral lateralization. Behavioral and Brain Sciences, 28(04), 575–589.

Van Schaik, C. (1983). Why are diurnal primates living in groups? Behaviour , 87 (1-2), 120–144.Willems, D., & Haselager, W. (2003). Cooperative behavior in simulated reactive robots. Proceed-

ings of the 15th Belgium-Netherlands conference on artificial intelligence (BNAIC), 369–376.Wrangham, R. (1980). An ecological model of female-bonded primate groups. Behaviour , 75(3-4),

262–300.

20

Page 21: Evolving group behavior - Radboud Universiteits thesis Tom Schu… · Evolving group behavior Bachelor’s Thesis Tom Schut (s0362638) August 29, 2008 Supervisors: Dr. W.F.G. Haselager

A FRAMSTICKS

A Framsticks

Framsticks (Komosinski & Ulatowski, 1999) is a tool to do artificial algorithm research with.It allows the user to define an artificial life genetic algorithm. The user can define almost allparameters of the simulation.

• The world, which simulates the real world, along with interaction between creatures.

• Creatures: morphology and nervous system, specific sensor, neuron and actuator behavior,and settings regulating lifespan.

• Evolutionary control: selection rules, the number of creatures that are in the gene pool, andfitness functions.

• Food: ingestion rate, food energy, number food particles.

The simulator then simulates the entire evolutionary process by simulating each generation ofcreatures and applying the steps of evolution to create a new generation.

21