0% found this document useful (0 votes)
19 views30 pages

Lect.3 - Simple Genetic Algorithms

The document describes the basic components and process of a simple genetic algorithm, including encoding techniques, initialization, evaluation functions, selection of parents through techniques like roulette wheel selection, genetic operators like crossover and mutation, and provides an example of applying a genetic algorithm to optimize a fitness function. Key steps in the genetic algorithm include initializing a population, evaluating fitness, selecting parents for reproduction, performing crossover and mutation on offspring, and iterating until termination criteria is met.

Uploaded by

Amany El-zonkoly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views30 pages

Lect.3 - Simple Genetic Algorithms

The document describes the basic components and process of a simple genetic algorithm, including encoding techniques, initialization, evaluation functions, selection of parents through techniques like roulette wheel selection, genetic operators like crossover and mutation, and provides an example of applying a genetic algorithm to optimize a fitness function. Key steps in the genetic algorithm include initializing a population, evaluating fitness, selecting parents for reproduction, performing crossover and mutation on offspring, and iterating until termination criteria is met.

Uploaded by

Amany El-zonkoly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Simple Genetic Algorithms

General idea of Genetic Algorithms


Components of a GA
A problem to solve, and ...
• Encoding technique (gene, chromosome)
• Initialization procedure (creation)
• Evaluation function (environment)
• Selection of parents (reproduction)
• Genetic operators (mutation, recombination)
• Parameter settings (practice and art)
Simple Genetic Algorithm
{
initialize population;
evaluate population;
while TerminationCriteriaNotSatisfied
{
select parents for reproduction;
perform recombination and mutation;
evaluate population;
}
}
Encoding
Roulette wheel selection
The most commonly used chromosome selection
techniques is the roulette wheel selection.

100 0
X1: 16.5%
X2: 20.2%
75.2 X3: 6.4%
X4: 6.4%
X5: 25.3%
36.7 X6: 24.8%
49.5 43.1
Example 2:

Suppose that the size of the chromosome population


N is 6, the crossover probability pc equals
0.7, and the mutation probability pm
equals 0.001. The fitness function in
our example is defined by
f(x) = 15 x – x2
The fitness function and chromosome locations
Chromosome Chromosome Decoded Chromosome Fitness
label string integer fitness ratio, %
X1 1 1 00 12 36 16.5
X2 0 1 00 4 44 20.2
X3 0 0 01 1 14 6.4
X4 1 1 10 14 14 6.4
X5 0 1 11 7 56 25.7
X6 1 0 01 9 54 24.8
f(x) 60 60

50 50

40 40

30 30

20 20

10 10

0 0
0 5 10 15 0 5 10 15
x x
(a) Chromosome initial locations. (b) Chromosome final locations.
100 0
X1: 16.5%
X2: 20.2%
75.2 X3: 6.4%
X4: 6.4%
X5: 25.3%
36.7 X6: 24.8%
49.5 43.1
Crossover

X6i 1 0 00 1 0 1 00 00 X2i

X1i 10 11 00 00 0 11 11 11 X5i

X2i 0 1 0 0 0 1 1 1 X5i
Mutation
X6'i 1 0 0 0

X2'i 0 1 0 10

X1'i 1
0 1 1 1 1 1 X1"i

X5'i 0 1 01 01

X2i 0 1 0 0 1 0 X2"i

X5i 0 1 1 1
The genetic algorithm cycle

C rossover
Generation i
X1i 1 1 0 0 f = 36 X6i 1 0 00 1 0 1 00 00 X2i
X2i 0 1 0 0 f = 44
X3i 0 0 0 1 f = 14
X4i 1 1 1 0 f = 14 X1i 10 11 00 00 0 11 11 11 X5i
X5i 0 1 1 1 f = 56
X6i 1 0 0 1 f = 54
X2i 0 1 0 0 0 1 1 1 X5i
Generation (i + 1)
X1i+1 1 0 0 0 f = 56 Mutation
X2i+1 0 1 0 1 f = 50 X6'i 1 0 0 0
X3i+1 1 0 1 1 f = 44
X2'i 0 1 0 10
X4i+1 0 1 0 0 f = 44
X1'i 10 1 1 1 1 1 X1"i
X5i+1 0 1 1 0 f = 54
X6i+1 0 1 1 1 f = 56 X5'i 0 1 01 01

X2i 0 1 0 0 1 0 X2"i

X5i 0 1 1 1
Report
Optimal power dispatch to achieve minimum cost
C =  + *P + *P2

cost = [500 5.3 0.004


400 5.5 0.006
200 5.8 0.009]
mwlimits=[200 450
150 350
100 225]
Pdt = 975 MW

You might also like