SlideShare a Scribd company logo
1 of 140
Lec – 3
 Population-based methods keep around a sample
of candidate solutions rather than a single
candidate solution.
 Each of the solutions is involved in tweaking and
quality assessment
3
Prof. Sohel Rahman
 In a Parallel HC, many solution will hill climb in
parallel independent with each other.
 In a population method, candidate solutions affect
how other candidates will hill-climb in the quality
function.
 How?
 either by good solutions causing poor solutions to
be rejected and new ones created,
 or by causing them to be Tweaked in the direction
of the better solutions.
4
Prof. Sohel Rahman
 most population-based methods steal
concepts from
 biology
 Genetics
 evolution
5
Prof. Sohel Rahman
6
Prof. Sohel Rahman
 EC refers to a particularly popular set of techniques
 An algorithm chosen from this set is known as an
Evolutionary Algorithm (EA).
 Most EAs may be divided into:
 generational algorithms (gen. version): update the entire
sample once per iteration
 steady-state algorithms (Std. St. version): update the sample a
few candidate solutions at a time.
 Common EA’s:
 Genetic Algorithm (GA)
 Evolution Strategies (ES)
 Both have generational and steady-state versions of each.
7
Prof. Sohel Rahman
8
Prof. Sohel Rahman
 Resampling Techniques: new samples
(populations) are generated or revised based
on the results from the older ones.
 Direct Mutation Method: candidate
solutions in the population are modified,
but no resampling occurs.
 e.g., PSO (we will learn this later)
 EC techniques are generally resampling
techniques
9
Prof. Sohel Rahman
 Constructs an initial population,
 Then iterates through three procedures:
 Fitness Assessment: First, it assesses the fitness
of all the individuals in the population.
 Breeding: Second, it uses this fitness
information to breed a new population of
children.
 Joining: Third, it joins the parents and children
in some fashion to form a new next-generation
population,
10
Prof. Sohel Rahman
11
Prof. Sohel Rahman
We start with some sample
solutions; Not a single
solution
Initially Best = null, because we
haven’t assessed the fitness yet!
Typically, we need fitness value of all before breeding
Recording
the best
Breeding & Joining
12
Prof. Sohel Rahman
 EA’s differ from one another largely in how they
perform the Breed and Join operations.
 The Breed operation usually has two parts:
 Selecting parents from the old population,
 then Tweaking them (usually Mutating or Recombining
them in some way) to make children.
 The Join operation could be either of 2 to form the
next generation :
 either completely replaces the parents with the children,
 or includes fit parents along with their children
13
Prof. Sohel Rahman
 Both Breed and Join do some sorts of
selection.
 Parent Selection (for Breed): Selecting
parents from the old population to make
children
 Survival Selection (for Join): choosing from
among the children and the parents to form
the next generation.
14
Prof. Sohel Rahman
 Initialization is typically just creating some n
individuals at random.
 If “good” regions of the space is known, you could bias
the random generation to tend to generate individuals
in those regions.
 you could seed the initial population partly with
individuals of your own design.
 Be careful: often you think you know where the good
areas are, there’s a good chance you don’t.
 Always, include a significant degree of uniform
randomness in your initialization.
15
Prof. Sohel Rahman
 Every individual in init. population should be unique.
 This enforces diversity
 How to achieve this?
 Method #1: Each time you make a new individual, scan
through the whole population to see if that individual is
already been created.
 Method #2:
 Create a hash table which stores individuals as keys
 Each time you make an individual, check to see if it’s
already in the hash table as a key.
 If it is, throw it away and make another one.
 Else, add the individual to the population, and hash it
in the hash table.
16
Prof. Sohel Rahman
 Every individual in init. population should be unique.
 This enforces diversity
 How to achieve this?
 Method #1: Each time you make a new individual, scan
through the whole population to see if that individual is
already been created.
 Method #2:
 Create a hash table which stores individuals as keys
 Each time you make an individual, check to see if it’s
already in the hash table as a key.
 If it is, throw it away and make another one.
 Else, add the individual to the population, and hash it
in the hash table.
O(n^2)!!!
17
Prof. Sohel Rahman
 Every individual in init. population should be unique.
 This enforces diversity
 How to achieve this?
 Method #1: Each time you make a new individual, scan
through the whole population to see if that individual is
already been created.
 Method #2:
 Create a hash table which stores individuals as keys
 Each time you make an individual, check to see if it’s
already in the hash table as a key.
 If it is, throw it away and make another one.
 Else, add the individual to the population, and hash it
in the hash table.
O(n^2)!!!
O(n)!!! 18
Prof. Sohel Rahman
19
Prof. Sohel Rahman
Two main features…
 Truncation Selection: ES employ a simple procedure
for selecting individuals
 Only a number of fittest individuals are selected
 only uses mutation as the Tweak operator.
20
Prof. Sohel Rahman
 mu: the number of parents which survive
 lambda: is the number of kids that the mu
parents make in total.
 lambda should be a multiple of mu
 ES practitioners usually refer to their
algorithm by the choice of mu and lambda
 mu = 5 and lambda = 20
=> (5, 20) Evolution Strategy
21
Prof. Sohel Rahman
 Start with a random population of size lambda
 We then iterate as follows.
 First we assess the fitness of each individual.
 Then we delete from the population all but the
mu fittest ones.
 Each of them produce (lambda/mu) children
 through an ordinary Mutation.
 So, lambda new children are produced and they
just replace the parents, who are discarded.
 The iteration continues anew.
22
Prof. Sohel Rahman
Truncation Selection
23
Prof. Sohel Rahman
Building Initial
Population of size
lambda
Fitness assessment
for each individual
Truncation Selection
•In total lambda
children are produced
•Join is done by just
replacing P with the
children
Ordinary Mutation
24
Prof. Sohel Rahman
Population-based methods have a variety of ways to
perform the Tweak operation:
 Mutation: converts a single individual into a new
individual through a (usually small) random change
 Recombination
 Crossover
multiple (typically two) individuals
are mixed and matched to form
children.
25
Prof. Sohel Rahman
Knob #1: lambda
 This essentially controls the sample size for
each population
 Sounds similar to n in Steepest-Ascent Hill
Climbing With Replacement?
 But not at all identical.
 lambda approaches infinity => the
algorithm approaches exploration (random
search).
26
Prof. Sohel Rahman
 Note the
difference of
role of n and
lambda
 lambda works
towards
exploration
 n worked
towards
exploitation
27
Prof. Sohel Rahman
Knob #2: mu
 This controls how selective the algorithm is
 low values of mu with respect to lambda
push the algorithm more towards
exploitative search
 Why?
 Because, only, the best individuals survive.
28
Prof. Sohel Rahman
Knob #3: Mutation
 The degree to which Mutation is
performed.
 If Mutate has a lot of noise:
 then new children are far away from the
parents
 and are fairly random regardless of the
selectivity of mu.
29
Prof. Sohel Rahman
30
Prof. Sohel Rahman
lambda high => more exploration!
Low mu w.r.t. lambda => more exploitation!
31
Prof. Sohel Rahman
lambda high => more exploration!
High mu w.r.t. lambda => more exploration!
32
Prof. Sohel Rahman
(mu + lambda) vs (mu ,lambda)
 The difference is in the Join operation.
 In (mu, lambda), the parents are simply replaced
with the children in the next generation.
 In (mu + lambda), the next generation = mu
parents + lambda children
 the parents compete with the kids next time
around.
 Thus the next and all successive generations are
(mu + lambda) in size.
33
Prof. Sohel Rahman
34
Prof. Sohel Rahman
The Join Operation is
the only difference with
(mu + lambda)
In the previous version we had P <- {}.
35
Prof. Sohel Rahman
 Generally speaking, (mu + lambda) may be more
exploitative than (mu, lambda)
 Because, high-fit parents persist to compete with the
children.
 This has risks:
 a sufficiently fit parent may defeat other
population members over and over again
 eventually causing the entire population to
prematurely converge to immediate descendants
of that parent
 at which point the whole population has been
trapped in the local optimum surrounding that
parent. 36
Prof. Sohel Rahman
 (mu + lambda) resembles Steepest
Ascent Hill-Climbing
 allow the parent to compete against the
children for supremacy in the next
iteration.
 (mu, lambda) resembles Steepest
Ascent Hill-Climbing with Replacement
 parents are replaced with the best
children.
37
Prof. Sohel Rahman
 the hill-climbers are essentially
degenerate cases of ES algorithms.
 With the right Tweak operator:
 plain Hill-Climbing becomes the (1 + 1)
algorithm
 Steepest Ascent Hill-Climbing with
Replacement becomes (1, lambda)
 Steepest Ascent Hill-Climbing becomes (1 +
lambda).
38
Prof. Sohel Rahman
Parent is
competing
with the child.
one parent
one child
39
Prof. Sohel Rahman
allow the parent to
compete against the
children for
supremacy in the next
iteration.
one parent
n children
40
Prof. Sohel Rahman
parent is
replaced with
the best child
without
competition.
one parent
n children
41
Prof. Sohel Rahman
 Mutation is typically performed using Gausian Convolution
 Recall the Gausian Convolution:
