Beruflich Dokumente
Kultur Dokumente
Evolutionary Computation:
Genetic algorithms
Introduction, or can evolution be
intelligent?
Simulation of natural evolution
Genetic algorithms
Case study: maintenance scheduling with
genetic algorithms
Summary
3/26/2018 Intelligent Systems and Soft Computing 1
Can evolution be intelligent?
Intelligence can be defined as the capability of a
system to adapt its behavior to ever-changing
environment. According to Alan Turing, the form
or appearance of a system is irrelevant to its
intelligence.
Evolutionary computation simulates evolution on a
computer. The result of such a simulation is a
series of optimization algorithms, usually based on
a simple set of rules. Optimization iteratively
improves the quality of solutions until an optimal,
or at least feasible, solution is found.
3/26/2018 Intelligent Systems and Soft Computing 2
The behavior of an individual organism is an
inductive inference about some yet unknown
aspects of its environment. If, over successive
generations, the organism survives, we can say
that this organism is capable of learning to predict
changes in its environment.
The evolutionary approach is based on
computational models of natural selection and
genetics. We call them evolutionary
computation, an umbrella term that combines
genetic algorithms, evolution strategies and
genetic programming.
1 0 1 1 0 1 0 0 0 0 0 1 0 1 0 1
f(x) = 15 x – x2
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.
3/26/2018 Intelligent Systems and Soft Computing 17
In natural selection, only the fittest species can
survive, breed, and thereby pass their genes on to
the next generation. GAs use a similar approach,
but unlike nature, the size of the chromosome
population remains unchanged from one
generation to the next.
The last column in Table shows the ratio of the
individual chromosome’s fitness to the
population’s total fitness. This ratio determines
the chromosome’s chance of being selected for
mating. The chromosome’s average fitness
improves from one generation to the next.
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
X6i 1 0 00 1 0 1 00 00 X2i
X1i 0 11 00 00
1 0 11 11 11 X5i
X2i 0 1 0 0 0 1 1 1 X5i
X2'i 0 1 0 10
X1'i 10 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
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 0 11 00 00
1 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 1
0
X4i+1 0 1 0 0 f = 44
X1'i 1
0 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 0
1 0
1
X2i 0 1 0 0 1 0 X2"i
X5i 0 1 1 1
x y
3/26/2018 Intelligent Systems and Soft Computing 26
We also choose the size of the chromosome
population, for instance 6, and randomly generate
an initial population.
The next step is to calculate the fitness of each
chromosome. This is done in two stages.
First, a chromosome, that is a string of 16 bits, is
partitioned into two 8-bit strings:
1 0 0 0 1 0 1 0 and 0 0 1 1 1 0 1 1
Then these strings are converted from binary
(base 2) to decimal (base 10):
(10001010 ) 2 1 27 0 26 0 2 5 0 2 4 1 23 0 2 2 1 21 0 2 0 (138 )10
and
(00111011 ) 2 0 2 7 0 2 6 1 25 1 2 4 1 2 3 0 2 2 1 21 1 2 0 (59)10
0. 6
0. 5
0. 4
Fitness
0. 3
0. 2
0. 1
Best
0 Average
-0.1
0 10 20 30 40 50 60 70 80 90 100
Generations
1.6
1.4
1.2
Fitness
1.0
0.8
0.6
Best
0.4 Average
0.2
0 10 20 30 40 50 60 70 80 90 100
Generations
1.6
1.4
1. 2
Fitness
1.0
0.8
0.6
Best
0.4 Average
0.2
0 2 46 8 10 12 14 16 18 20
Generations
Child 1
0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0
Child 2
1 1 0 0 0 1 1 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0
1 1 0 0 0 1 1 0 0 1
10 0 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0
1 1 0 0 0 1 1 0 0 0
10 0 1 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0
10
Fitness 5
Best
0 Average
-5
-10
0 5 10 15 20 25 30 35 40 45 50
Generations
N e t r e s e r v e s:
15 35 35 25
150
Unit 2 Unit 2 Unit 1
Unit 4 Unit 7
120 Unit 1
Unit 3
Unit 5 Unit 6
90
MW
60
30
0
1 2 3 4
Timeinterval
(a) 50 generations
3/26/2018 Intelligent Systems and Soft Computing 44
Performance graphs and the best maintenance
schedules created in a population of 20 chromosomes
N = 20, p c = 0.7, pm = 0.001
20
Fitness 10 Be st
Average
-10
0 10 20 30 40 50 60 70 80 90 100
Generations
Net r ese rves:
40 25 20 25
150
Unit 1 Unit 1 Unit 2
Unit 7 Unit 4
120 Unit 2
Unit 3
Unit 5
90 Unit 6
60
30
0
12 34
Time interval
Fitness
20
10
Best
0 Average
-10
0 10 20 30 40 50 60 70 80 90 100
Generations
N e t r e s e r v e s:
35 25 25 25
150
Unit 1 Unit 1
Unit 3 Unit 4
120 Unit 2
Unit 5 Unit 6
90 Unit 7
60
30
0
12 34
Time interval
-20
0 10 20 30 40 50 60 70 80 90 100
G e n e r a ti o n s
N e t r e s e r v e s:
25 25 30 30
150
Unit 1 Unit 1 Unit 2
Unit 3
120 Unit 6 Unit 2
Unit 7 Unit 4
Unit 5
90
60
30
0
1 2 3 4
T im e i n t e r v a l