Population Parameters

Top  Previous  Next

 

Population size - the population size is the size of the genetic breeding pool, i.e., the number of individuals that fill the population.  If this parameter is set too low, there will not be enough different kinds of individuals to solve the problem well.  If there are too many in the population, a good solution will take far too long to find because the fitness function must be calculated for every individual in every generation.  Excel is relatively slow at executing the fitness function in the formulas (as compared to executing fitness functions from a C or Visual Basic program).  Usually, between 20 and 200 individuals will give good results, and Population size=50 is a good number with which to start.  The maximum size you may select is 2000.

 

Chromosome length - recall from Implementation Details in Chapter 2, that the chromosome length is the number of genes in a chromosome (for continuous chromosomes).  This translates into the number of bits available to hold the variable in the computer.  More bits mean higher precision answers.  Suppose, for example, that you decide to find the minimum of y = x^2 for x between -5 and 5, which we already know in advance is zero.  If the chromosome length is 8 bits, then the "interval" between possible solutions is 1/256 or approximately .0039.  Since -5 will be mapped to 0 and 5 will be mapped to 255, and there are an even number (256) of positions between, then the closest you could get to zero is +-.0039/2 = +-.00195.  If the chromosome length is 32 bits, the best solution is closer to +- 0.0000000001!  So solutions may be much more precise with 32 bits.

 

Why not use 32 bit precision all the time?  The reason is that with 8 bits there are only 256 values to be searched for each chromosome, while with 32 bits there are 4,294,967,296!  Crossovers and mutations take much longer to make similar progress in this "larger space" of possible solutions.

 

In fact, one possible strategy for problem solving might be to first use 8 bit chromosomes until little progress is being made towards a better solution (no better solutions found after a reasonable number of generations).  Then interrupt evolution and change to 16 bits, making sure to tell GeneHunter to "Continue" searching instead of to "Start" searching.  Later, switch to 32 bits in the same way.  This method assumes, of course, that you require highly precise solutions, which might not be the case.

 

If you choose continuous chromosomes of the integer type, the parameter "Chromosome length" will not be used.  GeneHunter uses 2-byte integers to store integer chromosomes.  This allows you to mix, in one model, integer chromosomes with true continuous chromosomes of different ranges.