1 / 15

Ch.12 Machine Learning Genetic Algorithm

Ch.12 Machine Learning Genetic Algorithm. Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2011. Genetic Algorithm (GA). GA view learning as a competition among a population of evolving candidate problem solutions.

gay-moses
Download Presentation

Ch.12 Machine Learning Genetic Algorithm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ch.12 Machine Learning Genetic Algorithm Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2011

  2. Genetic Algorithm (GA) • GA view learning as a competition among a population of evolving candidate problem solutions. • A “fitness” function evaluates each solution to decide whether it will contribute to the next generation of solutions

  3. Genetic Algorithm

  4. Genetic Algorithm • Basic functions of Genetic Algorithm (GA) • Crossover • Mutation: takes a single candidate and randomly changes some aspect of it • Inversion

  5. Genetic Algorithm • Example: Traveling Salesperson problem • The Traveling salesperson problem • Suppose a salesperson has five cities to visit and then must return home • The goal of the problem is to find the shortest path for the salesperson to travel

  6. Genetic Algorithm • Traveling Salesperson Problem (TSP) is classic to AI and computer science • It has been shown to be NP-hard problem • TSP has some very nice applications, including • Circuit board drilling • X-ray crystallography • Routing in VLSI fabrications • Some of these applications required to travel tens of thousands points (cities)

  7. Genetic Algorithm • How might we use genetic algorithm (GA) to solve traveling salesperson problem (TSP)? • First of all, the choice of a representation for the path of cities visited in not trivial • Give each city an numeric name • The design of fitness function is much easier

  8. Genetic Algorithm • Now, the problem is how to crossover? • P1= (192465783) • P2= (459187623)

  9. Genetic Algorithm • First of all, select two cut point, indicate by a “|”, which are randomly inserted into the same location of each parent • P1= (192 | 4657 | 83) • P2= (459 | 1876 | 23)

  10. Genetic Algorithm • Two children C1 and C2 are produced in the following way. • First, the segments between cut points are copied into the offspring: • C1= (XXX | 4657 | XX) • C2= (XXX | 1876 | XX)

  11. Genetic Algorithm • Next, starting from the second cut point of one parent, the cities from the other parent are copied in the same order, omitting cities already present • When the end of the string is reached, continue on from the beginning • Thus, the sequence of cities from P2 (459 | 1876 | 23) is 23 459 1876

  12. Genetic Algorithm • For C1= (XXX | 4657 | XX), once 4657 are removed from the sequence generated by P2, we get the sequence 23918. • Then we just use these numbers to fill in the XXX XX portion in order • Thus, C1=(239 | 4657 | 18)

  13. Genetic Algorithm • So, what is C2?

  14. Genetic Algorithm • Mutation: • A mutation operation could be defined that randomly selected a city and placed it in a new randomly selected location in the path • Randomly selected two cities and swap their location

  15. Genetic Algorithm • Inversion: Just reverse the order

More Related