To view this presentation, you'll need to enable Flash.

Show me how

After you enable Flash, refresh this webpage and the presentation should play.

Loading...

PPT – GENETIC ALGORITHMS PowerPoint presentation | free to download - id: b4459-NmI3Y

The Adobe Flash plugin is needed to view this content

View by Category

Presentations

Products
Sold on our sister site CrystalGraphics.com

About This Presentation

Write a Comment

User Comments (0)

Transcript and Presenter's Notes

GENETIC ALGORITHMS

- By
- Prafulla S. Kota
- Raghavan Vangipuram

Introduction

- Genetic Algorithms are a form of local search

that use methods based on evolution to make small

changes to a population of chromosomes in an

attempt to identify an optimal solution. - We discuss
- Representations used for genetic algorithm.
- Idea of schemata.
- Genetic operators, crossover and mutations.
- Procedures used to run Genetic algorithms.

Representations

- Genetic programming can be used to evolve

S-expressions, which can be used as LISP programs

to solve problems. - A string of bits is known as a chromosome.
- Each bit is known as a gene.
- Chromosomes can be combined together to form

creatures. - We will see how genetic algorithms can be used to

solve mathematical problems.

The Algorithm

- Generate a random population of chromosomes.
- If the termination criteria are satisfied, stop.

Else, continue with step 3. - Determine the fitness of each chromosome.
- Apply crossover and mutation to selected

chromosomes from the current generation, to

generate a new population of chromosomes the

next generation. - Return to step 2.

- The size of the population should be determined

in advance. - The size of each chromosome must remain the same

for crossover to be applied. - Fittest chromosomes are selected in each

generation to produce offspring which replace the

previous generation. - Each pair of parents produces two offspring.

Fitness

- When we use traditional genetic algorithm, a

metric is needed whereby the fitness of a

chromosome can be objectively determined. - When we consider real creatures, fitness measure

is based on the extent to which the physical form

(phenotype) represented by the genetic

information (genotype) met certain criteria.

Crossover

- The crossover operator is applied to two

chromosomes of the same length as follows - Select a random crossover point.
- Break each chromosome into two parts, splitting

at the crossover point. - Recombine the broken chromosomes by combining the

front of one with the back of the other, and vice

versa, to produce two new chromosomes.

- For example, consider the following two

chromosomes - 110100110001001
- 010101000111101
- A crossover point might be chosen between the

sixth and seventh genes. - 110100 110001001
- 010101 000111101

- Now the chromosome parts are recombined as

follows - 110100 000111101 gt 110100000111101
- 010101 110001001 gt 010101110001001
- Single point crossover is the most commonly used

form, but it is also possible to apply crossover

with two or more crossover positions.

- In two point crossover, two points are chosen

that divide the chromosomes into two sections,

with the outer sections considered to be joined

together to turn the chromosome into a ring. The

two sections are swapped with each other.

100110001

10

1100

001

011100110

01

0110

110

- Uniform Crossover
- Here, a probability, p, is used to determine

whether a given bit from parent 1 will be used,

or from parent 2. - In other words, a child can receive any random

bits from each of its parents. - Parent 1 100011001
- Parent 2 001101110

100110001

1

1

0

10

0

01

1

011100110

0

0

1

11

0

10

0

Mutation

- Similar to Hill-Climbing, which involves

generating a possible solution to the problem and

moving toward a better solution than the current

one until a solution is found from which no

better solution can be found. - Mutation is a unary operator (it is applied to

just one argument a single gene) that is

usually applied with a low probability.

- Mutation simply involves reversing the value of a

bit in a chromosome. - For example, with a mutation rate of 0.01, it

might be expected that one gene in a chromosome

of 100 genes might be reversed. - 010101110001001
- 010101110101001

Termination Criteria

- There are typically two ways in which a run of a

genetic algorithm is terminated. - Usually, a limit is put on the number of

generations, after which the run is considered to

have finished. - The run can stop when a particular solution has

been reached, or when the highest fitness level

in the population has reached a particular value. - In some cases, genetic algorithms are used to

generate interesting pictures. - In these cases, human judgment must be used to

