Continuous Genetic Algorithm
-
Upload
chris-barrera -
Category
Documents
-
view
222 -
download
0
Transcript of Continuous Genetic Algorithm
-
7/27/2019 Continuous Genetic Algorithm
1/29
THE
CONTINUOUS GENETICALGORITHM
by:
Victoria Marcela Albacete
Rey Mark CasaquiteJeannette Supeda
-
7/27/2019 Continuous Genetic Algorithm
2/29
CONTINUOUS GENETIC ALGORITHM-
or better known as a real-valued GA
An algorithm used to solve a problem where the
values of the variables are continuous
Represented by floating-point numbers
-
7/27/2019 Continuous Genetic Algorithm
3/29
CONTINUOUSG.AVS. BINARYG.A Binary GA
- is applicable if the variables are naturally
quantized
- its precision limited by the binary representation of
variables
Continuous GA
- more logical to use when the variables are
continuous
- by using floating point numbers, it easily allows
representation to the machine precision
-
7/27/2019 Continuous Genetic Algorithm
4/29
Continuous GA requires less storage compare to
Binary GA.
Continuous GA is inherently faster compare to Binary
GA.
The primary difference is that the variables are no
longer represented by bits of zeros and ones but
instead by floating-point numbers.
-
7/27/2019 Continuous Genetic Algorithm
5/29
COMPONENTSOFA CONTINUOUS GA
The flowchart below provides a big picture overview of acontinuous GA
Define costfunction, cost,variables, SelectGA parameters
Generate initialpopulation
-
7/27/2019 Continuous Genetic Algorithm
6/29
Find cost for eachchromosome
Select mates
Mating
Mutation
Convergencecheck
-
7/27/2019 Continuous Genetic Algorithm
7/29
With this Algorithm our goal is to
solve the optimization problem
where we search for an
optimal(minimum) solution in terms
of the variable problems.
-
7/27/2019 Continuous Genetic Algorithm
8/29
WEBEGINBY:
- EXAMPLE VARIABLE and COST FUNCTION
Defining a chromosome as an array of variable values to be
optimized
Supposing that the chromosome has variables given bythen the chromosome is written as an array with
Then we can have
Thus each cost is found by evaluating the cost function which is
var
N
var,....,, 21 Nppp var1 N
var,...,, 21 Npppchromosome
var,...,,)(cos 21 Npppfchromosomeft
-
7/27/2019 Continuous Genetic Algorithm
9/29
Determine the initial population denoted by
Natural selection
- the time to decide which chromosomes in the
population are fit enough to survive and possibly
reproduce an offspring in the next generation
Among the chromosomes in a given generation
only the are kept for mating and the rest are
discarded to make room for the new offspring.
popN
popN
keepN
-
7/27/2019 Continuous Genetic Algorithm
10/29
-
7/27/2019 Continuous Genetic Algorithm
11/29
Example initial population of 8 random chromosomes and
their corresponding cost
-
7/27/2019 Continuous Genetic Algorithm
12/29
Surviving chromosomes after a 50% selection rate
-
7/27/2019 Continuous Genetic Algorithm
13/29
Pairing and mating process of single- point crossoverchromosome family binary string cost
-
7/27/2019 Continuous Genetic Algorithm
14/29
Pairing
- in this process the most-fit chromosomes
form a mating pool. Two mothers and two fathers pair
in some random fashion
Mating - in this process the Blending Method is used
by finding the ways to combine variable values from
the two parents into a new variable values in the
offspring. A single offspring variable value can be
computed as:
Random number between 0 and 1
Nth variable in the mother chromosome
Nth variable in the father chromosome
4keepN
newp
dnmnnew ppp )1(
dn
mn
p
p
-
7/27/2019 Continuous Genetic Algorithm
15/29
The Linear Crossover Method is a simple
extrapolation which is a case of generating three
offspring from two parents and is given by
Heuristic Crossover is a variation where a random
number is chosen on the interval [0,1] and the
variable of the offspring is defined by
dnmnnew
dnmnnew
dnmnnew
ppp
ppp
ppp
5.15.0
5.05.1
5.05.0
3
2
1
mndnmnnew pppp )(
-
7/27/2019 Continuous Genetic Algorithm
16/29
Then Blend CrossoverMethod chooses a parameterthat determines the distance outside the bounds ofthe two parent variables that the offspring variable maylie.
The combination of an extrapolation with a crossovermethod begins by a randomly selecting a variable inthe first pair of parents to be the crossover point
Then the selected variables are combined to form newvariables that will appear in the children. Finally, the
crossover is completed with the rest of thechromosomes as before.
}*{ varNrandomroundup
-
7/27/2019 Continuous Genetic Algorithm
17/29
Mutations
to avoid the problem of overly fast
convergence, the routine is force to explore otherareas of the cost surface by randomly introducing
changes ormutations in some of the variables.
The mutation rate is chosen to be 20%. Then it ismultiplied to the total number of variables that can be
mutated in the population.
The random numbers are chosen to select the rowand columns of the variables to be mutated. The
mutated variable is replaced by a new random
variable.
-
7/27/2019 Continuous Genetic Algorithm
18/29
An added normally distributed random number to
the variable selected for mutation is given by
= standard deviation of a normal distribution
= standard normal distribution (mean=0 and
variance=1)
)1,0(' nnn Npp
)1,0(nN
-
7/27/2019 Continuous Genetic Algorithm
19/29
Mutating the population
-
7/27/2019 Continuous Genetic Algorithm
20/29
Contour plot of the cost function with the population after
the first generation
-
7/27/2019 Continuous Genetic Algorithm
21/29
-
7/27/2019 Continuous Genetic Algorithm
22/29
-
7/27/2019 Continuous Genetic Algorithm
23/29
Contour plot of the cost function with the population
after the second generation
-
7/27/2019 Continuous Genetic Algorithm
24/29
-
7/27/2019 Continuous Genetic Algorithm
25/29
-
7/27/2019 Continuous Genetic Algorithm
26/29
Contour plot of the cost function with the population
after the third and final generation
-
7/27/2019 Continuous Genetic Algorithm
27/29
-
7/27/2019 Continuous Genetic Algorithm
28/29
The final step is to check the convergence or finding the
minimum cost in the given number of generations.
-
7/27/2019 Continuous Genetic Algorithm
29/29
END