Ant colony optimization


Published on

Published in: Education, Technology

Ant colony optimization

  1. 1. Ant Colony Optimization
  2. 2. Swarm Intelligence <ul><li>“ Swarm intelligence (SI) is artificial intelligence based on the collective behaviour of decentralized, self-organized systems” </li></ul>
  3. 3. Characteristics of Swarms <ul><li>Composed of many individuals </li></ul><ul><li>Individuals are homogeneous </li></ul><ul><li>Local interaction based on simple rules </li></ul><ul><li>Self-organization </li></ul><ul><li>Constituting a natural model particularly suited to distributed problem solving </li></ul>
  4. 4.
  5. 5.
  6. 6. Ant Colony Optimization <ul><li>Optimization Technique Proposed by Marco Dorigo in the early ’90 </li></ul><ul><li>Heuristic optimization method inspired by biological systems </li></ul><ul><li>Multi-agent approach for solving difficult combinatorial optimization problems </li></ul><ul><li>Has become new and fruitful research area </li></ul>
  7. 7. Natural behavior of ant
  8. 8. How can they manage such great tasks ? <ul><li>Ants are , </li></ul><ul><li>essentially blind, deaf and dumb. </li></ul><ul><li>social creatures – behavior directed to survival of colony </li></ul><ul><li>Question: how can ants find the short path to food sources? </li></ul>
  9. 9. SHORTEST PATH <ul><li>Answer: </li></ul><ul><li>Ants deposit pheromones on ground that form a trail. The trail attracts other ants. </li></ul><ul><li>Pheromones evaporate faster on longer paths. </li></ul><ul><li>Shorter paths serve as the way to food for most of the other ants. </li></ul>
  10. 10. Application <ul><li>Traveling Salesman Problem </li></ul><ul><li>Quadratic Assignment Problem </li></ul><ul><li>Network Model Problem </li></ul><ul><li>Vehicle routing </li></ul><ul><li>Graph coloring </li></ul>
  11. 11. Aco system -PSEUDOCODE <ul><li>Often applied to TSP (Travelling Salesman Problem): shortest path between n nodes </li></ul><ul><li>Algorithm in Pseudocode: </li></ul><ul><ul><li>Initialize Trail </li></ul></ul><ul><ul><li>Do While (Stopping Criteria Not Satisfied) – Cycle Loop </li></ul></ul><ul><ul><ul><li>Do Until (Each Ant Completes a Tour) – Tour Loop </li></ul></ul></ul><ul><ul><ul><li>Local Trail Update </li></ul></ul></ul><ul><ul><ul><li>End Do </li></ul></ul></ul><ul><ul><ul><li>Analyze Tours </li></ul></ul></ul><ul><ul><ul><li>Global Trail Update </li></ul></ul></ul><ul><ul><li>End Do </li></ul></ul>
  12. 12. Algorithm <ul><li>Ant Colony Algorithms are typically use to solve minimum cost problems. </li></ul><ul><li>We may usually have N nodes and A undirected arcs </li></ul><ul><li>There are two working modes for the ants: either forwards or backwards </li></ul><ul><li>The ants memory allows them to retrace the path it has followed while searching for the destination node </li></ul><ul><li>Before moving backward on their memorized path, they eliminate any loops from it. While moving backwards, the ants leave pheromones on the arcs they traversed. </li></ul>
  13. 13. Algorithm <ul><li>At the beginning of the search process, a constant amount of pheromone is assigned to all arcs. When located at a node i an ant k uses the pheromone trail to compute the probability of choosing j as the next node: </li></ul><ul><li>where is the neighborhood of ant k when in node i. </li></ul>
  14. 14. Algorithm <ul><li>When the arc (i,j) is traversed , the pheromone value changes as follows: </li></ul><ul><li>By using this rule, the probability increases that forthcoming ants will use this arc. </li></ul><ul><li>After each ant k has moved to the next node, the pheromones evaporate by the following equation to all the arcs: </li></ul>
  15. 15. Steps for Solving a Problem by ACO <ul><li>Represent the problem in the form of sets of components and transitions, or by a set of weighted graphs, on which ants can build solutions </li></ul><ul><li>Define the meaning of the pheromone trails </li></ul><ul><li>Define the heuristic preference for the ant while constructing a solution </li></ul><ul><li>If possible implement a efficient local search algorithm for the problem to be solved. </li></ul><ul><li>Choose a specific ACO algorithm and apply to problem being solved </li></ul><ul><li>Tune the parameter of the ACO algorithm. </li></ul>
  16. 16. A simple TSP example A D C B d AB =8;d BC = 4;d CD =15;d DA =6 1 [] 4 [] 3 [] 2 []
  17. 17. Iteration 1 A D C B 1 [A] 3 [C] 2 [B] 4 [D]
  18. 18. How to build next sub-solution? A D C B 1 [A]
  19. 19. Iteration 2 A D C B 2 [B,C] 3 [C,D] 1 [A,B] 4 [D,A]
  20. 20. Iteration 3 A D C B 2 [B,C,D] 3 [B,C,A] 4 [D,A,B] 1 [A,B,C]
  21. 21. Iteration 4 A D C B 1 [A,B,C,D] 2 [B,C,D,A] 3 [C,D,A,B] 4 [D,A,B,C]
  22. 22. Path and Pheromone Evaluation L 1 =27 L 2 =25 L 3 =29 L 4 =18 1 [A,B,C,D 2 [B,C,D,A] 3 [C,D,A,B] 4 [D,A,B,C] Best tour
  23. 23. End of First Run All ants die New ants are born Save Best Tour (Sequence and length)
  24. 24. Advantages and Disadvantages <ul><li>For TSPs (Traveling Salesman Problem), relatively efficient </li></ul><ul><ul><li>for a small number of nodes, TSPs can be solved by exhaustive search </li></ul></ul><ul><ul><li>for a large number of nodes, TSPs are very computationally difficult to solve exponential time to convergence </li></ul></ul><ul><li>Performs better against other global optimization techniques such as neural net, genetic algorithms, simulated annealing </li></ul><ul><li>Can be used in dynamic applications (adapts to changes such as new distances, etc.) </li></ul><ul><li>Convergence is guaranteed, but time to convergence uncertain </li></ul>