determine when to terminate.

Optimization of a Mathematic Function

- Use of Genetic Algorithm to maximize value of a

mathematic function. - Maximize the function
- f(x)sin(x)
- over the range of x from 1 to 15.
- x is in radians.
- Each chromosome represents a possible value of

x using four bits.

Discrete graph for f(x)Sin(x), x ranges from 0

to 15

- We will use a population size of four

chromosomes. - The first step is to generate a random

population, which is our first generation - c11001
- c20011
- c31010
- c40101
- To calculate the fitness of a chromosome, we need

to first convert it to a decimal integer and then

calculate f(x) for this integer.

- We will assign a fitness numeric value from 0 to

100, where 0 is the least fit and 100 is the most

fit. - f(x) generates real numbers between -1 and 1.
- We will assign a fitness of 100 to f(x)1 and

fitness of 0 to f(x) -1. - Fitness of 50 will be assigned to f(x)0.
- f(x) 50f(x)1
- 50Sin(x)1

- The fitness ratio of a chromosome is that

chromosomes fitness as a percentage of the total

fitness of the population. - Fitness values of First generation

- Now we need to run a single step of our genetic

algorithm to produce the next generation. - First step is to select which chromosomes will

reproduce. - Roulette-wheel selection involves using the

fitness ratio to randomly select chromosomes to

reproduce.

Roulette - wheel selection

- The range of real numbers from 0 to 100 is

divided up between the chromosomes

proportionally to each chromosomes fitness. - A random number is now generated between 0 to

100. This number will fall in the range of one of

the chromosomes, and this chromosome has been

selected for reproduction. - The next random number is used to select the

chromosomes mate. - Hence, fitter chromosomes will tend to produce

more offspring than less fit chromosomes.

- It is important that this method does not stop

less fit chromosomes from reproducing at all. - We will now need to generate four random numbers

to find the four parents that will produce the

next generation. - We first choose 56.7, which falls in the range of

c2. So, c2 is parent 1. - Next, 38.2 is chosen, so its mate is c1 (parent

2).

- We now combine c1 and c2 to produce new

offspring. - Select a random crossover point.
- 10 01
- 00 11
- Crossover is applied to produce two offspring, c5

and c6 - c51011
- c60001

- Similarly, we calculate c7 and c8 from parents c1

and c3 - c71000
- c81011
- Observe that c4 did not get a chance to

reproduce. So its genes will be lost. - c1 was the fittest of all chromosomes. So, it

could reproduce twice, thus passing on its highly

fit genes to all members of the next generation.

Fitness values for second generation

Why Genetic Algorithms Work

- It is possible to explain genetic algorithms by

comparison with natural evolution small changes

that occur on a selective basis combined with

reproduction will tend to improve the fitness of

the population over time. - John Holland invented schemata to provide an

explanation for genetic algorithms that is more

rigorous.

Schemata

- Strings of numbers are used to represent input

patterns in classifier systems. In these

patterns, is used to represent any value or

dont care, so that the following string - 10110010
- matches the following strings
- 1011000100
- 1011000110
- 1011100100
- 1011100110

- A schema is a string of bits that represents a

possible chromosome, using to represent any

value. - A schema is said to match a chromosome if the bit

string that represents the chromosome matches the

schema in the way shown above. - 11
- This matches the following four chromosomes
- 0110 0111 1110 1111

- A schema with n s will match a total of 2n

chromosomes. - Each chromosome of r bits will match 2r

different schemata. - The Defining length of a schema is defined as the

distance between the first and last defined bits

in the schema.

- 10111
- 101
- 11111
- 11
- 101
- The defining length for all the above schemata

is 4. - dL(S)ltL(S)

- Order of the schema is defined a the number of

defined bits in the schema. - 1011
- 1011
- 1111
- 1111
- 1101
- The order of all the above schemata is 4.
- We denote the order of schema as O(S).
- Order of the schema tells us how specific it is.

How Reproduction affects Schemata

- Consider the following population of 10

