Presentation is loading. Please wait.

Presentation is loading. Please wait.

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));

Similar presentations


Presentation on theme: "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));"— 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: –p i = f i /  f j –Where p i is the probability that individual i will be selected, –f i is the fitness of individual i, and –  f j 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: – sf i = (P-r i )(max-min)/(P-1) + min –Where r i 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. p i = sf i /  sf j 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 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


Download ppt "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));"

Similar presentations


Ads by Google