42
Prof. Sohel Rahman
 mutation rate of an ES: sigma^2 of Gaussian
Convolution
 determines the noise in the Mutate
operation.
 How to pick a value for sigma^2?
 You might pre-select its value
 you might slowly decrease the value
 Does this remind you of “someone”? “Something”
perhaps?
 you could try to adaptively change sigma^2
based on the current statistics of the system.
adaptive mutation rate
43
Prof. Sohel Rahman
 System is too exploitative:
 Increase sigma^2 to force
some more exploration
 System is too explorative :
 Decrease sigma^2 to
produce more exploitation
 In general, such adaptive
breeding operators adjust
themselves over time
 in response to statistics
gleaned from the
optimization run
44
Prof. Sohel Rahman
 self-adaptive operators are
stochastically optimized
along with individuals.
 Example:
 individuals might contain
their own mutation
procedures
 These procedures can
themselves be mutated
along with the individual.
45
Prof. Sohel Rahman
10 112 … 9 + 1
1 12 … 10 - 2
23 24 … * 1
12 43 … 99 + 2
56 23 … 12 * 3
 An old rule for changing sigma^2 adaptively
 Case 1: More than 1/5 th children are fitter than their
parents-
 we’re exploiting local optima too much
 Increase sigma^2 to explore more.
 Case 2: Less than 1/5 th children are fitter than their
parents-
 we’re exploring too much
 Decrease sigma^2 to exploit more.
 Case 3: If exactly 1/5 th children are fitter than their parents
 Keep current sigma^2
46
Prof. Sohel Rahman
 This rule was derived from the results
of experiments with the (1 + 1) ES on
certain simple test problems.
 It may not be optimal for more
complex situations
 but it’s a good starting point.
47
Prof. Sohel Rahman
(Plain) HC
48
Prof. Sohel Rahman
 First, EP historically only used a (mu +
lambda) strategy with mu = lambda
 half the population was eliminated
 and that half was then filled in with children.
49
Prof. Sohel Rahman
 Second, EP was applied to almost any
representation.
 (ES mainly uses vectors!)
 Example: graph structures (specifically finite state
automata, hence the “programming”).
 Mutate operation:
 adding or deleting an edge
 adding or deleting a node
 relabeling an edge or a node, etc.
50
Prof. Sohel Rahman
51
Prof. Sohel Rahman
Similarities:
 Both iterate through
 fitness assessment
 selection and breeding
 and population reassembly.
The primary difference is in selection and breeding:
 ES selects the parents and then creates the
children
 GA little-by-little selects a few parents and
generates children until enough children have
been created. 52
Prof. Sohel Rahman
 begin with an empty population of children.
 Produce two children as follows:
 select two parents from the original population
 copy them
 cross them over with one another
 mutate the results
 add the two children to the child population
 repeat this process until the child population is
entirely filled.
53
Prof. Sohel Rahman
54
Prof. Sohel Rahman
This is lambda.
Should be even.
Same as (mu,
lambda) ES
Deviation
from (mu,
lambda) ES
New
functions
55
Prof. Sohel Rahman
 GA can be applied to any kind of vector and indeed
many representations
 However, GA classically operated over fixed-length
vectors of boolean values
 On the other hand ES often were applied to fixed-
length vectors of floating-point values.
56
Prof. Sohel Rahman
57
Prof. Sohel Rahman
3 new functions
SelectWithReplacement()
Crossover()
Mutate()
58
Prof. Sohel Rahman
59
Prof. Sohel Rahman
 For real valued vectors use Gaussian Convolution
 For boolean valued vectors Use bit-flip mutation
60
Prof. Sohel Rahman
 For real valued vectors use Gaussian Convolution
 For boolean valued vectors Use bit-flip mutation
Often p = 1/l
61
Prof. Sohel Rahman
62
Prof. Sohel Rahman
 Genetic Algorithm’s distinguishing feature
 involves mixing and matching parts of two
parents to form children.
 three classic ways of doing crossover in
vectors:
 One-Point Crossover
 Two-Point Crossover
 Uniform Crossover.
63
Prof. Sohel Rahman
64
Prof. Sohel Rahman
 OPC may constantly break up good pairs
 Example:
 Say there is a linkage between v_1 and v_l to work well in
tandem in order to get a high fitness
 the probability is high that v_1 and v_l will be broken up
due to crossover,
 almost any choice of c will do it.
 On the other hand, note that, the probability that v_1
and v_2 will be broken up is quite small, as c must be
equal to a particular value.
65
Prof. Sohel Rahman
66
Prof. Sohel Rahman
 Think of the vectors not as vectors but as rings
 So, v_l is right next to v_1
 TPC breaks the rings at two spots and trades pieces
 Since v_l is right next to v_1, the only way they’d break
up is if c or d sliced right between them.
 The same situation as v_1 and v_2.
v_l v_1
… …
c or d
67
Prof. Sohel Rahman
 TPC solves the linkage problem for short distances
 Distance of v_1 and v_l is 1 if we consider ring
 What about the linkage between v_1 and v_{l/2}?
 Long distances like that are still more likely to be
broken up than short distances like v1 and v2 (or
indeed v1 and vl).
68
Prof. Sohel Rahman
 A generalization of TPC
 pick n random points and sort them in ascending
order: c_1, c_2, ..., c_n.
 Now swap indexes in the region between
 c_1 and c_2
 c_3 and c_4
 c_5 and c_6
 …
69
Prof. Sohel Rahman
 We can treat all genes fairly with respect to linkage by
crossing over each point independently of one another
Uniform crossover:
 March down the vectors
 swap individual indexes if a coin toss comes up heads
with probability p.
70
Prof. Sohel Rahman
Often p = 1/l
71
Prof. Sohel Rahman
 If you cross over two vectors
you can’t get every
conceivable vector out of it.
 Example:
 Suppose your vectors form
the corners of a cube in
space
 All the crossovers will
result in new vectors
which lie at some other
corner of the hypercube. 72
Prof. Sohel Rahman
 Crossover done on P (points in space) can only produce
children inside the bounding box surrounding P in space.
 Thus P’s bounding box can never increase
 you’re doomed to only search inside it.
 As we repeatedly perform crossover and selection on a
population, it may reach the situation where certain values
for certain positions in the vector have been eliminated
 Eventually the population will likely to prematurely
converge, to copies of the same individual
 At this stage there’s no escape from local optima
 when an individual crosses over with itself, nothing new is
generated.
73
Prof. Sohel Rahman
 To make GA global we need Mutate with
Crossover
74
Prof. Sohel Rahman
 Highly fit individuals often share certain traits, called
building blocks, in common.
 Example:
 in the boolean individual 10110101, perhaps ***101*1
might be a building block
 the fitness of a given individual is often at least partly
correlated to the degree to which it contains various of
these building blocks
 Crossover works by spreading building blocks quickly
throughout the population.
75
Prof. Sohel Rahman
 Crossover assumes BBH as well as linkage
 Linkage:
 some degree of linkage between genes on the
chromosome
 settings for certain genes in groups are strongly
correlated to fitness improvement
 Example: genes A and B might contribute to fitness only
when they’re both set to 1.
 OPC and TPC even assumes that highly linked
genes are located near to one another on the vector
 OPC and TPC are unlikely to break apart closely-
located gene groups
 UC does not have this linkage-location bias 76
Prof. Sohel Rahman
 you could perform uniform crossover with several
vectors at once
 to produce children which are the combination
of all of them.
 Probability of swapping any given index shouldn’t
be spectacularly high.
 To avoid sheer randomization, you’d want only a
bit of mixing to occur
 Something like this is very rare in practice though
77
Prof. Sohel Rahman
p should be very small
Load v with ith element
of each W_j in W
Put back the elements after shuffling. So
each vector W_j in W now gets a new
shuffled ith element
New Procedure
You
may
shuffle
each
position
depending
on
p
78
Prof. Sohel Rahman
1 2 3 4 5 6 7 8 9 10
10 3 1 45 8 9 119 2 0 12
13 29 2 54 60 12 11 3 9 6
16 31 3 4 16 89 9 24 8 18
1 2 4 89 61 7 91 7 1
1 2 3 4 9 12 89 7
2 1 4 3 12 89 7 9
1 2 3 4 5 6 7 8 9 10
10 3 2 45 8 12 119 2 0 12
13 29 1 54 60 89 11 3 9 6
16 31 4 4 16 7 9 24 8 18
1 2 3 89 61 9 91 7 1
Prof. Sohel Rahman 79
80
Prof. Sohel Rahman
(We have so far considered only boolean vectors)
 For real valued vectors: Only swapping two
elements is not enough
 Need to do something more
 Averaging two elements
 For each gene of the child, two parents are
chosen at random
 their gene values at that gene are averaged.
 Line Recombination
 We draw a line between the two points and
choose two new points between them.
 We could extend this line somewhat beyond the
