3. Introduction
⢠Mimics Theory of Evolution
⢠GAs as a general purpose learning algorithm
⢠Solving a complex problem of problems
⢠Uses Natural Selection or Survival of the Fittest
9. Basic GA algorithm
1. [Start] Generate random population of n chromosomes (suitable solutions for the problem)
2. [Fitness] Evaluate the ďŹtness f(x) of each chromosome x in the population
3. [New population] Create a new population by repeating following steps until the new population is
complete
1. [Selection] Select two parent chromosomes from a population according to their ďŹtness (the
better ďŹtness, the bigger chance to be selected)
2. [Crossover] With a crossover probability cross over the parents to form a new oďŹspring (children).
If no crossover was performed, oďŹspring is an exact copy of parents.
3. [Mutation] With a mutation probability mutate new oďŹspring at each locus (position in
chromosome).
4. [Accept] Place new oďŹspring in a new population
5. [Replace] Use new generated population for a further run of algorithm
6. [Test] If the end condition is satisďŹed, stop, and return the best solution in current population
[Loop] Go to step 2
11. GA Cycle of Reproduction
Reproduction Modification
EvaluationPopulation
Discard
Children
Modified
Children
Evaluated
Children
Deleted
Members
Parents
12. GA Operators
1. Reproduction: aka selection operator, usually the ďŹrst
operator applied on the population. Chromosomes are
selected from the population to cross over and produce
oďŹspring
2. Crossover: After reproduction population is enriched
with better individuals.
3. Mutation: Happens after crossover, causing a random
change in the oďŹspring.
13. Chromosomes could be:
â Bit strings (0101 ... 1100)
â Real numbers (43.2 -33.1 ... 0.0 89.2)
â Permutations of element (E11 E3 E7 ... E1 E15)
â Lists of rules (R1 R2 R3 ... R22 R23)
â Program elements (genetic programming)
â Any data structure ...
15. Mutation
Original offspring 1 1101111000011110
Original offspring 2 1101100100110110
Mutated offspring 1 1100111000011110
Mutated offspring 2 1101101100110110
16. GA Parameters
⢠Solving the problem by ďŹnding the extreme of a function
⢠GA Parameters
⢠Crossover and Mutation Probability
⢠Population Size
18. GA: Encoding
⢠Binary Encoding
⢠example Knapsack problem
⢠Permutation Encoding
⢠example Travelling Salesman problem
Chromosome A 101100101100101011100101
Chromosome B 111111100000110000011111
Chromosome A 1 Â 5 Â 3 Â 2 Â 6 Â 4 Â 7 Â 9 Â 8
Chromosome B 8 Â 5 Â 6 Â 7 Â 2 Â 3 Â 1 Â 4 Â 9
19. GA: Encoding
⢠Value Encoding
⢠example ďŹnding weights
for neural network
⢠Tree Encoding
⢠example ďŹnding a function
from given values
Chromosome A 1.2324 Â 5.3243 Â 0.4556 Â 2.3293 Â 2.4545
Chromosome B ABDJEIFJDHDIERJFDLDFLFEGT
Chromosome C (back), (back), (right), (forward), (left)
Chromosome A Chromosome B
( +  x  ( /  5  y ) ) ( do_until  step  wall )
20. ⢠Binary Encoding: Crossover
⢠Single Point Crossover
⢠Two Point Crossover
Crossover & Mutation
11001011+11011111 = 11001111
11001011 + 11011111 = 11011111
24. ⢠Value Encoding
⢠Crossover: All crossovers from Binary Encoding can
be used
⢠Mutation: Adding
Crossover & Mutation
1.29 Â 5.68 Â 2.86 Â 4.11 Â 5.55) => (1.29 Â 5.68 Â 2.73 Â 4.22 Â 5.55)
25. ⢠Tree Encoding
⢠Crossover: Tree Crossover
⢠Mutation: Changing operator, number
Crossover & Mutation
32. Applications of GAs
⢠GAs used to solve NP-hard
problems, but also for art,
evolving pictures and music
⢠In the ďŹrst represented image,
a binary tree type of encoding
is used to generate the
images through mathematical
operations:
Source: [http://www.algosome.com/articles/genetic-algorithm-evolution-art.html]
33. Applications of GAs
⢠Data analysis
⢠Designing Neural Networks
⢠Robot trajectory
⢠Evolving LISP programs
⢠Strategy Planning
⢠Finding the shape of protein
molecules
⢠Sequence Scheduling
⢠Functions for creating images
34. Issues for GAs
⢠Choosing basic implementation issues:
⢠representation
⢠population size, mutation rate, ...
⢠selection, deletion policies
⢠crossover, mutation operators
⢠Termination Criteria
⢠Performance, scalability
⢠Solution is only as good as the evaluation function (often
hardest part)
35. Strengths of GAs
⢠Concept is easy to understand
⢠Modular, separate from application
⢠Supports multi-objective optimization
⢠Good for ânoisyâ environments
⢠Always an answer; answer gets better with time
⢠Inherently parallel; easily distributed
36. Strengths of GAs
⢠Many ways to speed up and improve a GA-based
application as knowledge about problem domain is
gained
⢠Easy to exploit previous or alternate solutions
⢠Flexible building blocks for hybrid applications
⢠Substantial history and range of use
37. When to use GAs
⢠Alternate solutions are too slow or overly complicated
⢠Need an exploratory tool to examine new approaches
⢠Problem is similar to one that has already been
successfully solved by using a GA
⢠Want to hybridize with an existing solution
⢠BeneďŹts of the GA technology meet key problem
requirements