110 likes | 351 Views
Genetic Algorithms : An Examination of the Traveling Salesman Problem. Troy Cok Engineering 315 December 3, 2001. Basic Overview. Genetic algorithms are attempts to model evolutionary behavior Survival of the fittest, etc. More than mere simulations of life
E N D
Genetic Algorithms:An Examination of the Traveling Salesman Problem Troy Cok Engineering 315 December 3, 2001
Basic Overview • Genetic algorithms are attempts to model evolutionary behavior • Survival of the fittest, etc. • More than mere simulations of life • Goal: Exhibit real characteristics of living things • GA’s have several uses • Problem solvers • Basis for competent machine learning • Computational models of innovation, creativity, etc.
Classic GA Problem • Traveling Salesman Problem (TSP) • Implications in science, engineering • Control of routing system • Constraints: • Can be in one city at a time • Each city visited once and only once • Problem: • What is the shortest route through N cities?
Mathematical Attempts at TSP • Testing every possibility would require N! separate additions • For a 15 city tour: • 15! = 1.31 x 1012 separate calculations • Assuming 1 million calculations per second 15.2 days • Increasing complexity…
Solving TSP using GA • Generates a “near-perfect” solution in minutes • Steps: • Create group of random tours • Stored as sequence of numbers (parents) • Choose 2 of the better solutions • Combine and create new sequences (children) • Problems here: • City 1 repeated in Child 1 • City 5 repeated in Child 2
Modifications Needed • Algorithm must not allow repeated cities • Also, order must be considered • 12345 is same as 32154 • Based upon these considerations, a computer model for N cities can be created • Gets quite detailed
Final Notes • GA’s determine adequate “solution” to TSP • Much faster than sheer number-crunching • Enables efficient system control • The better the algorithm, the better the solution • Ongoing research in this area