genetic algorithms (ga)

18
Genetic Algorithms (GA) Vavilin Andrey {[email protected].

Upload: derek-lloyd

Post on 04-Jan-2016

34 views

Category:

Documents


0 download

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 Presentation

TRANSCRIPT

Page 1: Genetic Algorithms (GA)

Genetic Algorithms (GA)

Vavilin Andrey {[email protected]}

Page 2: Genetic Algorithms (GA)

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

Page 3: Genetic Algorithms (GA)

3Intelligent Systems

Lab.

Function minimization example

yexyxxyxf 12cos345.09.0sin2, 22

-2

-2

2

2

Page 4: Genetic Algorithms (GA)

4Intelligent Systems

Lab.

Function minimization

yexyxxyxf 12cos345.09.0sin2, 22

Gradient descent

Best point: -3.567Coordinates: 1.823, 1.549

-2

-2

2

2

Page 5: Genetic Algorithms (GA)

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

Page 6: Genetic Algorithms (GA)

6Intelligent Systems

Lab.

Function minimization

yexyxxyxf 12cos345.09.0sin2, 22

Genetic algorithm

Iterations: 200Best point: -3,949Coordinates: -2, -1.960

-2

-2

2

2

Page 7: Genetic Algorithms (GA)

7Intelligent Systems

Lab.

Typical genetic algorithm

Population

ParentsOffspringRecombination and

mutation

Parent selectionSurvivor selection

initialization termination

Page 8: Genetic Algorithms (GA)

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

Page 9: Genetic Algorithms (GA)

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

Page 10: Genetic Algorithms (GA)

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

Page 11: Genetic Algorithms (GA)

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

Page 12: Genetic Algorithms (GA)

12Intelligent Systems

Lab.

Image processing example

Page 13: Genetic Algorithms (GA)

13Intelligent Systems

Lab.

Image processing example

Initial population

Page 14: Genetic Algorithms (GA)

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

Page 15: Genetic Algorithms (GA)

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~

Page 16: Genetic Algorithms (GA)

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

Page 17: Genetic Algorithms (GA)

17Intelligent Systems

Lab.

Image processing exampleNN training

Training set

1x

Nx

Pixel values

1Nx

Nx2

Solid model

Edge model

1w

Nw

1Nw

Nw2

Page 18: Genetic Algorithms (GA)

18Intelligent Systems

Lab.

False detection example by reference method