points as well and pick along the line 81
Prof. Sohel Rahman
82
Prof. Sohel Rahman
p = 0
p > 0
p > 0
83
Prof. Sohel Rahman
p = 0
p > 0
Intermediate Recomb.: pick
random alpha and beta values
for each position in the vector.
Put Lines 4 and 5
within the for loop
of Line 6
Accept, if within bounds;
Reject, otherwise.
p > 0
84
Prof. Sohel Rahman
instead of rejecting if the
elements go out of bounds, we
can now just repeatedly pick a
new alpha and beta.
85
Prof. Sohel Rahman
SelectWithReplacement()
86
Prof. Sohel Rahman
 In ES, we used Truncation Selection
 just remove all but the mu best individuals.
 GA performs iterative selection, crossover, and
mutation while breeding
 GA’s SelectWithReplacement procedure may select the
same individual again in future.
 In ES, an individual will be the parent of a predefined
number of children
 In GA an individual can have any number of children.
87
Prof. Sohel Rahman
 Also known as Roulette Selection
 select individuals in proportion to their fitness
 higher fitness => it is selected more often
 How to do this?
 “size” the individuals according to their fitness
 Let s be the sum fitness of all the individuals.
 A random number is generated from 0 to s
 It falls within the range of some individual, which is
then selected.
88
Prof. Sohel Rahman
89
Prof. Sohel Rahman
Preprocessing
Steps:
converting all
the fitnesses
into a
cumulative
distribution
Deal with all zero
fitnesses gracefully
Creating the
cumulative density
function. f_l will
have s.
For efficiency, Binary
search could be done
here.
90
Prof. Sohel Rahman
 A variation of Fitness Proportionate Selection
 Here, fit individuals always get picked at least once
 How to do this?
 selects n individuals at a time
 build the fitness array as before.
 Then we select a random position from 0 to s/n.
 select the individual which straddles that position
 increment the position by s/n and repeat (up to n times total).
 At each increment, we select the individual in whose fitness
region we landed.
91
Prof. Sohel Rahman
 A variation of Fitness Proportionate Selection
 Here, fit individuals always get picked at least once
 How to do this?
 selects n individuals at a time
 build the fitness array as before.
 Then we select a random position from 0 to s/n.
 select the individual which straddles that position
 increment the position by s/n and repeat (up to n times total).
 At each increment, we select the individual in whose fitness
region we landed.
Fit Individuals
get picked at
least once
1 is picked twice
3 is picked once
5 is picked twice
8 is picked once 92
Prof. Sohel Rahman
93
Prof. Sohel Rahman
Preprocessing
Steps:
converting all
the fitnesses
into a
cumulative
distribution
Deal with all zero
fitnesses gracefully
Creating the
cumulative density
function. f_l will
have s.
No need to do
Binary Search.
94
Prof. Sohel Rahman
 Firstly, SUS is O(n) to select n individuals
 Fitness-Proportionate Selection run in O(n lg n)
 But this is not a big deal anymore
 since the lion’s share of time in most optimization algorithms
is spent in assessing the fitness of individuals
 Secondly, SUS guarantees that if an individual is fairly
fit it’ll get chosen for sure
 Sometimes multiple times.
 Fairly fit => over s/n in size in the CDF
 In Fitness-Proportionate Selection even the fittest
individual may never be selected.
95
Prof. Sohel Rahman
 Normally we choose a fitness function such that:
 higher => better
 and don’t mean to imply anything else.
 One Example:
 Consider a fitness function goes from 0 to 10.
 Near the end of a run, all the individuals have values like
9.97, 9.98, 9.99, etc.
 We want to finesse the peak of the fitness function, and
so we want to pick the 9.99-fitness individual.
 But to FPS and to SUS, all these individuals will be
selected with nearly identical probability.
 The system has converged to just doing random
selection.
96
Prof. Sohel Rahman
 scale the fitness function to be more sensitive to
the values at the top end of the function.
97
Prof. Sohel Rahman
 adopt a non-parametric selection algorithm
 throws away the notion that fitness values mean
anything other than bigger is better
 just considers their rank ordering.
 In the previous example, FPS and SUS assumed
that if values are too near, they are identical
 One simple solution is Tournament Selection
98
Prof. Sohel Rahman
We return the fittest individual of some t
individuals picked at random, with replacement,
from the population. That’s it!
99
Prof. Sohel Rahman
 It is not sensitive to the particulars of the fitness
function.
 It is dead simple
 requires no preprocessing
 works well with parallel algorithms.
 We now have a knob, tournament size, t
 At the extremes, if t = 1, this is just random search.
 t >> |P| => then the probability that the fittest individual
in the population will be selected approaches 1.0
 TS just picks the fittest individual each time
100
Prof. Sohel Rahman
 In GA, the most popular setting is t = 2.
 For certain representations it’s common to be more
selective (t = 7)
 To be less selective than t = 2, but not be totally random
do the following trick:
 allow real-numbered values of t from 1.0 to 2.0.
 with probability (t − 1.0) do a tournament selection of
size 2.
 else we select an individual at random, i.e., size 1.
101
Prof. Sohel Rahman
102
Prof. Sohel Rahman
 Elitism
 Steady-State Genetic Algorithm
(and Generation Gap methods)
 Genetic Algorithm with a
Tree-Style Genetic
Programming Pipeline
 Hybrid Evolutionary and Hill-Climbing
Algorithms
 Scatter Search with Path Relinking.
highly-fit
parents can
compete with
their children
directly
augment
evolution
with hill-
climbing
103
Prof. Sohel Rahman
104
Prof. Sohel Rahman
 the fittest individual or individuals from the previous
population are directly injected into the next
population
 These individuals are called the elites.
 this algorithm resembles (mu + lambda)
 has similar exploitation properties.
 This exploitation can cause premature convergence
 To avoid that:
 increase the mutation and crossover noise
 reduce the number of elites that are being stored.
105
Prof. Sohel Rahman
106
Prof. Sohel Rahman
Keeping the Elites!
(popsize - n) must be
even
Or
An extra crossover child
need be discarded
107
Prof. Sohel Rahman
 Elitism is very very common
 most major multiobjective algorithms are strongly
elitist.
 Many recent Ant Colony Optimization algorithms are
also elitist.
 Scatter Search is heavily elitist.
 In fact, anything resembling (mu + lambda) is Elitist
 Particle Swarm Optimization also has a kind of elitism
in its own regard.
108
Prof. Sohel Rahman
 Elitism
 Steady-State Genetic Algorithm
(and Generation Gap methods)
 Genetic Algorithm with a
Tree-Style Genetic
Programming Pipeline
 Hybrid Evolutionary and Hill-Climbing
Algorithms
 Scatter Search with Path Relinking.
highly-fit
parents can
compete with
their children
directly
augment
evolution
with hill-
climbing
109
Prof. Sohel Rahman
110
Prof. Sohel Rahman
 This is an alternative to the traditional generational
approach to GA
 updates the population in a piecemeal fashion
 The main idea is as follows:
 breed a new child or two
 assess their fitness
 then reintroduce them directly into the population
itself,
 kill off some preexisting individuals to make room for
them.
 Iteratively continue the above
111
Prof. Sohel Rahman
112
Prof. Sohel Rahman
113
Prof. Sohel Rahman
 First, it uses half the memory of a traditional
genetic algorithm
 because there is only one population at a
time (no Q, only P).
 In normal GA, you keep and use P to
generate Q and then update P for the next
round through some selection algo.
 Second, it is fairly exploitative compared to a
generational approach
 the parents stay around in the population,
potentially for a very long time
114
Prof. Sohel Rahman
 SSGA is exploitative and runs the risk of causing
the system to prematurely converge to largely
copies of a few highly fit individuals.
 Influence of SelectForDeath:
 If we tend to select unfit individuals for death this can
push diversity out of the population even faster.
115
Prof. Sohel Rahman
 More commonly, we might simply select individuals at
random for death.
 Thus the fit culprits in premature convergence can
eventually be shoved out of the population.
 If we want less exploitation, we may do the standard tricks:
 use a relatively unselective operator for
SelectWithReplacement,
 make Crossover and Mutate noisy.
 assuming we have enough memory, we may do
zero deletion!!
116
Prof. Sohel Rahman
 A more general variant of SSGA
 replace not just two individuals but some n
individuals all at once.
 Normally, when n ~ 50% of the total population
size or more, SSGA are called Generation Gap
Algorithms
 As n approaches 100%, we get closer and closer to a
plain generational algorithm.
117
Prof. Sohel Rahman
 Elitism
 Steady-State Genetic Algorithm
(and Generation Gap methods)
 Genetic Algorithm with a
Tree-Style Genetic
Programming Pipeline
 Hybrid Evolutionary and Hill-Climbing
Algorithms
 Scatter Search with Path Relinking.
highly-fit
parents can
compete with
their children
directly
augment
evolution
with hill-
climbing
118
Prof. Sohel Rahman
119
Prof. Sohel Rahman
 Genetic Programming is a metaheuristic to find
highly fit computer programs.
 TSGP is the most common form of Genetic
