genetic algorithms (ga)
DESCRIPTION
Genetic Algorithms (GA). Vavilin Andrey {[email protected]}. What is GA?. GA is an heuristic search algorithm which generates solutions to optimization problems using techniques inspired by natural evolution, such as inheritance, mutation, selection, and crossover. Problem domain - PowerPoint PPT PresentationTRANSCRIPT
Genetic Algorithms (GA)
Vavilin Andrey {[email protected]}
2Intelligent Systems
Lab.
What is GA?
GA is an heuristic search algorithm which generates solutions to optimization problems using techniques inspired by natural evolution, such as inheritance, mutation, selection, and crossover.
Problem domain
- graph-based problems (e.g. traveling salesman problem)
- global optimization problems
- scheduling and task planning problems
- artificial intelligence tasks
- computer vision
- etc
3Intelligent Systems
Lab.
Function minimization example
yexyxxyxf 12cos345.09.0sin2, 22
-2
-2
2
2
4Intelligent Systems
Lab.
Function minimization
yexyxxyxf 12cos345.09.0sin2, 22
Gradient descent
Best point: -3.567Coordinates: 1.823, 1.549
-2
-2
2
2
5Intelligent Systems
Lab.
Function minimization
yexyxxyxf 12cos345.09.0sin2, 22
Random search
Iterations: 5000Best point: -3,560Coordinates: -1.899, -1.639
-2
-2
2
2
6Intelligent Systems
Lab.
Function minimization
yexyxxyxf 12cos345.09.0sin2, 22
Genetic algorithm
Iterations: 200Best point: -3,949Coordinates: -2, -1.960
-2
-2
2
2
7Intelligent Systems
Lab.
Typical genetic algorithm
Population
ParentsOffspringRecombination and
mutation
Parent selectionSurvivor selection
initialization termination
8Intelligent Systems
Lab.
Image processing examplesP.W.M. Tsang and Z. Yu, “Genetic algorithm for model-based matching of projected images of three-
dimensional objects”, IEE Proceedings on Vision, Image and Signal Processing, vol.150, issue 6, pp.351-359, Dec. 2003
9Intelligent Systems
Lab.
Image processing examplesP.W.M. Tsang and Z. Yu, “Genetic algorithm for model-based matching of projected images of three-
dimensional objects”, IEE Proceedings on Vision, Image and Signal Processing, vol.150, issue 6, pp.351-359, Dec. 2003
10Intelligent Systems
Lab.
Image processing examplesP.W.M. Tsang and Z. Yu, “Genetic algorithm for model-based matching of projected images of three-
dimensional objects”, IEE Proceedings on Vision, Image and Signal Processing, vol.150, issue 6, pp.351-359, Dec. 2003
11Intelligent Systems
Lab.
Conclusions
Advantages:
- Easy to implement
- Better than random search and faster than brute force algorithm
- Good for various classes of problems
- Easy to use with GPU-based computation
Weak points
- Specialized algorithms provide better solutions
- GA do not scale well with increasing complexity
- Bad implementation may cause algorithm converges to a local optima instead of a global one
12Intelligent Systems
Lab.
Image processing example
13Intelligent Systems
Lab.
Image processing example
Initial population
14Intelligent Systems
Lab.
Image processing exampleCrossover
M1
M2
Initial individuals
111111 ,,,, SySxyxMM 222222 ,,,, SySxyxMM
Individuals produced by crossover
111333 ,,,, SySxyxMM 222334 ,,,, SySxyxMM (changing position)
333337 ,,,, SySxyxMM
311335 ,,,, SySxyxMM 322336 ,,,, SySxyxMM (changing position and angle)
(changing all)
221
3
xxx
221
3
SxSxSx
221
3
yyy
221
3
SySySy
221
3
15Intelligent Systems
Lab.
Image processing exampleMutations
Randomly change random number of parameters in randomly select individuals. Number of individuals is 5% of population.
iiiiii SySxyxMM ,,,,
iiiiii ySxSyxMM ~,~
,~
,~,~
overwisex
truemutateXifwidthrandomx
ii ,
,,0~
overwisex
truemutateSxifScaleScalerandomxS
ii ,
,max_min,_~
overwisex
truemutateifrandom
ii ,
,360,0~
16Intelligent Systems
Lab.
Image processing exampleEvaluating individuals using NN
1x
Nx
Pixel values
1Nx
Nx2
…
…
Solid model
Edge model
1w
Nw
1Nw
Nw2
Probability what the tested individual is arrowhead
17Intelligent Systems
Lab.
Image processing exampleNN training
Training set
1x
Nx
Pixel values
1Nx
Nx2
…
…
Solid model
Edge model
1w
Nw
1Nw
Nw2
18Intelligent Systems
Lab.
False detection example by reference method