0% found this document useful (0 votes)
104 views36 pages

Ant Travelling Salesman Problem

Ant Colony Optimization (ACO) is a metaheuristic algorithm inspired by the behavior of real ant colonies. It is used to find solutions to discrete optimization problems. ACO algorithms work by simulating the behavior of ants seeking a path between their colony and a source of food. Ants communicate indirectly via pheromone trails, and choose paths based on the density of pheromones. The more ants that travel along a path, the more attractive that path becomes due to stronger pheromone scent. This creates a positive feedback loop and autocatalytic behavior that is useful for solving optimization problems.

Uploaded by

Rodel D Dosano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views36 pages

Ant Travelling Salesman Problem

Ant Colony Optimization (ACO) is a metaheuristic algorithm inspired by the behavior of real ant colonies. It is used to find solutions to discrete optimization problems. ACO algorithms work by simulating the behavior of ants seeking a path between their colony and a source of food. Ants communicate indirectly via pheromone trails, and choose paths based on the density of pheromones. The more ants that travel along a path, the more attractive that path becomes due to stronger pheromone scent. This creates a positive feedback loop and autocatalytic behavior that is useful for solving optimization problems.

Uploaded by

Rodel D Dosano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 36

Ant Colony

Optimization

Real ants
Stigmergy
Autocatalyzation
Ant System
Ant Colony System
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.
-Source: ACO website, http://iridia.ulb.ac.be/~mdorigo/ACO/about.html

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.
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.
Naturally Observed Ant Behavior

All is well in the world of the


ant.
Ant Colony Optimization (ACO)
Naturally Observed Ant Behavior

Oh no! An obstacle has blocked our


path!
Ant Colony Optimization (ACO)
Naturally Observed Ant Behavior

Where do we go? Everybody, flip a


coin.
Ant Colony Optimization (ACO)
Naturally Observed Ant Behavior

pheromone pheromone
n ants n ants
x - distance x - distance
distance longer path distanceshorter path
Shorter path reinforced. time time

Ant Colony Optimization (ACO)


Stigmergic?
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.
This is stigmergy.

Ant Colony Optimization (ACO)


Stigmergy
Real ants use stigmergy. How again?
PHEROMONES!!!

Ant Colony Optimization (ACO)


Autocatalyzation

What is autocatalytic behavior?

Ant Colony Optimization (ACO)


Initial state: E t=0 E t=1 E
no ants

30 ants 30 ants

D 15 ants
D 10 ants
D
15 ants 20 ants
d=1 d = 0.5
= 15 = 30

H C H C H C
= 15 = 30
d=1 d = 0.5
15 ants 15 ants 10 ants 20 ants
B B B

30 ants 30 ants

A A A

(a) (b) (c)


Autocatalyzation

This is why ACO algorithms are


called autocatalytic positive
feedback algorithms!
Remember that!

Ant Colony Optimization (ACO)


Ant Colony
Optimization
The Ant System (AS)
Ant System
First introduced by Marco Dorigo in 1992
Progenitor to Ant Colony System, later discussed
Result of research on computational intelligence
approaches to combinatorial optimization
Originally applied to Traveling Salesman Problem
Applied later to various hard optimization problems

Ant Colony Optimization (ACO)


Would you trust this man?
Ant Colony Optimization (ACO)
Performance Chart
Problem Name MST AS ACSR&D ACSD GA EP SA Optimum

Eil50 615 450 463.423 425 428 426 443


425
(50-city [1] [36] [3] [1,830] [25,000] [100,000] [68.512]
[N/A]
problem) 44.71% 5.89% 9.04% 0.00% 0.71% 0.23% 4.24%

Eil75 740 570 576.749 545 545 542 580


535
(75-city [1] [238] [10] [3,840] [80,000] [325,000] [173,250]
[N/A]
problem) 38.31% 6.5% 7.80% 1.87% 1.87% 1.31% 8.41%

KroA100 30517 22,943 24497.6 21,282 21,761 N/A N/A


21,282
(100-city [1] [228] [37] [4,820] [103,000] [N/A] [N/A]
[N/A]
problem) 43.39% 7.81% 15.11% 0.00% 2.25% N/A N/A

Our Results Published Results


MST 2-approximation TSP algorithm ACSD Ant Colony System
AS Ant System GA Genetic Algorithm
( = 1, = 5, = .5) EP Evolutionary Programming
ACSR&D Ant Colony System SA Simulated Annealing
( = 0.1, =2, = .1, m = 50)

