Presentation is loading. Please wait.

Presentation is loading. Please wait.

Travelling Salesman Problem Stewart Adam Kevin Visser May 14, 2010.

Similar presentations


Presentation on theme: "Travelling Salesman Problem Stewart Adam Kevin Visser May 14, 2010."— Presentation transcript:

1 Travelling Salesman Problem Stewart Adam Kevin Visser May 14, 2010

2 The Problem Need to visit N cities with smallest total distance travelled Thought of in the 1830s Mathematicians in the 1930s realized the problem was unsolvable with the current technology

3 The Problem Assumptions made: ▫Must end at same city that we started at ▫Cannot visit any city twice ▫Can start the trip at any city

4

5 Conventional Approach Very long to calculate: ▫Modeling 30 cities means 30!=2.6 x 10^32 possible solutions ▫Equivalent to 8.4 x 10^24 years of trying at 1 solution/second

6 Genetic Algorithm Similar to wind farm problem Can’t use the same crossover or mutation methods, as that may result in duplicate cities Must converge on good solutions, but keep enough entropy in the solutions so we can pop out of local minimums ▫Solution: Morph our way out with lots of mutation ▫Solution: More elites to keep track of the better solutions

7 Crossover Given the parents: [7, 2, 4, 1, 9, | 5, 6, 8, 10, 3] and [4, 9, 10, 3, 7, | 5, 8, 6, 1, 2] Copy, excluding duplicates Child 1 (pass 1): [7, 2, 4, 1, 9, X, X, 10, 3, X] Fill in blanks with cities from parent 2 (in unused order) Child 1 (pass 2): [7, 2, 4, 1, 9, 5, 8, 10, 3, 6]

8 Mutation Swap the position of two elements More randomness! ▫When mutation happens, it randomly performs 1 or 2 “swap” passes ▫Mutation 50% of the time ▫1% of mutations are greedy (force a better solution)

9 Fun stuff: Videos Circle: Long

10 Fun stuff: Videos Circle: Short

11 Fun stuff: Videos Random: Local minimum

12 Fun stuff: Videos Test case: Stuck

13 Fun stuff: Videos Test case: Best

14 The best solution had a distance of 948.33 units (shown on left). Results

15 Best solution != nearest city The best results always seems to form closed shapes Shapes are close as possible to the circumference of a circle (contours). No diagonal lines Results

16


Download ppt "Travelling Salesman Problem Stewart Adam Kevin Visser May 14, 2010."

Similar presentations


Ads by Google