0% found this document useful (0 votes)
137 views29 pages

Continuous Genetic Algorithm

This document summarizes the continuous genetic algorithm. It begins by explaining that a continuous genetic algorithm uses floating point numbers rather than binary to represent variables that are continuous. It then describes the components of a continuous genetic algorithm, including defining an initial population, calculating costs, selecting parents for mating via crossover and mutation, and checking for convergence. Specific crossover and mutation methods are also outlined, such as blending parent variables or adding a random number. The goal is to iteratively find optimal variable values that minimize a given cost function.

Uploaded by

Chris Barrera
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views29 pages

Continuous Genetic Algorithm

This document summarizes the continuous genetic algorithm. It begins by explaining that a continuous genetic algorithm uses floating point numbers rather than binary to represent variables that are continuous. It then describes the components of a continuous genetic algorithm, including defining an initial population, calculating costs, selecting parents for mating via crossover and mutation, and checking for convergence. Specific crossover and mutation methods are also outlined, such as blending parent variables or adding a random number. The goal is to iteratively find optimal variable values that minimize a given cost function.

Uploaded by

Chris Barrera
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 29

THE

CONTINUOUS GENETIC
ALGORITHM
by:
Victoria Marcela Albacete
Rey Mark Casaquite
Jeannette Supeda

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

CONTINUOUS G.A VS. BINARY G.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





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.
COMPONENTS OF A CONTINUOUS GA
The flowchart below provides a big picture overview of a
continuous GA

Define cost
function, cost,
variables, Select
GA parameters
Generate initial
population
Find cost for each
chromosome
Select mates
Mating
Mutation
Convergence
check


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.
WE BEGIN BY:
- EXAMPLE VARIABLE and COST FUNCTION

Defining a chromosome as an array of variable values to be
optimized
Supposing that the chromosome has variables given by
then 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
,...., ,
2 1 N
p p p
var
1 N
| |
var
,..., ,
2 1 N
p p p chromosome =
| | ( )
var
,..., , ) ( cos
2 1 N
p p p f chromosome f t = =
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.
pop
N
pop
N
keep
N
Contour plot of the cost function with the initial population (Npop = 8)
indicated by large dots.
Example initial population of 8 random chromosomes and
their corresponding cost
Surviving chromosomes after a 50% selection rate
Pairing and mating process of single- point crossover
chromosome family binary string cost

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
4 =
keep
N
new
p
dn mn new
p p p ) 1 ( | | + =
=
=
=
dn
mn
p
p
|

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


dn mn new
dn mn new
dn mn new
p p p
p p p
p p p
5 . 1 5 . 0
5 . 0 5 . 1
5 . 0 5 . 0
3
2
1
+ =
=
+ =
|
mn dn mn new
p p p p + = ) ( |

Then Blend Crossover Method chooses a parameter
that determines the distance outside the bounds of
the two parent variables that the offspring variable may
lie.

The combination of an extrapolation with a crossover
method begins by a randomly selecting a variable in
the first pair of parents to be the crossover point


Then the selected variables are combined to form new
variables that will appear in the children. Finally, the
crossover is completed with the rest of the
chromosomes as before.


} * {
var
N random roundup = o

Mutations
to avoid the problem of overly fast
convergence, the routine is force to explore other
areas of the cost surface by randomly introducing
changes or mutations in some of the variables.

The mutation rate is chosen to be 20%. Then it is
multiplied to the total number of variables that can be
mutated in the population.

The random numbers are chosen to select the row
and columns of the variables to be mutated. The
mutated variable is replaced by a new random
variable.

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 ( '
n n n
N p p o + =
) 1 , 0 (
n
N
Mutating the population
Contour plot of the cost function with the population after
the first generation















Contour plot of the cost function with the population
after the second generation











Contour plot of the cost function with the population
after the third and final generation









Plot of the minimum and mean costs as a function of
generation

The final step is to check the convergence or finding the
minimum cost in the given number of generations.



END

You might also like