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

Ant colony optimization

  • 1.
  • 2.
    Swarm Intelligence “Swarm intelligence (SI) is artificial intelligence based on the collective behaviour of decentralized, self-organized systems”
  • 3.
    Characteristics of SwarmsComposed of many individuals Individuals are homogeneous Local interaction based on simple rules Self-organization Constituting a natural model particularly suited to distributed problem solving
  • 6.
    Ant Colony OptimizationOptimization Technique Proposed by Marco Dorigo in the early ’90 Heuristic optimization method inspired by biological systems Multi-agent approach for solving difficult combinatorial optimization problems Has become new and fruitful research area
  • 7.
  • 8.
    How can theymanage such great tasks ? Ants are , essentially blind, deaf and dumb. social creatures – behavior directed to survival of colony Question: how can ants find the short path to food sources?
  • 9.
    SHORTEST PATH Answer:Ants deposit pheromones on ground that form a trail. The trail attracts other ants. Pheromones evaporate faster on longer paths. Shorter paths serve as the way to food for most of the other ants.
  • 10.
    Application Traveling SalesmanProblem Quadratic Assignment Problem Network Model Problem Vehicle routing Graph coloring
  • 11.
    Aco system -PSEUDOCODEOften applied to TSP (Travelling Salesman Problem): shortest path between n nodes Algorithm in Pseudocode: Initialize Trail Do While (Stopping Criteria Not Satisfied) – Cycle Loop Do Until (Each Ant Completes a Tour) – Tour Loop Local Trail Update End Do Analyze Tours Global Trail Update End Do
  • 12.
    Algorithm Ant ColonyAlgorithms are typically use to solve minimum cost problems. We may usually have N nodes and A undirected arcs There are two working modes for the ants: either forwards or backwards The ants memory allows them to retrace the path it has followed while searching for the destination node 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.
  • 13.
    Algorithm At thebeginning 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: where is the neighborhood of ant k when in node i.
  • 14.
    Algorithm When thearc (i,j) is traversed , the pheromone value changes as follows: By using this rule, the probability increases that forthcoming ants will use this arc. After each ant k has moved to the next node, the pheromones evaporate by the following equation to all the arcs:
  • 15.
    Steps for Solvinga Problem by ACO 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 Define the meaning of the pheromone trails Define the heuristic preference for the ant while constructing a solution If possible implement a efficient local search algorithm for the problem to be solved. Choose a specific ACO algorithm and apply to problem being solved Tune the parameter of the ACO algorithm.
  • 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.
    Iteration 1 AD C B 1 [A] 3 [C] 2 [B] 4 [D]
  • 18.
    How to buildnext sub-solution? A D C B 1 [A]
  • 19.
    Iteration 2 AD C B 2 [B,C] 3 [C,D] 1 [A,B] 4 [D,A]
  • 20.
    Iteration 3 AD C B 2 [B,C,D] 3 [B,C,A] 4 [D,A,B] 1 [A,B,C]
  • 21.
    Iteration 4 AD C B 1 [A,B,C,D] 2 [B,C,D,A] 3 [C,D,A,B] 4 [D,A,B,C]
  • 22.
    Path and PheromoneEvaluation 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.
    End of FirstRun All ants die New ants are born Save Best Tour (Sequence and length)
  • 24.
    Advantages and DisadvantagesFor TSPs (Traveling Salesman Problem), relatively efficient for a small number of nodes, TSPs can be solved by exhaustive search for a large number of nodes, TSPs are very computationally difficult to solve exponential time to convergence Performs better against other global optimization techniques such as neural net, genetic algorithms, simulated annealing Can be used in dynamic applications (adapts to changes such as new distances, etc.) Convergence is guaranteed, but time to convergence uncertain