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 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
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
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 p c and depends on the defining length of a schema and on the string length The defining lenth of a given schema is the distance between the first and the last fixed string positions 01*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 p m then the probability of survival of a single bit is 1-p m Since single bit mutations are independent the total survival probability is thus (1-p m ) n where n is the string length for schemata only the fixed positions matter (1-p m ) 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 p m <<1 can be approximated by 1-o(H)p m
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
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 Results Selection If we only have proportional selection operator, the limitation distribution of chromosome is:
Some Further Results Selection Tournament selection should allow repetitive choosing. If not, the chromosome would never appear in the new generation
Some Further Results Crossover One-point crossover For some common crossover operators
Some Further Results Crossover 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 Results Mutation 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.
Inherently parallel O(n 3 ) schemata are processed while n chromosomes are processed.
Convergence The Genetic algorithm with mutation probability p m (0,1), crossover probability p c [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
Gray Coding PROCEDURE Binary-To-Gray g 1 =b 1 for k=2 to m do g k =b k-1 XOR b k 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 representation Representation 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:
Recombination for real valued representation Discrete recombination (uniform crossover): given two parents one child is created as follows adbfcegh FDGEHCBA abCEdHgf
Recombination for real valued representation Intermediate recombination: given two parents one child is created as follows adbfce FDECBA (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 adbfce FDECBA xa+(1-x)Axb+(1-x)Bxc+(1-x)Cxe+(1-x)Exd+(1-x)Dxf+(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 = x i + N(0, i ) for each parameter
Mutation for real valued representation Perturb values by jumping randomly if x i [a,b], then x’ i = random(a,b)