1 / 8

Genetic Algorithm

Genetic Algorithm. Example based on Koza, J. 1993. Genetic Programming. Cambridge MA: Basic Books. Avoiding paths altogether. genetic algorithms pick set of states randomly order states by fitness create new set of states by combining state variables of most fit

ohio
Download Presentation

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. Genetic Algorithm Example based on Koza, J. 1993. Genetic Programming. Cambridge MA: Basic Books

  2. Avoiding paths altogether • genetic algorithms • pick set of states randomly • order states by fitness • create new set of states by combining state variables of most fit • make a few random changes to state variables • go to 2 D Goforth - COSC 4117, fall 2006

  3. Example: Koza, based on Goldberg and Samtani in 1986 • Problem minimize cost of 10-member truss that meets stress requirements 8m 8m A3 A6 A5 A7 6m A2 A4 A9 A10 A1 A8 100kg 100kg D Goforth - COSC 4117, fall 2006

  4. Example: Koza, based on Goldberg and Samtani in 1986 • Problem minimize cost of 10-member truss that meets stress requirements 8m 8m A3 A6 A5 A7 6m A2 A4 A9 A10 A1 A8 100kg 100kg D Goforth - COSC 4117, fall 2006

  5. 8m 8m A10 A3 A6 A5 A7 6m A2 A4 A9 A1 A8 100kg 100kg Problem definition • 16 levels of strength for beams based on cross-section; cost increases with cross-section • Stress requirements for the truss • Goal: minimize cost of safe truss • Cost is minimized by minimizing truss weight = cross-section * length • Stress calculations are based on all member weights (succeed/fail) D Goforth - COSC 4117, fall 2006

  6. Problem representation • Represent cross-sections by 4-bit binary code • Represent a particular design by 10x4=40 bits • E.g., 0110 1101 0101 0101 1011 0110 1010 1010 1111 0111 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 • State space is set of all possible designs • 240 designs • No obvious start state; no “path” to solution  Genetic algorithm D Goforth - COSC 4117, fall 2006

  7. Genetic Algorithm I • pick set of states randomly (initial population) 0110 1101 0101 0101 1011 0110 1010 1010 1111 0111 (351) 1011 0110 1010 1010 1111 1101 0101 0111 0110 0101 (377) 1101 1011 0110 1010 0110 1111 1101 0101 1010 0111 (391) 0110 1101 1011 0101 0101 0110 1111 0111 1010 1010 (438) 1001 0111 0101 1011 0110 1010 1010 0110 1101 0101 (fail) 1111 0111 0110 1101 0101 0101 1011 0110 1010 1010 (fail) • order states by fitness (weight, stress) D Goforth - COSC 4117, fall 2006

  8. Genetic Algorithm II • create new set of states by combining state variables of (3) most fit and replacing least fit 1011 0110 1010 1010 1011 0110 1010 1010 1111 0111 (337) 0110 1101 0101 0101 1011 0110 1010 1010 1111 0111 (351) 0110 1101 0101 0101 1011 0110 1101 0101 1010 0111 (366) 0110 1101 0100 0101 1111 1101 0101 0111 0110 0101 (370) 1011 0110 1010 1010 1111 1101 1101 0111 0110 0101 (377) 1101 1011 0110 1010 0110 1111 1101 0101 1010 0111 (391) • make a few mutations (random changes to variables) • go to 2 repeat until no more improvement in best fitness D Goforth - COSC 4117, fall 2006

More Related