Genetic Algorithms Seth Bacon 4/25/2005 Seth Bacon 1 What are - - PowerPoint PPT Presentation

genetic algorithms
SMART_READER_LITE
LIVE PREVIEW

Genetic Algorithms Seth Bacon 4/25/2005 Seth Bacon 1 What are - - PowerPoint PPT Presentation

Genetic Algorithms Seth Bacon 4/25/2005 Seth Bacon 1 What are Genetic Algorithms Search algorithm based on selection and genetics Manipulate a population of candidate solutions to find a good solution 4/25/2005 Seth Bacon 2 What


slide-1
SLIDE 1

4/25/2005 Seth Bacon 1

Genetic Algorithms

Seth Bacon

slide-2
SLIDE 2

4/25/2005 Seth Bacon 2

What are Genetic Algorithms

Search algorithm based on

selection and genetics

Manipulate a population of

candidate solutions to find a good solution

slide-3
SLIDE 3

4/25/2005 Seth Bacon 3

What are GAs used for

Approximate solutions for NP-

Complete and NP-Hard problems

Artificial Intelligence Business, engineering and

science.

slide-4
SLIDE 4

4/25/2005 Seth Bacon 4

The Population

Each member of the population is

represented by a “chromosome”

Typically a binary string although

they can be more complex

Each chromosome is generated at

random (usually)

Each chromosome represents a

solution (although not necessarily a good one)

slide-5
SLIDE 5

4/25/2005 Seth Bacon 5

Steps of a GA

Generate Initial Population Run Tournament Fitness evaluation Selection Crossover Mutation Reach conclusion

slide-6
SLIDE 6

4/25/2005 Seth Bacon 6

Generation of Initial Pop

Must supply a large enough

population to create genetic diversity

The longer the chromosome the

greater the population

The more “noise” (poor solutions

not leading to the good solution) the greater the population

“A correctly-sized population is the first step toward competent and efficient genetic algorithms.” – Cantú-Paz

slide-7
SLIDE 7

4/25/2005 Seth Bacon 7

Fitness Evaluation

Ranks a chromosome based on it’s

performance

Defined by the user Unique to each problem

slide-8
SLIDE 8

4/25/2005 Seth Bacon 8

Selection

Technique for selecting parents of the

next generation

Based on rank from fitness Different selection schemes

Selection of top x-chromosomes Random selection of top x-chromosomes out of top

y-chromosomes (y > x)

Etc.

Try to keep population diverse to protect

from a premature poor solutions

slide-9
SLIDE 9

4/25/2005 Seth Bacon 9

Crossover

Mating of two different chromosomes Methods

Randomly chosen crossover point. Everything to

the left of the point stays put. Everything to the right switches with the other chromosome.

n-point crossover Completely random crossover (n = length of

chromosome)

Used to “explore the solution space”. Controlled randomness?

slide-10
SLIDE 10

4/25/2005 Seth Bacon 10

Mutation

Randomly changes a value in the

chromosome

Used to keep diversity up However its probability should be

kept low or else you are destroying too much information.

slide-11
SLIDE 11

4/25/2005 Seth Bacon 11

Reaching a Conclusion

After x number of generations you

stop and take out the most robust chromosome.

When improvement of the

chromosomes per generation has reached a plateau

When the fittest chromosome has

bred all the others out of the

  • population. (Only happens w/o

mutation)

slide-12
SLIDE 12

4/25/2005 Seth Bacon 12

Parallel GAs

Single-population master-slave

GAs

Multiple-population GAs Fine-grained GAs Hierarchical hybrid (Not discussed)

slide-13
SLIDE 13

4/25/2005 Seth Bacon 13

Master-Slave GAs

Very similar to serial GAs Slaves calculate the fitness

  • Tp = Time to compute a generation
  • Tc = is the communication time between processors
  • P = the number of processors
  • Tf = the time require for a fitness evaluation
  • n = size of the population

Tp = PTc + nTf/P

slide-14
SLIDE 14

4/25/2005 Seth Bacon 14

Master-Slave GAs

P* = sqrt(nTf/Tc)

slide-15
SLIDE 15

4/25/2005 Seth Bacon 15

Master Slave GAs

slide-16
SLIDE 16

4/25/2005 Seth Bacon 16

Multiple-Population GAs

Distributed panmictic population Panmictic - random mating within a

breeding population

Only occasional breeding between

processors

Each population converges on a

solution

Increases diversity

slide-17
SLIDE 17

4/25/2005 Seth Bacon 17

Fine Grained GAs

Each processor has its own

subpopulation (preferably consisting of

  • nly one chromosome)

Fitness and mutation per processor Selection and mating on a local

neighborhood (which overlap)

Diffuses population across all

subpopulation

“…well suited for massively parallel SIMD computers, but it is also possible to implement them very efficiently on coarse-grain MIMD computers.” – Cantú-Paz

slide-18
SLIDE 18

4/25/2005 Seth Bacon 18

Examples

http://cs.felk.cvut.cz/~xobitko/ga/ex

ample_f.html

Highly recommend this site let’s you play with

a lot of the concepts

http://cs.felk.cvut.cz/~xobitko/ga/pa

rams.html

slide-19
SLIDE 19

4/25/2005 Seth Bacon 19

Sources

Cantu-Paz, Erick. Efficient and Accurate

Parallel Genetic Algorithms. Kluwer Academic Publishers 2000

Antonette M. Logar, Edward M. Corwin,

ans Thomas M. English. Implementation

  • f Massively Parallel Genetic Algorithms

On the MasPar MP-1. Department of Computer Science

http://cs.felk.cvut.cz/~xobitko/ga/