Title: Biologically Inspired Computation
1Biologically Inspired Computation
Lecture 5 Introducing Swarm Intelligence conten
ts the behavior of natural swarms and flocks --
Reynolds rules and swarm simulation.
Some of the images in this lecture come from
slides for a Course in Swarm Intelligence given
at
2Swarms, and how they might inspire us
There are some interesting things that come to
mind when we think of swarms (flocks, schools,
etc )
- A swarm sometimes seems to behave as if it is an
individual organism. - Ants or wasps on a hunt for food, or on the
attack, behave as if with a single - mind, co-ordinating different actions with
different parts of the swarm. - But did you know that a jellyfish is actually a
swarm? Slime moulds too. - The way in which swarms in some species change
direction is astoundingly well co-ordinated. - The way in which swarms in some species avoid
obstacles seems to be extremely well
choreographed - Why do I call a jellyfish a swarm, but not a
human? Just like - a slime mould, for example, we are a collection
of a few trillion - cells lumped together so why is it that a
plague of locusts - exhibits swarm intelligence, but we dont?.
3Other puzzling things that swarms do
- Termites build huge nests how?? Is an
individual - termite clever enough to do this?
- Bees build hives, with complex internal
structure - -- same question.
How on earth can these things happen? GIVE THEM A
LIVE EXAMPLE
4(No Transcript)
5Two simple rules While continually wandering
randomly If you are empty-handed and
encounter a disc, pick it up If you are
carrying a disc and encounter another of the same
colour, put yours down.
Emergent order arises from simple local rules.
6But we sometimes exhibit swarm behaviour too
7But were mainly interested in animals and insects
locusts
ants
8Why does flocking/swarming occur so much in
nature?
Energy savings Geese in V formation have around
a 70 greater range than in flying
individually. Individuals can fly around 25
faster (why?).
Frightening and confusing predators avoiding
being picked off
9It also maybe helps with migration
- If we can assume that
- An individual has an idea, but not a perfect one,
of where to go e.g. by itself it may go a few
degrees off course. - The errors of individuals are not correlated
(i.e. theyre all wrong in a randomly different
way) - An emergent result of the flocking is that the
flocks direction is the average of its members
directions. - Then basic statistics can show that the error in
the flocks direction is probably very small.
About 1/sqrt(n) of the typical error of one of
the n individuals.
10So
- Flocking occurs so much because it is clearly
useful. But how do they do it so well? Individual
ants are not clever enough to understand the
benefits. - It comes down to simple behaviours of
individuals in a group can have useful emergent
properties. A theme we will continue to see a lot
11Another kinds of swarm behaviour is the dynamics
and evolution of ideas as they get passed on and
changed in social networks.
12The Adaptive Culture Model
Robert Axelrod has a well-known theory,
Axelrods Culture Model, which explains how
ideas spread in societies. Kennedy and
Eberhart (a computer scientist and a social
scientist respectively) altered this into the
Adaptive Culture Model, which works like this
If you think your neighbour is good, then be more
like them.
And thats basically it. But notice the important
words, neighbour you change yourself under
the influence of people nearby good
in some way your neighbour is more optimal than
you, otherwise why be like
them? more like this is vague, so you
have freedom in how you change
This is actually a very good model for how
culture and ideas spread quickly in societies.
Everything from rumours to eating habits. I only
hope this works with green behaviour
13Back to computer science
From the CS viewpoint, the question is How
does this kind of , apparently organised, group
behaviour emerge, without a central controller?
Without (like we have) something like a brain
in control of everything?
The emergent behaviour that we see arises purely
as a result of individuals in the swarm
processing information in their
(fairly) immediate neighbourhood.
So, studying this in nature suggests how we can
get co-ordinated behaviour from a group of
individuals, without having to specify any
overall controller. This is very useful, for
example, for designing computer networks. If one
main machine was in control of the network, and
that machine crashed,
But so far that has not been a main success area
for swarm inspiration
14Two main things that come from swarm inspiration
Optimisation algorithms. Ants seem to find
the shortest path to find food that may be
quite distant from their nest. They do this via
stigmergy laying pheronomones on their
path as they move. This has directly
inspired the design of a very successful
optimisation method.
Meanwhile, the adaptive culture model has led to
a different, and also very successful, new
optimisation algorithm
Simulations of natural flocks. For the
entertainment and gaming industries, for example.
15Craig Reynolds and Boids
Craig Reynolds is a computer graphics researcher,
who revolutionised animation in games and movies
with his classic paper Reynolds, C. W. (1987)
Flocks, Herds, and Schools A Distributed
Behavioral Model, in Computer Graphics, 21(4)
(SIGGRAPH '87 Conference Proceedings) pages
25-34. This paper is examinable reading,
available on my teaching page.
- The story is
- before this paper, animations of flocks, swarms,
groups, and so on, - behaved nothing at all like the real thing.
Nobody knew how to make - it realistic. (we still have that problem with
fire, explosions, and - realistic human movement, etc )
- Reynolds solved the problem by trying a very
simple approach, - which was inspired by a sensible view of how
animals actually do it.
16The problem
We would like these to move like a realistic
flock of starlings. (The heading of each one is
suggested by where its pointing) But whats
wrong to start with?
17The problem
Thats better. Now what? Perhaps in the next
timestep, they should all move the same small
distance? They should all change their velocity
in some way? What?
18Reynolds Rules
Reynolds came up with three simple rules that
solve this Problem, resulting in entirely
realistic flocking behaviour.
To explain them, we first need to consider the
perceptual system of an individual (which
Reynolds called a boid). For realistic
movement, you need a realistic view of
perception. E.g. a starlings movement is not
influenced at all by the flockmates that it
cannot see such as those out of its line of
sight, or too far away.
19A simple sensory system
This picture is from Reynolds boids page. The
green boid can see a certain amount ahead, and is
also aware of any flockmates within limits on
either side (recall, birds tend to have eithers
on the sides of their heads.) Two parameters,
angle and distance, define the system. SO, this
boid will only be influenced by those others it
can sense according to these parameters.
20Rule 1 Separation
At each iteration, a boid makes an adjustment to
its velocity according to the following
rule Avoid getting too close to local (the ones
it is aware of) flockmates.
21Rule 2 Alignment
At each iteration, a boid makes an adjustment to
match its velocity to the average of that of its
local flockmates.
22Rule 3 Cohesion
At each iteration, a boid makes an adjustment to
its velocity towards the centroid of its
flockmates.
23Notes Its not quite as simple as that to get
realistic behaviour
Need to define an appropriate distance for the
perceptive range. What if this is too high, what
if this is too small? Reynolds found that he
had to be careful about how the vectors from the
three rules get combined. It is not ideal to
simply add them. Opposing shouts from two rules
may cancel out, leading to the third winning in
what scenarios might this be a problem? Note
that the cohesion rule is interesting it leads
to bifurcating around obstacles a
follow-the-leader approach to flocking would not
achieve that. The simple rules also
realistically lead to flash expansion if
started too close together.
24Next time From the Adaptive Culture Model to
Particle Swarm Optimisation