Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
The Latest on Boid Research:
A Short Review in 5 Points
Olaf @ Ikegami Lab
October 2014
By tapping into social cues, indiv...
Synchrony, Coordination, Collective Behavior
2
Models, Algorithms [1/5]
3
Algorithms Modeling Collective Behavior
4
Vicsek/SPP ModelBoids
Bat AlgorithmAnt Colony Crowd Management
• Cancer systems are capable of developing multicellular collective patterns
that resemble evolved adaptive behavior known...
Boids: Some Old, Some New [2/5]
6
Original Boids (Reynolds 1986)
7
O
R
R
EC
TED
PR
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
3...
Original Boids (Reynolds 1986)
8
Adding New Forces
• Mataric (1992) proposes a generalization with a weighted combination of 6
interaction primitives:
9
• ...
Adding New Forces
• Hartman & Benes̆ (2006) introduce a complementary alignment, representing
the chance to become a leade...
Change of Leadership
• Since Hartman & Benes, many attempt to study leadership. Many are either
engineering-oriented, or b...
Evolving Flocking
• Olson et al. (2011)
12
ished when any prey agents near the target prey agent
are visible anywhere in t...
Boids Analysis: Basic Toolbox [3/5]
13
Who to Look at?
• Czirok & Viczek (2001) for a nice introduction

• Couzin et al. (2002) for nice measures

