25
Parallel Ant Colony Optimization for Real World Problems Brandon Phelps and Daniel White

Parallel Ant Colony Optimization for Real World Problems

Embed Size (px)

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 Presentation

Citation preview

Page 1: Parallel Ant Colony Optimization for Real World Problems

Parallel Ant Colony Optimization for Real World Problems

Brandon Phelps and Daniel White

Page 2: Parallel Ant Colony Optimization for Real World Problems

Topics to be covered:Traveling Salesman Problem(TSP)

Sequential TSP Solution

Ant Colony Optimization(ACO)

Parallelization of ACO

Time Complexity Comparison

Page 3: Parallel Ant Colony Optimization for Real World Problems

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

Page 4: Parallel Ant Colony Optimization for Real World Problems

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.

Page 5: Parallel Ant Colony Optimization for Real World Problems

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

Page 6: Parallel Ant Colony Optimization for Real World Problems

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?

Page 7: Parallel Ant Colony Optimization for Real World Problems

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

Page 8: Parallel Ant Colony Optimization for Real World Problems

Colony

G

S

Page 9: Parallel Ant Colony Optimization for Real World Problems

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.

Page 10: Parallel Ant Colony Optimization for Real World Problems

S

Page 11: Parallel Ant Colony Optimization for Real World Problems

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.

Page 12: Parallel Ant Colony Optimization for Real World Problems

How ACO relates to parallel processing

Two types - Multiple ants - Multiple colonies

Distributed Memory vs Shared Memory- Contrast

Page 13: Parallel Ant Colony Optimization for Real World Problems

Multiple ants

Each processor acts like a single ant, which generates a local pheromone map. This is then sent to a master processor.

Page 14: Parallel Ant Colony Optimization for Real World Problems

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.

Page 15: Parallel Ant Colony Optimization for Real World Problems

P0

P1 P2 P3

Page 16: Parallel Ant Colony Optimization for Real World Problems

Multiple Colonies

Each processor runs an entire colony. After which information is sent across processors about each colony’s best solution so far.

Page 17: Parallel Ant Colony Optimization for Real World Problems

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.

Page 18: Parallel Ant Colony Optimization for Real World Problems

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

Page 19: Parallel Ant Colony Optimization for Real World Problems

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.

Page 20: Parallel Ant Colony Optimization for Real World Problems

DEMO

Page 21: Parallel Ant Colony Optimization for Real World Problems

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

Page 22: Parallel Ant Colony Optimization for Real World Problems

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

Page 23: Parallel Ant Colony Optimization for Real World Problems

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.

Page 24: Parallel Ant Colony Optimization for Real World Problems

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

Page 25: Parallel Ant Colony Optimization for Real World Problems

Questions?