Upload
pmahesh268
View
215
Download
0
Embed Size (px)
Citation preview
8/6/2019 Genetic Algorithms Talk
1/43
IntroductionAlgorithmExamples
Conclusions
Genetic algorithms and evolutionary programming
Fabian J. Theis
Institute of BiophysicsUniversity of Regensburg, Germany
Regensburg 11-Jan-05
Theis Genetic algorithms and evolutionary programming
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
2/43
IntroductionAlgorithmExamples
Conclusions
Outline
Introduction
Reinforcement learningImitate natureGenetic algorithms
AlgorithmBasic algorithm
Data representation
Selection
ReproductionExamples2d-function optimizationGenetic MastermindHyerplane detection
Conclusions
Theis Genetic algorithms and evolutionary programming
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
3/43
IntroductionAlgorithmExamples
Conclusions
Reinforcement learningImitate natureGenetic algorithms
Algorithm
Introduction
Reinforcement learningImitate natureGenetic algorithms
AlgorithmBasic algorithm
Data representation
Selection
ReproductionExamples2d-function optimizationGenetic MastermindHyerplane detection
Conclusions
Theis Genetic algorithms and evolutionary programming
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
4/43
IntroductionAlgorithmExamples
Conclusions
Reinforcement learningImitate natureGenetic algorithms
Introduction
idea of genetic algorithms (GAs) extract optimization strategies nature uses successfully
Darwinian Evolution transform them for application in mathematical optimization
theory
abstract goal: find the global optimum of a problem/function
in a defined phase space
Theis Genetic algorithms and evolutionary programming
I d i
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
5/43
IntroductionAlgorithmExamples
Conclusions
Reinforcement learningImitate natureGenetic algorithms
Introduction
idea of genetic algorithms (GAs) extract optimization strategies nature uses successfully
Darwinian Evolution transform them for application in mathematical optimization
theory
abstract goal: find the global optimum of a problem/function
in a defined phase space
Theis Genetic algorithms and evolutionary programming
I t d ti
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
6/43
IntroductionAlgorithmExamples
Conclusions
Reinforcement learningImitate natureGenetic algorithms
Optimization
GA as special kind of reinforcement learning
no access to the full problem/function but: rewards are given for a given action/search space position goal: use rewards to find optimum this contrasts to learning by (given) examples as in supervised
learning e.g. using neural networks traverse search space manually
Theis Genetic algorithms and evolutionary programming
Introduction
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
7/43
IntroductionAlgorithmExamples
Conclusions
Reinforcement learningImitate natureGenetic algorithms
Optimization
simple algorithm: random sampling pick a single location in the search space store it if reward is higher than at previous locations, discard it
otherwise repeat
other such algorithms Markov-Chain-Monte-Carlo search (MCMC) simulated annealing if derivative of reward is available: (conjugated) gradient
ascent/descent etc.
Theis Genetic algorithms and evolutionary programming
Introduction
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
8/43
IntroductionAlgorithmExamples
Conclusions
Reinforcement learningImitate natureGenetic algorithms
Optimization
simple algorithm: random sampling pick a single location in the search space store it if reward is higher than at previous locations, discard it
otherwise repeat
other such algorithms Markov-Chain-Monte-Carlo search (MCMC) simulated annealing if derivative of reward is available: (conjugated) gradient
ascent/descent etc.
Theis Genetic algorithms and evolutionary programming
Introduction
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
9/43
IntroductionAlgorithmExamples
Conclusions
Reinforcement learningImitate natureGenetic algorithms
Genetic algorithms
here: imitate natures robust way of evolving successfulorganisms organisms ill-suited to an environment die off, whereas fit ones
reproduce offspring is similar to the parents, so population fitness
increases with generations mutation can randomly generate new species The Origin of Species by Means of Natural Selection, C.R.
Darwin, D. Appleton and Company, NY, 1897
history: introduced by J. Holland 1975 further invesigated by his students e.g. K. DeJong 1975 more recently theoretical advances e.g. by M. Vose 1993
Theis Genetic algorithms and evolutionary programming
IntroductionR i f l i
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
10/43
IntroductionAlgorithmExamples
Conclusions
Reinforcement learningImitate natureGenetic algorithms
Genetic algorithms
whats good for nature is good for artificial systems imagine population of individual explorers sent into the
optimization phase-space
explorer is defined by its genes, encoding his phase-spaceposition optimization problem is given by a fitness function
the struggle of life begins selection
crossover mutation
according to these rules populations tend to increase overallfitness
Theis Genetic algorithms and evolutionary programming
IntroductionR i f t l i
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
11/43
AlgorithmExamples
Conclusions
Reinforcement learningImitate natureGenetic algorithms
Genetic algorithms
whats good for nature is good for artificial systems imagine population of individual explorers sent into the
optimization phase-space
explorer is defined by its genes, encoding his phase-spaceposition optimization problem is given by a fitness function
the struggle of life begins selection
crossover mutation
according to these rules populations tend to increase overallfitness
Theis Genetic algorithms and evolutionary programming
IntroductionReinforcement learning
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
12/43
AlgorithmExamples
Conclusions
Reinforcement learningImitate natureGenetic algorithms
Genetic algorithms
whats good for nature is good for artificial systems imagine population of individual explorers sent into the
optimization phase-space
explorer is defined by its genes, encoding his phase-spaceposition optimization problem is given by a fitness function
the struggle of life begins selection
crossover mutation
according to these rules populations tend to increase overallfitness
Theis Genetic algorithms and evolutionary programming
IntroductionReinforcement learning
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
13/43
AlgorithmExamples
Conclusions
Reinforcement learningImitate natureGenetic algorithms
Genetic algorithms
whats good for nature is good for artificial systems imagine population of individual explorers sent into the
optimization phase-space
explorer is defined by its genes, encoding his phase-spaceposition optimization problem is given by a fitness function
the struggle of life begins selection
crossover mutation
according to these rules populations tend to increase overallfitness
Theis Genetic algorithms and evolutionary programming
IntroductionReinforcement learning
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
14/43
AlgorithmExamples
Conclusions
Reinforcement learningImitate natureGenetic algorithms
Genetic algorithms
advantages global not only local optimization
simple and hence easy to implement easy parallelization possible
disadvantages how to encode phase-space position rather low speed and high computational cost
parameter dependencies (population size, selection andreproduction parameters)
Theis Genetic algorithms and evolutionary programming
IntroductionAl ith
Reinforcement learning
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
15/43
AlgorithmExamples
Conclusions
Reinforcement learningImitate natureGenetic algorithms
Genetic algorithms
advantages global not only local optimization
simple and hence easy to implement easy parallelization possible
disadvantages how to encode phase-space position rather low speed and high computational cost
parameter dependencies (population size, selection andreproduction parameters)
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithm
Basic algorithmData re resentation
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
16/43
AlgorithmExamples
Conclusions
Data representationSelectionReproduction
Algorithm
Introduction
Reinforcement learningImitate natureGenetic algorithms
AlgorithmBasic algorithm
Data representation
SelectionReproduction
Examples2d-function optimizationGenetic MastermindHyerplane detection
Conclusions
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithm
Basic algorithmData representation
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
17/43
AlgorithmExamples
Conclusions
Data representationSelectionReproduction
Basic genetic algorithm
Data : population, a set of individualsfitness-function Fitness, a function measuring fitnessof an individual
Result: an individual
repeat
1 parents Selection (population, Fitness)2 population Reproduction (parents)
until some individual is fit enough;
3 return the best individual in population according to Fitness
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithm
Basic algorithmData representation
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
18/43
AlgorithmExamples
Conclusions
Data representationSelectionReproduction
Individual
an individual encodes the data space position classic GA approach: representation by word (chromosome)
over a finite alphabet each letter is called gene real DNA: alphabet is {A, G, T, C} here: usually binary alphabet {0, 1} some authors speak more general of evolutionary programming
if alphabet is larger finite alphabet implies discrete search space
continuous search space use continuous alphabet i.e. genes R or bounded genes [a, b]
so individual Rn respectively [a1, b1] . . . [an, bn]
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithm
Basic algorithmData representation
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
19/43
AlgorithmExamples
Conclusions
Data representationSelectionReproduction
Individual
an individual encodes the data space position classic GA approach: representation by word (chromosome)
over a finite alphabet each letter is called gene real DNA: alphabet is {A, G, T, C} here: usually binary alphabet {0, 1} some authors speak more general of evolutionary programming
if alphabet is larger finite alphabet implies discrete search space
continuous search space use continuous alphabet i.e. genes R or bounded genes [a, b]
so individual Rn respectively [a1, b1] . . . [an, bn]
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithm
Basic algorithmData representation
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
20/43
AlgorithmExamples
Conclusions
Data representationSelectionReproduction
Individual
an individual encodes the data space position classic GA approach: representation by word (chromosome)
over a finite alphabet each letter is called gene real DNA: alphabet is {A, G, T, C} here: usually binary alphabet {0, 1} some authors speak more general of evolutionary programming
if alphabet is larger finite alphabet implies discrete search space
continuous search space use continuous alphabet i.e. genes R or bounded genes [a, b]
so individual Rn respectively [a1, b1] . . . [an, bn]
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithm
Basic algorithmData representation
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
21/43
gExamples
Conclusions
pSelectionReproduction
Selection
goal: select individuals that produce the next generation probabilistic selection
based on fitness function f better individuals have increased chance of reproduction usually selection with replacement very fit individuals
reproduce several times selection probabilities roulette wheel (Holland 1975)
P(choice of individual i) =f(i)
jf(j)
problem: negative f? minimization? ranking methods, i.e. choose individuals according to fitness
rank e.g. normalized geometric ranking (Joines and Houck1994)
tournament selection, i.e. select best among a randomly
selected subsetTheis Genetic algorithms and evolutionary programming
IntroductionAlgorithm
Basic algorithmData representation
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
22/43
gExamples
ConclusionsSelectionReproduction
Selection
goal: select individuals that produce the next generation probabilistic selection
based on fitness function f better individuals have increased chance of reproduction usually selection with replacement very fit individuals
reproduce several times selection probabilities
roulette wheel (Holland 1975)
P(choice of individual i) =f(i)
jf(j)
problem: negative f? minimization? ranking methods, i.e. choose individuals according to fitness
rank e.g. normalized geometric ranking (Joines and Houck1994)
tournament selection, i.e. select best among a randomly
selected subsetTheis Genetic algorithms and evolutionary programming
IntroductionAlgorithm
Basic algorithmData representation
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
23/43
ExamplesConclusions
SelectionReproduction
Selection
goal: select individuals that produce the next generation probabilistic selection
based on fitness function f better individuals have increased chance of reproduction usually selection with replacement very fit individuals
reproduce several times selection probabilities
roulette wheel (Holland 1975)
P(choice of individual i) =f(i)
jf(j)
problem: negative f? minimization? ranking methods, i.e. choose individuals according to fitness
rank e.g. normalized geometric ranking (Joines and Houck1994)
tournament selection, i.e. select best among a randomly
selected subsetTheis Genetic algorithms and evolutionary programming
IntroductionAlgorithmE l
Basic algorithmData representationS l i
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
24/43
ExamplesConclusions
SelectionReproduction
Reproduction
typically consists of two stages crossover (or mating): selected individuals are randomly paired
and (usually two) children are produced mutation: genes can be altered by random mutation to a
different value according to a small probability
use genetic operators to produce and alter new offspring
basic search mechanism in GAs
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmE l
Basic algorithmData representationS l ti
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
25/43
ExamplesConclusions
SelectionReproduction
Reproduction
typically consists of two stages crossover (or mating): selected individuals are randomly paired
and (usually two) children are produced mutation: genes can be altered by random mutation to a
different value according to a small probability
use genetic operators to produce and alter new offspring
basic search mechanism in GAs
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmExamples
Basic algorithmData representationSelection
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
26/43
ExamplesConclusions
SelectionReproduction
Crossover
let x, y An
be the genes of the two parents simple crossover
choose r randomly in {1, . . . , n} generate children x, y An by
x
i := xi if i < r
yi otherwise
yi :=
yi if i < rxi otherwise
in the case of continuous genes: arithmetic crossover choose r randomly in [0, 1] generate children x, y An by
x := rx + (1 r)y
y := (1 r)x + ry
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmExamples
Basic algorithmData representationSelection
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
27/43
ExamplesConclusions
SelectionReproduction
Crossover
let x, y An
be the genes of the two parents simple crossover
choose r randomly in {1, . . . , n} generate children x, y An by
x
i := xi if i < r
yi otherwise
yi :=
yi if i < rxi otherwise
in the case of continuous genes: arithmetic crossover choose r randomly in [0, 1] generate children x, y An by
x := rx + (1 r)y
y := (1 r)x + ry
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmExamples
Basic algorithmData representationSelection
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
28/43
ExamplesConclusions
SelectionReproduction
Crossover
let x, y An
be the genes of the two parents simple crossover
choose r randomly in {1, . . . , n} generate children x, y An by
x
i := xi if i < r
yi otherwise
yi :=
yi if i < rxi otherwise
in the case of continuous genes: arithmetic crossover choose r randomly in [0, 1] generate children x, y An by
x := rx + (1 r)y
y := (1 r)x + ry
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmExamples
Basic algorithmData representationSelection
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
29/43
ExamplesConclusions
SelectionReproduction
Mutation
let xi A be the gene of an individual that is to be mutated binary gene: binary mutation
xi := 1 xi discrete or continuous bounded A: uniform mutation
set xi to be a uniformly randomly chosen element ofA
also possible: non-uniform mutation
needs fixed distribution for element choice
Theis Genetic algorithms and evolutionary programming
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
30/43
8/6/2019 Genetic Algorithms Talk
31/43
IntroductionAlgorithmExamples
Basic algorithmData representationSelection
8/6/2019 Genetic Algorithms Talk
32/43
Conclusions Reproduction
Mutation
let xi A be the gene of an individual that is to be mutated binary gene: binary mutation
xi := 1 xi discrete or continuous bounded A: uniform mutation
set xi to be a uniformly randomly chosen element ofA
also possible: non-uniform mutation
needs fixed distribution for element choice
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmExamples
C l i
Basic algorithmData representationSelectionR d i
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
33/43
Conclusions Reproduction
One generation example
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmExamples
C l i
2d-function optimizationGenetic MastermindHyerplane detection
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
34/43
ConclusionsHyerplane detection
Algorithm
IntroductionReinforcement learningImitate natureGenetic algorithms
AlgorithmBasic algorithm
Data representation
SelectionReproduction
Examples2d-function optimizationGenetic MastermindHyerplane detection
Conclusions
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmExamples
Conclusions
2d-function optimizationGenetic MastermindHyerplane detection
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
35/43
Conclusionsy p
Examples
continuous example global optimization of continuous function f : [a, b] R
binary example genetic Mastermind select optimal guess using GA
example from our research perform overcomplete blind source separation by sparse
component analysis key problem: hyperplane detection solution: optimize cost function using GAs
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmExamples
Conclusions
2d-function optimizationGenetic MastermindHyerplane detection
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
36/43
Conclusionsy
Examples
continuous example global optimization of continuous function f : [a, b] R
binary example genetic Mastermind select optimal guess using GA
example from our research perform overcomplete blind source separation by sparse
component analysis key problem: hyperplane detection solution: optimize cost function using GAs
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmExamples
Conclusions
2d-function optimizationGenetic MastermindHyerplane detection
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
37/43
Conclusions
Examples
continuous example global optimization of continuous function f : [a, b] R
binary example genetic Mastermind select optimal guess using GA
example from our research perform overcomplete blind source separation by sparse
component analysis key problem: hyperplane detection solution: optimize cost function using GAs
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmExamples
Conclusions
2d-function optimizationGenetic MastermindHyerplane detection
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
38/43
Conclusions
2d-function optimization
10 8 6 4 2 0 2 4 6 8 10
5
10
15
20
25
30
35
40
45
50
x
multipeak
0 10 20 30 40 50 60 70 80 90 10020
25
30
35
40
45
50
f performance (optimal individual and mean)
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmExamples
Conclusions
2d-function optimizationGenetic MastermindHyerplane detection
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
39/43
Co c us o s
Genetic Mastermind
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmExamples
Conclusions
2d-function optimizationGenetic MastermindHyerplane detection
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
40/43
Hyerplane detection
1
0.5
0
0.5
1
1
0.5
0
0.5
1
1
0.5
0
0.5
1
1
0.5
0
0.5
1 1
0.5
0
0.5
1
1
0.5
0
0.5
1
perform overcomplete blind source separation by sparse
component analysis Georgiev et al. [2004], Theis et al. [2004] key problem: hyperplane detection
solution: optimize cost function using GAs
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmExamples
Conclusions
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
41/43
Algorithm
IntroductionReinforcement learningImitate natureGenetic algorithms
AlgorithmBasic algorithm
Data representation
SelectionReproduction
Examples2d-function optimizationGenetic MastermindHyerplane detection
Conclusions
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmExamples
Conclusions
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
42/43
Conclusions
genetic algorithms perform global optimization
they mimic nature by letting a population evolve according to
their fitness algorithm
selection reproduction: by crossover and mutation
simple applicability in real-world situations
Theis Genetic algorithms and evolutionary programming
IntroductionAlgorithmExamples
Conclusions
http://goforward/http://find/http://goback/8/6/2019 Genetic Algorithms Talk
43/43
Resources
books: Goldberg [1989],Schoneburg et al. [1994]
Matlab GA optimization
toolbox:http://www.ie.ncsu.edu/
mirage/GAToolBox/gaot
Details and papers on mywebsite
http://fabian.theis.name This research was supported
by the DFG1 and BMBF2.
ReferencesP. Georgiev, F. Theis, and A. Cichocki. Sparse
component analysis and blind sourceseparation of underdetermined mixtures.IEEE Trans. on Neural Networks in print,2004.
D. Goldberg. Genetic Algorithms in SearchOptimization and Machine Learning.Addison Wesley Publishing, 1989.
E. Schoneburg, F. Heinzmann, andS. Feddersen. Genetische Algorithmen undEvolutionsstrategien. Addison WesleyPublishing, 1994.
F. Theis, P. Georgiev, and A. Cichocki. Robust
overcomplete matrix recovery for sparsesources using a generalized houghtransform. In Proc. ESANN 2004, pages343348, Bruges, Belgium, 2004. d-side,Evere, Belgium.
1graduate college: Nonlinearity and Nonequilibrium in Condensed Matter2project ModKog
Theis Genetic algorithms and evolutionary programming
http://goforward/http://find/http://goback/