You are on page 1of 40

Swarm Intelligence

Swarm intelligence is an active branch of Evolutionary


Computation which is one of the most important research
topics in Computational Intelligence Community.
Computational Intelligence, such as
 Artificial Neural Networks,
 Fuzzy Logic and Systems,
 Evolutionary Computation,
 Chaos Computation, Simulated
 Annealing, Tabu Search,
 Hybrid Strategies,
All these methods simulate and give an insight into natural phenomena or
biological processes.
Swarm intelligence (SI) is regarded as the collective behavior of
 Decentralized,
 Self-organized,
 Populated Systems.

A typical swarm intelligence system consists of a population of simple agents


that can communicate (either directly or indirectly) locally with each other by
acting on their local environment.

Though the agents in a swarm follow very simple rules, the interactions between
such agents can lead to the emergence of very complicated global behavior, far
beyond the capability of individual agents.
Examples in natural systems of swarm intelligence include:
 Bird Flocking,
 Ant Foraging,
 Fish Schooling.
Swarm of Robots Swarm of Ants
There are also various synonymous expressions to swarms
used in biology to describe various collective behavior of
different species.
Examples include
o “colonies” of ants or bees,
o “flocks” of birds,
o “schools” or “shoals” of fish,
o “herds” of antelopes,
o “packs” of wolf, etc.
• It is an artificial intelligence (AI)
technique based on the collective
behavior in decentralized, self-
organized systems

• Generally made up of agents who


interact with
each other and the environment

• No centralized control structures

• Based on group behavior found in


nature

Agents
• Insects have a few hundred brain
cells
• However, organized insects have
been known for:
 Architectural marvels
 Complex communication
systems
 Resistance to hazards in nature
• In the 1950’s E.O. Wilson observed:
• A single ant acts (almost)
randomly – often leading to its
own demise
• A colony of ants provides food
and protection for the entire
population
• This huge Ant
colony Concrete,
that has been
Excavated from
earth in several
weeks.

• This Colony has


roads with shortest
path between every
two points.
Characteristics

• Composed of many
individuals

• Individuals are
homogeneous

• Local interaction based


on simple rules

• Self-organization
Four Ingredients of Self
Organization

 Positive Feedback

 Negative Feedback

 Amplification of
Fluctuations –
randomness

 Reliance on multiple
interactions
Example
• Original Example: Swarm of Bees
• Ant colony
• Agents: ants
• Flock of birds
• Agents: birds
• Traffic
• Agents: cars
• Crowd
• Agents: humans
• Immune system
• Agents: cells and molecules
• Ant Colony
 Every single insect in a social insect colony seems to have its
own agenda, and yet an insect colony looks so organized.
 The seamless integration of all individual activities does not
seem to require any supervisor.

• For Example there is in one colony different type of workers:


 Leafcutter Ants
 Weaver Ants
 Army Ants
• Leafcutter Ants
 cut leaves from plants
and trees
 Workers forage for
leaves hundreds of
meters away from the
nest,
 literally organizing
highways to and from
their foraging sites
• Weaver Ants
 workers form chains
of their own bodies,
allowing them to cross
wide gaps and pull
stiff leaf edges
together to form a nest
 Several chains can
join to form a bigger
one over which
workers run back and
forth.
 Such chains create
enough force to pull
leaf edges together.
• Army Ants
• organize impressive
hunting raids,
involving up to
200,000 workers,
during which they
collect thousands of
prey
How to Interact?
• Direct Interactions
• Food/liquid exchange, visual contact, chemical contact
(pheromones)

• Indirect Interactions (Stigmergy)


• Individual behavior modifies the environment, which in turn
modifies the behavior of other individuals.
PSO and ACO Algorithms
 Two Common SI Algorithms
o Ant Colony Optimization
o Particle Swarm Optimization
 PSO
 A population based stochastic optimization

technique Searches for an optimal solution


in the computable search space.
 Developed in 1995 by Dr. Eberhart and Dr.
Kennedy.
 PSO
 In PSO individuals strive to improve themselves and often
achieve this by observing and imitating their neighbors.
 Each PSO individual has the ability to remember.
 Inspiration: Swarms of Bees, Flocks of Birds, Schools of Fish.
Concepts of PSO
 Uses a number of agents (particles)
that constitute a swarm moving around
in the search space looking for the best
solution

 Each particle in search space adjusts


its “flying” according to its own flying
experience as well as the flying
experience of other particles
Collection of flying particles (swarm) - Changing solutions

Search area - Possible solutions

Movement towards a promising area to get the global optimum

Each particle keeps track:


its best solution, personal best, pbest
the best value of any particle, global best, gbest
• Each particle adjusts its travelling speed dynamically
corresponding to the flying experiences of itself and its colleagues

 Each particle modifies its


position according to:
• its current position
• its current velocity

• the distance between its current


position and pbest

• the distance between its current


position and gbest
 Algorithm parameters
• A : Population of agents

• pi : Position of agent ai in the solution space

• f : Objective function

• vi : Velocity of agent’s ai

• V(ai) : Neighborhood of agent ai (fixed)

 The neighborhood concept in PSO is not the same as the one used in other

meta-heuristics search, since in PSO each particle’s neighborhood never


 Particle update rule
p=p+v
 with
v = v + c1 * rand * (pBest – p) + c2 * rand * (gBest – p)
 where
• p: particle’s position

• v: path direction

• c1: weight of local information

• c2: weight of global information

• pBest: best position of the particle

• gBest: best position of the swarm

• rand: random variable


 Number of particles usually between 10 and 50
 C1 is the importance of personal best value

 C2 is the importance of neighborhood best value

 Usually C1 + C2 = 4 (empirically chosen value)


 If velocity is too low → algorithm too slow
 If velocity is too high → algorithm too unstable
Algorithm Preparation

1. Create a ‘population’ of agents (particles) uniformly distributed over X

2. Evaluate each particle’s position according to the objective function

3. If a particle’s current position is better than its previous best position, update
it

4. Determine the best particle (according to the particle’s previous best


positions)
5. Update particles’ velocities:

6. Move particles to their new positions:

7. Go to step 2 until stopping criteria are satisfied


Particle’s velocity:

1. Inertia • Makes the particle move in the same direction and with
the same velocity
• Improves the individual
2. Personal • Makes the particle return to a previous position, better than
Influence the current
• Conservative
3. Social • Makes the particle follow the best neighbors direction
Influence
 Intensification: explores the previous solutions, finds the best solution of a given
region

 Diversification: searches new solutions, finds the regions with potentially the best
solutions

 In PSO:
Algorithm
[x*] = PSO()
P = Particle_Initialization();
For i=1 to it_max
For each particle p in P do
fp = f(p);
If fp is better than f(pBest)
            pBest = p;
end
end
gBest = best p in P;
For each particle p in P do
v = v + c1*rand*(pBest – p) + c2*rand*(gBest – p);
p = p + v;
end
end
PSO Algorithm - Example
Particle Optimization Technique Searching Robots

You might also like