Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Genetic Algorithms and
Ant Colony Optimisation
- An In...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 2
Can you guess what it is?
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
By Roger Alsing
At http://rogeralsing.com/2008/12/07/g...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 10
Agenda
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 11
Agenda
 Where does the major content come from?
 ...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 12
©
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Genetic Algorithms in
Search, Optimization, and
Machin...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Genetic Algorithms
+ Data Structures
= Evolution Progr...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Ant Colony Optimization
Marco Dorigo and Thomas Stützl...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Further reading
 M. Dorigo, M. Birattari and T. Stütz...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 17
What are metaheuristics?
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
A metaheuristic is…
„[…] a master strategy that guides...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 19
What is to be optimised?
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Bowled function
20
Z = X.^2 + Y.^2
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Mexican hat
21
Z = sin(sqrt(X.^2+Y.^2)) ./ sqrt(X.^2+Y...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
The peaks surface
22
[X,Y,Z] = peaks(30);
surfc(X,Y,Z)...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
TSP example nr. 1
23
By Dantzig, Fulkerson, and
Johnso...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
TSP example nr. 2
24
By Groetschel and Holland
(1987)
...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
TSP example nr. 3
25
By Applegate, Bixby,
Chvatal, and...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 26
By Applegate, Bixby,
Chvatal, Cook, and
Helsgaun (2...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 27
By Nagata (2009)
Solved instance:
100,000 cities
(M...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
TSP ex.
nr. 6
28
By Helsgaun
(2009)
Solved instance:
1...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Other domains
29
 Quadratic assignment problems
 Sch...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 30
Examples of metaheuristics
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Metaheuristics
31
 Traditional approaches:
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Metaheuristics
32
 Traditional approaches:
 EC (Evol...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Metaheuristics
33
 Traditional approaches:
 EC (Evol...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Metaheuristics
34
 Traditional approaches:
 EC (Evol...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 35
What do GA and ACO have in
common?
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA and ACO
36
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA and ACO
37
 Nature-inspired algorithms
 GA (Holla...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA and ACO
38
 Nature-inspired algorithms
 GA (Holla...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA and ACO
39
 Nature-inspired algorithms
 GA (Holla...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA and ACO
40
 Nature-inspired algorithms
 GA (Holla...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA and ACO
41
 Nature-inspired algorithms
 GA (Holla...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 42
Genetic Algorithms
– Pseudo code –
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA pseudo code
43
begin GA;
t = 0;
random P( t );
eval...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA pseudo code
44
begin GA;
t = 0;
random P( t );
eval...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA pseudo code
45
begin GA;
t = 0;
random P( t );
eval...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA pseudo code
46
begin GA;
t = 0;
random P( t );
eval...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA pseudo code
47
begin GA;
t = 0;
random P( t );
eval...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA pseudo code
48
begin GA;
t = 0;
random P( t );
eval...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA pseudo code
49
begin GA;
t = 0;
random P( t );
eval...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA pseudo code
50
begin GA;
t = 0;
random P( t );
eval...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA pseudo code
51
begin GA;
t = 0;
random P( t );
eval...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
GA pseudo code
52
begin GA;
t = 0;
random P( t );
eval...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 53
What are the basic components
in a GA?
What should ...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 54
Genetic Algorithms
– Basic components –
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Basic components
55
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Basic components
56
 A genetic representation of solu...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Basic components
57
 A genetic representation of solu...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Basic components
58
 A genetic representation of solu...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Basic components
59
 A genetic representation of solu...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Basic components
60
 A genetic representation of solu...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 61
Genetic Algorithms
– Genetic operators –
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Example of crossover operator
62
Single point crossove...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Example of mutation operator
63
Boundary mutation
When...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 64
Genetic Algorithms
– Other issues –
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Other issues
65
 Representation of individuals
 Sele...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 66
Ant Colony Optimization
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
ACO
67
 Strategies of real ants (e.g. to find food) a...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 68
Ant Colony Optimization
– Pseudo code –
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
ACO pseudo code (i)
69
© Dorigo & Di Caro at http://in...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
ACO pseudo code (i)
70
© Dorigo & Di Caro at http://in...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
ACO pseudo code (i)
71
© Dorigo & Di Caro at http://in...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
ACO pseudo code (i)
72
© Dorigo & Di Caro at http://in...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
ACO pseudo code (i)
73
© Dorigo & Di Caro at http://in...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
ACO
pseudo code (ii)
74
© Dorigo & Di Caro at
http://i...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
ACO
pseudo code (ii)
75
© Dorigo & Di Caro at
http://i...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
ACO
pseudo code (ii)
76
© Dorigo & Di Caro at
http://i...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
ACO
pseudo code (ii)
77
© Dorigo & Di Caro at
http://i...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
ACO
pseudo code (ii)
78
© Dorigo & Di Caro at
http://i...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 79
Metaheuristics: current trends
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Current trends
 Combination of aspects from different...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Configuration of algorithms
(or “fine-tuning” of algor...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 82
Homework:
“Search for implementations of GA
and ACO...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 83
Assessment
Image © renjith krishnan at http://www.f...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Questions
84
Mention and comment three similarities
be...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 85
References
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Others…
86
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Further reading and sites…
 Metaheuristics Network, a...
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 88
Can you guess what it is?
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
516 – 7
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
1 013 – 9
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
2 520 – 15
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
3 519 – 16
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
5 012 – 21
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
7 015 – 21
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
10 016 – 24
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
15 017 – 25
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
20 039 – 27
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
35 008 – 38
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
51 479 – 52
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
160 768 – 86
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
356 051 – 103
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
1 008 736 – 140
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 103
?
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
Timmy
D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 105
Slides of the talk per request:
dagmar@monettdiaz....
Upcoming SlideShare
Loading in …5
×

Genetic Algorithms and Ant Colony Optimisation (lecture slides)

5,058 views

Published on

Online lecture at the School of Computer Science, University of Hertfordshire, Hatfield, UK, as part of the 10th Europe Week from 3rd to 7th March 2014.

Published in: Education

Genetic Algorithms and Ant Colony Optimisation (lecture slides)

  1. 1. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Genetic Algorithms and Ant Colony Optimisation - An Introduction - Prof. Dr. Dagmar Monett Díaz Computer Science Dept. Faculty of Cooperative Studies Berlin School of Economics and Law dagmar@monettdiaz.com Europe Week, 3rd – 7th March 2014
  2. 2. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 2 Can you guess what it is?
  3. 3. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
  4. 4. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
  5. 5. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
  6. 6. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
  7. 7. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
  8. 8. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield
  9. 9. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield By Roger Alsing At http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/ After 904 314 iterations, the evolution of only 50 semi- transparent polygons is almost perfect to Mona Lisa!! Evolution of Mona Lisa
  10. 10. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 10 Agenda
  11. 11. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 11 Agenda  Where does the major content come from?  What are metaheuristics?  What is to be optimised?  Examples of metaheuristics  What do GA and ACO have in common?  Genetic Algorithms  Ant Colony Systems  Metaheuristics: current trends  Further reading, sources of inspiration, and more…
  12. 12. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 12 ©
  13. 13. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Genetic Algorithms in Search, Optimization, and Machine Learning David E. Goldberg 432 pp. Addison-Wesley, 1989 ISBN-13: 978-0201157673 What I also use in my lectures at the HWR… 13
  14. 14. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Genetic Algorithms + Data Structures = Evolution Programs Zbigniew Michalewicz 3rd, revised and extended Edition Springer-Verlag, 1999 ISBN-13: 978-3540606765 What I also use in my lectures at the HWR… 14
  15. 15. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Ant Colony Optimization Marco Dorigo and Thomas Stützle MIT Press, Cambridge, MA, 2004 ISBN-13: 978-3540606765 15 Further reading
  16. 16. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Further reading  M. Dorigo, M. Birattari and T. Stützle (2006): “Ant Colony Optimization: Artificial Ants as a Computational Intelligence Technique”. Available at http://iridia.ulb.ac.be/IridiaTrSeries/rev/IridiaTr2006- 023r001.pdf  M. Dorigo and K. Socha (2007): “An Introduction to Ant Colony Optimization”. Available at http://iridia.ulb.ac.be/IridiaTrSeries/rev/IridiaTr2006- 010r003.pdf 16
  17. 17. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 17 What are metaheuristics?
  18. 18. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield A metaheuristic is… „[…] a master strategy that guides and modifies other heuristics (like local search procedures) to produce solutions beyond those that are normally generated in a quest for local optimality.“ 18 According to Laguna (2002)
  19. 19. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 19 What is to be optimised?
  20. 20. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Bowled function 20 Z = X.^2 + Y.^2
  21. 21. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Mexican hat 21 Z = sin(sqrt(X.^2+Y.^2)) ./ sqrt(X.^2+Y.^2)
  22. 22. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield The peaks surface 22 [X,Y,Z] = peaks(30); surfc(X,Y,Z) colormap hsv Image © http://www.mathworks.de/de/help/matlab/ref/surfc.html
  23. 23. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield TSP example nr. 1 23 By Dantzig, Fulkerson, and Johnson (1954) Solved instance: 42 cities in USA Image © http://www.tsp.gatech.edu
  24. 24. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield TSP example nr. 2 24 By Groetschel and Holland (1987) Solved instance: 666 interesting places in the world Image © http://www.tsp.gatech.edu
  25. 25. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield TSP example nr. 3 25 By Applegate, Bixby, Chvatal, and Cook (2001) Solved instance: 15,112 German cities Image © http://www.tsp.gatech.edu
  26. 26. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 26 By Applegate, Bixby, Chvatal, Cook, and Helsgaun (2004) Solved instance: 24,978 cities in Sweden Image © http://www.tsp.gatech.edu TSP ex. nr. 4
  27. 27. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 27 By Nagata (2009) Solved instance: 100,000 cities (Mona Lisa TSP) Image © http://www.tsp.gatech.edu TSP ex. nr. 5
  28. 28. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield TSP ex. nr. 6 28 By Helsgaun (2009) Solved instance: 1,904,711 cities (World TSP) Image © http://www.tsp.gatech.edu
  29. 29. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Other domains 29  Quadratic assignment problems  Scheduling problems  Vehicle routing  Routing in communication networks  Graph colouring  Design problems in engineering  And many, many more!
  30. 30. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 30 Examples of metaheuristics
  31. 31. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Metaheuristics 31  Traditional approaches:
  32. 32. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Metaheuristics 32  Traditional approaches:  EC (Evolutionary Computation) • GA (Genetic Algorithms), ES (Evolution Strategies), GP (Genetic Programming), etc.
  33. 33. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Metaheuristics 33  Traditional approaches:  EC (Evolutionary Computation) • GA (Genetic Algorithms), ES (Evolution Strategies), GP (Genetic Programming), etc.  SA (Simulated Annealing), TS (Tabu Search), ANN (Artificial Neural Networks), EDA (Estimation of Distribution Algorithms), ACO (Ant Colony Optimization), etc.
  34. 34. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Metaheuristics 34  Traditional approaches:  EC (Evolutionary Computation) • GA (Genetic Algorithms), ES (Evolution Strategies), GP (Genetic Programming), etc.  SA (Simulated Annealing), TS (Tabu Search), ANN (Artificial Neural Networks), EDA (Estimation of Distribution Algorithms), ACO (Ant Colony Optimization), etc.  Hybrid metaheuristics  recent approaches!
  35. 35. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 35 What do GA and ACO have in common?
  36. 36. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA and ACO 36
  37. 37. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA and ACO 37  Nature-inspired algorithms  GA (Holland, 1975): simulates the process of natural selection (i.e. Darwin’s theory of evolution)  ACO (Dorigo, 1991): simulates behaviour of ant colonies
  38. 38. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA and ACO 38  Nature-inspired algorithms  GA (Holland, 1975): simulates the process of natural selection (i.e. Darwin’s theory of evolution)  ACO (Dorigo, 1991): simulates behaviour of ant colonies  Population-based algorithms
  39. 39. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA and ACO 39  Nature-inspired algorithms  GA (Holland, 1975): simulates the process of natural selection (i.e. Darwin’s theory of evolution)  ACO (Dorigo, 1991): simulates behaviour of ant colonies  Population-based algorithms  Stochastic search methods (probabilities are used)
  40. 40. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA and ACO 40  Nature-inspired algorithms  GA (Holland, 1975): simulates the process of natural selection (i.e. Darwin’s theory of evolution)  ACO (Dorigo, 1991): simulates behaviour of ant colonies  Population-based algorithms  Stochastic search methods (probabilities are used)  Near-optimal solutions are to be found (global convergence is not guaranteed)
  41. 41. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA and ACO 41  Nature-inspired algorithms  GA (Holland, 1975): simulates the process of natural selection (i.e. Darwin’s theory of evolution)  ACO (Dorigo, 1991): simulates behaviour of ant colonies  Population-based algorithms  Stochastic search methods (probabilities are used)  Near-optimal solutions are to be found (global convergence is not guaranteed)  Parameter tuning plays an important role
  42. 42. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 42 Genetic Algorithms – Pseudo code –
  43. 43. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA pseudo code 43 begin GA; t = 0; random P( t ); evaluate P( t ); statistics P( t ); while not done { t = t+1; P' = select P( t ); recombine P'( t ); evaluate P'( t ); P = survive P( t ), P'( t ) statistics P( t ); } end GA;
  44. 44. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA pseudo code 44 begin GA; t = 0; random P( t ); evaluate P( t ); statistics P( t ); while not done { t = t+1; P' = select P( t ); recombine P'( t ); evaluate P'( t ); P = survive P( t ), P'( t ) statistics P( t ); } end GA; Initialize a usually random population of individuals
  45. 45. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA pseudo code 45 begin GA; t = 0; random P( t ); evaluate P( t ); statistics P( t ); while not done { t = t+1; P' = select P( t ); recombine P'( t ); evaluate P'( t ); P = survive P( t ), P'( t ) statistics P( t ); } end GA; Evaluate the fitness of all individuals
  46. 46. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA pseudo code 46 begin GA; t = 0; random P( t ); evaluate P( t ); statistics P( t ); while not done { t = t+1; P' = select P( t ); recombine P'( t ); evaluate P'( t ); P = survive P( t ), P'( t ) statistics P( t ); } end GA; Compute statistics, keep the best individual so far, etc.
  47. 47. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA pseudo code 47 begin GA; t = 0; random P( t ); evaluate P( t ); statistics P( t ); while not done { t = t+1; P' = select P( t ); recombine P'( t ); evaluate P'( t ); P = survive P( t ), P'( t ) statistics P( t ); } end GA; Test for termination criteria
  48. 48. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA pseudo code 48 begin GA; t = 0; random P( t ); evaluate P( t ); statistics P( t ); while not done { t = t+1; P' = select P( t ); recombine P'( t ); evaluate P'( t ); P = survive P( t ), P'( t ) statistics P( t ); } end GA; Select a sub-population for offspring production
  49. 49. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA pseudo code 49 begin GA; t = 0; random P( t ); evaluate P( t ); statistics P( t ); while not done { t = t+1; P' = select P( t ); recombine P'( t ); evaluate P'( t ); P = survive P( t ), P'( t ) statistics P( t ); } end GA; Stochastically perturb genes of selected parents (apply mutation operators) and recombine them (apply crossover operators)
  50. 50. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA pseudo code 50 begin GA; t = 0; random P( t ); evaluate P( t ); statistics P( t ); while not done { t = t+1; P' = select P( t ); recombine P'( t ); evaluate P'( t ); P = survive P( t ), P'( t ) statistics P( t ); } end GA; Evaluate the new fitness of all individuals
  51. 51. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA pseudo code 51 begin GA; t = 0; random P( t ); evaluate P( t ); statistics P( t ); while not done { t = t+1; P' = select P( t ); recombine P'( t ); evaluate P'( t ); P = survive P( t ), P'( t ); statistics P( t ); } end GA; Select the survivors for next generations. Should you apply elitism?
  52. 52. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield GA pseudo code 52 begin GA; t = 0; random P( t ); evaluate P( t ); statistics P( t ); while not done { t = t+1; P' = select P( t ); recombine P'( t ); evaluate P'( t ); P = survive P( t ), P'( t ) statistics P( t ); } end GA; Compute new statistics
  53. 53. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 53 What are the basic components in a GA? What should be defined? Image © renjith krishnan at http://www.freedigitalphotos.net/
  54. 54. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 54 Genetic Algorithms – Basic components –
  55. 55. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Basic components 55
  56. 56. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Basic components 56  A genetic representation of solutions to the problem,
  57. 57. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Basic components 57  A genetic representation of solutions to the problem,  a way to create an initial population of solutions,
  58. 58. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Basic components 58  A genetic representation of solutions to the problem,  a way to create an initial population of solutions,  an evaluation function (i.e., the environment), rating solutions in terms of their ‘fitness’
  59. 59. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Basic components 59  A genetic representation of solutions to the problem,  a way to create an initial population of solutions,  an evaluation function (i.e., the environment), rating solutions in terms of their ‘fitness’  ‘genetic’ operators that alter the genetic composition of children during reproduction, and
  60. 60. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Basic components 60  A genetic representation of solutions to the problem,  a way to create an initial population of solutions,  an evaluation function (i.e., the environment), rating solutions in terms of their ‘fitness’  ‘genetic’ operators that alter the genetic composition of children during reproduction, and  values for the parameters (population size, probabilities of applying genetic operators, etc.)
  61. 61. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 61 Genetic Algorithms – Genetic operators –
  62. 62. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Example of crossover operator 62 Single point crossover (Also “Simple crossover”) Parents: Offspring: Crossover point: kth position . . . . . . 1 k k+1 q P1=(x1, …, xq) P2=(y1, …, yq) O1=(x1, …, xk, yk+1, …, yq) O2=(y1, …, yk, xk+1, …, xq)
  63. 63. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Example of mutation operator 63 Boundary mutation When using floating point representation: assign the new allele the value of one of the boundaries: if r < 0.5 then NewAllele := LowerBound; else NewAllele := UpperBound; with r generated at random in [0, 1] LowerBound UpperBound NewAllele = or OldAllele
  64. 64. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 64 Genetic Algorithms – Other issues –
  65. 65. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Other issues 65  Representation of individuals  Selection mechanisms  Parallel implementations  Adaptive Genetic Algorithms  Other evolutionary algorithms  Application domains
  66. 66. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 66 Ant Colony Optimization
  67. 67. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield ACO 67  Strategies of real ants (e.g. to find food) are used to solve optimisation problems  The behaviour of the system (swarm) emerges as a result of the indirect communication of individuals through the environment (‘stigmergy’)  Ants lay and follow pheromone trails  Deposited pheromone on a path depends on the quality of that solution. It evaporates with time.  Ants collectively search the solution space
  68. 68. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 68 Ant Colony Optimization – Pseudo code –
  69. 69. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield ACO pseudo code (i) 69 © Dorigo & Di Caro at http://informatics.indiana.edu/jbollen/I501F13/readings/dorigo99ant.pdf
  70. 70. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield ACO pseudo code (i) 70 © Dorigo & Di Caro at http://informatics.indiana.edu/jbollen/I501F13/readings/dorigo99ant.pdf
  71. 71. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield ACO pseudo code (i) 71 © Dorigo & Di Caro at http://informatics.indiana.edu/jbollen/I501F13/readings/dorigo99ant.pdf Ant lifecycle
  72. 72. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield ACO pseudo code (i) 72 © Dorigo & Di Caro at http://informatics.indiana.edu/jbollen/I501F13/readings/dorigo99ant.pdf The pheromone trail intensity automatically decreases over time
  73. 73. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield ACO pseudo code (i) 73 © Dorigo & Di Caro at http://informatics.indiana.edu/jbollen/I501F13/readings/dorigo99ant.pdf E.g., activation of a local optimisation procedure
  74. 74. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield ACO pseudo code (ii) 74 © Dorigo & Di Caro at http://informatics.indiana.edu/jbollen/ I501F13/readings/dorigo99ant.pdf
  75. 75. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield ACO pseudo code (ii) 75 © Dorigo & Di Caro at http://informatics.indiana.edu/jbollen/ I501F13/readings/dorigo99ant.pdf Where to go next? E.g., go to nearest node or follow more intense pheromone trail?
  76. 76. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield ACO pseudo code (ii) 76 © Dorigo & Di Caro at http://informatics.indiana.edu/jbollen/ I501F13/readings/dorigo99ant.pdf Update pheromone trail locally
  77. 77. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield ACO pseudo code (ii) 77 © Dorigo & Di Caro at http://informatics.indiana.edu/jbollen/ I501F13/readings/dorigo99ant.pdf Update pheromone trail after constructing a complete solution
  78. 78. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield ACO pseudo code (ii) 78 © Dorigo & Di Caro at http://informatics.indiana.edu/jbollen/ I501F13/readings/dorigo99ant.pdf Free allocated resources
  79. 79. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 79 Metaheuristics: current trends
  80. 80. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Current trends  Combination of aspects from different metaheuristics, Artificial Intelligence, Operations Research techniques, etc.  Parallel algorithms to distribute the computational effort.  Optimization of parameters (i.e. configuration process) is a relevant issue  Application to other domains
  81. 81. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Configuration of algorithms (or “fine-tuning” of algorithms) Not all metaheuristic algorithms are auto-adaptive (in particular the hybrid approaches) Usually, control parameters are set by hand or in the spirit of brute-force mechanisms; time-consuming task Few published research works; not yet an established research area Distributed, remote or parallel execution of configuration algorithms: not existing (?) Shortcomings: Special topic in most recent conferences and workshops; current open question!!
  82. 82. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 82 Homework: “Search for implementations of GA and ACO that simulate their functioning and evaluate them!” Image © renjith krishnan at http://www.freedigitalphotos.net/
  83. 83. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 83 Assessment Image © renjith krishnan at http://www.freedigitalphotos.net/
  84. 84. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Questions 84 Mention and comment three similarities between Genetic Algorithms and Ant Colony Optimisation! Mention and comment three differences! PLEASE ANSWER AT: https://docs.google.com/forms/d/1Mog_vgm1hFV4CLnM1XjYUYVmPlepH6iu9OTeivKONQA/viewform
  85. 85. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 85 References
  86. 86. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Others… 86
  87. 87. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Further reading and sites…  Metaheuristics Network, at http://www.metaheuristics.net/  Ant Colony Optimization, official Web site of the ant colony metaheuristic, at http://www.aco- metaheuristic.org/ 87
  88. 88. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 88 Can you guess what it is?
  89. 89. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 516 – 7
  90. 90. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 1 013 – 9
  91. 91. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 2 520 – 15
  92. 92. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 3 519 – 16
  93. 93. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 5 012 – 21
  94. 94. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 7 015 – 21
  95. 95. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 10 016 – 24
  96. 96. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 15 017 – 25
  97. 97. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 20 039 – 27
  98. 98. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 35 008 – 38
  99. 99. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 51 479 – 52
  100. 100. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 160 768 – 86
  101. 101. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 356 051 – 103
  102. 102. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 1 008 736 – 140
  103. 103. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 103 ?
  104. 104. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield Timmy
  105. 105. D. Monett – Europe Week 2014, University of Hertfordshire, Hatfield 105 Slides of the talk per request: dagmar@monettdiaz.com Prof. Dr. Dagmar Monett Díaz monettdiaz @dmonett http://monettdiaz.com

×