2. Ant Colony Optimization (ACO)
Overview
“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.”
4. Ant Colony Optimization (ACO)
A C O
• Ant Colony Optimization is another family of optimization algorithms
inspired by pheromone-based strategies of ant foraging.
• ACO algorithms were originally conceived to find the shortest route in
travelling salesman problems.
• In ACO several ants travel across the edges that connect the nodes of
the graph while depositing virtual pheromones.
• PHEROMONES : a chemical substance secreted externally by some
animals(especially insects) that influence the physiology or behavior
of other animals(insects) of same species.
5. Ant Colony Optimization (ACO)
A C O
• Ants that travel on the shortest path will be able to make more return
trips and deposit more pheromones in a given amount of time.
• Consequently, that path will attract more ants in a positive feedback
loop.
• ACO assumes that virtual pheromones evaporates ,thus reducing the
probability that long paths are selected.
• Pheromone evaporation has also the advantage of avoiding the
convergence to a locally optimal solution. If there were no
evaporation at all, the paths chosen by the first ants would tend to be
excessively attractive to the following ones. In that case, the
exploration of the solution space would be constrained.
7. Ant Colony Optimization (ACO)
• Almost blind.
• Incapable of achieving complex tasks alone.
• Rely on the phenomena of swarm intelligence for survival.
• Capable of establishing shortest-route paths from their colony to feeding sources
and back.
• Use stigmergic communication via pheromone trails.
Ants….
8. Ant Colony Optimization (ACO)
• Follow existing pheromone trails with high probability.
• What emerges is a form of autocatalytic behavior: the more ants follow a trail,
the more attractive that trail becomes for being followed.
• The process is thus characterized by a positive feedback loop, where the
probability of a discrete path choice increases with the number of times the
same path was chosen before.
Ants ,contd.
9. Ant Colony Optimization (ACO)
Ants ,contd.
It is well known that the primary means for ants to form and maintain the line is a
pheromone trail. Ants deposit a certain amount of pheromone while walking, and each
ant probabilistically prefers to follow a direction ,rich in pheromone.
ℙ 𝐶 < ℙ 𝐵 < ℙ 𝐴
ℙ(𝐴)
ℙ(𝐵)
ℙ(𝐶)
10. Ant Colony Optimization (ACO)
E
D
CH
B
A
(b)
30 ants
30 ants
15 ants
15 ants
15 ants
15 ants
t = 0
d = 0.5
d = 0.5
d = 1
d = 1
E
D
CH
B
A
(a)
E
D
CH
B
A
(c)
30 ants
30 ants
20 ants
20 ants
10 ants
10 ants
t = 1
τ = 30
τ = 30
τ = 15
τ = 15
Initial state:
no ants
11. Ant Colony Optimization (ACO)
Pheromone trails
Shortest path around an obstacle
This elementary behavior of real ants can be used to explain how they can find the
shortest path that reconnects a broken line after the sudden appearance of an
unexpected obstacle has interrupted the initial path.
Ants are moving on a
straight line that connects
a food source to their nest.
Let us consider the following scenario:
12. Ant Colony Optimization (ACO)
Pheromone trails
Shortest path around an obstacle
This elementary behavior of real ants can be used to explain how they can find the
shortest path that reconnects a broken line after the sudden appearance of an
unexpected obstacle has interrupted the initial path.
An obstacle appears on
the path.
13. Ant Colony Optimization (ACO)
Pheromone trails
Shortest path around an obstacle
This elementary behavior of real ants can be used to explain how they can find the
shortest path that reconnects a broken line after the sudden appearance of an
unexpected obstacle has interrupted the initial path.
Those ants which are just in front of the obstacle
cannot continue to follow the pheromone trail
and therefore they have to choose between
turning right or left. In this situation we can
expect half the ants to choose to turn right and
the other half to turn left.
14. Ant Colony Optimization (ACO)
Pheromone trails
Shortest path around an obstacle
This elementary behavior of real ants can be used to explain how they can find the
shortest path that reconnects a broken line after the sudden appearance of an
unexpected obstacle has interrupted the initial path.
Those ants which choose, by chance, the shorter
path around the obstacle will more rapidly
reconstitute the interrupted pheromone trail
compared to those which choose the longer
path. Thus, the shorter path will receive a
greater amount of pheromone per time unit and
in turn a larger number of ants will choose the
shorter path.
15. Ant Colony Optimization (ACO)
Pheromone trails
Shortest path around an obstacle
This elementary behavior of real ants can be used to explain how they can find the
shortest path that reconnects a broken line after the sudden appearance of an
unexpected obstacle has interrupted the initial path.
Shortest path is being obtained.
16. Ant Colony Optimization (ACO)
Pheromone trails
Shortest path from the nest to the food source
Ants are able, without using any spatial Information, to identify a sudden appearance of
a food source around their nest, and to find the shortest available path to it.
Let us describe the algorithm:
A small amount of ants travel
randomly around the nest.
N
17. Ant Colony Optimization (ACO)
Pheromone trails
Shortest path from the nest to the food source
Ants are able, without using any spatial Information, to identify a sudden appearance of
a food source around their nest, and to find the shortest available path to it.
One of the ants find food source.
S
N
18. Pheromone trails
Shortest path from the nest to the food source
When ant finds food, it returns to
the nest while laying down
pheromones trail.
S
N
Ants are able, without using any spatial Information, to identify a sudden
appearance of a food source around their nest, and to find the shortest
available path to it.
19. Ant Colony Optimization (ACO)
Pheromone trails
Shortest path from the nest to the food source
Ants are able, without using any spatial Information, to identify a sudden
appearance of a food source around their nest, and to find the shortest
available path to it.
When other ants find a pheromone trail,
they are likely not to keep travelling at
random, but to instead follow the trail.
S
N
20. Ant Colony Optimization (ACO)
Pheromone trails
Shortest path from the nest to the food source
If an ant eventually find food by following
a pheromone trail, it returning to the nest
while reinforcing the trail with more
pheromones.
S
N
Ants are able, without using any spatial Information, to identify a sudden
appearance of a food source around their nest, and to find the shortest
available path to it.
21. Ant Colony Optimization (ACO)
Pheromone trails
Shortest path from the nest to the food source
Due to their stochastic behavior,
some ants are not following the
pheromone trails, and thus uncover
more possible paths.
S
N
Ants are able, without using any spatial Information, to identify a sudden
appearance of a food source around their nest, and to find the shortest
available path to it.
22. Ant Colony Optimization (ACO)
Pheromone trails
Shortest path from the nest to the food source
Over time, however, the pheromones
trails starts to evaporate, thus
reducing its attractive strength.
S
N
Ants are able, without using any spatial Information, to identify a sudden
appearance of a food source around their nest, and to find the shortest
available path to it.
23. Ant Colony Optimization (ACO)
Pheromone trails
Shortest path from the nest to the food source
Shortest path is being obtained.
S
N
Ants are able, without using any spatial Information, to identify a sudden
appearance of a food source around their nest, and to find the shortest
available path to it.
24. Ant Colony Optimization (ACO)
• Let us consider the algorithm more formally. The number of ants M is usually equal
to the number of nodes N in the graph.
• A small amount of virtual pheromones is deposited on all edges of the beginning of
the search.
• The probability 𝑝 𝑖𝑗
𝑘
that ant k chooses the edge from node i to node j.
𝑝 𝑖𝑗
𝑘
=
𝜏𝑖𝑗
𝑎
𝜂𝑖𝑗
𝑏
ℎ ℰ 𝐽 𝑘
𝐻
𝜏𝑖ℎ
𝑎
𝜂𝑖ℎ
𝑏
Where 𝜏𝑖𝑗 = amount of virtual pheromones on that edge .
𝜂𝑖𝑗 = visibility of the node computed as the inverse of the edge length
1
𝑙 𝑖𝑗
.
constant a & b weight the importance of the two factors.
Formal ANT Algorithm
25. Ant Colony Optimization (ACO)
• If a = 0, ants choose solely on the basis of shortest distance .
• Conversely if b = 0, ants choose solely on the basis of the pheromones amount.
• The divider in the fraction sums up the pheromones and visibility values for the
edges H that are available at the node where the ants sits as long as they belong to
the set 𝐽 𝑘 of the nodes that the ants k has not yet visited .
• as soon as the ant visits a node , this is deleted from the list 𝐽 𝑘 .
• Once all the ants have completed a tour of the graph, each ant k retraces its own
path and deposits an amount of pheromones ∆τ𝑖𝑗
𝑘
on the travelled edges according
to
• where 𝐿 𝑘
= total length of the path found by ant k.
• Q is a constant , which is set to be the length of the shortest path estimated with a
simple heuristic method.
∆τ𝑖𝑗
𝑘
=
𝑄
𝐿 𝑘
Formal ANT Algorithm , contd.
26. Ant Colony Optimization (ACO)
• The amount of pheromones on each edge after all M ants have retraced their
own paths is equal to
• Before starting all ants again in a search for the shortest path, pheromone levels
evaporate according to
• Where 0 ≤ ρ ≥ 1 is the coefficient of pheromone evaporation.
• This concludes one iteration of the algorithm. This process is repeated for several
Hundred iterations until satisfactory short path has been found.
∆ 𝑇𝑖𝑗= 𝑘
𝑀
∆τ𝑖𝑗
𝑘
τ𝑖𝑗
𝑡+1
= (1 - ρ) τ𝑖𝑗
𝑡
∆ 𝑇𝑖𝑗
Formal ANT Algorithm , contd.
27. Ant Colony Optimization (ACO)
• Positive Feedback accounts for rapid discovery of good solutions.
• Virtual ants discover and maintain several short paths in addition to the best
one because of the probabilistic edge choice.
• Distributed computation avoids premature convergence.
• The greedy heuristic helps find acceptable solution in the early solution in the
early stages of the search process.
• The collective interaction of a population of agents.
Some inherent advantages
28. Ant Colony Optimization (ACO)
• Slower convergence than other Heuristics.
• Performed poorly for TSP problems larger than 75 cities.
• No centralized processor to guide the AS towards good solutions
Disadvantages in Ant Systems
29. Ant Colony Optimization (ACO)
• ACO is a recently proposed meta-heuristic approach for solving hard
combinatorial optimization problems.
• Artificial ants implement a randomized construction heuristic which makes
probabilistic decisions.
• The cumulated search experience is taken into account by the adaptation of
the pheromone trail.
• ACO Shows great performance with the “ill-structured” problems like network
routing.
• In ACO Local search is extremely important to obtain good results.
Conclusions