chromosomes, each of length 32. - C101000100101010010001010100101010
- C210100010100100001001010111010101
- C301010101011110101010100101010101
- C411010101010101001101111010100101
- C511010010101010010010100100001010
- C600101001010100101010010101111010
- C700101010100101010010101001010011
- C811111010010101010100101001010101
- C901010101010111101010001010101011
- C1011010100100101010011110010100001

- Let us consider the following schema
- s011010
- This schema is matched by three chromosomes in

our population c4,c5,c10. - We say that schema s0 matches three chromosomes

in generation i and write this as follows - m(s0,i) 3

- The fitness of a schema, S, in generation i is

written as follows - f(S,i)
- The fitness of a schema is defined as the average

fitness of the chromosomes in the population that

match the schema. - Hence if we define the fitness of c4, c5, and c10

as follows - f(c4,i)10
- f(c5,i)22
- f(c10,i)40

- Hence, the fitness of the schema s0 is defined as

the average of these three values - f(s0,i)(102240)/3
- 24
- We will now consider factors which affect the

likelihood of a particular schema surviving from

one generation to the next.

- Let us assume that there is a chromosome that

matches a schema, S, in the population at time i. - The number of occurrences of S in the population

at time i is - m(S,i)
- Number of occurrences of S in the population in

the subsequent generation is - m(S,i1)

- The fitness of S in generation i is
- f(S,i)
- We will calculate the probability that a given

chromosome, c, which matches the schema S at time

i, will reproduce and thus its genes will be

present in the population at time i1. - The probability that a chromosome will reproduce

is proportional to its fitness, so the expected

number of offspring of chromosome c is - m(c,i1)f(c,i)/a(i)
- Where a(i) is the average fitness of the

chromosomes in the population at time i.

- Because chromosome c is an instance of schema S,

we can thus deduce - m(S, i1)f(c1,i)..f(Cn,i)/a(i)
- where C1 to Cn are the chromosomes in the

population at time i that match schema S. - Let us compare this with the definition of the

fitness of schema S, f(S,i), which is defined as

follows - f(S,i)f(c1,i)..f(Cn,i)/m(S,i)

- By combining the above stated formulas,
- m(S,i1)f(S,i).m(S,i)/a(i)
- The more fit a schema is compared with the

average fitness of the current population, the

more likely it is that that schema will appear in

a subsequent population of chromosomes. - There will be fewer occurrences of a given schema

whose fitness is lower than the average fitness

of the population and more occurrences of a given

schema whose fitness is higher than average.

How Mutation and Crossover Affect Schemata

- Both mutation and crossover can destroy the

presence of a schema. - A given schema can be said to have survived

crossover, if the crossover operation produces a

new chromosome that matches the schema from a

parent that also matches the schema. - For a schema to survive crossover, the crossover

point must be outside the defining length.

- Hence, the probability that a schema S of

defining length dL(S) and of length L(S) will

survive crossover is - Ps(S)1-dL(S)/L(S)-1
- This formula assumes that crossover is applied to

each pair of parents that reproduce. - Hence, after certain modifications of the above

formula - Ps(S)gt1-(Pc)dL(S)/L(S)-1

- Effect of Mutation
- Probability that mutation will be applied is Pm.
- Hence, a schema will survive mutation if mutation

is not applied to any of the defined bits. The

probability of survival can be defined as - Ps(S)(1-Pm)O(s)
- Hence, a schema is more likely to survive

mutation if it has lower order

- We can combine all the equations we have to give

one equation that defines the likelihood of a

schema surviving - reproduction using crossover and mutation.
- That equation represents the schema theorem,

developed by Holland, which can be stated as - Short, low order schemata which are fitter than

the average fitness of the population will appear

with exponentially increasing regularity in

subsequent generations.

The Building Block Hypothesis

- The short, low order, high-fitness schemata are

known as building blocks. - Genetic algorithms work well when a small group

of genes that are close together represent a

feature that contributes to the fitness of a

chromosome. - Randomly selecting bit to represent particular

features of a solution is not good enough. - Bits should be selected in such a way that they

group naturally together into building blocks,

which genetic algorithm are designed to

manipulate.

Deception

