1 / 28

Genetic Programming

Genetic Programming. 20003106 김용덕. Contents. What is Genetic Programming? Difference between GP and GA Flowchart for GP Structures in GP Creation of Initial Population Main Generational Loop The fitness evaluation Selection The genetic operations. Example.

pembroke
Download Presentation

Genetic Programming

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 Programming 20003106 김용덕

  2. Contents • What is Genetic Programming? • Difference between GP and GA • Flowchart for GP • Structures in GP • Creation of Initial Population • Main Generational Loop • The fitness evaluation • Selection • The genetic operations. • Example

  3. What is Genetic Programming? • One of the central challenges of CS is to get a computer to do what needs to be done, without telling it how to do it. • Automatic programming (program synthesis or program induction) • Koza suggests that the desired program evolves itself. • GP is a branch of genetic algorithms.

  4. Difference between GP and GA • Representation of the solution • GA : • a string of numbers • GP : • computer program (originally lisp or scheme) • Represent hierarchical computer programs of dynamically varying sizes and shapes.

  5. Gen=0 Create Initial Random Population Designated Result Yes Termination Criterion Satisfied? No Evaluate Fitness of Each Individual in Population End Individuals=0 Yes Gen=Gen+1 Individuals=M ? No Flowchart for GP (1)

  6. reproduction mutation Select Genetic Operation Probabalistically crossover Select One Individual Based on Fitness Select Two Individual Based on Fitness Select One Individual Based on Fitness Perform Reproduction Perform Crossover Perform Mutation Insert Mutant into New Population Copy into New Population Insert Two Offspring into New Population Individuals=individuals + 2 Individuals=individuals + 1 Individuals=individuals + 1 Flowchart for GP (2)

  7. * 2 * r2 ( * 2 ( * r r ) ) 2 * r r Structures in GP • Structures in GP consist of • Functions • sin, cos, add, sub, AND, if-then-else, turn... • Terminals • X, Y, 0.456, true, false, p, sensor0... • The programs in LISP are s-expressions • Any s-expression can be drawn as a tree of functions and terminals.

  8. Creation of Initial Population (1) • It starts with a primordial ooze of thousands of randomly-generated computer programs. • The randomly created programs typically have different sizes and shapes. • The depth of a tree must be defined. • Full method • The tree is equal to a equal length • Grow method • It is created variable length paths. • Rpm-Half and Half method • Mixing full and grow method

  9. Creation of Initial Population (2)

  10. Main Generational Loop • The main generational loop of a run consists of • The fitness evaluation • The Darwinian selection • The genetic operations.

  11. The fitness evaluation • Ex) • The number of blocks pushed against a wall • The amount of food eaten • The error between the output and the target output

  12. Selection • We shall consider different forms of selection: • Fitness-Proportionate Selection • Rank Selection • Tournament Selection • Greedy Over-Selection

  13. Fitness Proportionate Selection • Individuals are selected with a probability according to their fitness. • This is like the roulette-wheel fitness from GA’s.

  14. Rank Selection • Individuals are ordered according to their fitness and then selected according to their rank, not their numerical fitness. • The amount of selection pressure towards very high individuals is limited. It also exaggerates the difference between closely clustered fitness values so better ones are sampled more

  15. Tournament Selection • Create a tournament by selecting n individuals randomly (with random uniform distribution) from the population. • Then choose a winner from this tournament. • “when two bulls fight over the right to mate with a given cow, tournament selection is occurring” • n is usually two, but sometimes higher!

  16. Greedy Over-Selection • We perform greedy over-selection by giving fitter individuals and even better chance of being selected. • Greedy over-selection is used when population is large (>= 1000). • The individuals are sorted according to fitness, with the top 32% in group 1, and the rest in group 2. • Then, 80% of the time, we select from group 1, and 20% of the time, we select from group 2 (using either fitness-proportionate, rank or tournament selection) • For higher population sizes: 2000, 4000, 8000, use 16%, 8% and 4% respectively to pick the class 1 elements.

  17. The genetic operations. • Mutation Operation • Crossover (Sexual Recombination) Operation • Reproduction Operation • Architecture-Altering Operations

  18. Mutation

  19. Crossover (Sexual Recombination)

  20. Reproduction Operation • The reproduction operation copies a single individual, probabilistically selected based on fitness, into the next generation of the population.

  21. Architecture-Altering Operations • subroutine duplication • argument duplication • subroutine creation • subroutine deletion • argument deletion

  22. subroutine duplication

  23. Argument duplication

  24. Subroutine Creation

  25. Subroutine Deletion

  26. Argument Deletion

  27. Example • http://alphard.ethz.ch/gerber/approx/default.html

  28. Reference • Zbigniew Michalewicz, Genetic Algorithms + Data Structures = Evolution Programs • http://www.genetic-programming.com/gpanimatedtutorial.html • http://www.geneticprogramming.com/Tutorial/tutorial.html

More Related