Ant Colony
Ants as Agents
Each ant is a simple agent with the following
characteristics:
It chooses the town to go to with a probability that
is a function of the town distance and of the
amount of trail present on the connecting edge;
To force the ant to make legal tours, transitions to
already visited towns are disallowed until a tour is
complete (this is controlled by a tabu list);
When it completes a tour, it lays a substance called
trail on each edge (i, j) visited.

Ant Colony Optimization (ACO)


The symmetric TSP has a Euclidean based problem
space. We use dij to denote the distance between any
two cities in the problem. As such
dij = [(xi-xj)2 + (yi-yj)2]1/2

Ant Colony Optimization (ACO)


We let ij(t) denote the intensity of trail on edge (i,j) at
time t. Trail intensity is updated following the
completion of each algorithm cycle, at which time
every ant will have completed a tour. Each ant
subsequently deposits trail of quantity Q/Lk on every
edge (i,j) visited in its individual tour. Notice how this
method would favor shorter tour segments. The sum of
all newly deposited trail is denoted by ij. Following
trail deposition by all ants, the trail value is updated
using ij(t + n) = ij(t) + ij, where p is the rate of
trail decay per time interval and ij = . m


k 1
ij

Ant Colony Optimization (ACO)


Two factors drive the probabilistic model:

1) Visibility, denoted ij, equals the quantity 1/dij

2) Trail, denoted ij(t)

These two factors play an essential role in the central


probabilistic transition function of the Ant System.

In return, the weight of either factor in the transition


function is controlled by the variables and ,
respectively. Significant study has been undertaken by
researchers to derive optimal : combinations.

Ant Colony Optimization (ACO)


Probabilistic Transition Function

(t )
ij

ij

if k allowed k

p t (t )
k
ij ij ij
kallowed k
0 otherwise

Ant Colony Optimization (ACO)


A high value for means that trail is very important
and therefore ants tend to choose edges chosen by
other ants in the past. On the other hand, low values of
make the algorithm very similar to a stochastic
multigreedy algorithm.

Ant Colony Optimization (ACO)


Ant System (AS) Algorithm
1. Initialization
2. Randomly place ants
3. Build tours
4. Deposit trail
5. Update trail
6. Loop or exit

Ant Colony Optimization (ACO)


Computational Complexity
The complexity of this ACO algorithm is O(NCn2 m) if we
stop the algorithm after NC cycles, where n is the number of
cities and m is the number of ants.

Step 1 is O(n2 + m)
Step 2 is O(m)
Step 3 is O(n2 m)
Step 4 is O(n2 m)
Step 5 is O(n2)
Step 6 is O(n m)

Researchers have found a linear relation between the number of


towns and the best number of ants, so the complexity of the
algorithm is O(NC n3).

Ant Colony Optimization (ACO)


How many ants do you need?

mn
Ant Colony
Optimization
The Ant Colony System (ACS)
AS ACS
Change to the probabilistic function: drop alpha

(t )
ij ij

if k allowed k

p t (t )
k
ij ij
ij
kallowed k
0 otherwise

Ant Colony Optimization (ACO)


AS ACS
New state transition rule; used to balance between
exploration and exploitation.

s uJ k ( r )

arg max (r , u ) (r , u )

if q q0 (exploitation)
S otherwise (biased exploration)

Here q0 is a constant parameter, q is a random variable,


and S is the outcome of the probabilistic transition
function.

Ant Colony Optimization (ACO)


AS ACS
Local updating rule:

(r , s ) 1 (r , s ) (r , s )

Here tau0 is a predetermined constant or function.


The edge (r,s) is updated following each iteration of an
ant search.

Ant Colony Optimization (ACO)


How many ants do you need?

m = 10
Advanced Topics
Discrete Approaches to
ACO Improvement
& Implementation
Check out
http://www.conquerware.com/
dbabb/academics/research/aco
for supplementary materials.

Ant Colony Optimization (ACO)


Conclusion
The main characteristics of this class of algorithms are
a natural metaphor, a stochastic nature, adaptivity,
inherent parallelism, and positive feedback. Ants have
evolved a highly efficient method of solving the
difficult Traveling Salesman Problem. Furthermore,
the Ant Colony Optimization can be applied to many
other hard problems.

Ant Colony Optimization (ACO)


Questions, Comments?

Thank You

You might also like