- Genetic Algorithms can be mislead or deceived by

some building blocks into heading toward

sub-optimal solutions. - One way to avoid effects of deception is to use

inversion, which is a unary operator that

reverses the order of a subset of the bits within

a chromosome. - Another way to avoid deception is to use Messy

Genetic Algorithms.

Messy Genetic Algorithms (mGAs)

- Developed as an alternative to standard genetic

algorithms. - Each bit is labeled with its position.
- A chromosome does not have to contain a value for

each position, and, a given position in a

chromosome can have more than one value. - Each bit in a chromosome is represented by a pair

of numbers the first number represents the

position within the chromosome, and the second

number is the bit value.

- mGAs use the standard mutation operation. But,

instead of crossover, they use splice and cut

operations. - Two chromosomes can be spliced together by

simply joining one to the end of other. - The cut operator splits one chromosome, into two

smaller chromosomes.

Evolution of Strategies

- The process for running this genetic algorithm is

as follows - Produce a random population of chromosomes. We

will start with 100. - Determine a score for each chromosome by playing

its strategy against a number of opponents. - Select chromosomes for the population to

reproduce. - Replace the previous generation with new

population produced by reproduction. - Return to step 2.

Problems

- Most Combinatorial search problems can be

successfully solved using genetic algorithms. - Genetic Algorithms can be applied to
- Travelling Salesman Problem
- The Knights tour.
- The CNF- satisfiability problem.
- Robot Navigation.
- Knapsack Problem
- Time Table problem.

- THANK YOU

About PowerShow.com

PowerShow.com is a leading presentation/slideshow sharing website. Whether your application is business, how-to, education, medicine, school, church, sales, marketing, online training or just for fun, PowerShow.com is a great resource. And, best of all, most of its cool features are free and easy to use.

You can use PowerShow.com to find and download example online PowerPoint ppt presentations on just about any topic you can imagine so you can learn how to improve your own slides and presentations for free. Or use it to find and download high-quality how-to PowerPoint ppt presentations with illustrated or animated slides that will teach you how to do something new, also for free. Or use it to upload your own PowerPoint slides so you can share them with your teachers, class, students, bosses, employees, customers, potential investors or the world. Or use it to create really cool photo slideshows - with 2D and 3D transitions, animation, and your choice of music - that you can share with your Facebook friends or Google+ circles. That's all free as well!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

You can use PowerShow.com to find and download example online PowerPoint ppt presentations on just about any topic you can imagine so you can learn how to improve your own slides and presentations for free. Or use it to find and download high-quality how-to PowerPoint ppt presentations with illustrated or animated slides that will teach you how to do something new, also for free. Or use it to upload your own PowerPoint slides so you can share them with your teachers, class, students, bosses, employees, customers, potential investors or the world. Or use it to create really cool photo slideshows - with 2D and 3D transitions, animation, and your choice of music - that you can share with your Facebook friends or Google+ circles. That's all free as well!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

presentations for free. Or use it to find and download high-quality how-to PowerPoint ppt presentations with illustrated or animated slides that will teach you how to do something new, also for free. Or use it to upload your own PowerPoint slides so you can share them with your teachers, class, students, bosses, employees, customers, potential investors or the world. Or use it to create really cool photo slideshows - with 2D and 3D transitions, animation, and your choice of music - that you can share with your Facebook friends or Google+ circles. That's all free as well!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

Recommended

«

/ »

Page of

«

/ »

Promoted Presentations

Related Presentations

Page of

Home About Us Terms and Conditions Privacy Policy Presentation Removal Request Contact Us Send Us Feedback

Copyright 2018 CrystalGraphics, Inc. — All rights Reserved. PowerShow.com is a trademark of CrystalGraphics, Inc.

Copyright 2018 CrystalGraphics, Inc. — All rights Reserved. PowerShow.com is a trademark of CrystalGraphics, Inc.

The PowerPoint PPT presentation: "GENETIC ALGORITHMS" is the property of its rightful owner.

Do you have PowerPoint slides to share? If so, share your PPT presentation slides online with PowerShow.com. It's FREE!