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:
Prafulla S. Kota
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.
110100 | 110001001
010101 | 000111101
110100 | 000111101 => 110100000111101
010101 | 110001001 => 010101110001001
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.
Parent 1: 100011001
Parent 2: 001101110
Use of Genetic Algorithm to maximize value of a mathematic function.
Maximize the function:
over the range of ‘x’ from 1 to 15.
‘x’ is in radians.
Each chromosome represents a possible value of ‘x’ using four bits.
We will assign a fitness numeric value from 0 to 100, where 0 is the least fit and 100 is the most fit.
The fitness ratio of a chromosome is that chromosome’s 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.
Roulette-wheel selection involves using the fitness ratio to randomly select chromosomes to reproduce.
It is important that this method does not stop less fit chromosomes from reproducing at all.
10 | 01
00 | 11
matches the following strings:
A schema is a string of bits that represents a possible chromosome, using * to represent “any value.”
This matches the following four chromosomes
0110 0111 1110 1111
Each chromosome of r bits will match 2^r different schemata.
The Defining length of a schema is defined as the distance between the first and last defined bits in the schema.
The defining length for all the above schemata is 4.
Order of the schema is defined a the number of defined bits in the schema.
The order of all the above schemata is 4.
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
Hence, the fitness of the schema s0 is defined as the average of these three values:
Let us assume that there is a chromosome that matches a schema, S, in the population at time i.
Where a(i) is the average fitness of the chromosomes in the population at time i.
where C1 to Cn are the chromosomes in the population at time i that match schema S.
Hence, the probability that a schema S of defining length dL(S) and of length L(S) will survive crossover is
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.
“Short, low order schemata which are fitter than the average fitness of the population will appear with exponentially increasing regularity in subsequent generations.”
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.
mGA’s 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.