SlideShare une entreprise Scribd logo
1  sur  47
Télécharger pour lire hors ligne
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 1
Lecture 9Lecture 9
Evolutionary Computation:Evolutionary Computation:
Genetic algorithmsGenetic algorithms
II Introduction, orIntroduction, or cancan evolutionevolution bebe
intelligentintelligent??
II Simulation ofSimulation of naturalnatural evolutionevolution
II GeneticGenetic algorithmsalgorithms
II CaseCase studystudy:: maintenancemaintenance schedulingscheduling withwith
geneticgenetic algorithmsalgorithms
II SummarySummary
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 2
II Intelligence can be defined as the capability of aIntelligence can be defined as the capability of a
system to adapt its behaviour to eversystem to adapt its behaviour to ever--changingchanging
environment. According to Alan Turing, the formenvironment. According to Alan Turing, the form
or appearance of a system is irrelevant to itsor appearance of a system is irrelevant to its
intelligence.intelligence.
II Evolutionary computation simulates evolution on aEvolutionary computation simulates evolution on a
computer. The result of such a simulation is acomputer. The result of such a simulation is a
series of optimisation algorithmsseries of optimisation algorithms, usually based on, usually based on
a simple set of rules. Optimisationa simple set of rules. Optimisation iterativelyiteratively
improves the quality of solutions until an optimal,improves the quality of solutions until an optimal,
or at least feasible, solution is found.or at least feasible, solution is found.
Can evolution be intelligentCan evolution be intelligent??
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 3
II The behaviour ofThe behaviour of an individual organisman individual organism isis anan
inductive inference about some yet unknowninductive inference about some yet unknown
aspects of its environment.aspects of its environment. If,If, over successiveover successive
generations, the organism survives, we can saygenerations, the organism survives, we can say
that this organism is capable of learning to predictthat this organism is capable of learning to predict
changes in its environment.changes in its environment.
II The evolutionary approach is based onThe evolutionary approach is based on
computational models of natural selection andcomputational models of natural selection and
genetics. We call themgenetics. We call them evolutionaryevolutionary
computationcomputation, an umbrella term that combines, an umbrella term that combines
genetic algorithmsgenetic algorithms,, evolution strategiesevolution strategies andand
genetic programminggenetic programming..
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 4
II On 1 July 1858,On 1 July 1858, Charles DarwinCharles Darwin presented hispresented his
theory of evolution before thetheory of evolution before the LinneanLinnean Society ofSociety of
London. This day marks the beginning of aLondon. This day marks the beginning of a
revolution in biology.revolution in biology.
II DarwinDarwin’’ss classicalclassical theory of evolutiontheory of evolution, together, together
withwith WeismannWeismann’’ss theory of natural selectiontheory of natural selection andand
MendelMendel’’ss concept ofconcept of geneticsgenetics, now represent the, now represent the
neoneo--Darwinian paradigm.Darwinian paradigm.
Simulation ofSimulation of naturalnatural evolutionevolution
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 5
II NeoNeo--DarwinismDarwinism is based on processes ofis based on processes of
reproduction, mutation, competition and selection.reproduction, mutation, competition and selection.
The power to reproduce appears to be an essentialThe power to reproduce appears to be an essential
property of life. The power to mutate is alsoproperty of life. The power to mutate is also
guaranteed in any living organism that reproducesguaranteed in any living organism that reproduces
itself in a continuously changing environment.itself in a continuously changing environment.
Processes of competition and selection normallyProcesses of competition and selection normally
take place in the natural world, where expandingtake place in the natural world, where expanding
populations of different species are limited by apopulations of different species are limited by a
finite space.finite space.
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 6
II Evolution can be seen as a process leading to theEvolution can be seen as a process leading to the
maintenancemaintenance of a populationof a population’’ss ability to surviveability to survive
and reproduce in a specific environment. Thisand reproduce in a specific environment. This
ability is calledability is called evolutionary fitnessevolutionary fitness..
II Evolutionary fitness can also be viewed as aEvolutionary fitness can also be viewed as a
measure of the organismmeasure of the organism’’s ability to anticipates ability to anticipate
changes in its environment.changes in its environment.
II TheThe fitness, or the quantitative measure of thefitness, or the quantitative measure of the
ability to predict environmental changes andability to predict environmental changes and
respond adequately, can be considered as therespond adequately, can be considered as the
quality that isquality that is optimisedoptimised in natural life.in natural life.
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 7
How is a population with increasingHow is a population with increasing
fitness generated?fitness generated?
II Let us considerLet us consider a population of rabbits. Somea population of rabbits. Some
rabbits are faster than others, and we may say thatrabbits are faster than others, and we may say that
these rabbits possess superior fitness, because theythese rabbits possess superior fitness, because they
have a greater chance of avoiding foxes, survivinghave a greater chance of avoiding foxes, surviving
and then breedingand then breeding..
II If two parents have superior fitness, there is a goodIf two parents have superior fitness, there is a good
chance that a combination of their genes willchance that a combination of their genes will
produce an offspring with even higher fitness.produce an offspring with even higher fitness.
Over time the entire population of rabbits becomesOver time the entire population of rabbits becomes
faster to meet their environmental challenges in thefaster to meet their environmental challenges in the
face of foxes.face of foxes.
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 8
II All methods of evolutionary computation simulateAll methods of evolutionary computation simulate
naturalnatural evolution by creatingevolution by creating a population ofa population of
individuals, evaluating their fitness, generating aindividuals, evaluating their fitness, generating a
new population through genetic operations, andnew population through genetic operations, and
repeating this process a number of timesrepeating this process a number of times..
II We will start withWe will start with Genetic AlgorithmsGenetic Algorithms (GAs) as(GAs) as
most of the other evolutionarymost of the other evolutionary algorithms can bealgorithms can be
viewed as variations ofviewed as variations of genetic algorithmsgenetic algorithms..
Simulation ofSimulation of naturalnatural evolutionevolution
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 9
II In the early 1970s, JohnIn the early 1970s, John Holland introduced theHolland introduced the
concept of genetic algorithms.concept of genetic algorithms.
II HisHis aim was to make computers do what natureaim was to make computers do what nature
does.does. Holland was concerned withHolland was concerned with algorithmsalgorithms
that manipulate strings of binary digitsthat manipulate strings of binary digits..
II Each artificialEach artificial ““chromosomeschromosomes”” consists of aconsists of a
number ofnumber of ““genesgenes””, and each gene is represented, and each gene is represented
by 0 or 1:by 0 or 1:
Genetic AlgorithmsGenetic Algorithms
1 10 1 0 1 0 0 0 0 0 1 0 1 10
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 10
II Nature has an ability to adapt and learn withoutNature has an ability to adapt and learn without
being told what to do. In other words, naturebeing told what to do. In other words, nature
finds good chromosomes blindly.finds good chromosomes blindly. GAsGAs do thedo the
same. Two mechanisms link a GA to the problemsame. Two mechanisms link a GA to the problem
it is solving:it is solving: encodingencoding andand evaluationevaluation..
II The GA uses a measure of fitness of individualThe GA uses a measure of fitness of individual
chromosomes to carry out reproduction. Aschromosomes to carry out reproduction. As
reproduction takes place, the crossover operatorreproduction takes place, the crossover operator
exchanges parts of two single chromosomes, andexchanges parts of two single chromosomes, and
the mutation operator changes the gene value inthe mutation operator changes the gene value in
some randomly chosen location of thesome randomly chosen location of the
chromosome.chromosome.
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 11
Step 1Step 1:: Represent the problem variable domain asRepresent the problem variable domain as
a chromosome of a fixed length, choose the sizea chromosome of a fixed length, choose the size
of a chromosome populationof a chromosome population NN, the crossover, the crossover
probabilityprobability ppcc and the mutation probabilityand the mutation probability ppmm..
StepStep 22:: DefineDefine a fitness function to measure thea fitness function to measure the
performance, or fitness, of an individualperformance, or fitness, of an individual
chromosome in the problem domain. The fitnesschromosome in the problem domain. The fitness
function establishes the basis for selectingfunction establishes the basis for selecting
chromosomes that will be mated duringchromosomes that will be mated during
reproduction.reproduction.
BasicBasic geneticgenetic algorithmsalgorithms
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 12
Step 3Step 3:: Randomly generate an initial population ofRandomly generate an initial population of
chromosomes of sizechromosomes of size NN::
xx11,, xx22, . . . ,, . . . , xxNN
Step 4Step 4:: Calculate the fitness of each individualCalculate the fitness of each individual
chromosome:chromosome:
ff ((xx11),), ff ((xx22), . . . ,), . . . , ff ((xxNN))
Step 5Step 5:: Select a pair of chromosomes for matingSelect a pair of chromosomes for mating
from the current population. Parentfrom the current population. Parent
chromosomes are selected with a probabilitychromosomes are selected with a probability
related to their fitness.related to their fitness.
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 13
Step 6Step 6:: Create a pair of offspring chromosomes byCreate a pair of offspring chromosomes by
applying the genetic operatorsapplying the genetic operators −− crossovercrossover andand
mutationmutation..
Step 7Step 7:: Place the created offspring chromosomesPlace the created offspring chromosomes
in the new population.in the new population.
Step 8Step 8:: RepeatRepeat Step 5Step 5 until the size of the newuntil the size of the new
chromosome population becomeschromosome population becomes equal to theequal to the
size of thesize of the initial population,initial population, NN..
Step 9Step 9:: ReplaceReplace the initial (parent) chromosomethe initial (parent) chromosome
population with the new (offspring) population.population with the new (offspring) population.
StepStep 1010:: Go toGo to Step 4Step 4, and repeat the process until, and repeat the process until
the termination criterion is satisfied.the termination criterion is satisfied.
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 14
II GA represents an iterative process. Each iteration isGA represents an iterative process. Each iteration is
called acalled a generationgeneration. A typical number of generations. A typical number of generations
for a simple GA can range from 50 to overfor a simple GA can range from 50 to over 500. The500. The
entire setentire set of generations is called aof generations is called a runrun..
II Because GAs use a stochastic search method, theBecause GAs use a stochastic search method, the
fitness of a population mayfitness of a population may remain stable for aremain stable for a
number of generations before a superior chromosomenumber of generations before a superior chromosome
appears.appears.
II A common practice is to terminate a GA after aA common practice is to terminate a GA after a
specified number of generations and then examinespecified number of generations and then examine
the best chromosomes in the population. If nothe best chromosomes in the population. If no
satisfactory solution is found, the GA is restarted.satisfactory solution is found, the GA is restarted.
GeneticGenetic algorithmsalgorithms
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 15
A simple example will help us to understand howA simple example will help us to understand how
a GA works. Let us find the maximum value ofa GA works. Let us find the maximum value of
the function (15the function (15xx −− xx22
) where parameter) where parameter xx variesvaries
between 0 and 15. For simplicity, we maybetween 0 and 15. For simplicity, we may
assume thatassume that xx takes only integer values. Thus,takes only integer values. Thus,
chromosomes can be built with only fourchromosomes can be built with only four genes:genes:
GeneticGenetic algorithmsalgorithms:: casecase studystudy
Integer Binary code Integer Binary code Integer Binary code
1 0 0 0 1 6 0 1 1 0 11 1 0 1 1
2 0 0 1 0 7 0 1 1 1 12 1 1 0 0
3 0 0 1 1 8 1 0 0 0 13 1 1 0 1
4 0 1 0 0 9 1 0 0 1 14 1 1 1 0
5 0 1 0 1 10 1 0 1 0 15 1 1 1 1
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 16
Suppose that the size of the chromosome populationSuppose that the size of the chromosome population
NN is 6, the crossover probabilityis 6, the crossover probability ppcc equals 0.7, andequals 0.7, and
the mutation probabilitythe mutation probability ppmm equals 0.001. Theequals 0.001. The
fitness function in our example is definedfitness function in our example is defined byby
ff((xx) =) = 1515 xx −−−−−−−− xx22
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 17
The fitness function and chromosome locationsThe fitness function and chromosome locations
Chromosome
label
Chromosome
string
Decoded
integer
Chromosome
fitness
Fitness
ratio, %
X1 1 1 0 0 12 36 16.5
X2 0 1 0 0 4 44 20.2
X3 0 0 0 1 1 14 6.4
X4 1 1 1 0 14 14 6.4
X5 0 1 1 1 7 56 25.7
X6 1 0 0 1 9 54 24.8
x
50
40
30
20
60
10
0
0 5 10 15
f(x)
(a) Chromosome initial locations.
x
50
40
30
20
60
10
0
0 5 10 15
(b) Chromosome final locations.
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 18
II In natural selection, only the fittest species canIn natural selection, only the fittest species can
survive, breed, and thereby pass their genes on tosurvive, breed, and thereby pass their genes on to
the next generation.the next generation. GAsGAs use a similar approach,use a similar approach,
but unlike nature, the size of the chromosomebut unlike nature, the size of the chromosome
population remains unchanged from onepopulation remains unchanged from one
generation to the next.generation to the next.
II The last column in Table shows the ratio of theThe last column in Table shows the ratio of the
individual chromosomeindividual chromosome’’s fitness to thes fitness to the
populationpopulation’’s total fitness. This ratio determiness total fitness. This ratio determines
the chromosomethe chromosome’’s chance of being selected fors chance of being selected for
mating.mating. The chromosomeThe chromosome’’s average fitnesss average fitness
improves from one generation to the next.improves from one generation to the next.
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 19
RouletteRoulette wheelwheel selectionselection
The most commonly used chromosome selectionThe most commonly used chromosome selection
techniques is thetechniques is the roulette wheel selectionroulette wheel selection..
100 0
16.5
36.7
43.149.5
75.2
X1: 16.5%
X2: 20.2%
X3: 6.4%
X4: 6.4%
X5: 25.3%
X6: 24.8%
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 20
Crossover operatorCrossover operator
II In our example, we have an initial population of 6In our example, we have an initial population of 6
chromosomes. Thus, to establish the samechromosomes. Thus, to establish the same
population in the next generation, the roulettepopulation in the next generation, the roulette
wheel would be spun six timeswheel would be spun six times..
II Once a pair of parent chromosomes is selected,Once a pair of parent chromosomes is selected,
thethe crossovercrossover operator is applied.operator is applied.
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 21
II First, the crossover operator randomly chooses aFirst, the crossover operator randomly chooses a
crossover point where two parent chromosomescrossover point where two parent chromosomes
““breakbreak””, and then exchanges the chromosome, and then exchanges the chromosome
parts after that point. As a result, two newparts after that point. As a result, two new
offspring are created.offspring are created.
II If a pair of chromosomes does not cross over,If a pair of chromosomes does not cross over,
thenthen the chromosome cloning takes place, and thethe chromosome cloning takes place, and the
offspring are created as exact copies of eachoffspring are created as exact copies of each
parent.parent.
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 22
X6i 1 00 0 01 0 X2i
0 01 0X2i 0 11 1 X5i
0X1i 0 11 1 X5i1 01 0
0 1
0 0
11 1
01 0
CrossoverCrossover
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 23
II Mutation represents a change inMutation represents a change in the gene.the gene.
II Mutation is a background operator. Its role is toMutation is a background operator. Its role is to
provide a guarantee thatprovide a guarantee that the search algorithm isthe search algorithm is
not trapped on a local optimum.not trapped on a local optimum.
II The mutation operator flips a randomly selectedThe mutation operator flips a randomly selected
gene in a chromosome.gene in a chromosome.
II The mutation probability is quite small in nature,The mutation probability is quite small in nature,
and is kept low forand is kept low for GAsGAs, typically in the range, typically in the range
between 0.001 and 0.01.between 0.001 and 0.01.
Mutation operatorMutation operator
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 24
MutationMutation
0 11 1X5'i 01 0
X6'i 1 00
0 01 0X2'i 0 1
0 0
0 1 111X5i
1 1 1 X1"i1 1
X2"i0 1 0
0X1'i 1 1 1
0 1 0X2i
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 25
TheThe genetic algorithm cyclegenetic algorithm cycle
1 01 0X1i
Generation i
0 01 0X2i
0 00 1X3i
1 11 0X4i
0 11 1X5i f = 56
1 00 1X6i f = 54
f = 36
f = 44
f = 14
f = 14
1 00 0X1i+1
Generation (i + 1)
0 01 1X2i+1
1 10 1X3i+1
0 01 0X4i+1
0 11 0X5i+1 f = 54
0 11 1X6i+1 f = 56
f = 56
f = 50
f = 44
f = 44
Crossover
X6i 1 00 0 01 0 X2i
0 01 0X2i 0 11 1 X5i
0X1i 0 11 1 X5i1 01 0
0 1
0 0
11 1
01 0
Mutation
0 11 1X5'i 01 0
X6'i 1 00
0 01 0X2'i 0 1
0 0
0 1 111X5i
1 1 1 X1"i1 1
X2"i0 1 0
0X1'i 1 1 1
0 1 0X2i
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 26
GeneticGenetic algorithmsalgorithms:: casecase studystudy
II Suppose it is desired to find the maximum of theSuppose it is desired to find the maximum of the
““peakpeak”” function of two variables:function of two variables:
where parameterswhere parameters xx andand yy vary betweenvary between −−3 and 3.3 and 3.
II The first step is to represent the problem variablesThe first step is to represent the problem variables
as aas a chromosomechromosome −− parametersparameters xx andand yy as aas a
concatenated binary string:concatenated binary string:
2222
)()1(),( 33)1(2 yxyx
eyxxexyxf −−+−−
−−−−=
1 00 0 1 10 0 0 10 1 1 10 1
yx
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 27
II We also chooseWe also choose the size of the chromosomethe size of the chromosome
population, for instance 6, and randomly generatepopulation, for instance 6, and randomly generate
an initial population.an initial population.
II The next step is to calculate the fitness of eachThe next step is to calculate the fitness of each
chromosome. This is done in two stages.chromosome. This is done in two stages.
II First, a chromosome, that is a string of 16 bits, isFirst, a chromosome, that is a string of 16 bits, is
partitioned into two 8partitioned into two 8--bit strings:bit strings:
10
01234567
2 )138(2021202120202021)10001010( =×+×+×+×+×+×+×+×=
and
10
01234567
2 )59(2121202121212020)00111011( =×+×+×+×+×+×+×+×=
II Then these strings are converted from binaryThen these strings are converted from binary
(base 2) to decimal (base 10):(base 2) to decimal (base 10):
1 00 0 1 10 0 0 10 1 1 10 1and
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 28
II Now the range of integers that can be handled byNow the range of integers that can be handled by
88--bits, that is the range from 0 to (2bits, that is the range from 0 to (288
−− 1), is1), is
mapped to the actual range of parametersmapped to the actual range of parameters xx andand yy,,
that is the range fromthat is the range from −−3 to 3:3 to 3:
II ToTo obtain the actual values ofobtain the actual values of xx andand yy, we multiply, we multiply
their decimal values by 0.0235294 and subtract 3their decimal values by 0.0235294 and subtract 3
from the results:from the results:
0235294.0
1256
6
=
−
2470588.030235294.0)138( 10 =−×=x
and
6117647.130235294.0)59( 10 −=−×=y
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 29
II Using decoded values ofUsing decoded values of xx andand yy as inputs in theas inputs in the
mathematical function, the GA calculates themathematical function, the GA calculates the
fitness of each chromosome.fitness of each chromosome.
II ToTo find the maximum of thefind the maximum of the ““peakpeak”” function, wefunction, we
will use crossover with the probability equal to 0.7will use crossover with the probability equal to 0.7
and mutation with the probability equal to 0.001.and mutation with the probability equal to 0.001.
As we mentioned earlier, a common practice inAs we mentioned earlier, a common practice in
GAsGAs is to specify the number of generations.is to specify the number of generations.
Suppose the desired number of generations is 100.Suppose the desired number of generations is 100.
That is, the GA will create 100 generations of 6That is, the GA will create 100 generations of 6
chromosomes before stopping.chromosomes before stopping.
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 30
Chromosome locations on the surface of theChromosome locations on the surface of the
““peakpeak”” function: initial populationfunction: initial population
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 31
Chromosome locations on the surface of theChromosome locations on the surface of the
““peakpeak”” function: first generationfunction: first generation
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 32
Chromosome locations on the surface of theChromosome locations on the surface of the
““peakpeak”” function: local maximumfunction: local maximum
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 33
Chromosome locations on the surface of theChromosome locations on the surface of the
““peakpeak”” function: global maximumfunction: global maximum
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 34
Performance graphs for 100 generations of 6Performance graphs for 100 generations of 6
chromosomeschromosomes:: local maximumlocal maximum
pc = 0.7, pm = 0.001
G e n e r a t i o n s
Best
Average
80 90 10060 7040 5020 30100
-0.1
0.5
0.6
0.7
Fitness
0
0.1
0.2
0.3
0.4
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 35
Performance graphs for 100 generations of 6Performance graphs for 100 generations of 6
chromosomeschromosomes:: global maximumglobal maximum
Best
Average
100
G e n e r a t i o n s
80 9060 7040 5020 3010
pc = 0.7, pm = 0.01
1.8
Fitness
0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
1.6
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 36
pc = 0.7, pm = 0.001
Best
Average
20
G e n e r a t i o n s
16 1812 148 104 620
Fitness
0.2
0.4
0.6
0.8
1.0
1.2
1.4
1.6
1.8
Performance graphs forPerformance graphs for 2020 generations ofgenerations of
6060 chromosomeschromosomes
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 37
CaseCase studystudy:: maintenancemaintenance schedulingscheduling
II Maintenance scheduling problems are usuallyMaintenance scheduling problems are usually
solved using a combination of search techniquessolved using a combination of search techniques
andand heuristics.heuristics.
II These problems are complex and difficult toThese problems are complex and difficult to
solve.solve.
II They are NPThey are NP--complete and cannot be solved bycomplete and cannot be solved by
combinatorial searchcombinatorial search techniques.techniques.
II Scheduling involves competition for limitedScheduling involves competition for limited
resources, and is complicated by a great numberresources, and is complicated by a great number
of badly formalised constraints.of badly formalised constraints.
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 38
Steps in the GA developmentSteps in the GA development
1. Specify1. Specify the problem, define constraintsthe problem, define constraints andand
optimumoptimum criteria;criteria;
22. Represent. Represent the problem domain asthe problem domain as aa
chromosomechromosome;;
3.3. DefineDefine a fitness function to evaluate thea fitness function to evaluate the
chromosomechromosome performance;performance;
4. Construct4. Construct the geneticthe genetic operators;operators;
5. Run5. Run the GA and tune itsthe GA and tune its parameters.parameters.
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 39
CaseCase studystudy
Scheduling of 7 units in 4 equal intervalsScheduling of 7 units in 4 equal intervals
The problem constraints:The problem constraints:
II The maximum loads expected during four intervals areThe maximum loads expected during four intervals are
80, 90, 65 and 70 MW;80, 90, 65 and 70 MW;
II Maintenance of any unit starts at the beginning of anMaintenance of any unit starts at the beginning of an
interval and finishes at the end of the same or adjacentinterval and finishes at the end of the same or adjacent
interval. The maintenance cannot be aborted or finishedinterval. The maintenance cannot be aborted or finished
earlier than scheduled;earlier than scheduled;
II The net reserve of the power system must be greater orThe net reserve of the power system must be greater or
equal to zero at any interval.equal to zero at any interval.
The optimum criterion is the maximum of the netThe optimum criterion is the maximum of the net
reserve at any maintenance period.reserve at any maintenance period.
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 40
CaseCase studystudy
Unit data and maintenance requirementsUnit data and maintenance requirements
Unit
number
Unit capacity,
MW
Number of intervals required
for unit maintenance
1 20 2
2 15 2
3 35 1
4 40 1
5 15 1
6 15 1
7 10 1
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 41
CaseCase studystudy
Unit gene poolsUnit gene pools
Unit 1: 1 01 0 0 11 0 0 10 1
Unit 2: 1 01 0 0 11 0 0 10 1
Unit 3: 1 00 0 0 01 0 0 10 0 0 00 1
Unit 4: 1 00 0 0 01 0 0 10 0 0 00 1
Unit 5: 1 00 0 0 01 0 0 10 0 0 00 1
Unit 6: 1 00 0 0 01 0 0 10 0 0 00 1
Unit 7: 1 00 0 0 01 0 0 10 0 0 00 1
Chromosome for the scheduling problemChromosome for the scheduling problem
0 11 0 0 10 1 0 00 1 1 00 0 0 01 0 0 10 0 1 00 0
Unit 1 Unit 3Unit 2 Unit 4 Unit 6Unit 5 Unit 7
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 42
CaseCase studystudy
The crossover operatorThe crossover operator
0 11 0 0 10 1 0 00 1 1 00 0 0 01 0 0 10 0 1 00 0
Parent 1
1 01 0 0 11 0 0 01 0 0 00 1 0 10 0 1 00 0 0 01 0
Parent 2
0 11 0 0 10 1 0 00 1 1 00 0 0 10 0 1 00 0 0 01 0
Child 1
1 01 0 0 11 0 0 01 0 0 00 1 0 01 0 0 10 0 1 00 0
Child 2
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 43
CaseCase studystudy
The mutation operatorThe mutation operator
1 01 0 0 11 0 0 01 0 0 00 1 0 01 0 0 10 0 1 00 00 01 0
1 01 0 0 11 0 0 01 0 0 00 1 0 01 0 0 10 0 1 00 00 00 1
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 44
PerformancePerformance graphs and the best maintenancegraphs and the best maintenance
schedules created in a population of 20 chromosomesschedules created in a population of 20 chromosomes
G e n e r a t i o n s
0
30
60
90
120
150
Unit 2 Unit 2
Unit 7
Unit 1
Unit 6
Unit 1
Unit 3
Unit 5
Unit 4
1 2 3 4
T i m e i n t e r v a l
MW
N e t r e s e r v e s:
15 35 35 25
N = 20, pc = 0.7, pm = 0.001
Best
Average
5 15 25 3510 3020 40 45 50
G e n e r a t i o n s
0
Fitness
-10
-5
0
5
10
15
((aa) 50) 50 generationsgenerations
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 45
PerformancePerformance graphs and the best maintenancegraphs and the best maintenance
schedules created in a population of 20 chromosomesschedules created in a population of 20 chromosomes
G e n e r a t i o n s
0
30
60
1 2 3 4
T i m e i n t e r v a l
MW
N e t r e s e r v e s :
40 25 20 25
Unit 2
Unit 2
Unit 7
Unit 1
Unit 6
Unit 1
Unit 3
Unit 5
Unit 4
90
120
150
N = 20, pc = 0.7, pm = 0.001
Best
Average
10 30 50 70200 6040 80 90 100
Fitness
-10
0
10
20
G e n e r a t i o n s
((bb)) 100100 generationsgenerations
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 46
PerformancePerformance graphs and the best maintenancegraphs and the best maintenance
schedules created in a population ofschedules created in a population of 100100 chromosomeschromosomes
((aa)) Mutation rate is 0.001Mutation rate is 0.001
1 2 3 4
T i m e i n t e r v a l
35 25 25 25
Unit 2 Unit 2
Unit 7
Unit 1
Unit 6
Unit 1
Unit 3
Unit 5
Unit 4
0
30
60
MW
90
120
150
N = 100, pc = 0.7, pm = 0.001
G e n e r a t i o n s
N e t r e s e r v e s :
Best
Average
10 30 50 70200 6040 80 90 100
-10
Fitness
0
10
20
30
 Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 47
PerformancePerformance graphs and the best maintenancegraphs and the best maintenance
schedules created in a population ofschedules created in a population of 100100 chromosomeschromosomes
((bb)) Mutation rate is 0.01Mutation rate is 0.01
1 2 3 4
T i m e i n t e r v a l
N e t r e s e r v e s :
25 25 30 30
Unit 2
Unit 2
Unit 7
Unit 6
Unit 1
Unit 3
Unit 5
Unit 4
0
30
60
MW
90
120
150
Unit 1
N = 100, pc = 0.7, pm = 0.01
G e n e r a t i o n s
10 30 50 70200 6040 80 90 100
Best
Average
Fitness
-20
-10
0
10
30
20

Contenu connexe

Tendances

Evolving Neural Networks Through Augmenting Topologies
Evolving Neural Networks Through Augmenting TopologiesEvolving Neural Networks Through Augmenting Topologies
Evolving Neural Networks Through Augmenting TopologiesDaniele Loiacono
 
INHIBITION AND SET-SHIFTING TASKS IN CENTRAL EXECUTIVE FUNCTION OF WORKING ME...
INHIBITION AND SET-SHIFTING TASKS IN CENTRAL EXECUTIVE FUNCTION OF WORKING ME...INHIBITION AND SET-SHIFTING TASKS IN CENTRAL EXECUTIVE FUNCTION OF WORKING ME...
INHIBITION AND SET-SHIFTING TASKS IN CENTRAL EXECUTIVE FUNCTION OF WORKING ME...sipij
 
Computational neuroscience
Computational neuroscienceComputational neuroscience
Computational neuroscienceNicolas Rougier
 
Neural fields, a cognitive approach
Neural fields, a cognitive approachNeural fields, a cognitive approach
Neural fields, a cognitive approachNicolas Rougier
 

Tendances (6)

Jaeggi2010
Jaeggi2010Jaeggi2010
Jaeggi2010
 
Evolving Neural Networks Through Augmenting Topologies
Evolving Neural Networks Through Augmenting TopologiesEvolving Neural Networks Through Augmenting Topologies
Evolving Neural Networks Through Augmenting Topologies
 
INHIBITION AND SET-SHIFTING TASKS IN CENTRAL EXECUTIVE FUNCTION OF WORKING ME...
INHIBITION AND SET-SHIFTING TASKS IN CENTRAL EXECUTIVE FUNCTION OF WORKING ME...INHIBITION AND SET-SHIFTING TASKS IN CENTRAL EXECUTIVE FUNCTION OF WORKING ME...
INHIBITION AND SET-SHIFTING TASKS IN CENTRAL EXECUTIVE FUNCTION OF WORKING ME...
 
Computational neuroscience
Computational neuroscienceComputational neuroscience
Computational neuroscience
 
Neural fields, a cognitive approach
Neural fields, a cognitive approachNeural fields, a cognitive approach
Neural fields, a cognitive approach
 
Project. Thalamocortical
Project. ThalamocorticalProject. Thalamocortical
Project. Thalamocortical
 

En vedette

Роза для учителя
Роза для учителяРоза для учителя
Роза для учителяsfrnvln
 
印象.西湖.雨
印象.西湖.雨印象.西湖.雨
印象.西湖.雨psjlew
 
伸展的好處
伸展的好處伸展的好處
伸展的好處psjlew
 
2010年时代周刊50個最佳發民明
2010年时代周刊50個最佳發民明2010年时代周刊50個最佳發民明
2010年时代周刊50個最佳發民明psjlew
 
祖先定十二生肖的含意
祖先定十二生肖的含意祖先定十二生肖的含意
祖先定十二生肖的含意psjlew
 
認識白内障
認識白内障認識白内障
認識白内障psjlew
 
Secondary academic information session
Secondary academic information sessionSecondary academic information session
Secondary academic information sessionEd
 
Looking ahead at Freight Costs
Looking ahead at Freight CostsLooking ahead at Freight Costs
Looking ahead at Freight CostsNulogx
 
一生受用不盡的經驗
一生受用不盡的經驗一生受用不盡的經驗
一生受用不盡的經驗psjlew
 
2010 national-geographic
2010 national-geographic2010 national-geographic
2010 national-geographicpsjlew
 
Approved maintenance organisation ofpl
Approved maintenance organisation ofplApproved maintenance organisation ofpl
Approved maintenance organisation ofplqcorientflights
 
可能“致命”的家常菜(非常實用)
可能“致命”的家常菜(非常實用)可能“致命”的家常菜(非常實用)
可能“致命”的家常菜(非常實用)psjlew
 
劉兆玄的幽默(大家都適合看)
劉兆玄的幽默(大家都適合看)劉兆玄的幽默(大家都適合看)
劉兆玄的幽默(大家都適合看)psjlew
 
2011.07 陳文茜減肥祕笈
2011.07 陳文茜減肥祕笈2011.07 陳文茜減肥祕笈
2011.07 陳文茜減肥祕笈psjlew
 
Problema logico
Problema logicoProblema logico
Problema logicoJesus
 
北京大观园
北京大观园北京大观园
北京大观园psjlew
 

En vedette (20)

2015-2 W16 kernel and smo
2015-2 W16   kernel and smo2015-2 W16   kernel and smo
2015-2 W16 kernel and smo
 
Роза для учителя
Роза для учителяРоза для учителя
Роза для учителя
 
Lektion 13 april
Lektion 13 aprilLektion 13 april
Lektion 13 april
 
鉛筆的啟示
鉛筆的啟示鉛筆的啟示
鉛筆的啟示
 
印象.西湖.雨
印象.西湖.雨印象.西湖.雨
印象.西湖.雨
 
伸展的好處
伸展的好處伸展的好處
伸展的好處
 
2010年时代周刊50個最佳發民明
2010年时代周刊50個最佳發民明2010年时代周刊50個最佳發民明
2010年时代周刊50個最佳發民明
 
祖先定十二生肖的含意
祖先定十二生肖的含意祖先定十二生肖的含意
祖先定十二生肖的含意
 
認識白内障
認識白内障認識白内障
認識白内障
 
Secondary academic information session
Secondary academic information sessionSecondary academic information session
Secondary academic information session
 
Looking ahead at Freight Costs
Looking ahead at Freight CostsLooking ahead at Freight Costs
Looking ahead at Freight Costs
 
一生受用不盡的經驗
一生受用不盡的經驗一生受用不盡的經驗
一生受用不盡的經驗
 
2010 national-geographic
2010 national-geographic2010 national-geographic
2010 national-geographic
 
Approved maintenance organisation ofpl
Approved maintenance organisation ofplApproved maintenance organisation ofpl
Approved maintenance organisation ofpl
 
Onlinetcasestudy Erste
Onlinetcasestudy   ErsteOnlinetcasestudy   Erste
Onlinetcasestudy Erste
 
可能“致命”的家常菜(非常實用)
可能“致命”的家常菜(非常實用)可能“致命”的家常菜(非常實用)
可能“致命”的家常菜(非常實用)
 
劉兆玄的幽默(大家都適合看)
劉兆玄的幽默(大家都適合看)劉兆玄的幽默(大家都適合看)
劉兆玄的幽默(大家都適合看)
 
2011.07 陳文茜減肥祕笈
2011.07 陳文茜減肥祕笈2011.07 陳文茜減肥祕笈
2011.07 陳文茜減肥祕笈
 
Problema logico
Problema logicoProblema logico
Problema logico
 
北京大观园
北京大观园北京大观园
北京大观园
 

Similaire à Genetic Algorithms and Evolutionary Computation

lecture-09-evolutionary-computation-genetic-algorithms.pdf
lecture-09-evolutionary-computation-genetic-algorithms.pdflecture-09-evolutionary-computation-genetic-algorithms.pdf
lecture-09-evolutionary-computation-genetic-algorithms.pdfahmedsalim244821
 
Taking A Look At Influenza A Virus
Taking A Look At Influenza A VirusTaking A Look At Influenza A Virus
Taking A Look At Influenza A VirusNicole Gomez
 
adaptation and selection
adaptation and selectionadaptation and selection
adaptation and selectionAftab Badshah
 
Epigenetics /certified fixed orthodontic courses by Indian dental academy
Epigenetics /certified fixed orthodontic courses by Indian dental academy Epigenetics /certified fixed orthodontic courses by Indian dental academy
Epigenetics /certified fixed orthodontic courses by Indian dental academy Indian dental academy
 
Epigenetics /certified fixed orthodontic courses by Indian dental academy
Epigenetics /certified fixed orthodontic courses by Indian dental academy Epigenetics /certified fixed orthodontic courses by Indian dental academy
Epigenetics /certified fixed orthodontic courses by Indian dental academy Indian dental academy
 
Evolutionary Genetics by: Kim Jim F. Raborar, RN, MAEd(ue)
Evolutionary Genetics by: Kim Jim F. Raborar, RN, MAEd(ue)Evolutionary Genetics by: Kim Jim F. Raborar, RN, MAEd(ue)
Evolutionary Genetics by: Kim Jim F. Raborar, RN, MAEd(ue)Kim Jim Raborar
 
2013-1 Machine Learning Lecture 07 - Michael Negnevitsky - Evolutionary Co…
2013-1 Machine Learning Lecture 07 - Michael Negnevitsky - Evolutionary Co…2013-1 Machine Learning Lecture 07 - Michael Negnevitsky - Evolutionary Co…
2013-1 Machine Learning Lecture 07 - Michael Negnevitsky - Evolutionary Co…Dongseo University
 
The Imperfection of Evolution and the Evolution of Imperfection
The Imperfection of Evolution and the Evolution of ImperfectionThe Imperfection of Evolution and the Evolution of Imperfection
The Imperfection of Evolution and the Evolution of ImperfectionDan Graur
 
generic optimization techniques lecture slides
generic optimization techniques  lecture slidesgeneric optimization techniques  lecture slides
generic optimization techniques lecture slidesSardarHamidullah
 
Coevolution Drives the Emergence of Complex Traits and Promotes Evolvability
Coevolution Drives the Emergence of Complex Traits and Promotes EvolvabilityCoevolution Drives the Emergence of Complex Traits and Promotes Evolvability
Coevolution Drives the Emergence of Complex Traits and Promotes EvolvabilityRanjith Raj V
 
Liberty university biol 101 study guide quiz 7 solutions answers slideshare
Liberty university biol 101 study guide quiz 7 solutions answers slideshareLiberty university biol 101 study guide quiz 7 solutions answers slideshare
Liberty university biol 101 study guide quiz 7 solutions answers slideshareLiberty Liberty
 
Chapter 15.3 shaping evolutionary theory
Chapter 15.3 shaping evolutionary theoryChapter 15.3 shaping evolutionary theory
Chapter 15.3 shaping evolutionary theorykathy_lambert
 
Biology 1A Study Guide [SJSU] Essay
Biology 1A Study Guide [SJSU] EssayBiology 1A Study Guide [SJSU] Essay
Biology 1A Study Guide [SJSU] EssayChristina Padilla
 
A key question for personality psychologists is Are we what .docx
A key question for personality psychologists is Are we what .docxA key question for personality psychologists is Are we what .docx
A key question for personality psychologists is Are we what .docxsleeperharwell
 
Algortimos bio-inspirados para clustering y visualizacion de datos geoespaciales
Algortimos bio-inspirados para clustering y visualizacion de datos geoespacialesAlgortimos bio-inspirados para clustering y visualizacion de datos geoespaciales
Algortimos bio-inspirados para clustering y visualizacion de datos geoespacialesaskroll
 
Neuroeconomic Class
Neuroeconomic ClassNeuroeconomic Class
Neuroeconomic Classtkvaran
 
Functional matrix hypothesis revisited
Functional matrix hypothesis   revisitedFunctional matrix hypothesis   revisited
Functional matrix hypothesis revisitedIndian dental academy
 

Similaire à Genetic Algorithms and Evolutionary Computation (20)

lecture-09-evolutionary-computation-genetic-algorithms.pdf
lecture-09-evolutionary-computation-genetic-algorithms.pdflecture-09-evolutionary-computation-genetic-algorithms.pdf
lecture-09-evolutionary-computation-genetic-algorithms.pdf
 
Taking A Look At Influenza A Virus
Taking A Look At Influenza A VirusTaking A Look At Influenza A Virus
Taking A Look At Influenza A Virus
 
adaptation and selection
adaptation and selectionadaptation and selection
adaptation and selection
 
Epigenetics
EpigeneticsEpigenetics
Epigenetics
 
Epigenetics /certified fixed orthodontic courses by Indian dental academy
Epigenetics /certified fixed orthodontic courses by Indian dental academy Epigenetics /certified fixed orthodontic courses by Indian dental academy
Epigenetics /certified fixed orthodontic courses by Indian dental academy
 
Epigenetics /certified fixed orthodontic courses by Indian dental academy
Epigenetics /certified fixed orthodontic courses by Indian dental academy Epigenetics /certified fixed orthodontic courses by Indian dental academy
Epigenetics /certified fixed orthodontic courses by Indian dental academy
 
Evolutionary Genetics by: Kim Jim F. Raborar, RN, MAEd(ue)
Evolutionary Genetics by: Kim Jim F. Raborar, RN, MAEd(ue)Evolutionary Genetics by: Kim Jim F. Raborar, RN, MAEd(ue)
Evolutionary Genetics by: Kim Jim F. Raborar, RN, MAEd(ue)
 
2013-1 Machine Learning Lecture 07 - Michael Negnevitsky - Evolutionary Co…
2013-1 Machine Learning Lecture 07 - Michael Negnevitsky - Evolutionary Co…2013-1 Machine Learning Lecture 07 - Michael Negnevitsky - Evolutionary Co…
2013-1 Machine Learning Lecture 07 - Michael Negnevitsky - Evolutionary Co…
 
The Imperfection of Evolution and the Evolution of Imperfection
The Imperfection of Evolution and the Evolution of ImperfectionThe Imperfection of Evolution and the Evolution of Imperfection
The Imperfection of Evolution and the Evolution of Imperfection
 
generic optimization techniques lecture slides
generic optimization techniques  lecture slidesgeneric optimization techniques  lecture slides
generic optimization techniques lecture slides
 
Coevolution Drives the Emergence of Complex Traits and Promotes Evolvability
Coevolution Drives the Emergence of Complex Traits and Promotes EvolvabilityCoevolution Drives the Emergence of Complex Traits and Promotes Evolvability
Coevolution Drives the Emergence of Complex Traits and Promotes Evolvability
 
Liberty university biol 101 study guide quiz 7 solutions answers slideshare
Liberty university biol 101 study guide quiz 7 solutions answers slideshareLiberty university biol 101 study guide quiz 7 solutions answers slideshare
Liberty university biol 101 study guide quiz 7 solutions answers slideshare
 
DORN1
DORN1DORN1
DORN1
 
Outcrossing
OutcrossingOutcrossing
Outcrossing
 
Chapter 15.3 shaping evolutionary theory
Chapter 15.3 shaping evolutionary theoryChapter 15.3 shaping evolutionary theory
Chapter 15.3 shaping evolutionary theory
 
Biology 1A Study Guide [SJSU] Essay
Biology 1A Study Guide [SJSU] EssayBiology 1A Study Guide [SJSU] Essay
Biology 1A Study Guide [SJSU] Essay
 
A key question for personality psychologists is Are we what .docx
A key question for personality psychologists is Are we what .docxA key question for personality psychologists is Are we what .docx
A key question for personality psychologists is Are we what .docx
 
Algortimos bio-inspirados para clustering y visualizacion de datos geoespaciales
Algortimos bio-inspirados para clustering y visualizacion de datos geoespacialesAlgortimos bio-inspirados para clustering y visualizacion de datos geoespaciales
Algortimos bio-inspirados para clustering y visualizacion de datos geoespaciales
 
Neuroeconomic Class
Neuroeconomic ClassNeuroeconomic Class
Neuroeconomic Class
 
Functional matrix hypothesis revisited
Functional matrix hypothesis   revisitedFunctional matrix hypothesis   revisited
Functional matrix hypothesis revisited
 

Plus de Dongseo University

Lecture_NaturalPolicyGradientsTRPOPPO.pdf
Lecture_NaturalPolicyGradientsTRPOPPO.pdfLecture_NaturalPolicyGradientsTRPOPPO.pdf
Lecture_NaturalPolicyGradientsTRPOPPO.pdfDongseo University
 
Evolutionary Computation Lecture notes03
Evolutionary Computation Lecture notes03Evolutionary Computation Lecture notes03
Evolutionary Computation Lecture notes03Dongseo University
 
Evolutionary Computation Lecture notes02
Evolutionary Computation Lecture notes02Evolutionary Computation Lecture notes02
Evolutionary Computation Lecture notes02Dongseo University
 
Evolutionary Computation Lecture notes01
Evolutionary Computation Lecture notes01Evolutionary Computation Lecture notes01
Evolutionary Computation Lecture notes01Dongseo University
 
Average Linear Selection Algorithm
Average Linear Selection AlgorithmAverage Linear Selection Algorithm
Average Linear Selection AlgorithmDongseo University
 
Lower Bound of Comparison Sort
Lower Bound of Comparison SortLower Bound of Comparison Sort
Lower Bound of Comparison SortDongseo University
 
Running Time of Building Binary Heap using Array
Running Time of Building Binary Heap using ArrayRunning Time of Building Binary Heap using Array
Running Time of Building Binary Heap using ArrayDongseo University
 
Proof By Math Induction Example
Proof By Math Induction ExampleProof By Math Induction Example
Proof By Math Induction ExampleDongseo University
 
Estimating probability distributions
Estimating probability distributionsEstimating probability distributions
Estimating probability distributionsDongseo University
 
2018-2 Machine Learning (Wasserstein GAN and BEGAN)
2018-2 Machine Learning (Wasserstein GAN and BEGAN)2018-2 Machine Learning (Wasserstein GAN and BEGAN)
2018-2 Machine Learning (Wasserstein GAN and BEGAN)Dongseo University
 
2018-2 Machine Learning (Linear regression, Logistic regression)
2018-2 Machine Learning (Linear regression, Logistic regression)2018-2 Machine Learning (Linear regression, Logistic regression)
2018-2 Machine Learning (Linear regression, Logistic regression)Dongseo University
 
2017-2 ML W9 Reinforcement Learning #5
2017-2 ML W9 Reinforcement Learning #52017-2 ML W9 Reinforcement Learning #5
2017-2 ML W9 Reinforcement Learning #5Dongseo University
 

Plus de Dongseo University (20)

Lecture_NaturalPolicyGradientsTRPOPPO.pdf
Lecture_NaturalPolicyGradientsTRPOPPO.pdfLecture_NaturalPolicyGradientsTRPOPPO.pdf
Lecture_NaturalPolicyGradientsTRPOPPO.pdf
 
Evolutionary Computation Lecture notes03
Evolutionary Computation Lecture notes03Evolutionary Computation Lecture notes03
Evolutionary Computation Lecture notes03
 
Evolutionary Computation Lecture notes02
Evolutionary Computation Lecture notes02Evolutionary Computation Lecture notes02
Evolutionary Computation Lecture notes02
 
Evolutionary Computation Lecture notes01
Evolutionary Computation Lecture notes01Evolutionary Computation Lecture notes01
Evolutionary Computation Lecture notes01
 
Markov Chain Monte Carlo
Markov Chain Monte CarloMarkov Chain Monte Carlo
Markov Chain Monte Carlo
 
Simplex Lecture Notes
Simplex Lecture NotesSimplex Lecture Notes
Simplex Lecture Notes
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement Learning
 
Median of Medians
Median of MediansMedian of Medians
Median of Medians
 
Average Linear Selection Algorithm
Average Linear Selection AlgorithmAverage Linear Selection Algorithm
Average Linear Selection Algorithm
 
Lower Bound of Comparison Sort
Lower Bound of Comparison SortLower Bound of Comparison Sort
Lower Bound of Comparison Sort
 
Running Time of Building Binary Heap using Array
Running Time of Building Binary Heap using ArrayRunning Time of Building Binary Heap using Array
Running Time of Building Binary Heap using Array
 
Running Time of MergeSort
Running Time of MergeSortRunning Time of MergeSort
Running Time of MergeSort
 
Binary Trees
Binary TreesBinary Trees
Binary Trees
 
Proof By Math Induction Example
Proof By Math Induction ExampleProof By Math Induction Example
Proof By Math Induction Example
 
TRPO and PPO notes
TRPO and PPO notesTRPO and PPO notes
TRPO and PPO notes
 
Estimating probability distributions
Estimating probability distributionsEstimating probability distributions
Estimating probability distributions
 
2018-2 Machine Learning (Wasserstein GAN and BEGAN)
2018-2 Machine Learning (Wasserstein GAN and BEGAN)2018-2 Machine Learning (Wasserstein GAN and BEGAN)
2018-2 Machine Learning (Wasserstein GAN and BEGAN)
 
2018-2 Machine Learning (Linear regression, Logistic regression)
2018-2 Machine Learning (Linear regression, Logistic regression)2018-2 Machine Learning (Linear regression, Logistic regression)
2018-2 Machine Learning (Linear regression, Logistic regression)
 
2017-2 ML W11 GAN #1
2017-2 ML W11 GAN #12017-2 ML W11 GAN #1
2017-2 ML W11 GAN #1
 
2017-2 ML W9 Reinforcement Learning #5
2017-2 ML W9 Reinforcement Learning #52017-2 ML W9 Reinforcement Learning #5
2017-2 ML W9 Reinforcement Learning #5
 

Dernier

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Dernier (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

Genetic Algorithms and Evolutionary Computation

  • 1.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 1 Lecture 9Lecture 9 Evolutionary Computation:Evolutionary Computation: Genetic algorithmsGenetic algorithms II Introduction, orIntroduction, or cancan evolutionevolution bebe intelligentintelligent?? II Simulation ofSimulation of naturalnatural evolutionevolution II GeneticGenetic algorithmsalgorithms II CaseCase studystudy:: maintenancemaintenance schedulingscheduling withwith geneticgenetic algorithmsalgorithms II SummarySummary
  • 2.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 2 II Intelligence can be defined as the capability of aIntelligence can be defined as the capability of a system to adapt its behaviour to eversystem to adapt its behaviour to ever--changingchanging environment. According to Alan Turing, the formenvironment. According to Alan Turing, the form or appearance of a system is irrelevant to itsor appearance of a system is irrelevant to its intelligence.intelligence. II Evolutionary computation simulates evolution on aEvolutionary computation simulates evolution on a computer. The result of such a simulation is acomputer. The result of such a simulation is a series of optimisation algorithmsseries of optimisation algorithms, usually based on, usually based on a simple set of rules. Optimisationa simple set of rules. Optimisation iterativelyiteratively improves the quality of solutions until an optimal,improves the quality of solutions until an optimal, or at least feasible, solution is found.or at least feasible, solution is found. Can evolution be intelligentCan evolution be intelligent??
  • 3.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 3 II The behaviour ofThe behaviour of an individual organisman individual organism isis anan inductive inference about some yet unknowninductive inference about some yet unknown aspects of its environment.aspects of its environment. If,If, over successiveover successive generations, the organism survives, we can saygenerations, the organism survives, we can say that this organism is capable of learning to predictthat this organism is capable of learning to predict changes in its environment.changes in its environment. II The evolutionary approach is based onThe evolutionary approach is based on computational models of natural selection andcomputational models of natural selection and genetics. We call themgenetics. We call them evolutionaryevolutionary computationcomputation, an umbrella term that combines, an umbrella term that combines genetic algorithmsgenetic algorithms,, evolution strategiesevolution strategies andand genetic programminggenetic programming..
  • 4.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 4 II On 1 July 1858,On 1 July 1858, Charles DarwinCharles Darwin presented hispresented his theory of evolution before thetheory of evolution before the LinneanLinnean Society ofSociety of London. This day marks the beginning of aLondon. This day marks the beginning of a revolution in biology.revolution in biology. II DarwinDarwin’’ss classicalclassical theory of evolutiontheory of evolution, together, together withwith WeismannWeismann’’ss theory of natural selectiontheory of natural selection andand MendelMendel’’ss concept ofconcept of geneticsgenetics, now represent the, now represent the neoneo--Darwinian paradigm.Darwinian paradigm. Simulation ofSimulation of naturalnatural evolutionevolution
  • 5.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 5 II NeoNeo--DarwinismDarwinism is based on processes ofis based on processes of reproduction, mutation, competition and selection.reproduction, mutation, competition and selection. The power to reproduce appears to be an essentialThe power to reproduce appears to be an essential property of life. The power to mutate is alsoproperty of life. The power to mutate is also guaranteed in any living organism that reproducesguaranteed in any living organism that reproduces itself in a continuously changing environment.itself in a continuously changing environment. Processes of competition and selection normallyProcesses of competition and selection normally take place in the natural world, where expandingtake place in the natural world, where expanding populations of different species are limited by apopulations of different species are limited by a finite space.finite space.
  • 6.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 6 II Evolution can be seen as a process leading to theEvolution can be seen as a process leading to the maintenancemaintenance of a populationof a population’’ss ability to surviveability to survive and reproduce in a specific environment. Thisand reproduce in a specific environment. This ability is calledability is called evolutionary fitnessevolutionary fitness.. II Evolutionary fitness can also be viewed as aEvolutionary fitness can also be viewed as a measure of the organismmeasure of the organism’’s ability to anticipates ability to anticipate changes in its environment.changes in its environment. II TheThe fitness, or the quantitative measure of thefitness, or the quantitative measure of the ability to predict environmental changes andability to predict environmental changes and respond adequately, can be considered as therespond adequately, can be considered as the quality that isquality that is optimisedoptimised in natural life.in natural life.
  • 7.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 7 How is a population with increasingHow is a population with increasing fitness generated?fitness generated? II Let us considerLet us consider a population of rabbits. Somea population of rabbits. Some rabbits are faster than others, and we may say thatrabbits are faster than others, and we may say that these rabbits possess superior fitness, because theythese rabbits possess superior fitness, because they have a greater chance of avoiding foxes, survivinghave a greater chance of avoiding foxes, surviving and then breedingand then breeding.. II If two parents have superior fitness, there is a goodIf two parents have superior fitness, there is a good chance that a combination of their genes willchance that a combination of their genes will produce an offspring with even higher fitness.produce an offspring with even higher fitness. Over time the entire population of rabbits becomesOver time the entire population of rabbits becomes faster to meet their environmental challenges in thefaster to meet their environmental challenges in the face of foxes.face of foxes.
  • 8.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 8 II All methods of evolutionary computation simulateAll methods of evolutionary computation simulate naturalnatural evolution by creatingevolution by creating a population ofa population of individuals, evaluating their fitness, generating aindividuals, evaluating their fitness, generating a new population through genetic operations, andnew population through genetic operations, and repeating this process a number of timesrepeating this process a number of times.. II We will start withWe will start with Genetic AlgorithmsGenetic Algorithms (GAs) as(GAs) as most of the other evolutionarymost of the other evolutionary algorithms can bealgorithms can be viewed as variations ofviewed as variations of genetic algorithmsgenetic algorithms.. Simulation ofSimulation of naturalnatural evolutionevolution
  • 9.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 9 II In the early 1970s, JohnIn the early 1970s, John Holland introduced theHolland introduced the concept of genetic algorithms.concept of genetic algorithms. II HisHis aim was to make computers do what natureaim was to make computers do what nature does.does. Holland was concerned withHolland was concerned with algorithmsalgorithms that manipulate strings of binary digitsthat manipulate strings of binary digits.. II Each artificialEach artificial ““chromosomeschromosomes”” consists of aconsists of a number ofnumber of ““genesgenes””, and each gene is represented, and each gene is represented by 0 or 1:by 0 or 1: Genetic AlgorithmsGenetic Algorithms 1 10 1 0 1 0 0 0 0 0 1 0 1 10
  • 10.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 10 II Nature has an ability to adapt and learn withoutNature has an ability to adapt and learn without being told what to do. In other words, naturebeing told what to do. In other words, nature finds good chromosomes blindly.finds good chromosomes blindly. GAsGAs do thedo the same. Two mechanisms link a GA to the problemsame. Two mechanisms link a GA to the problem it is solving:it is solving: encodingencoding andand evaluationevaluation.. II The GA uses a measure of fitness of individualThe GA uses a measure of fitness of individual chromosomes to carry out reproduction. Aschromosomes to carry out reproduction. As reproduction takes place, the crossover operatorreproduction takes place, the crossover operator exchanges parts of two single chromosomes, andexchanges parts of two single chromosomes, and the mutation operator changes the gene value inthe mutation operator changes the gene value in some randomly chosen location of thesome randomly chosen location of the chromosome.chromosome.
  • 11.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 11 Step 1Step 1:: Represent the problem variable domain asRepresent the problem variable domain as a chromosome of a fixed length, choose the sizea chromosome of a fixed length, choose the size of a chromosome populationof a chromosome population NN, the crossover, the crossover probabilityprobability ppcc and the mutation probabilityand the mutation probability ppmm.. StepStep 22:: DefineDefine a fitness function to measure thea fitness function to measure the performance, or fitness, of an individualperformance, or fitness, of an individual chromosome in the problem domain. The fitnesschromosome in the problem domain. The fitness function establishes the basis for selectingfunction establishes the basis for selecting chromosomes that will be mated duringchromosomes that will be mated during reproduction.reproduction. BasicBasic geneticgenetic algorithmsalgorithms
  • 12.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 12 Step 3Step 3:: Randomly generate an initial population ofRandomly generate an initial population of chromosomes of sizechromosomes of size NN:: xx11,, xx22, . . . ,, . . . , xxNN Step 4Step 4:: Calculate the fitness of each individualCalculate the fitness of each individual chromosome:chromosome: ff ((xx11),), ff ((xx22), . . . ,), . . . , ff ((xxNN)) Step 5Step 5:: Select a pair of chromosomes for matingSelect a pair of chromosomes for mating from the current population. Parentfrom the current population. Parent chromosomes are selected with a probabilitychromosomes are selected with a probability related to their fitness.related to their fitness.
  • 13.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 13 Step 6Step 6:: Create a pair of offspring chromosomes byCreate a pair of offspring chromosomes by applying the genetic operatorsapplying the genetic operators −− crossovercrossover andand mutationmutation.. Step 7Step 7:: Place the created offspring chromosomesPlace the created offspring chromosomes in the new population.in the new population. Step 8Step 8:: RepeatRepeat Step 5Step 5 until the size of the newuntil the size of the new chromosome population becomeschromosome population becomes equal to theequal to the size of thesize of the initial population,initial population, NN.. Step 9Step 9:: ReplaceReplace the initial (parent) chromosomethe initial (parent) chromosome population with the new (offspring) population.population with the new (offspring) population. StepStep 1010:: Go toGo to Step 4Step 4, and repeat the process until, and repeat the process until the termination criterion is satisfied.the termination criterion is satisfied.
  • 14.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 14 II GA represents an iterative process. Each iteration isGA represents an iterative process. Each iteration is called acalled a generationgeneration. A typical number of generations. A typical number of generations for a simple GA can range from 50 to overfor a simple GA can range from 50 to over 500. The500. The entire setentire set of generations is called aof generations is called a runrun.. II Because GAs use a stochastic search method, theBecause GAs use a stochastic search method, the fitness of a population mayfitness of a population may remain stable for aremain stable for a number of generations before a superior chromosomenumber of generations before a superior chromosome appears.appears. II A common practice is to terminate a GA after aA common practice is to terminate a GA after a specified number of generations and then examinespecified number of generations and then examine the best chromosomes in the population. If nothe best chromosomes in the population. If no satisfactory solution is found, the GA is restarted.satisfactory solution is found, the GA is restarted. GeneticGenetic algorithmsalgorithms
  • 15.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 15 A simple example will help us to understand howA simple example will help us to understand how a GA works. Let us find the maximum value ofa GA works. Let us find the maximum value of the function (15the function (15xx −− xx22 ) where parameter) where parameter xx variesvaries between 0 and 15. For simplicity, we maybetween 0 and 15. For simplicity, we may assume thatassume that xx takes only integer values. Thus,takes only integer values. Thus, chromosomes can be built with only fourchromosomes can be built with only four genes:genes: GeneticGenetic algorithmsalgorithms:: casecase studystudy Integer Binary code Integer Binary code Integer Binary code 1 0 0 0 1 6 0 1 1 0 11 1 0 1 1 2 0 0 1 0 7 0 1 1 1 12 1 1 0 0 3 0 0 1 1 8 1 0 0 0 13 1 1 0 1 4 0 1 0 0 9 1 0 0 1 14 1 1 1 0 5 0 1 0 1 10 1 0 1 0 15 1 1 1 1
  • 16.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 16 Suppose that the size of the chromosome populationSuppose that the size of the chromosome population NN is 6, the crossover probabilityis 6, the crossover probability ppcc equals 0.7, andequals 0.7, and the mutation probabilitythe mutation probability ppmm equals 0.001. Theequals 0.001. The fitness function in our example is definedfitness function in our example is defined byby ff((xx) =) = 1515 xx −−−−−−−− xx22
  • 17.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 17 The fitness function and chromosome locationsThe fitness function and chromosome locations Chromosome label Chromosome string Decoded integer Chromosome fitness Fitness ratio, % X1 1 1 0 0 12 36 16.5 X2 0 1 0 0 4 44 20.2 X3 0 0 0 1 1 14 6.4 X4 1 1 1 0 14 14 6.4 X5 0 1 1 1 7 56 25.7 X6 1 0 0 1 9 54 24.8 x 50 40 30 20 60 10 0 0 5 10 15 f(x) (a) Chromosome initial locations. x 50 40 30 20 60 10 0 0 5 10 15 (b) Chromosome final locations.
  • 18.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 18 II In natural selection, only the fittest species canIn natural selection, only the fittest species can survive, breed, and thereby pass their genes on tosurvive, breed, and thereby pass their genes on to the next generation.the next generation. GAsGAs use a similar approach,use a similar approach, but unlike nature, the size of the chromosomebut unlike nature, the size of the chromosome population remains unchanged from onepopulation remains unchanged from one generation to the next.generation to the next. II The last column in Table shows the ratio of theThe last column in Table shows the ratio of the individual chromosomeindividual chromosome’’s fitness to thes fitness to the populationpopulation’’s total fitness. This ratio determiness total fitness. This ratio determines the chromosomethe chromosome’’s chance of being selected fors chance of being selected for mating.mating. The chromosomeThe chromosome’’s average fitnesss average fitness improves from one generation to the next.improves from one generation to the next.
  • 19.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 19 RouletteRoulette wheelwheel selectionselection The most commonly used chromosome selectionThe most commonly used chromosome selection techniques is thetechniques is the roulette wheel selectionroulette wheel selection.. 100 0 16.5 36.7 43.149.5 75.2 X1: 16.5% X2: 20.2% X3: 6.4% X4: 6.4% X5: 25.3% X6: 24.8%
  • 20.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 20 Crossover operatorCrossover operator II In our example, we have an initial population of 6In our example, we have an initial population of 6 chromosomes. Thus, to establish the samechromosomes. Thus, to establish the same population in the next generation, the roulettepopulation in the next generation, the roulette wheel would be spun six timeswheel would be spun six times.. II Once a pair of parent chromosomes is selected,Once a pair of parent chromosomes is selected, thethe crossovercrossover operator is applied.operator is applied.
  • 21.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 21 II First, the crossover operator randomly chooses aFirst, the crossover operator randomly chooses a crossover point where two parent chromosomescrossover point where two parent chromosomes ““breakbreak””, and then exchanges the chromosome, and then exchanges the chromosome parts after that point. As a result, two newparts after that point. As a result, two new offspring are created.offspring are created. II If a pair of chromosomes does not cross over,If a pair of chromosomes does not cross over, thenthen the chromosome cloning takes place, and thethe chromosome cloning takes place, and the offspring are created as exact copies of eachoffspring are created as exact copies of each parent.parent.
  • 22.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 22 X6i 1 00 0 01 0 X2i 0 01 0X2i 0 11 1 X5i 0X1i 0 11 1 X5i1 01 0 0 1 0 0 11 1 01 0 CrossoverCrossover
  • 23.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 23 II Mutation represents a change inMutation represents a change in the gene.the gene. II Mutation is a background operator. Its role is toMutation is a background operator. Its role is to provide a guarantee thatprovide a guarantee that the search algorithm isthe search algorithm is not trapped on a local optimum.not trapped on a local optimum. II The mutation operator flips a randomly selectedThe mutation operator flips a randomly selected gene in a chromosome.gene in a chromosome. II The mutation probability is quite small in nature,The mutation probability is quite small in nature, and is kept low forand is kept low for GAsGAs, typically in the range, typically in the range between 0.001 and 0.01.between 0.001 and 0.01. Mutation operatorMutation operator
  • 24.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 24 MutationMutation 0 11 1X5'i 01 0 X6'i 1 00 0 01 0X2'i 0 1 0 0 0 1 111X5i 1 1 1 X1"i1 1 X2"i0 1 0 0X1'i 1 1 1 0 1 0X2i
  • 25.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 25 TheThe genetic algorithm cyclegenetic algorithm cycle 1 01 0X1i Generation i 0 01 0X2i 0 00 1X3i 1 11 0X4i 0 11 1X5i f = 56 1 00 1X6i f = 54 f = 36 f = 44 f = 14 f = 14 1 00 0X1i+1 Generation (i + 1) 0 01 1X2i+1 1 10 1X3i+1 0 01 0X4i+1 0 11 0X5i+1 f = 54 0 11 1X6i+1 f = 56 f = 56 f = 50 f = 44 f = 44 Crossover X6i 1 00 0 01 0 X2i 0 01 0X2i 0 11 1 X5i 0X1i 0 11 1 X5i1 01 0 0 1 0 0 11 1 01 0 Mutation 0 11 1X5'i 01 0 X6'i 1 00 0 01 0X2'i 0 1 0 0 0 1 111X5i 1 1 1 X1"i1 1 X2"i0 1 0 0X1'i 1 1 1 0 1 0X2i
  • 26.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 26 GeneticGenetic algorithmsalgorithms:: casecase studystudy II Suppose it is desired to find the maximum of theSuppose it is desired to find the maximum of the ““peakpeak”” function of two variables:function of two variables: where parameterswhere parameters xx andand yy vary betweenvary between −−3 and 3.3 and 3. II The first step is to represent the problem variablesThe first step is to represent the problem variables as aas a chromosomechromosome −− parametersparameters xx andand yy as aas a concatenated binary string:concatenated binary string: 2222 )()1(),( 33)1(2 yxyx eyxxexyxf −−+−− −−−−= 1 00 0 1 10 0 0 10 1 1 10 1 yx
  • 27.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 27 II We also chooseWe also choose the size of the chromosomethe size of the chromosome population, for instance 6, and randomly generatepopulation, for instance 6, and randomly generate an initial population.an initial population. II The next step is to calculate the fitness of eachThe next step is to calculate the fitness of each chromosome. This is done in two stages.chromosome. This is done in two stages. II First, a chromosome, that is a string of 16 bits, isFirst, a chromosome, that is a string of 16 bits, is partitioned into two 8partitioned into two 8--bit strings:bit strings: 10 01234567 2 )138(2021202120202021)10001010( =×+×+×+×+×+×+×+×= and 10 01234567 2 )59(2121202121212020)00111011( =×+×+×+×+×+×+×+×= II Then these strings are converted from binaryThen these strings are converted from binary (base 2) to decimal (base 10):(base 2) to decimal (base 10): 1 00 0 1 10 0 0 10 1 1 10 1and
  • 28.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 28 II Now the range of integers that can be handled byNow the range of integers that can be handled by 88--bits, that is the range from 0 to (2bits, that is the range from 0 to (288 −− 1), is1), is mapped to the actual range of parametersmapped to the actual range of parameters xx andand yy,, that is the range fromthat is the range from −−3 to 3:3 to 3: II ToTo obtain the actual values ofobtain the actual values of xx andand yy, we multiply, we multiply their decimal values by 0.0235294 and subtract 3their decimal values by 0.0235294 and subtract 3 from the results:from the results: 0235294.0 1256 6 = − 2470588.030235294.0)138( 10 =−×=x and 6117647.130235294.0)59( 10 −=−×=y
  • 29.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 29 II Using decoded values ofUsing decoded values of xx andand yy as inputs in theas inputs in the mathematical function, the GA calculates themathematical function, the GA calculates the fitness of each chromosome.fitness of each chromosome. II ToTo find the maximum of thefind the maximum of the ““peakpeak”” function, wefunction, we will use crossover with the probability equal to 0.7will use crossover with the probability equal to 0.7 and mutation with the probability equal to 0.001.and mutation with the probability equal to 0.001. As we mentioned earlier, a common practice inAs we mentioned earlier, a common practice in GAsGAs is to specify the number of generations.is to specify the number of generations. Suppose the desired number of generations is 100.Suppose the desired number of generations is 100. That is, the GA will create 100 generations of 6That is, the GA will create 100 generations of 6 chromosomes before stopping.chromosomes before stopping.
  • 30.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 30 Chromosome locations on the surface of theChromosome locations on the surface of the ““peakpeak”” function: initial populationfunction: initial population
  • 31.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 31 Chromosome locations on the surface of theChromosome locations on the surface of the ““peakpeak”” function: first generationfunction: first generation
  • 32.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 32 Chromosome locations on the surface of theChromosome locations on the surface of the ““peakpeak”” function: local maximumfunction: local maximum
  • 33.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 33 Chromosome locations on the surface of theChromosome locations on the surface of the ““peakpeak”” function: global maximumfunction: global maximum
  • 34.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 34 Performance graphs for 100 generations of 6Performance graphs for 100 generations of 6 chromosomeschromosomes:: local maximumlocal maximum pc = 0.7, pm = 0.001 G e n e r a t i o n s Best Average 80 90 10060 7040 5020 30100 -0.1 0.5 0.6 0.7 Fitness 0 0.1 0.2 0.3 0.4
  • 35.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 35 Performance graphs for 100 generations of 6Performance graphs for 100 generations of 6 chromosomeschromosomes:: global maximumglobal maximum Best Average 100 G e n e r a t i o n s 80 9060 7040 5020 3010 pc = 0.7, pm = 0.01 1.8 Fitness 0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6
  • 36.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 36 pc = 0.7, pm = 0.001 Best Average 20 G e n e r a t i o n s 16 1812 148 104 620 Fitness 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 Performance graphs forPerformance graphs for 2020 generations ofgenerations of 6060 chromosomeschromosomes
  • 37.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 37 CaseCase studystudy:: maintenancemaintenance schedulingscheduling II Maintenance scheduling problems are usuallyMaintenance scheduling problems are usually solved using a combination of search techniquessolved using a combination of search techniques andand heuristics.heuristics. II These problems are complex and difficult toThese problems are complex and difficult to solve.solve. II They are NPThey are NP--complete and cannot be solved bycomplete and cannot be solved by combinatorial searchcombinatorial search techniques.techniques. II Scheduling involves competition for limitedScheduling involves competition for limited resources, and is complicated by a great numberresources, and is complicated by a great number of badly formalised constraints.of badly formalised constraints.
  • 38.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 38 Steps in the GA developmentSteps in the GA development 1. Specify1. Specify the problem, define constraintsthe problem, define constraints andand optimumoptimum criteria;criteria; 22. Represent. Represent the problem domain asthe problem domain as aa chromosomechromosome;; 3.3. DefineDefine a fitness function to evaluate thea fitness function to evaluate the chromosomechromosome performance;performance; 4. Construct4. Construct the geneticthe genetic operators;operators; 5. Run5. Run the GA and tune itsthe GA and tune its parameters.parameters.
  • 39.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 39 CaseCase studystudy Scheduling of 7 units in 4 equal intervalsScheduling of 7 units in 4 equal intervals The problem constraints:The problem constraints: II The maximum loads expected during four intervals areThe maximum loads expected during four intervals are 80, 90, 65 and 70 MW;80, 90, 65 and 70 MW; II Maintenance of any unit starts at the beginning of anMaintenance of any unit starts at the beginning of an interval and finishes at the end of the same or adjacentinterval and finishes at the end of the same or adjacent interval. The maintenance cannot be aborted or finishedinterval. The maintenance cannot be aborted or finished earlier than scheduled;earlier than scheduled; II The net reserve of the power system must be greater orThe net reserve of the power system must be greater or equal to zero at any interval.equal to zero at any interval. The optimum criterion is the maximum of the netThe optimum criterion is the maximum of the net reserve at any maintenance period.reserve at any maintenance period.
  • 40.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 40 CaseCase studystudy Unit data and maintenance requirementsUnit data and maintenance requirements Unit number Unit capacity, MW Number of intervals required for unit maintenance 1 20 2 2 15 2 3 35 1 4 40 1 5 15 1 6 15 1 7 10 1
  • 41.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 41 CaseCase studystudy Unit gene poolsUnit gene pools Unit 1: 1 01 0 0 11 0 0 10 1 Unit 2: 1 01 0 0 11 0 0 10 1 Unit 3: 1 00 0 0 01 0 0 10 0 0 00 1 Unit 4: 1 00 0 0 01 0 0 10 0 0 00 1 Unit 5: 1 00 0 0 01 0 0 10 0 0 00 1 Unit 6: 1 00 0 0 01 0 0 10 0 0 00 1 Unit 7: 1 00 0 0 01 0 0 10 0 0 00 1 Chromosome for the scheduling problemChromosome for the scheduling problem 0 11 0 0 10 1 0 00 1 1 00 0 0 01 0 0 10 0 1 00 0 Unit 1 Unit 3Unit 2 Unit 4 Unit 6Unit 5 Unit 7
  • 42.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 42 CaseCase studystudy The crossover operatorThe crossover operator 0 11 0 0 10 1 0 00 1 1 00 0 0 01 0 0 10 0 1 00 0 Parent 1 1 01 0 0 11 0 0 01 0 0 00 1 0 10 0 1 00 0 0 01 0 Parent 2 0 11 0 0 10 1 0 00 1 1 00 0 0 10 0 1 00 0 0 01 0 Child 1 1 01 0 0 11 0 0 01 0 0 00 1 0 01 0 0 10 0 1 00 0 Child 2
  • 43.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 43 CaseCase studystudy The mutation operatorThe mutation operator 1 01 0 0 11 0 0 01 0 0 00 1 0 01 0 0 10 0 1 00 00 01 0 1 01 0 0 11 0 0 01 0 0 00 1 0 01 0 0 10 0 1 00 00 00 1
  • 44.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 44 PerformancePerformance graphs and the best maintenancegraphs and the best maintenance schedules created in a population of 20 chromosomesschedules created in a population of 20 chromosomes G e n e r a t i o n s 0 30 60 90 120 150 Unit 2 Unit 2 Unit 7 Unit 1 Unit 6 Unit 1 Unit 3 Unit 5 Unit 4 1 2 3 4 T i m e i n t e r v a l MW N e t r e s e r v e s: 15 35 35 25 N = 20, pc = 0.7, pm = 0.001 Best Average 5 15 25 3510 3020 40 45 50 G e n e r a t i o n s 0 Fitness -10 -5 0 5 10 15 ((aa) 50) 50 generationsgenerations
  • 45.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 45 PerformancePerformance graphs and the best maintenancegraphs and the best maintenance schedules created in a population of 20 chromosomesschedules created in a population of 20 chromosomes G e n e r a t i o n s 0 30 60 1 2 3 4 T i m e i n t e r v a l MW N e t r e s e r v e s : 40 25 20 25 Unit 2 Unit 2 Unit 7 Unit 1 Unit 6 Unit 1 Unit 3 Unit 5 Unit 4 90 120 150 N = 20, pc = 0.7, pm = 0.001 Best Average 10 30 50 70200 6040 80 90 100 Fitness -10 0 10 20 G e n e r a t i o n s ((bb)) 100100 generationsgenerations
  • 46.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 46 PerformancePerformance graphs and the best maintenancegraphs and the best maintenance schedules created in a population ofschedules created in a population of 100100 chromosomeschromosomes ((aa)) Mutation rate is 0.001Mutation rate is 0.001 1 2 3 4 T i m e i n t e r v a l 35 25 25 25 Unit 2 Unit 2 Unit 7 Unit 1 Unit 6 Unit 1 Unit 3 Unit 5 Unit 4 0 30 60 MW 90 120 150 N = 100, pc = 0.7, pm = 0.001 G e n e r a t i o n s N e t r e s e r v e s : Best Average 10 30 50 70200 6040 80 90 100 -10 Fitness 0 10 20 30
  • 47.  Negnevitsky, Pearson Education, 2011Negnevitsky, Pearson Education, 2011 47 PerformancePerformance graphs and the best maintenancegraphs and the best maintenance schedules created in a population ofschedules created in a population of 100100 chromosomeschromosomes ((bb)) Mutation rate is 0.01Mutation rate is 0.01 1 2 3 4 T i m e i n t e r v a l N e t r e s e r v e s : 25 25 30 30 Unit 2 Unit 2 Unit 7 Unit 6 Unit 1 Unit 3 Unit 5 Unit 4 0 30 60 MW 90 120 150 Unit 1 N = 100, pc = 0.7, pm = 0.01 G e n e r a t i o n s 10 30 50 70200 6040 80 90 100 Best Average Fitness -20 -10 0 10 30 20