Programming
 TSGP uses trees as its representation.
 It uses a variant of GA with special breeding:
 It first flips a coin.
 With 90% probability it selects two parents and
performs only crossover. NO MUTATION!!!
 Otherwise, it selects one parent and directly copies the
parent into the new population.
 direct copying makes this a strongly exploitative variant.
120
Prof. Sohel Rahman
 First, There’s no mutation
 So, this is not a global algorithm.
 However the crossover used in TSGP is peculiarly
mutative
 Therefore, in practice mutation is rarely needed.
 Second, this algorithm could produce one more child
than is needed:
 just discard it.
 Third, the selection procedure is highly selective:
 Genetic Programming usually employs Tournament
Selection with a tournament size t = 7.
121
Prof. Sohel Rahman
122
Prof. Sohel Rahman
Usually r = 0.1
Deviation from GA Starts
Deviation from GA Ends
Direct Copying
Only
Crossover
No
Mutation
123
Prof. Sohel Rahman
 Elitism
 Steady-State Genetic Algorithm
(and Generation Gap methods)
 Genetic Algorithm with a
Tree-Style Genetic
Programming Pipeline
 Hybrid Evolutionary and Hill-Climbing
Algorithms
 Scatter Search with Path Relinking.
highly-fit
parents can
compete with
their children
directly
augment
evolution
with hill-
climbing
124
Prof. Sohel Rahman
125
Prof. Sohel Rahman
 many ways for hybridization
 One approach:
 hybrid of evolutionary computation and a local
improver such as hill-climbing.
 The EA could go in the inner loop and the hill-climber
outside
 Most common approach:
 augment an EA with some hill-climbing during the
fitness assessment phase
 HC revises each individual as it is being assessed.
 The revised individual replaces the original one in the
population.
126
Prof. Sohel Rahman
127
Prof. Sohel Rahman
Knob t
128
Prof. Sohel Rahman
 t adjusts the degree of exploitation in the
algorithm
 t is very long => we’re doing more hill-
climbing
 more exploiting
 t is very short => we’re spending more time
in the outer algorithm
 more exploring.
129
Prof. Sohel Rahman
 There are many ways to mix an exploitative (and
likely local) algorithm with an explorative (usually
global) algorithm.
 Example:
 Hill-Climbing with Random Restarts: combines
Hill-Climbing (local) with Random Search
(global).
 Indeed, the local-improvement algorithm doesn’t
even have to be a metaheuristic:
 it could be a machine learning or heuristic
algorithm, for example.
130
Prof. Sohel Rahman
 the overall family of algorithms that combines
some kind of global optimization algorithm with
some kind of local improvement algorithm in
some way may be called Memetic Algorithm
 Though this term encompasses a fairly broad
category of stuff, the lion’s share of memetic
algorithms in the literature have been hybrids of
global search (often evolutionary computation)
and hill-climbing.
131
Prof. Sohel Rahman
 Elitism
 Steady-State Genetic Algorithm
(and Generation Gap methods)
 Genetic Algorithm with a
Tree-Style Genetic
Programming Pipeline
 Hybrid Evolutionary and Hill-Climbing
Algorithms
 Scatter Search with Path Relinking.
highly-fit
parents can
compete with
their children
directly
augment
evolution
with hill-
climbing
132
Prof. Sohel Rahman
133
Prof. Sohel Rahman
 Combination of the followings:
 hybrid evolutionary and hill climbing algorithm
 line recombination
 (mu + lambda)
 an explicit procedure to inject some diversity
(exploration)
 Standard Scatter Search with Path Relinking is quite
complex.
134
Prof. Sohel Rahman
 Starts with a set of initial seeded individuals (supplied)
 Then it tries to produce a large number of random
individuals that are very different
 from one another and
 from the seeds.
 These, plus the seeds, form the population.
 Then we do some hill-climbing on each of the
individuals to improve them.
 The we do the following loop…
135
Prof. Sohel Rahman
 First, we truncate the population to a small size
consisting of some very fit individuals and some very
diverse individuals (to force diversity).
 Then we perform some kind of pairing up and
crossover (usually using line recombination) plus,
possibly, some mutating for good measure.
 Then we do hill-climbing on these new individuals
 add them to the population
 and repeat the loop.
136
Prof. Sohel Rahman
137
Prof. Sohel Rahman
Do some HC to improve P_i
We do line recombination (crossover)
Generally, Scatter Search does
not mutate
138
Prof. Sohel Rahman
 We need a distance measure among individuals
 We may use Euclidian distance (assuming that the
individuals are real valued vectors)
 Then, the diversity of an individual is its sum distance
from everyone
139
Prof. Sohel Rahman
 Producing a “diverse” individual is mostly ad-hoc:
 Way #1:
 Generate a lot of individuals
 then select a subset of them using a tournament
selection based on maximum diversity from the seeds.
 Way #2:
 find gene values uncommon among the seeds and build
an individual with them.
140
Prof. Sohel Rahman

More Related Content

Similar to lec3-Oct2021.pptx

Evolutionary-Algorithms.ppt
Evolutionary-Algorithms.pptEvolutionary-Algorithms.ppt
Evolutionary-Algorithms.ppt
lakshmi.ec
 
Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP
Raktim Halder
 
Chapter 3 part1-Design of Experiments
Chapter 3 part1-Design of ExperimentsChapter 3 part1-Design of Experiments
Chapter 3 part1-Design of Experiments
nszakir
 

Similar to lec3-Oct2021.pptx (20)

Genetic-Algorithms.ppt
Genetic-Algorithms.pptGenetic-Algorithms.ppt
Genetic-Algorithms.ppt
 
Evolutionary-Algorithms.ppt
Evolutionary-Algorithms.pptEvolutionary-Algorithms.ppt
Evolutionary-Algorithms.ppt
 
Introduction to Genetic algorithm
Introduction to Genetic algorithmIntroduction to Genetic algorithm
Introduction to Genetic algorithm
 
4.Genetic-Algorithms.ppt
4.Genetic-Algorithms.ppt4.Genetic-Algorithms.ppt
4.Genetic-Algorithms.ppt
 
Parallel evolutionary approach paper
Parallel evolutionary approach paperParallel evolutionary approach paper
Parallel evolutionary approach paper
 
Genetic algorithm raktim
Genetic algorithm raktimGenetic algorithm raktim
Genetic algorithm raktim
 
Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP
 
Info to Genetic Algorithms - DC Ruby Users Group 11.10.2016
Info to Genetic Algorithms - DC Ruby Users Group 11.10.2016Info to Genetic Algorithms - DC Ruby Users Group 11.10.2016
Info to Genetic Algorithms - DC Ruby Users Group 11.10.2016
 
Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)Introduction to Optimization with Genetic Algorithm (GA)
Introduction to Optimization with Genetic Algorithm (GA)
 
Genetic Algorithm 2 -.pptx
Genetic Algorithm 2 -.pptxGenetic Algorithm 2 -.pptx
Genetic Algorithm 2 -.pptx
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
soft computing.pptx
soft computing.pptxsoft computing.pptx
soft computing.pptx
 
D0353027043
D0353027043D0353027043
D0353027043
 
Flowchart of GA
Flowchart of GAFlowchart of GA
Flowchart of GA
 
POSTDOC : THE HUMAN OPTIMIZATION
POSTDOC : THE HUMAN OPTIMIZATIONPOSTDOC : THE HUMAN OPTIMIZATION
POSTDOC : THE HUMAN OPTIMIZATION
 
Data Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsData Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic Algorithms
 
1582997627872.pdf
1582997627872.pdf1582997627872.pdf
1582997627872.pdf
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Chapter 3 part1-Design of Experiments
Chapter 3 part1-Design of ExperimentsChapter 3 part1-Design of Experiments
Chapter 3 part1-Design of Experiments
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 

Recently uploaded

Difference Between Skeletal Smooth and Cardiac Muscles
Difference Between Skeletal Smooth and Cardiac MusclesDifference Between Skeletal Smooth and Cardiac Muscles
Difference Between Skeletal Smooth and Cardiac Muscles
MedicoseAcademics
 
Physiologic Anatomy of Heart_AntiCopy.pdf
Physiologic Anatomy of Heart_AntiCopy.pdfPhysiologic Anatomy of Heart_AntiCopy.pdf
Physiologic Anatomy of Heart_AntiCopy.pdf
MedicoseAcademics
 
Obat Aborsi Ampuh Usia 1,2,3,4,5,6,7 Bulan 081901222272 Obat Penggugur Kandu...
Obat Aborsi Ampuh Usia 1,2,3,4,5,6,7 Bulan  081901222272 Obat Penggugur Kandu...Obat Aborsi Ampuh Usia 1,2,3,4,5,6,7 Bulan  081901222272 Obat Penggugur Kandu...
Obat Aborsi Ampuh Usia 1,2,3,4,5,6,7 Bulan 081901222272 Obat Penggugur Kandu...
Halo Docter
 
Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...
Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...
Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...
Cara Menggugurkan Kandungan 087776558899
 

Recently uploaded (20)

