Presentation is loading. Please wait.

Presentation is loading. Please wait.

Genetic Programming 20003106 김용덕. 2001-04-30Page 2 Contents What is Genetic Programming? Difference between GP and GA Flowchart for GP Structures in GP.

Similar presentations


Presentation on theme: "Genetic Programming 20003106 김용덕. 2001-04-30Page 2 Contents What is Genetic Programming? Difference between GP and GA Flowchart for GP Structures in GP."— Presentation transcript:

1 Genetic Programming 20003106 김용덕

2 2001-04-30Page 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 2001-04-30Page 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 2001-04-30Page 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 2001-04-30Page 5 Flowchart for GP (1) Gen=0 Create Initial Random Population Termination Criterion Satisfied? Evaluate Fitness of Each Individual in Population No Designated Result Yes End Individuals=0 Individuals=M ?Gen=Gen+1 Yes No

6 2001-04-30Page 6 Flowchart for GP (2) Select Genetic Operation Probabalistically Select One Individual Based on Fitness Select Two Individual Based on Fitness Select One Individual Based on Fitness Perform Reproduction Perform CrossoverPerform Mutation Copy into New Population Insert Two Offspring into New Population Insert Mutant into New Population Individuals=individuals + 1 Individuals=individuals + 2 Individuals=individuals + 1 reproductionmutation crossover

7 2001-04-30Page 7 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. ( * 2 ( * r r ) ) * 2 * rr 2 * r 2

8 2001-04-30Page 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 2001-04-30Page 9 Creation of Initial Population (2)

10 2001-04-30Page 10 Main Generational Loop The main generational loop of a run consists of The fitness evaluation The Darwinian selection The genetic operations.

11 2001-04-30Page 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 2001-04-30Page 12 Selection We shall consider different forms of selection: Fitness-Proportionate Selection Rank Selection Tournament Selection Greedy Over-Selection

13 2001-04-30Page 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 2001-04-30Page 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 2001-04-30Page 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 2001-04-30Page 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 2001-04-30Page 17 The genetic operations. Mutation Operation Crossover (Sexual Recombination) Operation Reproduction Operation Architecture-Altering Operations

18 2001-04-30Page 18 Mutation

19 2001-04-30Page 19 Crossover (Sexual Recombination)

20 2001-04-30Page 20 Reproduction Operation The reproduction operation copies a single individual, probabilistically selected based on fitness, into the next generation of the population.

21 2001-04-30Page 21 Architecture-Altering Operations subroutine duplication argument duplication subroutine creation subroutine deletion argument deletion

22 2001-04-30Page 22 subroutine duplication

23 2001-04-30Page 23 Argument duplication

24 2001-04-30Page 24 Subroutine Creation

25 2001-04-30Page 25 Subroutine Deletion

26 2001-04-30Page 26 Argument Deletion

27 2001-04-30Page 27 Example http://alphard.ethz.ch/gerber/approx/default.html

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


Download ppt "Genetic Programming 20003106 김용덕. 2001-04-30Page 2 Contents What is Genetic Programming? Difference between GP and GA Flowchart for GP Structures in GP."

Similar presentations


Ads by Google