parallel ant colony optimization for real world problems
DESCRIPTION
Parallel Ant Colony Optimization for Real World Problems. Brandon Phelps and Daniel White. Topics to be covered:. Traveling Salesman Problem(TSP) Sequential TSP Solution Ant Colony Optimization(ACO) Parallelization of ACO Time Complexity Comparison. Introduction to TSP. - PowerPoint PPT PresentationTRANSCRIPT
Parallel Ant Colony Optimization for Real World Problems
Brandon Phelps and Daniel White
Topics to be covered:Traveling Salesman Problem(TSP)
Sequential TSP Solution
Ant Colony Optimization(ACO)
Parallelization of ACO
Time Complexity Comparison
Introduction to TSP
Traveling Salesman Problem - Given a list of cities and distance between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?
For a number of cities N, the number of permutations of cycles is N factorial. The time complexity for an exact algorithm with brute force search is O(N!) because all possible cycles must be considered.
This will produce the optimal path, but becomes almost unusable for anything past a couple dozen vertices.
NP-Hard - Nondeterministic Polynomial Time
Why TSP is Important
Circuit Boards When drilling circuit boards, different sizes of bits are used to drill and the TSP is used to find the fastest path to decrease production time.
Sequential Algorithm for TSPNearest Neighbor - also known as the greedy algorithm. Doesn't return an exact answer, but
rather just a relatively short cycle. (Averages 25% longer than optimal)
O( n2 ) - Similar to Prim's algorithm, nearest neighbor goes along each vertex and chooses the next vertex to visit by the shortest edge.
Choose a starting pointing V
V = starting vertex
while (all vertices have not been visited)
set V as visited
for all vertices connected to Vreturn edge values and compare to find nearest
unvisited vertex
V = nearest vertex
What is ACO?
Ant Colony Optimization - an algorithm to find “good” paths through graphs
ACO is based on the generalized behavior of an ant colony seeking a path between the colony and a source of food.
So how do ant colonies work?
Ant Colony Behavior
Initially, ants wander in random directions until food is found
Once food is found, the ants return to the colony, laying down pheromone trails for other ants to follow and find the food.
- If an ant finds an existing pheromone trail, it is likely to follow it - The trail is reinforced if other ants find the food as well
Colony
G
S
How ACO works on TSP
At each node, or “city”, the ant chooses the next node according to some parameters:
1) The ant must visit every node only once. 2) The distance of the next node. Distant nodes are not as likely
to be chosen.3) The pheromone value of the path between nodes. The higher
the value, the more likely the path will be chosen. 4) The cost of the tour. After all the ants in the iteration have
completed a loop, the ant with the shortest tour places pheromones on the path with the lowest cost.
S
How ACO works on TSP cont.
Ant memory - Each ant has a visited set for traversing through the graph
- Each ant also has a local pheromone “map” used to record it’s route.
Global Pheromone Map- Updated after all ants have traversed the graph with the lowest path cost found.
How ACO relates to parallel processing
Two types - Multiple ants - Multiple colonies
Distributed Memory vs Shared Memory- Contrast
Multiple ants
Each processor acts like a single ant, which generates a local pheromone map. This is then sent to a master processor.
Multiple ants cont.
The master processor then updates the global pheromone map. Which is then sent back to the slave processors. This then completes the cycle and is repeated for N generations.
P0
P1 P2 P3
Multiple Colonies
Each processor runs an entire colony. After which information is sent across processors about each colony’s best solution so far.
Multiple Colonies Modifications
By taking advantage of the parallel processing and the multiple amount of parameters.
Each processor can be given different parameters which can cause an increase in diversity of the solutions.
Comparison of Sequential Time Complexity
Nearest neighbor O(n^2)
Ant colony Optimization O(G*A*n^2)G = number of generations A = number of ants
Parallel vs Sequential Time Complexity
Multiple AntsO(G(lg(n)*P + n^2))
where P is the number of processors
Multiple Colonies- same as Sequential, except has a greater convergence rate, as well as search space.
DEMO
Our Results - Computation Time
Average of 20 runsConstant: 50 generations, 30 cities
Number of ants Time (sec)
10 4.293
20 8.464
30 12.6821
40 16.865
50 21.080
Our Results - Path Length
Average over 20 runsConstant: 40 ants, 50 generations
Cities Average Ant Path Length
Average NN Path Length
Average Ant Time (sec)
Average NN Time (sec)
10 82 83 .9456 .0002
30 78 107 12.64 .0006
50 149 156 49.83 .00164
70 160 185 126.97 .0039
Conclusion
ACO, due to it’s nature, is easy to implement on a parallel system.
Using multiple processors, good solutions to the TSP can be found.
Citations
Ant colonies for the traveling salesman problem, Marco Dorigo and Luca Maria Gambardella
A Parallel Implementation of Ant Colony Optimization, Marcus Randall and Andrew Lewis
Questions?