Genetic Algorithms GAs Genetic Programming GP - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Genetic Algorithms GAs Genetic Programming GP

Description:

Genetic Programming. Program discovery with GA ... GP Chromosomes. Usually trees (i.e. parse trees) e.g. parse tree for LISP program: ... – PowerPoint PPT presentation

Number of Views:251
Avg rating:3.0/5.0
Slides: 19
Provided by: dab9
Category:

less

Transcript and Presenter's Notes

Title: Genetic Algorithms GAs Genetic Programming GP


1
Genetic Algorithms (GAs)Genetic Programming (GP)
  • Winter 2005

2
Intro
  • Genetic Algorithm
  • Developed by John H. Holland mid-70s
  • Evolutionary search algorithm
  • Evolves bit-strings (1s and 0s)
  • Genetic Programming
  • Developed by John Koza early 90s
  • Algorithm based on the GA
  • Evolves program trees

3
GA Chromosomes
  • Usually bit-strings
  • e.g. 1100101010
  • Distinct mapping between genotype and phenotype
  • e.g. 1100101010 blue eyes

4
Basic GA
population
crossover
1100101010 1011101110 0011011001 1100110001
1100101010 1011101110 1100101110 1011101010
selection
fitness evaluation
mutation
0011011001 0011001001
decoding
new population
1100101110 1011101010 0011001001
insert / replace
5
GA Algorithm
  • Generate initial population of n individuals
  • P c1, , cn
  • Evaluate all individuals to calculate fitness
    using a fitness function
  • Repeat until termination criteria met
  • Select individuals from P (mating pool)
  • Apply genetic operators (crossover, mutation)
  • Generate offspring population
  • Evaluate offspring population

6
Fitness
  • Driving force in evolution
  • Usually explicit fitness for GAs
  • Can be calculated at any time with a function
  • Calculated using a fitness (or objective)
    function
  • Usually non-trivial to find a good fitness
    function

7
Selection
  • Most important part of the algorithm
  • Selects the best individuals for
    mating/reproduction purposes
  • Few common selection schemes
  • Fitness-Proportional
  • Roulette wheel
  • Rank
  • Tournament

8
Roulette Wheel Selection
  • Parents are selected according to their fitness.
    The better the chromosomes are, the more chances
    to be selected they have. Imagine a roulette
    wheel where all the chromosomes in the population
    are placed. The size of the section in the
    roulete wheel is proportional to the value of the
    fitness function of every chromosome - the bigger
    the value is, the larger the section is. See the
    following picture for an example.

9
Ranking Selection
  • Hides absolute fitness differences
  • Reduces selection pressure under high fitness
    variance
  • Maintains selection pressure under low fitness
    variance
  • Cons
  • Requires sorting of individuals

10
Ranking Cont..
Rank selection ranks the population first and
then every chromosome receives fitness value
determined by this ranking. The worst will have
the fitness 1, the second worst 2 etc. and the
best will have fitness N (number of chromosomes
in population).
Before Using Rank Selection
After Using Rank Selection
11
Tournament Selection
  • In general tournament selection n individuals are
    selected at random and the fittest is selected.
    The most common type of tournament selection is
    binary tournament selection, where just two
    individuals are selected.

12
Genetic Operators
  • Crossover
  • The most important operator in GAs
  • Choose 1 (single-point crossover) or more
    crossover points and swap corresponding sections
    of 2 parents to form children
  • Usually high probability 90
  • Mutation
  • Secondary genetic operator
  • Most common is point mutation where a bit is
    flipped with a given probability (other types
    proposed)
  • Usually low probability 5 per chrom

13
Genetic Programming
  • Program discovery with GA
  • Works directly with programs (no genotype
    encoding) usually rooted-tree representation
  • Chromosome Generation
  • Internal nodes from Function Set
  • Leaf nodes from Terminal Set

14
GP Chromosomes
  • Usually trees (i.e. parse trees)
  • e.g. parse tree for LISP program
  • ( (- 6 1) ( x ( 1 7)))



-
x
6
1

1
7
15
Genetic Operators
Parents
  • Crossover

A
B
Children
A
B
16
Genetic Operators
  • Mutation (point-mutation)
  • Replace subtree at randomly chosen node with
    another subtree
  • Other types proposed

Parent
Child
Mutation point
17
Sufficiency and Closure
  • Terminal/Function sets and genetic operators must
    guarantee sufficiency closure
  • Sufficiency TF sets must be sufficient in order
    to compute a solution to the problem
  • Closure every function in F must accept as
    argument any return value from any function and
    any terminal value

18
  • http//cs.felk.cvut.cz/xobitko/ga/
Write a Comment
User Comments (0)
About PowerShow.com