Genetic Algorithms - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Genetic Algorithms

Description:

... (engine size, car weight, ??) = mpg ... Large size provides a good sampling of the search space ... Population statistics can be used to test for convergence ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 21
Provided by: janpr
Category:

less

Transcript and Presenter's Notes

Title: Genetic Algorithms


1
Genetic Algorithms
  • Jan Prokaj

2
Genetic Algorithms
  • Background
  • What they are
  • Genetic algorithm step by step
  • Genetic algorithm applet
  • Summary
  • Bibliography

3
Background
  • Pioneered by John H. Holland in 1960s at the
    University of Michigan
  • Solve optimization problems
  • Based on evolution in nature
  • Reproduction
  • Variation
  • Heritable characteristics
  • Natural selection

4
Definitions
  • Population
  • A set of chromosomessolutionsat one period of
    time
  • Chromosome
  • An individual in a population
  • One point in the search space
  • Search space
  • All potential solutions to a problem

5
Search Space
6
Genetic Algorithm (GA)
7
Genetic Algorithm
  • f(chromosome) //define fitness function
  • Create the initial population
  • do
  • Compute a fitness value for each chromosome
  • Discard unfit chromosomes
  • while lt population size
  • Select mates
  • Reproduce
  • Mutate
  • while gt convergence threshold // lt N iterations
  • output

8
Genetic Algorithm
  • Each iteration is a generation
  • Each individual in a population is a possible
    solution
  • Often encoded in a string of bits
  • Objective is to maximize the fitness value for
    each individual
  • The fitness function is defined by a particular
    problem

9
Fitness function
  • Input chromosome p1,p2,,pN
  • Output f(p1,p2,,pN)
  • Can be quite complicated
  • Example
  • Finding the peak in Rocky Mountains
  • f(longitude, latitude) elevation
  • Maximizing gas mileage
  • f(engine size, car weight, ??) mpg ( )

10
Initial Population
  • Chromosomes are randomly generated
  • Large size provides a good sampling of the search
    space
  • Usually trimmed before starting iterations
  • Different sampling methods (next slide)

11
Initial Population sampling
12
Natural Selection
  • Occurs each generation of the algorithm
  • The least fit chromosomes are discarded (Nbad)
  • Nbad replaced by offspring from the most fit
    chromosomes (Ngood)
  • Number of fittest chromosomes can be thresholded
    or fixed

13
Pairing
  • Takes place between Ngood until enough offspring
    is produced to replace Nbad
  • Different methods
  • Top to bottom
  • Random pairing
  • Weighted random pairing (roulette wheel
    weighting)
  • Tournament selection

14
Mating / Crossover
  • Select a crossover point between the first and
    the last bit of the parents chromosomes
  • Simple crossover (more complicated exist)

15
Mutations
  • Random mutations alter a small percentage of the
    bits in chromosomes
  • Typically 1-5 of bits mutate per iteration
  • Generally not done on good solutions
  • Types
  • Single point
  • Insertion, deletion
  • Allow to explore the search space

16
Convergence
  • After a while, all the chromosomes stabilize
  • Population statistics can be used to test for
    convergence
  • Rate of convergence depends on various factors
    (mutation rate, crossover rate,)

17
Genetic Algorithm applets
  • http//cs.felk.cvut.cz/xobitko/ga/

18
Applications
  • Nonlinear dynamical systems - predicting, data
    analysis
  • Designing neural networks, both architecture and
    weights
  • Robot trajectory
  • Evolving LISP programs (genetic programming)
  • Strategy planning
  • Finding shape of protein molecules
  • TSP and sequence scheduling
  • Functions for creating images, music

19
Summary
  • Optimization algorithm
  • Principles from nature
  • Complex problems need a lot of iterations
  • long computational time
  • Wide applications
  • Implementation may be difficult for some problems

20
Bibliography
  • Dewdney, A.K. The New Turing Omnibus. Owl Books,
    New York. 1993
  • Ghanea-Hercock, R. Applied Evolutionary
    Algorithms in Java. Springer, New York. 2003.
  • Haupt, R. L. and Haupt S.E. Practical Genetic
    Algorithms. Wiley, New York. 1998
  • Obitko, M. An introduction to genetic algorithms
    with Java applets. http//cs.felk.cvut.cz/xobitko
    /ga/. 1998.
  • Reeves, C.R. and Rowe, J.E. Genetic
    AlgorithmsPrinciples and Perspectives. Kluwer,
    Norwell, MA. 2003
Write a Comment
User Comments (0)
About PowerShow.com