• Kao et al. (...
Radiuses of Repulsion, Orientation, Attraction
15
within this zone:
An individual will attemp
neighbours within the zone
d...
2 Useful Measures
• Group polarisation: degree of alignment among individuals within the group

16
tion increases as the d...
; ð4Þ
mgroupðtÞ ¼
1
N
XN
i¼1
ricðtÞ Â viðtÞ
; ð5Þ
where
ric ¼ ci À cgroup
and
cgroupðtÞ ¼
1
N
XN
i¼1
ciðtÞ: ð6Þ
For each combination of parameters, individuals
start ...
2 Useful Measures
• Group polarisation: degree of alignment among individuals within the group

!
• Group angular momentum...
; ð4Þ
mgroupðtÞ ¼
1
N
XN
i¼1
ricðtÞ Â viðtÞ
; ð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 ...
; ð4Þ
mgroupðtÞ ¼
1
N
XN
i¼1
ricðtÞ Â viðtÞ
; ð5Þ
where
ric ¼ ci À cgroup
and
cgroupðtÞ ¼
1
N
XN
i¼1
ciðtÞ: ð6Þ
For each combination of parameters, individuals
start ...
; ð4Þ
mgroupðtÞ ¼
1
N
XN
i¼1
ricðtÞ Â viðtÞ
; ð5Þ
where
ric ¼ ci À cgroup
and
cgroupðtÞ ¼
1
N
XN
i¼1
ciðtÞ: ð6Þ
For each combination of parameters, individuals
start ...
;
mgroupðtÞ ¼
1
N
XN
i¼1
ricðtÞ Â viðtÞ
;
where
ric ¼ ci À cgroup
and
cgroupðtÞ ¼
1
N
XN
i¼1
ciðtÞ:
For each combination of parameters, individu
start with random...
4 Classes of Collective Dynamical Behavior
18
1
d
(A)
(C) (D)
(B)
I. D. COUZIN ET AL.6
Swarm Torus
Dynamic Parallel Highly...
4 Classes of Collective Dynamical Behavior
19
(A)
(C) (D)
(B)
Swarm Torus
Dynamic Parallel Highly Parallel
stability from ...
4 Classes of Collective Dynamical Behavior
20
(A)
(C) (D)
(B)
Swarm Torus
Dynamic Parallel Highly Parallel
An individual w...
4 Classes of Collective Dynamical Behavior
21
1
d
(A)
(C) (D)
(B)
I. D. COUZIN ET AL.6
Swarm Torus
Dynamic Parallel Highly...
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
...
Hysteresis and Collective Memory
23
2301 group fragmentation is
s the entire parameter space, and
further it becomes less ...
Back To Nature [4/5]
24
How to Capture Real Flocking
• Recent studies of starling flocks by Ballerini et al. (2008)
have shown that each bird modifi...
Big Data, Big Processing [5/5]
26
Shall We Use A GPU
27
Upcoming SlideShare
Loading in …5
×

The Latest on Boids Research - October 2014

732 views

Published on

Published in: Science
  • Be the first to comment

The Latest on Boids Research - October 2014

  1. 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.
  2. 2. Synchrony, Coordination, Collective Behavior 2
  3. 3. Models, Algorithms [1/5] 3
  4. 4. Algorithms Modeling Collective Behavior 4 Vicsek/SPP ModelBoids Bat AlgorithmAnt Colony Crowd Management
  5. 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
  6. 6. Boids: Some Old, Some New [2/5] 6
  7. 7. Original Boids (Reynolds 1986) 7 O R R EC TED PR 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 Figure 3. Example of extreme flocking (left), high separation of boids (middle), an There is a special case when no boid is around the bi and m = 0. In this case the Equation (2) is not defined; no cohesion is applied; and, its result is the zero vector ⃗ki = ⃗o. Alignment The last steering force, alignment, or velocity matching, is important for the boids to follow an impetus. Boids tend to align with the velocity of their flockmates. This steer is denoted by ⃗mi and is calculated as the average velocity of the visible flockmates ⃗mi = ∀bj∈Vi ⃗vj m . (4) The velocity speed is the size of the vector. Therefore, the boids will automatically slow down or speed up de- pending on their flockmates. If a boid accelerates too much it can jump out of the visibility sphere of the flock- mates and eventually escape. If there is no boid directly visible, the cardinality of Vi is equal to zero and ⃗mi = ⃗o. Combining the Steers where S, K, and M are co of each force. These coeffi are global to the flock. Figure 3 shows example parameters. Swarm behavior can be matching (alignment) to z The values of the param within the range ⟨0, 1⟩. Th behavior is its initializatio be ‘reasonable’ as well as Ideally each boid should b In this way each boid will and the flock will not bre tial speed is too high, the fl parts. We have found tha zero and letting the simul the system to find a stable Lead The new contribution to change of leadership. As out an external force such U N C O 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 is equal to zero and ⃗mi = ⃗o. Combining the Steers All the steers are combined into one resulting influence. Let us recall that the vectors are separation ⃗si, cohesion ⃗ki, and alignment ⃗mi. The new position p′ i of the boid in the time t + t is calculated from its velocity ⃗vi and the previous position as p′ i = pi + t ⃗vi. Toreflectthesteeringforcesthevelocityisfirstupdated correspondingly ⃗v′ i = ⃗vi + S.⃗si + K.⃗ki + M. ⃗mi, The new con change of lea out an extern a direction o in the three-d form obvious This does n Birds ‘play a from the floc follows the ru flock. The chang bility sphere mates are con take the lead to fly. Boids .......................................................... Copyright © 2006 John Wiley & Sons, Ltd. 4 U N C O R R EC T 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 ⃗mi = ∀bj∈Vi ⃗vj m . (4) The velocity speed is the size of the vector. Therefore, the boids will automatically slow down or speed up de- pending on their flockmates. If a boid accelerates too much it can jump out of the visibility sphere of the flock- mates and eventually escape. If there is no boid directly visible, the cardinality of Vi is equal to zero and ⃗mi = ⃗o. Combining the Steers All the steers are combined into one resulting influence. Let us recall that the vectors are separation ⃗si, cohesion ⃗ki, and alignment ⃗mi. The new position p′ i of the boid in the time t + t is calculated from its velocity ⃗vi and the previous position as p′ i = pi + t ⃗vi. Toreflectthesteeringforcesthevelocityisfirstupdated In this way each and the flock w tial speed is too parts. We have f zero and letting the system to fin The new contrib change of leader out an external a direction of th in the three-dime form obvious vis This does not c Birds ‘play a gam from the flock an follows the runa flock. The change in bility sphere of e U N C O R R EC Separation Every member of a crowd tends to avoid collision with its neighbors. This tendency is called separation or collision avoidance. It steers a boid to avoid overcrowding the local flockmates. If only this steering force is applied the flock will dissipate. There are many ways how this force can be imple- mented. A simple but efficient solution is depicted in Figure 1Q2 . Vectors defined by the position of the boid bi and each visible boid bj are summed and the separation steer, denoted by ⃗si, is calculated as the negative sum of these vectors: ⃗si = − ∀bj∈Vi pi − pj . (1) Cohesion Cohesion, or flock centering, is the steering force which moves a boid toward the center of the visible flock. It acts as the complement to the separation (see in Figure 2). If ∀bj∈Vi The tendency of the boid bi to navigate tow center of density of the visible flock Vi is calcul the cohesion displacement vector ⃗ki: ⃗ki = ci − pi Figure 2. Cohesion ⃗ki is calculated as the vector poi the center ci (denoted by the black square) of the flock o boids. ...................................................................................... Copyright © 2006 John Wiley & Sons, Ltd. 3 Comp. Anim. Virtual Worlds 2006; O R R EC TED PR O O F 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 i i paration, cohesion, and alignment). The forces bed in detail in the following text. ortant aspect in the algorithm is the boid’s vi- s have limited vision that is defined by a vari- orresponds approximately to the five times the e. Every boid has associated a visibility sphere thing that is inside is visible by the boid. This an be set by the user and it is a global parameter ual for every boid in the flock and it is denoted us denote the set of boids inside the sphere of of the i−th boid by Vi. The entire visible set is ribed as: ∈ B; ∀bj : |bi − bj| < e, j = 0, 1, . . . , m − 1}, s the number of the boids visible by the ith boid. ction the three steers are described. Separation mber of a crowd tends to avoid collision with its . This tendency is called separation or collision e. It steers a boid to avoid overcrowding the mates. If only this steering force is applied the dissipate. re many ways how this force can be imple- A simple but efficient solution is depicted in . Vectors defined by the position of the boid bi Figure 1. Separation ⃗si is expressed as the sum of all vector corresponding to the oriented lines pi, pj. The visible boids are denoted by the cross. The boids not directly visible by the bi are depicted by the empty circles. The boid bi is described by the full circle and its position is denoted by pi. only this steer is applied, the flockmates will merge into one single position. Cohesion of the boid bi is denoted by ⃗ki and is calculated in two steps. First, the center of the directly visible set Vi is calcu- lated. This center is denoted by ci and corresponds to the center of density of all visible boids: ci = ∀bj∈Vi pj m . (2) The tendency of the boid bi to navigate toward the center of density of the visible flock Vi is calculated as the cohesion displacement vector ⃗ki: Q2 ⃗ki = ci − pi (3)
  8. 8. Original Boids (Reynolds 1986) 8
  9. 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. 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. 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. 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”
  13. 13. Boids Analysis: Basic Toolbox [3/5] 13
  14. 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. 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. 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Þ
  17. 17. ; ð4Þ mgroupðtÞ ¼ 1 N XN i¼1 ricðtÞ Â viðtÞ
  18. 18. ; ð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
  19. 19. 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Þ
  20. 20. ; ð4Þ mgroupðtÞ ¼ 1 N XN i¼1 ricðtÞ Â viðtÞ
  21. 21. ; ð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Þ
  22. 22. ; ð4Þ mgroupðtÞ ¼ 1 N XN i¼1 ricðtÞ Â viðtÞ
  23. 23. ; ð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Þ
  24. 24. ; ð4Þ mgroupðtÞ ¼ 1 N XN i¼1 ricðtÞ Â viðtÞ
  25. 25. ; ð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Þ
  26. 26. ; mgroupðtÞ ¼ 1 N XN i¼1 ricðtÞ Â viðtÞ
  27. 27. ; 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
  28. 28. 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
  29. 29. 4 Classes of Collective Dynamical Behavior 19 (A) (C) (D) (B) Swarm Torus Dynamic Parallel Highly Parallel stability from the ephemeral assemblages of midges to the obligatory schools of her- ring (1). What the eye sees is the collec- tive—the flock, the school, the swarm— regardless of whether its members work in synchrony (fish, birds) or not (insects). Ag- gregations often behave as a unit with prop- erties that are not merely a sum of the individual behaviors. In some cases, this results in new functions: the ability to build a nest or thermoregulate the hive (bees, termites), form a spore-bearing structure (slime mold), or mob predators (birds) (2, 3). In other cases, the properties are mean- ingful only in the context of a group, for example, a well-defined edge (hopper bands of locusts), a well-regulated density profile (schooling fish), polarity without a leader, or a distinct shape whose topology varies to suit the tasks (branched army ant raiding column) (4). Some aggregations also display fluidity and uniformity of re- sponse, such as mills, vacuoles, fountains, and flash expansion of fish schools (Fig. 1) (5). Emergent properties of groups are not surprising in view of recent research on complexity demonstrating the ability of large populations of simple, identical units (for example, spin magnets) to self-orga- nize, form patterns, store information, and reach “collective decisions” (6). Even with rather simple individual rules, nonlinear into two classes: those that “self organize” and those that form in response to external cues such as light or food. The former, for example bird flocks, fish schools, and un- gulate herds, are of primary interest in com- plexity theory. In some congregations, an external attractant nucleates the group: schools of tuna initially form beneath float- ing objects but quickly grow in size, dwarf- ing the original stimulus (8). Once formed, many aggregations persist even though membership turns over. Relatedness to, or knowledge of, neighbors may be minimal, and the group is maintained through collec- tive individual responses. Simple mecha- nisms, such as allelomimesis—or doing among many) (10). However, persistent ag- gregations also attract predators (11). Marine mammals use the tendency of their prey to be concentrated to facilitate successful attack (12). The consummate concentration preda- tor—humans—can net up to 40 million met- ric tons of schooling marine finfish and in- vertebrates annually (half of the world catch of marine biomass) because these species aggregate so densely (13). Other selection factors also favor aggre- gation. Mating and mate choice lead to small, ephemeral assemblages (swarms of mosqui- toes, leks of sage grouse) as well as large, predictable aggregations (herds, pods, and schools migrating to and from spawning 1 Zoology Department, University of Washington, Se- attle, WA 98195, USA. 2 Department of Mathematics, University of British Columbia, Vancouver, BC V6T 1Z2, Canada. *To whom correspondence should be addressed. E- mail: jparrish@u.washington.edu Fig. 1. Fish schools provide an example of emergent pattern such as milling in which individual members circle about an unoccupied core. [Photo: ©1999 Norbert Wu] www.sciencemag.org SCIENCE VOL 284 2 APRIL 1999 99 Swarms are often seen in insects, such as mosquitoes and midges (Okubo & Chiang, 1974; Ikawa & Okabe, 1997), and can also be exhibited by fish schools (Pitcher & Parrish, 1993) The dynamic parallel group exhibits many of the properties associated with aggregations such as bird flocks and fish schools; the individuals are polarized and move as a coherent group, but individuals can move throughout the group and density and group form can fluctuate (Major & Dill, 1978; Partridge, 1982). The highly parallel group is much more static in terms of exchange of spatial positions within the group than the dynamic parallel group, and the variation in density and form is minimal. The torus formation type is exhibited by natural schools of fish in open water including barracuda, jack and tuna. See Parrish & Edelstein-Keshet (1999).
  30. 30. 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
  31. 31. 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
  32. 32. 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
  33. 33. 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
  34. 34. Back To Nature [4/5] 24
  35. 35. 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
  36. 36. Big Data, Big Processing [5/5] 26
  37. 37. Shall We Use A GPU 27
  38. 38. 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
  39. 39. 80k boids in real time with CUDA using cuSwarm 29
  40. 40. 150k boids @30fps with CUDA using cuSwarm 30
  41. 41. 1M boids with CUDA - OpenGL - ISIS (Frola 2009) 31
  42. 42. • 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
  43. 43. 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
  44. 44. What Do You Think? [6/5] (I lied.) 34
  45. 45. 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
  46. 46. 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
  47. 47. ! Thank you

×