Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ALGORITHMS
Prepared by:
Engr. Ian Kent S. Bescoro
WHAT IS GENETIC ALGORITHMS?
» Reproduction
•Crossover
•Mutation
» Convergence
•When to stop
Structure of Genetic Algorithms
Basic Genetic Algorithm
How it works ?
Several methods ….
Crossover methods
Recombination
HOW IT WORKS ?
How do we represent a set of variables as a
string?
Example: Max of X^2 over {0,1…31}
X = X1, X2, X3 and X4
Let X1= 15, X2= 4, X3 = 21 and X4= 7
As a binary string, X can be written as
X1= 01111, X2= 00100, X3 = 10101 and X4= 00111
Example of Roulette wheel selection
NO STRING FITNESS %OF TOTAL
2 00100 16 2.19
4 00111 49 6.7
Chromosome1
Chromosome 2
Chromosome 3
Chromosome 4
EXAMPLE #1
1. The cost of engines plus fuel for a cargo ship varies with speed and is
given by 0.2 x^2 where x is the speed of the ship in m/s. The fixed costs
of hull and crew (again in the same unit) are given by 450/x. Using
Genetic Algorithm method, determine the operating speed of the ship
for minimum total cost. Start with an original interval of uncertainty of
0.5 ≤ x ≤ 25.5 m/s.
Y = 0.2 x^2 + 450/x
0.5 ≤ x ≤ 25.5 m/s Initial Iteration
Initial Iteration showing the
Crossover line
Second Iteration
Second Iteration showing the
Crossover line
Third Iteration
Third Iteration showing the
Crossover line
THANK YOU!