Week 7 Flashcards
Characteristics of flocking?
- Rapid directed movement of the whole flock
- Reactivity to predators (flash expansion, fountain effect)
- Reactivity to obstacles
- No collisions between flock members
- Coalescing and splitting of flocks
- Tolerant of movement within the flock, loss or gain of flock members
- No dedicated leader
- Different species can have different flocking characteristics — easy to recognise but not always easy to describe
Benefits of flocking
Energy saving
Geese flying in Vs can extend range by over 70%
Flash expansion, fountain effect in fish, confuse predators
How can we work out error of a flock direction?
IF
* Each individual has only a vague and noisy idea of which direction to fly in, or is a really incompetent flyer…
* and if a flock averaged out all the individual directions…
* Individual error in measuring the global field is uncorrelated
THEN
* From a simple statistical computation, flock direction should have an error proportional to
1/sqrt(𝑛) = # of individuals in the flock
Examples of migration in nature
Monarch butterflies reach the same trees every year
Wrenecks do the same from Africa to Valais
Fish reach the same tiny spawning grounds
Application:
fishery statistics: models based on averaged navigational errors
Who is Boids?
Computer animator who wanted to find a way of animating flocks that would be
realistic looking
computationally efficient (no worse than linear)
3D
What is Boids sensory system?
Idealized system
Local, omni-directional sensory system
Relative range and bearing system
Can identify all teammates within range of detection
Immediate response
Homogenous system
No noise
Second order variables (velocity) estimated with 2 first order measures (position)
What are Reynold’s Rules for Flocking
Separation: steer to avoid crowding local flockmates
Alignment/Velocity Matching: steer towards the average heading of local flockmates & attempt to match velocity
Cohesion: steer to move toward the average position of local flockmates.
Characteristics of Reynold’s flocks
spontaneously polarize
synchronise their changes in direction
flocks join when they meet
if started too close together, flash expansion occurs
if started too far apart, they may slowly aggregate or form flockettes which later merge.
What is particle swarm optimisation
Each particle is a candidate solution
- no mass or volume BUT velocity and acceleration apply
Swam - velocity matching not included (no coordination unlike flocking, collaboration instead)
Optimisation - discovery of near optimal solution by means of a population of individuals.
The Cornfield Vector/ Rooster effect
How does swarming/flocking get us to a near optimal solution?
When food is left for birds, within minutes many birds are there, so we can define a fitness representing the quality of the solution (odor of food)
Knowledge of the swarm is incorporated into the local behaviour of each particle. All collaborate to find the food quickly.
Basic PSO
Create N random particles (solutions)
For each timestep
For each individual
- update the position of particle by adding a velocity to current particle pos
- update velocity
next individual
next timestep
How do we update the velocity of a particle?
vij[t+1] = vij[t] +c1rand()(pbestxij-presentxij)
+c2rand()(gbestxij-presentxij)
Where c1 & c2 are constants and rand() is a function which returns a random number between 0 and 1.
As before i is the individual and j is the dimension.
pbestx is that particle’s previous best position
gbestx is the population’s best position
Why do we use rand() in PSO velocity update
Stops swarm from converging too quickly
Why c1 and c2 in velocity update?
Change weighting between personal and population experience/knowledge
Neighbour based PSO
Similar to global based PSO
lbest computed instead of gbest where lbest is best solution in current neighbourhood.
Neghbourhoods are normally not defined by closeness in search space
-no velocity matching required
- good solutions are spread throughout the population
gbest vs lbest
- gbest will converge earlier as every particle has access to best
- lbest has larger diversity, wont get trapped in local minima.