1. Scientific Research Group in Egypt (SRGE)
Swarm Intelligence (II)
Ant Colony optimization
Dr. Ahmed Fouad Ali
Suez Canal University,
Dept. of Computer Science, Faculty of Computers and informatics
Member of the Scientific Research Group in Egypt
Company
LOGO
4. Company
LOGO
Outline
1. Ant colony optimization (ACO)(Main idea)
2. History of ACO
3. ACO parameters definitions
4. Ant colony optimization (ACO)
5. ACO Algorithm
6. Advantage / disadvantage
7. References
5. Company
LOGO
Swarm intelligence (Main Idea)
•Suppose you and a group of friends
are on a treasure finding mission.
Each one in the group has a metal
detector and can communicate the
signal and current position to the n
nearest neighbors.
•Each person therefore knows
whether one of his neighbors is
nearer to the treasure than him. If this
is the case, you can move closer to
that neighbor. In doing so, your
chances are improved to find the
treasure. Also, the treasure may be
found more quickly than if you were
on your own.
6. Company
LOGO
Ant colony optimization (Main Idea)
In a series of experiments on a
colony of ants with a choice
between two unequal length paths
leading to a source of
food, biologists have observed
that ants tended to use the
shortest route.
A model explaining this behavior
is as follows:
An ant runs more or less at
random around the colony.
if it discovers a food source, it
returns more or less directly to the
nest, leaving in its path a trail of
pheromone.
7. Company
LOGO
Ant colony optimization (Main Idea)
These pheromones are attractive,
nearby ants will be inclined to
follow, more or less directly, the
track.
Returning to the colony, these ants
will strengthen the route.
If two routes are possible to reach
the same food source, the shorter
one will be, in the same time,
traveled by more ants than the
long route will.
The short route will be
increasingly enhanced, and the
long route will eventually
disappear, pheromones are
volatile.
8. Company
LOGO
History of ACO
First proposed by M. Dorigo, 1992.
Heuristic optimization method inspired by
biological systems.
Population based algorithm for solving difficult
combinatorial optimization problems.
Traveling Salesman, vehicle routing, sequential
ordering, graph coloring, routing in communications
networks
Ant behavior is a kind of stochastic distributed
optimization behavior
9. Company
LOGO
ACO parameters definitions
Stigmergy
a term coined by French
biologist Pierre-Paul Grasse, is
interaction through the
environment.
Two individuals interact
indirectly when one of them
modifies the environment and
the other responds to the new
environment at a later time.
10. Company
LOGO
ACO parameters definitions cont.
Pheromone Trails
Species lay pheromone trails
traveling from nest, to nest or
possibly in both directions.
Pheromones evaporate.
Pheromones accumulate with
multiple ants using path.
11. Company
LOGO
Ant colony optimization TSP
1. Initializing the pheromone amounts on each route to a
positive, small random value.
2. A simple transition rule for choosing the next city to visit, is
where Ti j(t) is the pheromone intensity on edge (i, j)
between cities i and j, the k-th ant is denoted by k, α is a
constant, and Ci,k is the set of cities ant k still have to
visit from city i.
12. Company
LOGO
Ant colony optimization TSP
The transition rule above can be improved by including
local information on the desirability of choosing city j when
currently in city i, i.e.the next city to visit, is
where α and ß are adjustable parameters that control
the weight of pheromone intensity and
13. Company
LOGO
Ant colony optimization TSP
with dij the Euclidean distance between cities i and j
At the end of each route, Tk, constructed by ant k, the pheromone
intensity Tij on the edges of that route is updated, using
Where
14. Company
LOGO
Ant colony optimization TSP
The parameter Q has a value of the same order of the length
of the optimal route, Lk(t) is the length of the route
traveled by ant k, and m is the total number of ants.
The constant p ϵ [0,1], is referred to as the forgetting
factor, which models the evaporation over time of
pheromone deposits.
15. Company
LOGO
ACO Algorithm for TSP.
1. Initialize the pheromone deposits on each edge (i, j) between
cities i and j to small positive random values, i.e. Tij(0) ~
U(0, max).
2. Place all ants k ϵ 1,…, m on the originating city.
3. Let T+ be the shortest trip, and L+ the length of that trip.
4. For t = I to tmax do the following:
For each ant, build the trip Tk (t) by choosing the next city n —
1 times (n is the number of cities), with probability Фij,k(t).
Compute the length of the route, Lk(t), of each ant.
If an improved route is found, update T+ and L+.
Update the pheromone deposits on each edge.
5. Output the shortest route T+.
16. Company
LOGO
Advantage / disadvantage
Advantage:
•Retains memory of entire colony instead of previous
generation only.
•Less affected by poor initial solutions (due to
combination of random path selection and colony
memory).
•Has been applied to a wide variety of applications.
17. Company
LOGO
Advantage / disadvantage
Disadvantage:
•Theoretical analysis is difficult:
Due to sequences of random decisions (not
independent).
Probability distribution changes by iteration.
•Convergence is guaranteed, but time to convergence
uncertain.
•Coding is somewhat complicated, not straightforward
Pheromone “trail” additions/deletions, global updates and
local updates.
18. Company
LOGO
References
•Computational Intelligence An Introduction
Andries P. Engelbrecht, University of Pretoria South Africa
•Some slides adapted from a presentation
“Ant Colony Optimization. A metaheuristic approach to hard
network optimization problems”.
Particle Swarm Optimization
http://www.particleswarm.info/
http://www.swarmintelligence.org