Professional Documents
Culture Documents
3faiga PDF
3faiga PDF
Objectives
To provide a background and understanding of basic genetic
algorithms and some of their applications.
1859
1975
Genetic Algorithms
1989
Genetic Algorithms
Chromosome String
Gene Feature, character
Genomes Guesses, solutions,
collection of genes
Selection
Crossover
Population
Mutate Final
Population Population
n=n+1
n<20?
Genetic Algorithms
Parent selection
A percentage of the
Crossover
population is selected for
1 1 breeding and assigned
random mates.
2 2 A random crossover
point is selected and a
pair of new solutions
are produced
One Point Crossover in Uniform Crossover in
Genetic Algorithms Genetic Algorithms
Adapted from Dr Graham Kendall’s
G5BAIM lecture example
© Graham Kendall © Graham Kendall
gxk@cs.nott.ac.uk gxk@cs.nott.ac.uk
http://cs.nott.ac.uk/~gxk http://cs.nott.ac.uk/~gxk
Genetic Algorithms
Mutation
In a small percentage of
the population random
changes are made.
Genetic Algorithms
Each iteration of the loop is called a generation,
fitness can be gauged in several different ways
depending on the application of the algorithm.
Reproduction and crossover play the primary role in
artificial genetic search. Reproduction emphasises
highly fit strings (or good solutions), and crossover
recombines these selected solutions for new,
potentially better solutions.
Mutation plays a secondary role in the search by
providing diversity in the population.
Genetic Algorithms
P3 1 0 1 1 1 P4 0 0 1 0 0
P2 0 1 1 1 1 P2 0 1 1 1 1
C1 1 1 1 1 1 C3 0 0 1 1 1
C2 0 0 1 1 1 C4 0 1 1 0 0
Genetic Algorithm Example I
New generation
Maximise f(x) = x3 - 60 * x2 + 900 * x +100 (0 <= x <= 31)
Two generations
Maximise f(x) = x3 - 60 * x2 + 900 * x +100 (0 <= x <= 31)
Mutation
Genetic Algorithm Example II
Initial generation
P1 5 8 1 … … 84 32 27 54 67 6.5
P2 78 81 27 … … 9 11 7 44 24 7.8
…
P30 8 1 7 … … 9 16 36 24 19 6.0
Genetic Algorithm Example II
Crossover
C1 8 1 7 … … 9 11 13
7 44 24 5.9
C2 78 81 27 … … 9 16 36 24 19 6.2
Genetic Algorithm Example II
Next generation
P1 8 1 7 … … 9 11 7 44 24 5.9
P2 78 81 27 … … 9 16 36 24 19 6.2
…
P2 7 8 2 … … 5 10 76 4 79 6.0
Genetic Algorithm Example II
Applying
Genetic Algorithms
to Personnel Scheduling
•shift coverage
A number of nurses •one shift per day
A number of shifts each day
A set of constraints •resting time
•workload per month
•consecutive shifts
•working weekends
•…
Genetic Algorithm Example III
Genetic Algorithm Example III
Genetic Algorithm
-Initial population
-construct rosters
-repair infeasible ones
Genetic Algorithm Example III
Genetic Algorithm
-Select parents
-Recombine rows in the two rosters
-repair infeasible ones
+
Genetic Algorithm Example III
Genetic Algorithm
-Mutation
-Local optimiser
Genetic Algorithm Example III
Population Size 50
Crossover Probability 0.7
Mutation Probability 0.001
Local Optimiser ON
Genetic Algorithm Applications
• portfolio optimization
• multimedia multicast routing
• knapsack problem
Genetic Algorithm Performance
Meta-heuristics
• Population based
• Genetic algorithms
• Memetic algorithms
• Swarm intelligence (ant colony, particle
swarm optimisation)
•…
• Local search based
• Tabu search
• Variable neighbourhood search
• Simulated annealing
• …
Conclusions