3. Lecture Overview
• Real world insect examples
• Theory of Swarm Intelligence
• Ant Pheromone and Food Foraging Demo
• PARTICLE SWARM INTELLIGENCE (PSO)
• PSEUDO CODE / ALGORITHM
• Ant Colony Optimization
6. Bees
• Colony cooperation
• Regulate hive temperature
• Efficiency via Specialization: division of labour in
the colony
• Communication : Food sources are exploited
according to quality and distance from the hive
8. Ants
• Organizing highways to and from their foraging
sites by leaving pheromone trails
• Form chains from their own bodies to create a
bridge to pull and hold leafs together with silk
• Division of labour between major and minor ants
17. How Ants Communicate with
Each Other?
• If you watch ants on a trail, you will
notice that they often touch each other
with their antennae (long feelers on the
head) when they meet.
• All ants can produce pheromones,
which are scent chemicals used for
communication and to make trails.
19. What is Particle?
• A Particle is a small localized object that
have several physical or chemical
properties such as volume or mass.
20. What is Swarm?
• Collection of something that can move
in large number collectively.
• For Example:
– Bird’s Flock
– Animal Crowd
– Ant Swarm
21. What is Optimization?
• The action to get the best or the most
effective use of a resource.
• For example:
– Minimize the total time to travel from one
city to another city.
22. Particle Swarm Optimization
(PSO)
• Particle Swarm Optimization (PSO) is a
population based stochastic
optimization technique developed by Dr.
Eberhart and Dr. Kennedy in 1995,
inspired by social behaviour of Bird
Flocking or Ant Swarm.
23. • This technique works on population
(large amount of data) and does
optimization (gets the best or the most
effective results).
25. PSO Technique by Example
• PSO Simulates the behaviour of Bird
Flocking.
• Suppose the following Scenario:
26. • A group of birds are randomly searching
for food in an area.
• There is only one piece of food in an
area.
• All the birds don’t know where the food
is. But they know (in each iteration) how
far the food is?
• So what’s the best strategy to find the
food?
• The effective way is to follow the bird
which is nearest to the food.
27. PSO Technique by Example
• In PSO, each single solution is called a
“bird” in the search space.
• The particles (birds) fly through the
problem space by following current
optimum particle.
28. • Each bird has its value pBest (Personal
Best) which means that how much a
single bird is near to food.
• There is a value gBest (Group Best)
which is a combine value of a swarm
means that how much a complete flock
of birds is near to food.
30. Terminologies Used…
V(t) velocity of the particle at time t
X(t) Particle position at time t
w Inertia weight
c1 , c2 learning factor or accelerating factor
rand uniformly distributed random number between 0 and 1
Xpbest particle’s best position
Xgbest global best position
31. Input: Randomly initialized position and velocity of Particles:
Xi (0) andVi (0)
Output: Position of the approximate global minimum X*
1: while terminating condition is not reached do
2: for i = 1 to number of particles do
3: Calculate the fitness function f
4: Update personal best and global best of each particle
5: Update velocity of the particle using Equation (ii)
6: Update the position of the particle using equation (i)
7: end for
8: end while
32. Ant Colony Optimization
“Ant Colony Optimization (ACO) studies artificial
systems that take inspiration from the
behavior of real ant colonies and which are
used to solve discrete optimization problems.”
ACO Website [1]
Source: http://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Aco_branches.svg/2000px-
Aco_branches.svg.png
33. Ant Colony Optimization
Probalistic Techniques to solve optimization Problem
It is a population based metaheuristic used to find approximate
solution to an optimization problem.
The Optimization Problem must be written in the form of path
finding with a weighted graph
Application of ACO
Shortest paths and routing
Assignment problem
Set Problem
34. Idea
• The way ants find their food in shortest
path is interesting.
• Ants hide pheromones to remember their
path.
• These pheromones evaporate with time.
• Whenever an ant finds food , it marks its
return journey with pheromones.
• Pheromones evaporate faster on longer
paths.
35. • Shorter paths serve as the way to food
for most of the other ants.
• The shorter path will be reinforced by the
pheromones further.
• Finally , the ants arrive at the shortest
path.
Idea (cont.)
36. ACO Concept
• Ants navigate from nest to food source. Ants
are blind!
• Shortest path is discovered via pheromone
trails. Each ant moves at random
• Pheromone is deposited on path
• More pheromone on path increases probability
of path being followed
36
38. • ConstructAntSolutions: Partial solution extended by adding
an edge based on stochastic and pheromone
considerations.
• ApplyLocalSearch: problem-specific, used in state-of-art
ACO algorithms.
• UpdatePheromones: increase pheromone of good
solutions, decrease that of bad solutions (pheromone
evaporation).
Ant Colony Algorithm