Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
The Latest on Boids Research - October 2014
1. The Latest on Boid Research:
A Short Review in 5 Points
Olaf @ Ikegami Lab
October 2014
By tapping into social cues, individuals in
a group may gain access to higher-order
computational capacities that mirror the
group’s responses to its environment.
5. • Cancer systems are capable of developing multicellular collective patterns
that resemble evolved adaptive behavior known from other biological systems
including collective sensing of environmental conditions and collective
decision-making (Deisboek & Couzin 2009)
A Word On Unexpected Applications
5
oeck and I. D. Couzin Problems and paradigms
Figure 1. (A) Social caterpillars (image courtesy of Trond Larsen), cf. (B) Multicellular patterns that emerge in a confluent human glioma cell
culture in vitro. Note the resemblance of the two complex patterns, although the characteristic length-scale of the two systems is distinctively
different (i.e., a social caterpillar measures several millimeters in length, whereas the diameter of tumor cells is measured in micrometers). (C) Ant
trails that originate from the nest (bright spot on the left) to sugar drops (four) deposited on the right (from digital tracking of ants by I. D. C.).
(D) Invasive cell branches that originate from a (top left) glioma spheroid in vitro (3D extracellular matrix assay using MatrigelTM(8)
, used also as
basis for computational cancer modeling works(70,71)
). (E) Microscopic image of a confluent human glioma cell culture in vitro. Note the alignment
of multiple cancer cells (within the broken lines), as compared to the rest of the cell culture.
T. S. Deisboeck and I. D. Couzin Problems and paradigms
Figure 1. (A) Social caterpillars (image courtesy of Trond Larsen), cf. (B) Multicellular patterns that emerge in a confluent human glioma cell
culture in vitro. Note the resemblance of the two complex patterns, although the characteristic length-scale of the two systems is distinctively
different (i.e., a social caterpillar measures several millimeters in length, whereas the diameter of tumor cells is measured in micrometers). (C) Ant
trails that originate from the nest (bright spot on the left) to sugar drops (four) deposited on the right (from digital tracking of ants by I. D. C.).
(D) Invasive cell branches that originate from a (top left) glioma spheroid in vitro (3D extracellular matrix assay using MatrigelTM(8)
, used also as
basis for computational cancer modeling works(70,71)
). (E) Microscopic image of a confluent human glioma cell culture in vitro. Note the alignment
of multiple cancer cells (within the broken lines), as compared to the rest of the cell culture.
T. S. Deisboeck and I. D. Couzin Problems and paradigms
highly relevant to understanding the interactions of tumor
cell populations. In addition, we argue that similarities
among these systems go beyond mere analogy and
instead we can begin to make testable predictions about
the types, and consequences, of collective behavior within
tumors.
Chemical feedback processes and collective
migration in tumors
A crucial and ubiquitous form of collective communicatio
animal groups arises from the interplay of processes
result in amplification and decay of information. Consider
Figure 1. (A) Social caterpillars (image courtesy of Trond Larsen), cf. (B) Multicellular patterns that emerge in a confluent human glioma
culture in vitro. Note the resemblance of the two complex patterns, although the characteristic length-scale of the two systems is distinct
different (i.e., a social caterpillar measures several millimeters in length, whereas the diameter of tumor cells is measured in micrometers). (C
trails that originate from the nest (bright spot on the left) to sugar drops (four) deposited on the right (from digital tracking of ants by I. D.
(D) Invasive cell branches that originate from a (top left) glioma spheroid in vitro (3D extracellular matrix assay using MatrigelTM(8)
, used als
basis for computational cancer modeling works(70,71)
). (E) Microscopic image of a confluent human glioma cell culture in vitro. Note the alignm
of multiple cancer cells (within the broken lines), as compared to the rest of the cell culture.
T. S. Deisboeck and I. D. Couzin Problems and paradig
BioEssays 31:190–197, ß 2009 WILEY Periodicals, Inc. 1
9. Adding New Forces
• Mataric (1992) proposes a generalization with a weighted combination of 6
interaction primitives:
9
• collision avoidance
• following
• dispersion
• aggregation
• homing
• flocking
10. Adding New Forces
• Hartman & Benes̆ (2006) introduce a complementary alignment, representing
the chance to become a leader and try to escape
10
a) b)
c) d)
e) f)
Figure 7: a) Boids are simplified by spheres with the heading vector and their traces are
b)
d)
a) b)
c) d)
e) f)
Figure 7: a) Boids are simplified by spheres with the head
showed. The image shows the outside view and the image b
is the outside view and the image d) is the boid’s view from
the leadership. The image e) shows a small flock of boids w
the image f) shows a trace of a flock of 250 birds
26
a) b)
c) d)
e) f)
Figure 7: a) Boids are simplified by spheres with the head
showed. The image shows the outside view and the image b
is the outside view and the image d) is the boid’s view from
the leadership. The image e) shows a small flock of boids w
the image f) shows a trace of a flock of 250 birds
a) b)
c) d)
e) f)
Figure 7: a) Boids are simplified by spheres with the heading vector and their traces are
a) b)
c) d)
e) f)
Figure 7: a) Boids are simplified by spheres with the heading vector and their traces are
showed. The image shows the outside view and the image b) the boid’s view. The image c)
is the outside view and the image d) is the boid’s view from the simulation of the change of
the leadership. The image e) shows a small flock of boids with a change in leadership and
11. Change of Leadership
• Since Hartman & Benes, many attempt to study leadership. Many are either
engineering-oriented, or based on informed agents or assigned leadership
• Cucker & Huepe (2008) make a laplacian model with a consensus term that
balances the trade-off between informed preference and desire for social
interaction
• Su et al. (2009) use a position-only model to show that all agents can
asymptotically attain a desired velocity even if only one agent in the team has
access to the information of the virtual leader
• Yu et al. (2010) find that a second-order consensus can be achieved in a
laplacian model if and only if the network topology contains a directed
spanning tree
11
12. Evolving Flocking
• Olson et al. (2011)
12
ished when any prey agents near the target prey agent
are visible anywhere in the predator’s visual field.
This perceptual constraint is similar to previous mod-
els of predator confusion based on observations from
natural predator-prey systems [21,22,38], where the
predator’s attack e ciency (# successful attacks /
total # attacks) is reduced when attacking swarms
of higher density. Pcapture is determined by the equa-
tion:
Pcapture =
1
ANV
(3)
where ANV is the number of prey agents that are vis-
ible to the predator, i.e., anywhere in the predator
agent’s visual field, and within 30 virtual meters of
the target prey. By only counting prey near the tar-
get prey, this mechanism localizes the predator con-
fusion e↵ect to the predator’s retina, and enables us
to experimentally control the strength of the preda-
tor confusion e↵ect. Although our predator confusion
model is based on the predator’s retina, it is func-
tionally equivalent to previous models that are based
on the total swarm size (Figure 2, dashed line), e.g.,
in [21,22,38,43]. As shown in Figure 2 (solid line with
triangles), the predator has a 50% chance of captur-
ing a prey with one visible prey near the target prey
(ANV = 2), a 33% chance of capturing a prey with
two visible prey near the target prey (ANV = 3), etc.
As a consequence, prey are in principle able to ex-
ploit the combined e↵ects of predator confusion and
handling time by swarming.
3 Results
3.1 E↵ects of Predator Confusion
Qualitatively, we observed significant di↵erences in
prey behavior over the course of evolution between
swarms experiencing predators with and without
predator confusion. Figure 3A illustrates that prey
hunted by a predator without the predator confusion
mechanism dispersed as much as possible to escape
the predator. No replicates containing a predator
without predator confusion resulted in prey behavior
that resembled a cohesive swarm. Conversely, when
evolution occurred with predator confusion, prey ex-
hibited cohesive swarm behavior in the majority of
the replicates (70% of our replicates). Figure 3B de-
picts one such swarm in which prey follow the con-
specific directly in front of them, resulting in an elon-
gated swarm. Similarly, Figure 3C shows another
swarm where the prey circle around their nearest con-
specific, resulting in multiple small, cohesive swarms
with the prey constantly trying to circle around each
C)
B)
A)
Figure 3: Screen captures of (A) dispersed prey in a
swarm hunted by a predator without predator confu-
sion, (B) prey forming a single elongated swarm un-
der attack by a predator with predator confusion, and
(C) prey forming multiple cohesive swarms to defend
themselves from a predator with predator confusion
after 1,200 generations of evolution. Black dots are
prey, the triangle is the predator, the lines project-
ing from the predator represent the predator’s frontal
180 visual field, and the star denotes where a prey
was just captured.
5
• Ward et al. (2001)
C. R. Ward et al. Evolving Collective Behavior in an Artificial Ecology
Figure 10. Behavior of prey E-BOIDS in different ecologies. Left graph shows the mean distance between prey when
predators are present in the environment. Right graph shows the mean distance between prey in the absence of
predators. The curve shows the best-fitting power function.
Plate 2. Evolution of predatory behavior in the system. Blue indicates prey, red predators, and green food. Of
particular note is that prey organisms are “swimming” away from predators and predators are tracking prey.
In contrast to Experiment 2, Figure 6, the creature is highly oriented toward ev-
erything with high weights on food in vision (0.55) and very little on predator. The
lateral sense dominates over vision, in terms of attention (0.85 vs. 0.15) and depth
(79.4 vs. 138). This indicates that the prey are not looking out for predators as they
were before; now, they consume as much food as possible to increase their energy to
compete for the next generation. As with the experiment outlined in Section 5.2 we
used a matched t-test to identify reliable differences in the weights of the networks of
prey with different ecologies. We found statistically reliable differences (p < 0.05) for
all weights except for the attention weight prey (vision) and lateral weights (1 → 0,
206 Artificial Life Volume 7, Number 2
Evolving Collective Behavior in an Artificial Ecology
of prey E-BOIDS in different ecologies. Left graph shows the mean distance between prey when
nt in the environment. Right graph shows the mean distance between prey in the absence of
ve shows the best-fitting power function.
of predatory behavior in the system. Blue indicates prey, red predators, and green food. Of
at prey organisms are “swimming” away from predators and predators are tracking prey.
to Experiment 2, Figure 6, the creature is highly oriented toward ev-
high weights on food in vision (0.55) and very little on predator. The
ominates over vision, in terms of attention (0.85 vs. 0.15) and depth
This indicates that the prey are not looking out for predators as they
ow, they consume as much food as possible to increase their energy to
e next generation. As with the experiment outlined in Section 5.2 we
d t-test to identify reliable differences in the weights of the networks of
• Also… (2014)
computation power limits the population size. The fitness
allowed to the agents is therefore adjusted in order to main-
tain an acceptable number of agents (between 100 and 1000)
alive throughout the simulation. In addition, agents above a
certain age (5000 time steps) are removed from the simula-
tion, to keep the evolution from standing still.
Results
Emergence of swarming
We observe agents coordinate together in clustered groups.
As shown in Figure 3 (top) the simulation goes through three
distinct phases. In the first one, agents wander in an appar-
ently random way across the space. Then, during the second
phase, agents progressively cluster into a rapidly changing
shape, reminiscent of animal flocks3
. In the third phase, to-
wards the end of the simulation, the flocks get closer and
closer to the goal4
, forming a compact ball around it.
Figure 4: Visualization of the swarming behavior occur
in the second phase of the simulation.
react faster to the environment, as each turn making one
sor face a particular direction allows a reaction to the sig
2D, ANN, Vision,
Food & Predator-Prey
3D, RNN, Signal,
Food
+ “Confusion
Effect”
14. Who to Look at?
• Czirok & Viczek (2001) for a nice introduction
• Couzin et al. (2002) for nice measures
• Kao et al. (2013) for nice additional insights
• Then, your favorite information theory handbook. (But I won’t go over that.)
14
15. Radiuses of Repulsion, Orientation, Attraction
15
within this zone:
An individual will attemp
neighbours within the zone
doðt þ tÞ ¼
Xno
j¼
and towards the positions
the zone of attraction
daðt þ tÞ ¼
Xna
ja
The attraction represents th
isms to join groups and to
periphery, whereas the orien
tive movement by minimi
collisions between individua
only found in the zoo (n ¼
doðt þ tÞ; likewise if all neig
(n ¼ na), then diðt þ tÞ ¼ da
are found in both zone
1
z
x
y
zoa
zor
zoo
α°
(360 - α)°
Fig. 1. Representation of an individual in the model
centred at the origin: zor ¼ zone of repulsion, zoo ¼ zone of
orientation, zoa ¼ zone of attraction. The possible ‘‘blind
volume’’ behind an individual is also shown. a ¼ field of
perception.
COLLECTIVE BEHAVIOUR OF ANIMAL GROUPS
Table 1
Summary of model parameters. The use of ‘‘units’’ relates to the non-
dimensionality of certain parameters in the model with the characteristic length
scale being associated with the particular organism in question, e.g. rr may be
very small for an insect, and the rest of the model parameters can be scaled
appropriately
Parameter Unit Symbol Values explored
Number of individuals None N 10–100
Zone of repulsion Units rr 1
Zone of orientation Units Droðro À rrÞ 0–15
Zone of attraction Units Draðra À roÞ 0–15
Field of perception Degrees a 200–360
Turning rate Degrees per second y 10–100
Speed Units per second s 1–5
I. D. COUZIN ET AL.4
16. 2 Useful Measures
• Group polarisation: degree of alignment among individuals within the group
16
tion increases as the degree of alignment among
individuals within the group increases, whereas
the group angular momentum is the sum of the
angular momenta of the individuals about
the centre of the group, cgroup [also known as
the group centroid, eqn (6)]. Angular momentum
therefore measures the degree of rotation of the
group about the group centre. Thus,
pgroupðtÞ ¼
1
N
XN
i¼1
viðtÞ
36. ; ð5Þ
where
ric ¼ ci À cgroup
and
cgroupðtÞ ¼
1
N
XN
i¼1
ciðtÞ: ð6Þ
For each combination of parameters, individuals
start with random orientations and at random
positions within a sphere in which each can
The collective b
analysed after it re
state, where the va
measures have stab
time steps, equivalen
the range of parame
To understand
differences on spat
we investigate the
speed s, turning ra
among individuals
variation, the par
is modified by a G
independently draw
is then fixed at tha
the experiment. Th
distribution determ
individuals differ w
within the group, an
off point beyond
fragment. The corr
meters and the dista
the group centre c
front of the grou
Spearman rank co
The front of the g
37. 2 Useful Measures
• Group polarisation: degree of alignment among individuals within the group
!
• Group angular momentum: sum of the angular momenta (centroids) of the
individuals about the centre of the group
17
individuals; group polarization, pgroup [0ppgroup
p1; eqn (4)] and the group angular momentum,
mgroup [0pmgroup p1; eqn (5)]. Group polariza-
tion increases as the degree of alignment among
individuals within the group increases, whereas
the group angular momentum is the sum of the
angular momenta of the individuals about
the centre of the group, cgroup [also known as
the group centroid, eqn (6)]. Angular momentum
therefore measures the degree of rotation of the
group about the group centre. Thus,
pgroupðtÞ ¼
1
N
XN
i¼1
viðtÞ
57. ; ð5Þ
where
ric ¼ ci À cgroup
and
cgroupðtÞ ¼
1
N
XN
i¼1
ciðtÞ: ð6Þ
1992), where the criterion of interest is
presence of other individuals within the fiel
perception.
The collective behaviour of the mode
analysed after it reaches a dynamically st
state, where the values of the different sys
measures have stabilized (always within 5
time steps, equivalent to 8.3 min of real time
the range of parameters analysed here).
To understand the influence of individ
differences on spatial position within a gro
we investigate the consequence of variatio
speed s, turning rate y; error s; rr, ro an
among individuals within a group. To simu
variation, the parameter under investiga
is modified by a Gaussian distributed dev
independently drawn for each individual,
is then fixed at that value for the duration
the experiment. The standard deviation of
distribution determines the degree to w
individuals differ with respect to that param
within the group, and is investigated up to a
off point beyond which the group tends
fragment. The correlation between these p
meters and the distance between individuals
the group centre cgroup(t), and distance to
tion increases as the degree of alignment among
individuals within the group increases, whereas
the group angular momentum is the sum of the
angular momenta of the individuals about
the centre of the group, cgroup [also known as
the group centroid, eqn (6)]. Angular momentum
therefore measures the degree of rotation of the
group about the group centre. Thus,
pgroupðtÞ ¼
1
N
XN
i¼1
viðtÞ
77. ; ð5Þ
where
ric ¼ ci À cgroup
and
cgroupðtÞ ¼
1
N
XN
i¼1
ciðtÞ: ð6Þ
For each combination of parameters, individuals
start with random orientations and at random
positions within a sphere in which each can
The collective b
analysed after it re
state, where the va
measures have stab
time steps, equivalen
the range of parame
To understand
differences on spat
we investigate the
speed s, turning ra
among individuals
variation, the par
is modified by a G
independently draw
is then fixed at tha
the experiment. Th
distribution determ
individuals differ w
within the group, an
off point beyond
fragment. The corr
meters and the dista
the group centre c
front of the grou
Spearman rank co
The front of the g
the group angular momentum is the sum of the
angular momenta of the individuals about
the centre of the group, cgroup [also known as
the group centroid, eqn (6)]. Angular momentum
therefore measures the degree of rotation of the
group about the group centre. Thus,
pgroupðtÞ ¼
1
N
XN
i¼1
viðtÞ
97. ; ð5Þ
where
ric ¼ ci À cgroup
and
cgroupðtÞ ¼
1
N
XN
i¼1
ciðtÞ: ð6Þ
For each combination of parameters, individuals
start with random orientations and at random
positions within a sphere in which each can
state, where t
measures hav
time steps, equ
the range of p
To underst
differences on
we investigate
speed s, turn
among individ
variation, the
is modified b
independently
is then fixed
the experimen
distribution d
individuals di
within the gro
off point bey
fragment. Th
meters and th
the group cen
front of the
Spearman ra
The front of
the group centroid, eqn (6)]. Angular moment
therefore measures the degree of rotation of
group about the group centre. Thus,
pgroupðtÞ ¼
1
N
XN
i¼1
viðtÞ
117. ;
where
ric ¼ ci À cgroup
and
cgroupðtÞ ¼
1
N
XN
i¼1
ciðtÞ:
For each combination of parameters, individu
start with random orientations and at rand
positions within a sphere in which each
118. 4 Classes of Collective Dynamical Behavior
18
1
d
(A)
(C) (D)
(B)
I. D. COUZIN ET AL.6
Swarm Torus
Dynamic Parallel Highly Parallel
120. 4 Classes of Collective Dynamical Behavior
20
(A)
(C) (D)
(B)
Swarm Torus
Dynamic Parallel Highly Parallel
An individual will attem
neighbours within the zon
doðt þ tÞ ¼
and towards the position
the zone of attraction
daðt þ tÞ ¼
X
The attraction represents
isms to join groups and
periphery, whereas the or
tive movement by minim
collisions between individ
only found in the zoo (n
doðt þ tÞ; likewise if all ne
z
x
y
zoa
zor
zoo
α°
(360 - α)°
Fig. 1. Representation of an individual in the model
centred at the origin: zor ¼ zone of repulsion, zoo ¼ zone of
orientation, zoa ¼ zone of attraction. The possible ‘‘blind
volume’’ behind an individual is also shown. a ¼ field of
perception.
COLLECTIVE BEHAVIOUR OF ANIMAL GROUPS
121. 4 Classes of Collective Dynamical Behavior
21
1
d
(A)
(C) (D)
(B)
I. D. COUZIN ET AL.6
Swarm Torus
Dynamic Parallel Highly Parallel
low pgroup, low mgroup
high pgroup, low mgroup
low pgroup, high mgroup
very high pgroup, low mgroup
pgroup = group polarization ; mgroup = group angular momentum
122. Polarization & Momentum
22
0
2
4
6
8
10
12
14
∆ra
0
2
4
6
8
10
12
14
∆ro
0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
0.6
0.8
1
pgroup
0
2
4
6
8
10
12
14
∆ra
0
2
4
6
8
10
12
14
∆ro
0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
0.6
0.8
1
mgroup
a a
b
bc
c
d
d
e z
(C) (D)
(E) (F)
The collective behaviours exhibited by the model: (A) swarm, (B) torus, (C) dynamic parallel group, (D)
oup. Also shown are the group polarization pgroup (E) and angular momentum mgroup (F) as a function of c
of the zone of orientation Dro and zone of attraction Dra: The areas denoted as (a–d), correspond to the
space in which the collective behaviours (A–D), respectively, are found. Area (e) corresponds to the reg
0
2
4
6
8
10
12
14
∆ra
0
2
4
6
8
10
12
14
∆ro
0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
0.6
0.8
1
pgroup
0
2
4
6
8
10
12
14
∆ra
0
2
4
6
8
10
12
14
∆ro
0
0
0.2
0.4
0.6
0.8
1
mgroup
a a
b
bc
c
d
d
e z
(C) (D)
(E) (F)
Fig. 3. The collective behaviours exhibited by the model: (A) swarm, (B) torus, (C) dynamic paralle
parallel group. Also shown are the group polarization pgroup (E) and angular momentum mgroup (F) as a f
in the size of the zone of orientation Dro and zone of attraction Dra: The areas denoted as (a–d), corresp
parameter space in which the collective behaviours (A–D), respectively, are found. Area (e) correspon
parameter space, where groups have a greater than 50% chance of fragmenting. N ¼ 100, rr ¼ 1, a ¼
s ¼ 0.05. Data shown in (E) and (F) are the mean of 30 replicates per parameter combination.
e:
a: swarm b: torus c: dynamic parallel d: highly parallel
123. Hysteresis and Collective Memory
23
2301 group fragmentation is
s the entire parameter space, and
further it becomes less likely that
main cohesive.
rate of individuals essentially
rameter space; increasing the rate
mpresses’’ parameter space allow-
ve patterns to form with relatively
of Dro and Dra; whereas decreas-
urning increases the area in which
nt and increases the Dro and Dra at
ups enter the behavioural states
ds’’ the parameter space). Speed
influence to turning, since it
urning arc of individuals (higher
s the size of the turning arc, as
ng turning rate). If the noise
ose to zero, the swarm and torus
meter space remain largely un-
the area in which groups form
el groups is reduced, with highly
s forming at relatively low Dro
oise is increased, the dynamic
rst expands in the Dro dimension
idual error becomes too high for
torus group types to form, and
haviour persists over much of the
e. As noise increases, there is also
ability that groups will fragment,
of Dro and Dra at which stable
nds to increase.
AND BEHAVIOURAL TRANSITIONS
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
pgroup
ro
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
mgroup
ro
increasing decreasing
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
pgroup
r
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
mgroup
ro
(A)
(B)
Fig. 4. The change in group polarization pgroup (A) and
angular momentum mgroup (B) as individuals within a group
increase (bold line) or decrease (dotted line) the size of the
zone of orientation ro. Two thousand time steps were run
under each value of ro before it was incremented or
decremented. Fifteen replicates were performed, and the
average value plotted with error bars, indicating the
standard error. The group patterns that form depend on
the previous history of the group (hysteresis). Parameters as
for Fig. 3, ra ¼ 14.
as it decreases further it becomes less likely that
groups will remain cohesive.
The turning rate of individuals essentially
rescales the parameter space; increasing the rate
of turning ‘‘compresses’’ parameter space allow-
ing the collective patterns to form with relatively
smaller values of Dro and Dra; whereas decreas-
ing the rate of turning increases the area in which
groups fragment and increases the Dro and Dra at
which the groups enter the behavioural states
(i.e. it ‘‘expands’’ the parameter space). Speed
has a similar influence to turning, since it
modifies the turning arc of individuals (higher
speed increases the size of the turning arc, as
does decreasing turning rate). If the noise
parameter is close to zero, the swarm and torus
area of parameter space remain largely un-
changed, but the area in which groups form
dynamic parallel groups is reduced, with highly
parallel groups forming at relatively low Dro
values. As noise is increased, the dynamic
parallel area first expands in the Dro dimension
and then individual error becomes too high for
polarized, or torus group types to form, and
swarm-like behaviour persists over much of the
parameter space. As noise increases, there is also
a higher probability that groups will fragment,
so the values of Dro and Dra at which stable
groups form tends to increase.
0
0.1
0.2
0.3
0.4
0.5
0.6
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
pgrou
ro
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
mgroup
ro
increasing decreasing
0
0.1
0.2
0.3
0.4
0.5
0.6
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
pgrou
r
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
mgroup
ro
(A)
(B)
Fig. 4. The change in group polarization pgroup (A) and
angular momentum mgroup (B) as individuals within a group
increase (bold line) or decrease (dotted line) the size of the
zone of orientation ro. Two thousand time steps were run
under each value of ro before it was incremented or
decremented. Fifteen replicates were performed, and the
average value plotted with error bars, indicating the
standard error. The group patterns that form depend on
the previous history of the group (hysteresis). Parameters as
for Fig. 3, ra ¼ 14.
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
pgroup
ro
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
mgroup
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.9
1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
pgroup
r
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
mgroup
(A)
UR OF ANIMAL GROUPS 7
125. How to Capture Real Flocking
• Recent studies of starling flocks by Ballerini et al. (2008)
have shown that each bird modifies its position, relative to
the 6 or 7 individuals directly surrounding it, no matter how
close or how far away those animals are.
• The 3D reconstruction shows that the interaction does not
depend on the metric distance, as most current models and
theories assume, but rather on the topological distance.
• A topological interaction is indispensable to maintain a
flock's cohesion against the large density changes caused
by external perturbations, typically predation. Topological
interaction grants significantly higher cohesion of the
aggregation compared with a standard metric one (shown
by Ballerini’s simulations).
25
128. GPU: Optimizations
28
texture, and shared memory. The global memory is not cached, and is therefore slow. Texture memory
implements cache logic in hardware and is persistent across thread blocks. Finally, shared memory is a very slow
latency (1 cycle) memory divided into 16k chunks. However, it is not persistent across blocks and must be
managed by the application.
We implemented two versions of the algorithm: The naive implementation uses the global memory to store
several contiguous arrays representing the boid's information. Each array is allocated twice, so that the current
step can use information from the previous step.
In the optimized implementation, there is only one set of arrays in global memory. Each array, however, has a
corresponding copy in texture memory that is used for kernel reads. The data in the texture memory is kept
updated by using a CUDA operation to copy it from global to texture memory. The data is read from the textures
using the same mapping shown in Figure 3.
4.2 Data Structure
The cost of neighbor search can be accelerated by using spatial indexing structures. We used a uniform grid
because it has a constant cost to build and is easy to evaluate inside the GPU. Other recursive structures,
although more efficient, require costly maintenance and are more complex to construct. The structure used is
shown in the Figure 4: there is a regular division in the space in the three axes that indexes lists of boids.
Fig. 4. Mapping of the 3D world to grid space and linked list indexing.
In the GPGPU programming model, we encoded the grid structure as a 3D texture. Each position contains a
virtual index to one boid. This index can be used to retrieve information about position, orientation, or force in
another texture. To be able to store more than one boid per cell, we used a linked list. This was implemented
using the fourth coordinate (w) as an index to the next boid in the same cell. A value of -1 means the list has
reached the end. Figure 4 shows the mapping from the world space to the grid space, the mapping of the grid to a
We stop the search when the number of processed neighbors reaches the minimum visibility density or when the
maximum vision range is exceeded. In Figure 9, the minimum visibility density of four neighbors is reached
before the maximum vision range, and there are many neighbors discarded from processing. Since the number of
boids is only an estimative of the real occlusion, we may at times not consider boids that would otherwise be
included in the behavior computation; this situation is depicted in Figure 10. This may change the behavior of
the flock, especially if the number of boids being simulated is small. Another important issue regarding the
simulation is grid density (elements per grid cell). When a fixed number is used, if the density is too low the
algorithm will discard a lot of empty cells, and if the density is too high the algorithm will iterate over a lot of
elements, even when most of them are not visible.
Fig. 9: Using visibility to cull boids.
Fig. 10. A problem when the neighbors do not occlude another visible neighbor.
We tried to create a grid with a more uniform distribution by changing the size of the grid in accordance with the
number of boids being simulated. The size of the grid is given by the equation below, which considers the total
number of boids and the desired density.
• Mapping
• Visual culling
• Self-occlusion
129. 80k boids in real time with CUDA using cuSwarm
29
132. • Cui et al. 2009
GPU: Performances
32
Figure 6. Document Flocking runtime, CPU
vs. GPU
faster than the CPU version. Initia
number of documents in our test s
creased. For 1000 documents, we
nearly sixty times over the CPU. W
lower performance that occurs wit
ments is caused by not all processin
being utilized. From 1200 to 3400 d
improvement degrades. As is clea
documents, performance degrades
we have done no direct testing, we
to an increase in global memory read
population size grows.
4 Future directions
In future work, larger data sets
Clustering hundreds of thousands o
uments on a workstation quickly i
research problem but the GPU may
ing the document flocking algorith
could also substantially improve th
that can be handled during a simula
millions of documents to be clust
133. GPU: Performances
33
6 8 10 12 14 16 18 20 22 24 26
0
5
10
15
20
Shader
CUDA (texture)
CUDA
grid dimension³
time(ms)
Fig. 11. Grid construction times: shader construction time is greater since it was executed on the CPU.
In Figures 12, 13, and 14 we can see the total simulation times for the three implementations with and without
visibility culling. All of them show a significant gain when using visibility culling. The biggest improvement can
be seen in the shader implementation.
0 10000 20000 30000 40000 50000 60000 70000
0
100
200
300
400
500
600
700
800
900
1000
Simulation Time - Shader
Without Visibility
With Visibility
nº boids
time(ms)
Fig. 12. Simulation time for the GPGPU implementation.
0 10000 20000 30000 40000 50000 60000 70000
0
200
400
600
800
1000
1200
1400
Simulation Time - CUDA
Without Visibility
With Visibility
nº boids
time(ms)
Fig.13. Simulation time for the CUDA with global memory implementation.
200
400
600
800
1000
1200
Simulation Time - CUDA (texture)
Without Visibility
With Visibility
time(ms)
We tried to create a grid with a more uniform distribution by changing the size of the grid in accordan
number of boids being simulated. The size of the grid is given by the equation below, which conside
number of boids and the desired density.
6 RESULTS AND DISCUSSION
We performed a series of experiments in order to determine the effectiveness of the occlusion algo
tests were executed on a PC with the following configuration:
Processor: Athlon64x2 4200+
Memory: 2Gb DDR1 - 400 Mhz
Operational System: Windows Vista 64
Graphics Processor: GeForce8800GT - 512Mb DDR3 - PCI-e 16x
Graphics Driver Version: 181.22
Cg API: 2.0
We tested three implementations: the shader, naive CUDA, and an optimized CUDA with cache o
through textures.
• Da Silva et al. 2009
135. Future Research Questions
• Which aspects of collective behavior are cooperative vs. selfish?
• How do individuals adapt quickly to environmental changes while remaining
robust and organized even under noisy conditions? Are there two levels of
learning/adaptation?
• How well do abstract mathematical models capture the dynamics of real
biological systems?
35
136. My Personal Favorite
• If collective behavior compensates for an individual cognitive limitations, does
enhancing collective cognition relax selection pressure on individuals’
general cognitive ability?
• It has been suggested that similar types of patterns shown by insects, birds
and fish result from commonality of function. To which extent may it not be
the case, and how can those patterns be driven by totally different
mechanisms?
• How common is multistability of collective state in animal groups? Does it
encode information in an analogous way to coexistence of stable modes of
collective behavior in neuronal networks?
36