Ralph Vince - Portfolio Mathematics

(Brent) #1

The Leverage Space Model 319


has a scaled fitness score of .05, the second has one of .1, and the
third .08, then they are set up in a selection scheme as follows:

First candidate 0 to .05
Second candidate .05 to .15
Third candidate .15 to .23

This continues until the last candidate has its upper limit at 1.0.
Now, two random numbers are generated between 0 and 1, with
the random numbers determining from the preceding selection
scheme who the two parents will be. Two parents must now be
selected for each candidate solution of the next generation.
c.Crossover. Go through each bit of thechild, the new population
candidate. Start by copying the first bit of the first parent to the
first bit of the child. At each bit carryover, you must also generate
a random number. If the random number is less than or equal to
(probability of crossover/gene length), then switch to copying the
bits over from the other parent. Thus, if we have three scenario
spectrums and 12 bits per each variable, then the gene length is 36.
If we use a probability of crossover of .6, then the random number
generated at any bit must be less than .6/36, or less than .01667, in
order to switch to copying the other parent’s code for subsequent
bits. Continue until all the bits are copied to the child. This must be
performed for all new population candidates.
Typically, probabilities of crossover are in the range .6 to .9. Thus,
a .9 probability of crossover means there is a 90% chance, on average,
that there will be crossover to the child, that is, a 10% chance the
child will be an exact replicant of one of the parents.
d.Mutation. While copying over each bit from parent to child, gener-
ate a second random number. If this random number is less than
or equal to the probability of mutation, then toggle that bit. Thus, a
bit which is 0 in the parent becomes 1 in the child and vice versa.
Mutation helps maintain diversity in the population. The probability
of mutation should generally be some small value (i.e.,<=.001); oth-
erwise the algorithm tends to deteriorate into a random search. As
the algorithm approaches an optimum, however, mutation becomes
more and more important, since crossover cannot maintain genetic
diversity in such a localized space in then+1 terrain.

Now you can go back to step three and perform the process for the next
generation. Along the way, you must keep track of the highest objective
function returned and its corresponding gene. Keep repeating the process

Free download pdf