¡Descarga Back - Ant Colony Optimization y más Diapositivas en PDF de Algoritmos y Programación solo en Docsity!
Ant Colony Optimization
Ant Colony Optimization (ACO)
- Developed by Marco Dorigo in the early 1990s.
- A probabilistic optimization technique inspired by
the interaction of ants in nature.
- Individual ants are blind and dumb, but ant
colonies show complex and smart behavior by as a result of low-level based communications.
- Useful for computational problems which can be
reduced to finding good paths in graphs.
Ants search for food
- Ants wander randomly in their search for food.
- If an ant finds food it returns home laying down a
pheromone trail on its way back.
- Other ants stumble upon the trail and start
following this pheromone trail.
- If the other ants successfully followed the trail,
they will also return home and also deposit pheromones on their way back ( reinforcing the trail).
Ants and pheromones
- Ants follow pheromone trails.
- The higher the amount of pheromone on a trail,
the higher the probability of ants following it.
- Pheromones defuse over time, so when a food
source is exhausted, the trail will no longer be reinforced and slowly dissipates.
- When an established path to a food source is
blocked, the ants leave the path to explore new routes.
(applet: the principle in action)
The shortest path
Three reasons why ants find the shortest path:
- Earlier pheromone (the trail is completed earlier)
- More pheromone (higher ant density)
- Younger pheromone (less diffusion)
Soon, the ants will find the shortest path between
their home and the food.
Idea: use this principle to find the shortest paths
of graphs!!!
The ACO algorithm
initialize pheromones tij
for each iteration do
for k = 1 to number of ants do set out ant k at start node while ant k has not build a solution do choose the next node of the path enddo enddo update pheromones
enddo
return best solution found
Ants choosing their path
- When ant k is located at a node vi the probability pjk^ of
choosing vj as the next node is:
With:
- Ni : the set of nodes that ant k can reach from vi (tabu list)
- ij : the heuristical desirability for choosing edge (i,j)
- tij : the amount of pheromone on edge (i,j)
- and : relative influence of heuristics vs. pheromone
(^)
i
i m N im im
ij ij k
if j N
if j N p (^) k j i
0
t
t
Pheromone update (1)
The pheromone on each edge is updated as:
t ij ( 1 )t ij t ij
With:
- : the evaporation rate of the ‘old’ pheromone
- ∆tij : the ‘new’ pheromone that is deposited by all ants on edge (i,j) calculated as:
m
k
k ij (^) ij 0
t t
Using heuristic information
- The attractiveness ij of edge (i,j) is computed by
some heuristic indicating the a priori desirability of that move.
- The pheromone trail level tij of edge (i,j) indicates
how proficient it has been in the past.
- = 0 represents a greedy approach and = 0
represents rapid selection of tours that may not be optimal.
- Thus, there is a tradeoff between speed and
quality.
Example: TSP
- Desirability ij = 1/dij
- Tabu list contains all cities an ant has visited already.
- N = e
- Adding “elitist ant”: best t (^) ij ( 1 )t ij t ij b t ij
otherwise
best Q^ Lbest if i j best ij 0
/ ( , ) t
- = 1
- = 5
- = 0.
- Q = 100
- t 0 = 10-^6
- b = 5
Solving a problem by ACO
- Represent the problem in the form a weighted
graph, on which ants can build solutions.
- Define the meaning of the pheromone trails.
- Define the heuristic preference for the ant while
constructing a solution.
- Choose a specific ACO algorithm and apply to
problem being solved.
- Tune the parameters of the ACO algorithm.
Applications of ACO
- Scheduling
- Routing problems
- Traveling Salesman Problem (TSP)
- Vehicle routing
- Network routing
- Set-problems
- Multi-Knapsack
- Max Independent Set
- Set Covering
- Other
- Shortest Common Sequence
- Constraint Satisfaction
- 2D-HP protein folding
Further reading
General Ant Colony Optimization:
- http://en.wikipedia.org/wiki/Ant_colony_optimization
- http://www.aco-metaheuristic.org/
Simulation applications:
- http://www.nightlab.ch/antsim/