Why do GAs work? Symbol alphabet : {0, 1, * } * is a wild card symbol that matches both 0 and 1 A...
-
Upload
toby-norris -
Category
Documents
-
view
213 -
download
0
Transcript of Why do GAs work? Symbol alphabet : {0, 1, * } * is a wild card symbol that matches both 0 and 1 A...
Why do GAs work?
Symbol alphabet : {0, 1, * }
* is a wild card symbol that matches both 0 and 1
A schema is a string with fixed and variable symbols
01*1* template which matches 01010 01011 01110 01111
Notice that the symbol * is never actually manipulated by the GA, it is only a notational device that makes it easier to talk about families of strings
Schemata and Building Blocks
Every evaluated string gives partial information about the fitness of the set of possible schematas of which the string is a member
Under fitness-proportionate replication the number m of individuals in the population belonging to a particular schemata H at time t+1 is related to the same number at time t by:
Where f is the average fitness value of the strings representing schema H, while is the average fitness value over all strings in the population
))(/)()(,()1,( tftftHmtHm H
f
Schemata and Building Blocks
If one assumes that a particular schema remains above the average by a fixed amount for a number t of generations then the solution of the above recirrence is the following exponential growth equation
m(H,t)=m(H,0)(1+c)t
Where m(H,0) stands for the number of schemata H in the population
at time 0, c is a positive constant
Fitness-proportionate reproduction allocates exponentially increasing number of trials to above average schemata
)(tfc
Schemata and Building Blocks
The effect of crossover, which breaks strings apart, is to diminish the exponential increase by a quantity that is proportional to the crossover rate pc and depends on the defining length of a schema and on the string length
1)(
lH
pc
The defining lenth of a given schema is the distance between the firstand the last fixed string positions01*1* is 3 and **1*1010 is 5 therefore short defining length schemata will be less disrupted by a single point crossover…above average schemata with short defining lengths will still be sampled at an exponentially increasing rate
Schemata and Building Blocks
If the mutation probability is pm then the probability of survival of a single bit is 1-pm
Since single bit mutations are independent the total survival probability is thus (1-pm)n where n is the string length
for schemata only the fixed positions matter(1-pm)o(H) where order o(H) of a schema H equals n
minus the number of do not care symbols
Probability of surviving a mutation for pm <<1 can be approximated by 1-o(H)pm
Schemata and Building Blocks
Putting together the effects of reproduction, crossover and mutation we have the schema theorem
This says that the number of short, low-order, above average schemata grows exponentially in subsequent generations of a genetic algorithm
])(1)(
1[)()(
),()1,( mcH pHo
lH
ptftf
tHmtHm
Schemata and Building Blocks
The schema theorem characterizes the successful building blocks of GA chromosome structures
Those schemata with
short defining length,
with little fixed positions and
with instances of above-average fitness
will reproduce exponentially from generation to generation.
Building Block Hypothesis
A genetic algorithm seeks near-optimal performance through the juxtaposition of short, low-order, high-performance schemata, called the building blocks
Consequence: the manner in which we encode a problem is critical for the performance of a GA - it should satisfy the idea of short building blocks
Some Further ResultsSelection
If we only have proportional selection operator, the limitation distribution of chromosome is:
JHJP
HP
JH
HPHP kk
)(
)(
0
)(lim)(
0
0
Some Further ResultsSelection
Tournament selection should allow repetitive choosing. If not, the chromosome would never appear in the new generation
qqN
qqkN
qqN
qqkN
k C
C
C
CxP
1
11
1
11)1()1()(
Some Further ResultsCrossover
One-point crossover
For some common crossover operators
))(
)()(()1)(1(
+
)()1(
)(
211
1
11111
211
21
nk
n
inikik
c
nkc
nk
xxxP
xxPxxNPNn
p
xxxPp
xxxP
)()()(lim 00 11 nn iiiikk
xPxPxxP
)()()(11 nn iiii xPxPxxP
Some Further ResultsCrossover
With the crossover operator, 1) the genes will be independent; 2) the schema will be searched only if the genes it contains exist in the initial population; 3) the limitation probability of the schema equals the product of the initial probability of the genes and has nothing to do with the definition length.
Some Further ResultsMutation
In spite of the value of the mutation probability , any schema will be found by the mutation operator. The limitation probability of the schema with same order is same. And this limitation probability only depends on the order and has nothing to do with the definition length.
niikk n
xxP2
1)(lim
1
Inherently parallel
O(n3) schemata are processed while n chromosomes are processed.
Convergence
The Genetic algorithm with mutation probability pm(0,1), crossover probability pc[0,1] and proportional selection does not converge to the global optimum.
If the genetic algorithm maintaining the best solution found over time before selection converges globally optimum.
Premature convergence
The population converged to an unacceptable poor solution
increase mutation rate
adaptive mutation rate
larger population or lower selection pressure
(but with low selection or high mutation Gas will behave like a random search)
Gray Coding
Desired: points close to each other in representation space also close to each other in problem space
This is not the case when binary numbers represent floating point values
m is number of bits in representation
binary number b = (b1; b2; ; bm)
Gray code number g = (g1; g2; ; gm)
Gray Coding
Binary gray code 000 000 001 001 010 011 011 010 100 110 101 111 110 101 111 100
Gray Coding
PROCEDURE Binary-To-Gray
g1=b1
for k=2 to m do
gk=b k-1 XOR bk
endfor
Gray Coding
PROCEDURE Gray-To-Binary
value = g1 b1 = value for k = 2 to m do if gk = 1 then value = NOT value end if bk =value end for
Real-valued representation
A very natural encoding if the solution we are looking for is a list of real-valued numbers, then encode it as a list of real-valued numbers! (i.e., not as a string of 1’s and 0’s)
Lots of applications, e.g. parameter optimisation
Real valued representationRepresentation of individuals
Individuals are represented as a tuple of n real-valued numbers:
The fitness function maps tuples of real numbers to a single real number:
Rx
x
x
x
X i
n
,2
1
RRf n :
Recombination for real valued representation
Discrete recombination (uniform crossover): given two parents one child is created as follows
a db fc e g h
FD GE HCBAa b C Ed Hgf
Recombination for real valued representation
Intermediate recombination: given two parents one child is created as follows
a db fc e
FD ECBA
(a+A)/2 (b+B)/2 (c+C)/2 (e+E)/2(d+D)/2 (f+F)/2
Recombination for real valued representation
Arithmetic crossover: given two parents one child is created as follows
a db fc e
FD ECBA
xa+(1-x)A xb+(1-x)B xc+(1-x)C xe+(1-x)Exd+(1-x)D xf+(1-x)F
Mutation for real valued representation
Perturb values by adding some random noise
Often, a Gaussian/normal distribution N(0,) is used, where 0 is the mean value is the standard deviation
and
x’i = xi + N(0,i)
for each parameter
Mutation for real valued representation
Perturb values by jumping randomly
if xi[a,b], then x’i = random(a,b)