1 / 15

Genetic Algorithms

Genetic Algorithms. An Example Genetic Algorithm Procedure GA{ t = 0; Initialize P(t); Evaluate P(t); While (Not Done) { Parents(t) = Select_Parents(P(t)); Offspring(t) = Procreate(Parents(t)); Evaluate(Offspring(t));

farren
Download Presentation

Genetic Algorithms

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 Algorithms • An Example Genetic Algorithm Procedure GA{ t = 0; Initialize P(t); Evaluate P(t); While (Not Done) { Parents(t) = Select_Parents(P(t)); Offspring(t) = Procreate(Parents(t)); Evaluate(Offspring(t)); P(t+1)= Select_Survivors(P(t),Offspring(t)); t = t + 1; }

  2. Genetic Algorithms:Binary Coded Representations

  3. Genetic Algorithms:Real-Coded Representations • Real-Coded GAs can be regarded as GAs that operate on the actual CS (phenotype). • For Real-Coded GAs, no genotype-to-phenotype mapping is needed.

  4. Genetic Algorithms:Parent Selection Methods • An Example Genetic Algorithm Procedure GA{ t = 0; Initialize P(t); Evaluate P(t); While (Not Done) { Parents(t) = Select_Parents(P(t)); Offspring(t) = Procreate(Parents(t)); Evaluate(Offspring(t)); P(t+1)= Select_Survivors(P(t),Offspring(t)); t = t + 1; }

  5. Genetic Algorithms:Proportionate Selection • In Proportionate Selection, individuals are assigned a probability of being selected based on their fitness: • pi = fi / fj • Where pi is the probability that individual i will be selected, • fi is the fitness of individual i, and • fj represents the sum of all the fitnesses of the individuals with the population. • This type of selection is similar to using a roulette wheel where the fitness of an individual is represented as proportionate slice of wheel. The wheel is then spun and the slice underneath the wheel when it stops determine which individual becomes a parent.

  6. Genetic Algorithms:Proportionate Selection • There are a number of disadvantages associated with using proportionate selection: • Cannot be used on minimization problems, • Loss of selection pressure (search direction) as population converges, • Susceptible to Super Individuals

  7. Genetic Algorithms:Linear Rank Selection • In Linear Rank selection, individuals are assigned subjective fitness based on the rank within the population: • sfi = (P-ri)(max-min)/(P-1) + min • Where ri is the rank of indvidual i, • P is the population size, • Max represents the fitness to assign to the best individual, • Min represents the fitness to assign to the worst individual. • pi = sfi / sfj Roulette Wheel Selection can be performed using the subjective fitnesses. • One disadvantage associated with linear rank selection is that the population must be sorted on each cycle.

  8. Genetic Algorithms:Genetic Procreation Operators • Genetic Algorithms typically use two types of operators: • Crossover (Sexual Recombination), and • Mutation (Asexual) • Crossover is usually the primary operator with mutation serving only as a mechanism to introduce diversity in the population. • However, when designing a GA to solve a problem it is not uncommon that one will have to develop unique crossover and mutation operators that take advantage of the structure of the CSs comprising the search space.

  9. Genetic Algorithms:Genetic Procreation Operators • However, there are a number of crossover operators that have been used on binary and real-coded GAs: • Single-point Crossover, • Two-point Crossover, • Uniform Crossover

  10. Genetic Algorithms:Single-Point Crossover • Given two parents, single-point crossover will generate a cut-point and recombines the first part of first parent with the second part of the second parent to create one offspring. • Single-point crossover then recombines the second part of the first parent with the first part of the second parent to create a second offspring.

  11. Genetic Algorithms:Single-Point Crossover • Example: • Parent 1: X X | X X X X X • Parent 2: Y Y | Y Y Y Y Y • Offspring 1: X X Y Y Y Y Y • Offspring 2: Y Y X X X X X

  12. Genetic Algorithms:Two-Point Crossover • Two-Point crossover is very similar to single-point crossover except that two cut-points are generated instead of one.

  13. Genetic Algorithms:Two-Point Crossover • Example: • Parent 1: X X | X X X | X X • Parent 2: Y Y | Y Y Y | Y Y • Offspring 1: X X Y Y Y X X • Offspring 2: Y Y X X X Y Y

  14. Genetic Algorithms: The Emoticon Process • Population of nine individuals • Selecting one or two parents One Parent • If a chicken was on a deserted island, how could it reproduce? Two Parents • What type of reproduction can we have? • Allowing the parents chromosomes to become blueprint for the next generation • Based upon the operator you choose • Add the Interactive Touch of you making the evaluation of what you think matches the desired response • Replacing the parents with the offspring • Repeated until a stopping criterion has been reached. • In the interactive case this is when the user is satisfied with the result

  15. Emoticon Populations • Interactively Evolving Emoticons • Happy • Angry • Worried

More Related