TEST BANK For Porth's Essentials of Pathophysiology, 5th Edition by Tommie L ...
TEST BANK For Porth's Essentials of Pathophysiology, 5th Edition by Tommie L ...TEST BANK For Porth's Essentials of Pathophysiology, 5th Edition by Tommie L ...
TEST BANK For Porth's Essentials of Pathophysiology, 5th Edition by Tommie L ...
 
VIP ℂall Girls Kothanur {{ Bangalore }} 6378878445 WhatsApp: Me 24/7 Hours Se...
VIP ℂall Girls Kothanur {{ Bangalore }} 6378878445 WhatsApp: Me 24/7 Hours Se...VIP ℂall Girls Kothanur {{ Bangalore }} 6378878445 WhatsApp: Me 24/7 Hours Se...
VIP ℂall Girls Kothanur {{ Bangalore }} 6378878445 WhatsApp: Me 24/7 Hours Se...
 
Difference Between Skeletal Smooth and Cardiac Muscles
Difference Between Skeletal Smooth and Cardiac MusclesDifference Between Skeletal Smooth and Cardiac Muscles
Difference Between Skeletal Smooth and Cardiac Muscles
 
TEST BANK For Guyton and Hall Textbook of Medical Physiology, 14th Edition by...
TEST BANK For Guyton and Hall Textbook of Medical Physiology, 14th Edition by...TEST BANK For Guyton and Hall Textbook of Medical Physiology, 14th Edition by...
TEST BANK For Guyton and Hall Textbook of Medical Physiology, 14th Edition by...
 
ANATOMY AND PHYSIOLOGY OF RESPIRATORY SYSTEM.pptx
ANATOMY AND PHYSIOLOGY OF RESPIRATORY SYSTEM.pptxANATOMY AND PHYSIOLOGY OF RESPIRATORY SYSTEM.pptx
ANATOMY AND PHYSIOLOGY OF RESPIRATORY SYSTEM.pptx
 
VIP ℂall Girls Arekere Bangalore 6378878445 WhatsApp: Me All Time Serviℂe Ava...
VIP ℂall Girls Arekere Bangalore 6378878445 WhatsApp: Me All Time Serviℂe Ava...VIP ℂall Girls Arekere Bangalore 6378878445 WhatsApp: Me All Time Serviℂe Ava...
VIP ℂall Girls Arekere Bangalore 6378878445 WhatsApp: Me All Time Serviℂe Ava...
 
Physiologic Anatomy of Heart_AntiCopy.pdf
Physiologic Anatomy of Heart_AntiCopy.pdfPhysiologic Anatomy of Heart_AntiCopy.pdf
Physiologic Anatomy of Heart_AntiCopy.pdf
 
Part I - Anticipatory Grief: Experiencing grief before the loss has happened
Part I - Anticipatory Grief: Experiencing grief before the loss has happenedPart I - Anticipatory Grief: Experiencing grief before the loss has happened
Part I - Anticipatory Grief: Experiencing grief before the loss has happened
 
Creeping Stroke - Venous thrombosis presenting with pc-stroke.pptx
Creeping Stroke - Venous thrombosis presenting with pc-stroke.pptxCreeping Stroke - Venous thrombosis presenting with pc-stroke.pptx
Creeping Stroke - Venous thrombosis presenting with pc-stroke.pptx
 
Dr. A Sumathi - LINEARITY CONCEPT OF SIGNIFICANCE.pdf
Dr. A Sumathi - LINEARITY CONCEPT OF SIGNIFICANCE.pdfDr. A Sumathi - LINEARITY CONCEPT OF SIGNIFICANCE.pdf
Dr. A Sumathi - LINEARITY CONCEPT OF SIGNIFICANCE.pdf
 
Obat Aborsi Ampuh Usia 1,2,3,4,5,6,7 Bulan 081901222272 Obat Penggugur Kandu...
Obat Aborsi Ampuh Usia 1,2,3,4,5,6,7 Bulan  081901222272 Obat Penggugur Kandu...Obat Aborsi Ampuh Usia 1,2,3,4,5,6,7 Bulan  081901222272 Obat Penggugur Kandu...
Obat Aborsi Ampuh Usia 1,2,3,4,5,6,7 Bulan 081901222272 Obat Penggugur Kandu...
 
MOTION MANAGEMANT IN LUNG SBRT BY DR KANHU CHARAN PATRO
MOTION MANAGEMANT IN LUNG SBRT BY DR KANHU CHARAN PATROMOTION MANAGEMANT IN LUNG SBRT BY DR KANHU CHARAN PATRO
MOTION MANAGEMANT IN LUNG SBRT BY DR KANHU CHARAN PATRO
 
Cardiac Output, Venous Return, and Their Regulation
Cardiac Output, Venous Return, and Their RegulationCardiac Output, Venous Return, and Their Regulation
Cardiac Output, Venous Return, and Their Regulation
 
7 steps How to prevent Thalassemia : Dr Sharda Jain & Vandana Gupta
7 steps How to prevent Thalassemia : Dr Sharda Jain & Vandana Gupta7 steps How to prevent Thalassemia : Dr Sharda Jain & Vandana Gupta
7 steps How to prevent Thalassemia : Dr Sharda Jain & Vandana Gupta
 
Circulatory Shock, types and stages, compensatory mechanisms
Circulatory Shock, types and stages, compensatory mechanismsCirculatory Shock, types and stages, compensatory mechanisms
Circulatory Shock, types and stages, compensatory mechanisms
 
Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...
Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...
Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...
 
Top 10 Most Beautiful Russian Pornstars List 2024
Top 10 Most Beautiful Russian Pornstars List 2024Top 10 Most Beautiful Russian Pornstars List 2024
Top 10 Most Beautiful Russian Pornstars List 2024
 
ABO Blood grouping in-compatibility in pregnancy
ABO Blood grouping in-compatibility in pregnancyABO Blood grouping in-compatibility in pregnancy
ABO Blood grouping in-compatibility in pregnancy
 
Test bank for critical care nursing a holistic approach 11th edition morton f...
Test bank for critical care nursing a holistic approach 11th edition morton f...Test bank for critical care nursing a holistic approach 11th edition morton f...
Test bank for critical care nursing a holistic approach 11th edition morton f...
 
Face and Muscles of facial expression.pptx
Face and Muscles of facial expression.pptxFace and Muscles of facial expression.pptx
Face and Muscles of facial expression.pptx
 

lec3-Oct2021.pptx

  • 2.
  • 3.  Population-based methods keep around a sample of candidate solutions rather than a single candidate solution.  Each of the solutions is involved in tweaking and quality assessment 3 Prof. Sohel Rahman
  • 4.  In a Parallel HC, many solution will hill climb in parallel independent with each other.  In a population method, candidate solutions affect how other candidates will hill-climb in the quality function.  How?  either by good solutions causing poor solutions to be rejected and new ones created,  or by causing them to be Tweaked in the direction of the better solutions. 4 Prof. Sohel Rahman
  • 5.  most population-based methods steal concepts from  biology  Genetics  evolution 5 Prof. Sohel Rahman
  • 7.  EC refers to a particularly popular set of techniques  An algorithm chosen from this set is known as an Evolutionary Algorithm (EA).  Most EAs may be divided into:  generational algorithms (gen. version): update the entire sample once per iteration  steady-state algorithms (Std. St. version): update the sample a few candidate solutions at a time.  Common EA’s:  Genetic Algorithm (GA)  Evolution Strategies (ES)  Both have generational and steady-state versions of each. 7 Prof. Sohel Rahman
  • 9.  Resampling Techniques: new samples (populations) are generated or revised based on the results from the older ones.  Direct Mutation Method: candidate solutions in the population are modified, but no resampling occurs.  e.g., PSO (we will learn this later)  EC techniques are generally resampling techniques 9 Prof. Sohel Rahman
  • 10.  Constructs an initial population,  Then iterates through three procedures:  Fitness Assessment: First, it assesses the fitness of all the individuals in the population.  Breeding: Second, it uses this fitness information to breed a new population of children.  Joining: Third, it joins the parents and children in some fashion to form a new next-generation population, 10 Prof. Sohel Rahman
  • 12. We start with some sample solutions; Not a single solution Initially Best = null, because we haven’t assessed the fitness yet! Typically, we need fitness value of all before breeding Recording the best Breeding & Joining 12 Prof. Sohel Rahman
  • 13.  EA’s differ from one another largely in how they perform the Breed and Join operations.  The Breed operation usually has two parts:  Selecting parents from the old population,  then Tweaking them (usually Mutating or Recombining them in some way) to make children.  The Join operation could be either of 2 to form the next generation :  either completely replaces the parents with the children,  or includes fit parents along with their children 13 Prof. Sohel Rahman
  • 14.  Both Breed and Join do some sorts of selection.  Parent Selection (for Breed): Selecting parents from the old population to make children  Survival Selection (for Join): choosing from among the children and the parents to form the next generation. 14 Prof. Sohel Rahman
  • 15.  Initialization is typically just creating some n individuals at random.  If “good” regions of the space is known, you could bias the random generation to tend to generate individuals in those regions.  you could seed the initial population partly with individuals of your own design.  Be careful: often you think you know where the good areas are, there’s a good chance you don’t.  Always, include a significant degree of uniform randomness in your initialization. 15 Prof. Sohel Rahman
  • 16.  Every individual in init. population should be unique.  This enforces diversity  How to achieve this?  Method #1: Each time you make a new individual, scan through the whole population to see if that individual is already been created.  Method #2:  Create a hash table which stores individuals as keys  Each time you make an individual, check to see if it’s already in the hash table as a key.  If it is, throw it away and make another one.  Else, add the individual to the population, and hash it in the hash table. 16 Prof. Sohel Rahman
  • 17.  Every individual in init. population should be unique.  This enforces diversity  How to achieve this?  Method #1: Each time you make a new individual, scan through the whole population to see if that individual is already been created.  Method #2:  Create a hash table which stores individuals as keys  Each time you make an individual, check to see if it’s already in the hash table as a key.  If it is, throw it away and make another one.  Else, add the individual to the population, and hash it in the hash table. O(n^2)!!! 17 Prof. Sohel Rahman
  • 18.  Every individual in init. population should be unique.  This enforces diversity  How to achieve this?  Method #1: Each time you make a new individual, scan through the whole population to see if that individual is already been created.  Method #2:  Create a hash table which stores individuals as keys  Each time you make an individual, check to see if it’s already in the hash table as a key.  If it is, throw it away and make another one.  Else, add the individual to the population, and hash it in the hash table. O(n^2)!!! O(n)!!! 18 Prof. Sohel Rahman
  • 20. Two main features…  Truncation Selection: ES employ a simple procedure for selecting individuals  Only a number of fittest individuals are selected  only uses mutation as the Tweak operator. 20 Prof. Sohel Rahman
  • 21.  mu: the number of parents which survive  lambda: is the number of kids that the mu parents make in total.  lambda should be a multiple of mu  ES practitioners usually refer to their algorithm by the choice of mu and lambda  mu = 5 and lambda = 20 => (5, 20) Evolution Strategy 21 Prof. Sohel Rahman
  • 22.  Start with a random population of size lambda  We then iterate as follows.  First we assess the fitness of each individual.  Then we delete from the population all but the mu fittest ones.  Each of them produce (lambda/mu) children  through an ordinary Mutation.  So, lambda new children are produced and they just replace the parents, who are discarded.  The iteration continues anew. 22 Prof. Sohel Rahman Truncation Selection
  • 24. Building Initial Population of size lambda Fitness assessment for each individual Truncation Selection •In total lambda children are produced •Join is done by just replacing P with the children Ordinary Mutation 24 Prof. Sohel Rahman
  • 25. Population-based methods have a variety of ways to perform the Tweak operation:  Mutation: converts a single individual into a new individual through a (usually small) random change  Recombination  Crossover multiple (typically two) individuals are mixed and matched to form children. 25 Prof. Sohel Rahman
  • 26. Knob #1: lambda  This essentially controls the sample size for each population  Sounds similar to n in Steepest-Ascent Hill Climbing With Replacement?  But not at all identical.  lambda approaches infinity => the algorithm approaches exploration (random search). 26 Prof. Sohel Rahman
  • 27.  Note the difference of role of n and lambda  lambda works towards exploration  n worked towards exploitation 27 Prof. Sohel Rahman
  • 28. Knob #2: mu  This controls how selective the algorithm is  low values of mu with respect to lambda push the algorithm more towards exploitative search  Why?  Because, only, the best individuals survive. 28 Prof. Sohel Rahman
  • 29. Knob #3: Mutation  The degree to which Mutation is performed.  If Mutate has a lot of noise:  then new children are far away from the parents  and are fairly random regardless of the selectivity of mu. 29 Prof. Sohel Rahman
  • 31. lambda high => more exploration! Low mu w.r.t. lambda => more exploitation! 31 Prof. Sohel Rahman
  • 32. lambda high => more exploration! High mu w.r.t. lambda => more exploration! 32 Prof. Sohel Rahman
  • 33. (mu + lambda) vs (mu ,lambda)  The difference is in the Join operation.  In (mu, lambda), the parents are simply replaced with the children in the next generation.  In (mu + lambda), the next generation = mu parents + lambda children  the parents compete with the kids next time around.  Thus the next and all successive generations are (mu + lambda) in size. 33 Prof. Sohel Rahman
  • 35. The Join Operation is the only difference with (mu + lambda) In the previous version we had P <- {}. 35 Prof. Sohel Rahman
  • 36.  Generally speaking, (mu + lambda) may be more exploitative than (mu, lambda)  Because, high-fit parents persist to compete with the children.  This has risks:  a sufficiently fit parent may defeat other population members over and over again  eventually causing the entire population to prematurely converge to immediate descendants of that parent  at which point the whole population has been trapped in the local optimum surrounding that parent. 36 Prof. Sohel Rahman
  • 37.  (mu + lambda) resembles Steepest Ascent Hill-Climbing  allow the parent to compete against the children for supremacy in the next iteration.  (mu, lambda) resembles Steepest Ascent Hill-Climbing with Replacement  parents are replaced with the best children. 37 Prof. Sohel Rahman
  • 38.  the hill-climbers are essentially degenerate cases of ES algorithms.  With the right Tweak operator:  plain Hill-Climbing becomes the (1 + 1) algorithm  Steepest Ascent Hill-Climbing with Replacement becomes (1, lambda)  Steepest Ascent Hill-Climbing becomes (1 + lambda). 38 Prof. Sohel Rahman
  • 39. Parent is competing with the child. one parent one child 39 Prof. Sohel Rahman
  • 40. allow the parent to compete against the children for supremacy in the next iteration. one parent n children 40 Prof. Sohel Rahman
  • 41. parent is replaced with the best child without competition. one parent n children 41 Prof. Sohel Rahman
  • 42.  Mutation is typically performed using Gausian Convolution  Recall the Gausian Convolution: 42 Prof. Sohel Rahman
  • 43.  mutation rate of an ES: sigma^2 of Gaussian Convolution  determines the noise in the Mutate operation.  How to pick a value for sigma^2?  You might pre-select its value  you might slowly decrease the value  Does this remind you of “someone”? “Something” perhaps?  you could try to adaptively change sigma^2 based on the current statistics of the system. adaptive mutation rate 43 Prof. Sohel Rahman
  • 44.  System is too exploitative:  Increase sigma^2 to force some more exploration  System is too explorative :  Decrease sigma^2 to produce more exploitation  In general, such adaptive breeding operators adjust themselves over time  in response to statistics gleaned from the optimization run 44 Prof. Sohel Rahman
  • 45.  self-adaptive operators are stochastically optimized along with individuals.  Example:  individuals might contain their own mutation procedures  These procedures can themselves be mutated along with the individual. 45 Prof. Sohel Rahman 10 112 … 9 + 1 1 12 … 10 - 2 23 24 … * 1 12 43 … 99 + 2 56 23 … 12 * 3
  • 46.  An old rule for changing sigma^2 adaptively  Case 1: More than 1/5 th children are fitter than their parents-  we’re exploiting local optima too much  Increase sigma^2 to explore more.  Case 2: Less than 1/5 th children are fitter than their parents-  we’re exploring too much  Decrease sigma^2 to exploit more.  Case 3: If exactly 1/5 th children are fitter than their parents  Keep current sigma^2 46 Prof. Sohel Rahman
  • 47.  This rule was derived from the results of experiments with the (1 + 1) ES on certain simple test problems.  It may not be optimal for more complex situations  but it’s a good starting point. 47 Prof. Sohel Rahman (Plain) HC
  • 49.  First, EP historically only used a (mu + lambda) strategy with mu = lambda  half the population was eliminated  and that half was then filled in with children. 49 Prof. Sohel Rahman
  • 50.  Second, EP was applied to almost any representation.  (ES mainly uses vectors!)  Example: graph structures (specifically finite state automata, hence the “programming”).  Mutate operation:  adding or deleting an edge  adding or deleting a node  relabeling an edge or a node, etc. 50 Prof. Sohel Rahman
  • 52. Similarities:  Both iterate through  fitness assessment  selection and breeding  and population reassembly. The primary difference is in selection and breeding:  ES selects the parents and then creates the children  GA little-by-little selects a few parents and generates children until enough children have been created. 52 Prof. Sohel Rahman
  • 53.  begin with an empty population of children.  Produce two children as follows:  select two parents from the original population  copy them  cross them over with one another  mutate the results  add the two children to the child population  repeat this process until the child population is entirely filled. 53 Prof. Sohel Rahman
  • 55. This is lambda. Should be even. Same as (mu, lambda) ES Deviation from (mu, lambda) ES New functions 55 Prof. Sohel Rahman
  • 56.  GA can be applied to any kind of vector and indeed many representations  However, GA classically operated over fixed-length vectors of boolean values  On the other hand ES often were applied to fixed- length vectors of floating-point values. 56 Prof. Sohel Rahman
  • 60.  For real valued vectors use Gaussian Convolution  For boolean valued vectors Use bit-flip mutation 60 Prof. Sohel Rahman
  • 61.  For real valued vectors use Gaussian Convolution  For boolean valued vectors Use bit-flip mutation Often p = 1/l 61 Prof. Sohel Rahman
  • 63.  Genetic Algorithm’s distinguishing feature  involves mixing and matching parts of two parents to form children.  three classic ways of doing crossover in vectors:  One-Point Crossover  Two-Point Crossover  Uniform Crossover. 63 Prof. Sohel Rahman
  • 65.  OPC may constantly break up good pairs  Example:  Say there is a linkage between v_1 and v_l to work well in tandem in order to get a high fitness  the probability is high that v_1 and v_l will be broken up due to crossover,  almost any choice of c will do it.  On the other hand, note that, the probability that v_1 and v_2 will be broken up is quite small, as c must be equal to a particular value. 65 Prof. Sohel Rahman
  • 67.  Think of the vectors not as vectors but as rings  So, v_l is right next to v_1  TPC breaks the rings at two spots and trades pieces  Since v_l is right next to v_1, the only way they’d break up is if c or d sliced right between them.  The same situation as v_1 and v_2. v_l v_1 … … c or d 67 Prof. Sohel Rahman
  • 68.  TPC solves the linkage problem for short distances  Distance of v_1 and v_l is 1 if we consider ring  What about the linkage between v_1 and v_{l/2}?  Long distances like that are still more likely to be broken up than short distances like v1 and v2 (or indeed v1 and vl). 68 Prof. Sohel Rahman
  • 69.  A generalization of TPC  pick n random points and sort them in ascending order: c_1, c_2, ..., c_n.  Now swap indexes in the region between  c_1 and c_2  c_3 and c_4  c_5 and c_6  … 69 Prof. Sohel Rahman
  • 70.  We can treat all genes fairly with respect to linkage by crossing over each point independently of one another Uniform crossover:  March down the vectors  swap individual indexes if a coin toss comes up heads with probability p. 70 Prof. Sohel Rahman
  • 71. Often p = 1/l 71 Prof. Sohel Rahman
  • 72.  If you cross over two vectors you can’t get every conceivable vector out of it.  Example:  Suppose your vectors form the corners of a cube in space  All the crossovers will result in new vectors which lie at some other corner of the hypercube. 72 Prof. Sohel Rahman
  • 73.  Crossover done on P (points in space) can only produce children inside the bounding box surrounding P in space.  Thus P’s bounding box can never increase  you’re doomed to only search inside it.  As we repeatedly perform crossover and selection on a population, it may reach the situation where certain values for certain positions in the vector have been eliminated  Eventually the population will likely to prematurely converge, to copies of the same individual  At this stage there’s no escape from local optima  when an individual crosses over with itself, nothing new is generated. 73 Prof. Sohel Rahman
  • 74.  To make GA global we need Mutate with Crossover 74 Prof. Sohel Rahman
  • 75.  Highly fit individuals often share certain traits, called building blocks, in common.  Example:  in the boolean individual 10110101, perhaps ***101*1 might be a building block  the fitness of a given individual is often at least partly correlated to the degree to which it contains various of these building blocks  Crossover works by spreading building blocks quickly throughout the population. 75 Prof. Sohel Rahman
  • 76.  Crossover assumes BBH as well as linkage  Linkage:  some degree of linkage between genes on the chromosome  settings for certain genes in groups are strongly correlated to fitness improvement  Example: genes A and B might contribute to fitness only when they’re both set to 1.  OPC and TPC even assumes that highly linked genes are located near to one another on the vector  OPC and TPC are unlikely to break apart closely- located gene groups  UC does not have this linkage-location bias 76 Prof. Sohel Rahman
  • 77.  you could perform uniform crossover with several vectors at once  to produce children which are the combination of all of them.  Probability of swapping any given index shouldn’t be spectacularly high.  To avoid sheer randomization, you’d want only a bit of mixing to occur  Something like this is very rare in practice though 77 Prof. Sohel Rahman
  • 78. p should be very small Load v with ith element of each W_j in W Put back the elements after shuffling. So each vector W_j in W now gets a new shuffled ith element New Procedure You may shuffle each position depending on p 78 Prof. Sohel Rahman
  • 79. 1 2 3 4 5 6 7 8 9 10 10 3 1 45 8 9 119 2 0 12 13 29 2 54 60 12 11 3 9 6 16 31 3 4 16 89 9 24 8 18 1 2 4 89 61 7 91 7 1 1 2 3 4 9 12 89 7 2 1 4 3 12 89 7 9 1 2 3 4 5 6 7 8 9 10 10 3 2 45 8 12 119 2 0 12 13 29 1 54 60 89 11 3 9 6 16 31 4 4 16 7 9 24 8 18 1 2 3 89 61 9 91 7 1 Prof. Sohel Rahman 79
  • 81. (We have so far considered only boolean vectors)  For real valued vectors: Only swapping two elements is not enough  Need to do something more  Averaging two elements  For each gene of the child, two parents are chosen at random  their gene values at that gene are averaged.  Line Recombination  We draw a line between the two points and choose two new points between them.  We could extend this line somewhat beyond the points as well and pick along the line 81 Prof. Sohel Rahman
  • 83. p = 0 p > 0 p > 0 83 Prof. Sohel Rahman
  • 84. p = 0 p > 0 Intermediate Recomb.: pick random alpha and beta values for each position in the vector. Put Lines 4 and 5 within the for loop of Line 6 Accept, if within bounds; Reject, otherwise. p > 0 84 Prof. Sohel Rahman
  • 85. instead of rejecting if the elements go out of bounds, we can now just repeatedly pick a new alpha and beta. 85 Prof. Sohel Rahman
  • 87.  In ES, we used Truncation Selection  just remove all but the mu best individuals.  GA performs iterative selection, crossover, and mutation while breeding  GA’s SelectWithReplacement procedure may select the same individual again in future.  In ES, an individual will be the parent of a predefined number of children  In GA an individual can have any number of children. 87 Prof. Sohel Rahman
  • 88.  Also known as Roulette Selection  select individuals in proportion to their fitness  higher fitness => it is selected more often  How to do this?  “size” the individuals according to their fitness  Let s be the sum fitness of all the individuals.  A random number is generated from 0 to s  It falls within the range of some individual, which is then selected. 88 Prof. Sohel Rahman
  • 90. Preprocessing Steps: converting all the fitnesses into a cumulative distribution Deal with all zero fitnesses gracefully Creating the cumulative density function. f_l will have s. For efficiency, Binary search could be done here. 90 Prof. Sohel Rahman
  • 91.  A variation of Fitness Proportionate Selection  Here, fit individuals always get picked at least once  How to do this?  selects n individuals at a time  build the fitness array as before.  Then we select a random position from 0 to s/n.  select the individual which straddles that position  increment the position by s/n and repeat (up to n times total).  At each increment, we select the individual in whose fitness region we landed. 91 Prof. Sohel Rahman
  • 92.  A variation of Fitness Proportionate Selection  Here, fit individuals always get picked at least once  How to do this?  selects n individuals at a time  build the fitness array as before.  Then we select a random position from 0 to s/n.  select the individual which straddles that position  increment the position by s/n and repeat (up to n times total).  At each increment, we select the individual in whose fitness region we landed. Fit Individuals get picked at least once 1 is picked twice 3 is picked once 5 is picked twice 8 is picked once 92 Prof. Sohel Rahman
  • 94. Preprocessing Steps: converting all the fitnesses into a cumulative distribution Deal with all zero fitnesses gracefully Creating the cumulative density function. f_l will have s. No need to do Binary Search. 94 Prof. Sohel Rahman
  • 95.  Firstly, SUS is O(n) to select n individuals  Fitness-Proportionate Selection run in O(n lg n)  But this is not a big deal anymore  since the lion’s share of time in most optimization algorithms is spent in assessing the fitness of individuals  Secondly, SUS guarantees that if an individual is fairly fit it’ll get chosen for sure  Sometimes multiple times.  Fairly fit => over s/n in size in the CDF  In Fitness-Proportionate Selection even the fittest individual may never be selected. 95 Prof. Sohel Rahman
  • 96.  Normally we choose a fitness function such that:  higher => better  and don’t mean to imply anything else.  One Example:  Consider a fitness function goes from 0 to 10.  Near the end of a run, all the individuals have values like 9.97, 9.98, 9.99, etc.  We want to finesse the peak of the fitness function, and so we want to pick the 9.99-fitness individual.  But to FPS and to SUS, all these individuals will be selected with nearly identical probability.  The system has converged to just doing random selection. 96 Prof. Sohel Rahman
  • 97.  scale the fitness function to be more sensitive to the values at the top end of the function. 97 Prof. Sohel Rahman
  • 98.  adopt a non-parametric selection algorithm  throws away the notion that fitness values mean anything other than bigger is better  just considers their rank ordering.  In the previous example, FPS and SUS assumed that if values are too near, they are identical  One simple solution is Tournament Selection 98 Prof. Sohel Rahman
  • 99. We return the fittest individual of some t individuals picked at random, with replacement, from the population. That’s it! 99 Prof. Sohel Rahman
  • 100.  It is not sensitive to the particulars of the fitness function.  It is dead simple  requires no preprocessing  works well with parallel algorithms.  We now have a knob, tournament size, t  At the extremes, if t = 1, this is just random search.  t >> |P| => then the probability that the fittest individual in the population will be selected approaches 1.0  TS just picks the fittest individual each time 100 Prof. Sohel Rahman
  • 101.  In GA, the most popular setting is t = 2.  For certain representations it’s common to be more selective (t = 7)  To be less selective than t = 2, but not be totally random do the following trick:  allow real-numbered values of t from 1.0 to 2.0.  with probability (t − 1.0) do a tournament selection of size 2.  else we select an individual at random, i.e., size 1. 101 Prof. Sohel Rahman
  • 103.  Elitism  Steady-State Genetic Algorithm (and Generation Gap methods)  Genetic Algorithm with a Tree-Style Genetic Programming Pipeline  Hybrid Evolutionary and Hill-Climbing Algorithms  Scatter Search with Path Relinking. highly-fit parents can compete with their children directly augment evolution with hill- climbing 103 Prof. Sohel Rahman
  • 105.  the fittest individual or individuals from the previous population are directly injected into the next population  These individuals are called the elites.  this algorithm resembles (mu + lambda)  has similar exploitation properties.  This exploitation can cause premature convergence  To avoid that:  increase the mutation and crossover noise  reduce the number of elites that are being stored. 105 Prof. Sohel Rahman
  • 107. Keeping the Elites! (popsize - n) must be even Or An extra crossover child need be discarded 107 Prof. Sohel Rahman
  • 108.  Elitism is very very common  most major multiobjective algorithms are strongly elitist.  Many recent Ant Colony Optimization algorithms are also elitist.  Scatter Search is heavily elitist.  In fact, anything resembling (mu + lambda) is Elitist  Particle Swarm Optimization also has a kind of elitism in its own regard. 108 Prof. Sohel Rahman
  • 109.  Elitism  Steady-State Genetic Algorithm (and Generation Gap methods)  Genetic Algorithm with a Tree-Style Genetic Programming Pipeline  Hybrid Evolutionary and Hill-Climbing Algorithms  Scatter Search with Path Relinking. highly-fit parents can compete with their children directly augment evolution with hill- climbing 109 Prof. Sohel Rahman
  • 111.  This is an alternative to the traditional generational approach to GA  updates the population in a piecemeal fashion  The main idea is as follows:  breed a new child or two  assess their fitness  then reintroduce them directly into the population itself,  kill off some preexisting individuals to make room for them.  Iteratively continue the above 111 Prof. Sohel Rahman
  • 114.  First, it uses half the memory of a traditional genetic algorithm  because there is only one population at a time (no Q, only P).  In normal GA, you keep and use P to generate Q and then update P for the next round through some selection algo.  Second, it is fairly exploitative compared to a generational approach  the parents stay around in the population, potentially for a very long time 114 Prof. Sohel Rahman
  • 115.  SSGA is exploitative and runs the risk of causing the system to prematurely converge to largely copies of a few highly fit individuals.  Influence of SelectForDeath:  If we tend to select unfit individuals for death this can push diversity out of the population even faster. 115 Prof. Sohel Rahman
  • 116.  More commonly, we might simply select individuals at random for death.  Thus the fit culprits in premature convergence can eventually be shoved out of the population.  If we want less exploitation, we may do the standard tricks:  use a relatively unselective operator for SelectWithReplacement,  make Crossover and Mutate noisy.  assuming we have enough memory, we may do zero deletion!! 116 Prof. Sohel Rahman
  • 117.  A more general variant of SSGA  replace not just two individuals but some n individuals all at once.  Normally, when n ~ 50% of the total population size or more, SSGA are called Generation Gap Algorithms  As n approaches 100%, we get closer and closer to a plain generational algorithm. 117 Prof. Sohel Rahman
  • 118.  Elitism  Steady-State Genetic Algorithm (and Generation Gap methods)  Genetic Algorithm with a Tree-Style Genetic Programming Pipeline  Hybrid Evolutionary and Hill-Climbing Algorithms  Scatter Search with Path Relinking. highly-fit parents can compete with their children directly augment evolution with hill- climbing 118 Prof. Sohel Rahman
  • 120.  Genetic Programming is a metaheuristic to find highly fit computer programs.  TSGP is the most common form of Genetic Programming  TSGP uses trees as its representation.  It uses a variant of GA with special breeding:  It first flips a coin.  With 90% probability it selects two parents and performs only crossover. NO MUTATION!!!  Otherwise, it selects one parent and directly copies the parent into the new population.  direct copying makes this a strongly exploitative variant. 120 Prof. Sohel Rahman
  • 121.  First, There’s no mutation  So, this is not a global algorithm.  However the crossover used in TSGP is peculiarly mutative  Therefore, in practice mutation is rarely needed.  Second, this algorithm could produce one more child than is needed:  just discard it.  Third, the selection procedure is highly selective:  Genetic Programming usually employs Tournament Selection with a tournament size t = 7. 121 Prof. Sohel Rahman
  • 123. Usually r = 0.1 Deviation from GA Starts Deviation from GA Ends Direct Copying Only Crossover No Mutation 123 Prof. Sohel Rahman
  • 124.  Elitism  Steady-State Genetic Algorithm (and Generation Gap methods)  Genetic Algorithm with a Tree-Style Genetic Programming Pipeline  Hybrid Evolutionary and Hill-Climbing Algorithms  Scatter Search with Path Relinking. highly-fit parents can compete with their children directly augment evolution with hill- climbing 124 Prof. Sohel Rahman
  • 126.  many ways for hybridization  One approach:  hybrid of evolutionary computation and a local improver such as hill-climbing.  The EA could go in the inner loop and the hill-climber outside  Most common approach:  augment an EA with some hill-climbing during the fitness assessment phase  HC revises each individual as it is being assessed.  The revised individual replaces the original one in the population. 126 Prof. Sohel Rahman
  • 129.  t adjusts the degree of exploitation in the algorithm  t is very long => we’re doing more hill- climbing  more exploiting  t is very short => we’re spending more time in the outer algorithm  more exploring. 129 Prof. Sohel Rahman
  • 130.  There are many ways to mix an exploitative (and likely local) algorithm with an explorative (usually global) algorithm.  Example:  Hill-Climbing with Random Restarts: combines Hill-Climbing (local) with Random Search (global).  Indeed, the local-improvement algorithm doesn’t even have to be a metaheuristic:  it could be a machine learning or heuristic algorithm, for example. 130 Prof. Sohel Rahman
  • 131.  the overall family of algorithms that combines some kind of global optimization algorithm with some kind of local improvement algorithm in some way may be called Memetic Algorithm  Though this term encompasses a fairly broad category of stuff, the lion’s share of memetic algorithms in the literature have been hybrids of global search (often evolutionary computation) and hill-climbing. 131 Prof. Sohel Rahman
  • 132.  Elitism  Steady-State Genetic Algorithm (and Generation Gap methods)  Genetic Algorithm with a Tree-Style Genetic Programming Pipeline  Hybrid Evolutionary and Hill-Climbing Algorithms  Scatter Search with Path Relinking. highly-fit parents can compete with their children directly augment evolution with hill- climbing 132 Prof. Sohel Rahman
  • 134.  Combination of the followings:  hybrid evolutionary and hill climbing algorithm  line recombination  (mu + lambda)  an explicit procedure to inject some diversity (exploration)  Standard Scatter Search with Path Relinking is quite complex. 134 Prof. Sohel Rahman
  • 135.  Starts with a set of initial seeded individuals (supplied)  Then it tries to produce a large number of random individuals that are very different  from one another and  from the seeds.  These, plus the seeds, form the population.  Then we do some hill-climbing on each of the individuals to improve them.  The we do the following loop… 135 Prof. Sohel Rahman
  • 136.  First, we truncate the population to a small size consisting of some very fit individuals and some very diverse individuals (to force diversity).  Then we perform some kind of pairing up and crossover (usually using line recombination) plus, possibly, some mutating for good measure.  Then we do hill-climbing on these new individuals  add them to the population  and repeat the loop. 136 Prof. Sohel Rahman
  • 138. Do some HC to improve P_i We do line recombination (crossover) Generally, Scatter Search does not mutate 138 Prof. Sohel Rahman
  • 139.  We need a distance measure among individuals  We may use Euclidian distance (assuming that the individuals are real valued vectors)  Then, the diversity of an individual is its sum distance from everyone 139 Prof. Sohel Rahman
  • 140.  Producing a “diverse” individual is mostly ad-hoc:  Way #1:  Generate a lot of individuals  then select a subset of them using a tournament selection based on maximum diversity from the seeds.  Way #2:  find gene values uncommon among the seeds and build an individual with them. 140 Prof. Sohel Rahman