Selecting A Mate
Previous  Top  Next

For mating to occur, the individuals that will mate with each other must somehow be selected as a couple. In real life, mates chose each other, usually according to an attraction based upon a perceived fitness for mating. Quite a bit of variation occurs during the evaluation of fitness, which directly translates into the desirability for mating. This variation depends upon many factors, such as personal judgement, geographical limitations, whim, fancy, availability and emotional makeup, which all contribute to the variability in fitness determination. In Optimax, we simulate the mate selection process using a variety of algorithms, known as Fitness Calculations. You will choose the fitness calculation that Optimax will use to evaluate the fitness of an individual (a combination of inputs.) We will discuss this in more detail in the next section.

After Optimax has sent all of the individuals of a generation to TradeStation and fitness values received for each, the next step is to execute the mating process in order to build the next generation. Optimax begins this process by creating a mating pool. A mating pool is an area in memory into which all individuals that will be eligible for mating will be placed. The mating pool can hold more individuals than are in the current generation. Exactly which individuals and how many individual Optimax places within it depends on the mating options that you select.

Survival and Elitism
Another advanced feature found within Optimax is the ability to mate individuals spanning several generations. In real life, a person from an older generation can mate with a person of a younger generation. This can happen because the fitter the individual, the longer they survive and the better they are able to compete with younger individuals. Th fitter the individual, the longer they survive, and the more chances they have of mating to pass on their extremely fit genes.

This feature is known as elitism, and is an advanced, extremely useful feature uncommon in genetic optimization programs because of it's complexity in programming. The individuals that survive from previous generations to mate with the current population are known as elite individuals.

You will control how many individuals survive from generation to generation using the Elite Percent Taper value on the Optimization Settings window. For example, setting this value to 50 would mean that 50% of the individuals from the previous generation survived to mate with the current generation. These are the fittest 50% of the previous population, of course. With each passing generation, 50% of the population dies, so in the 3rd generation, 50% of generation 2 is available for mating, and 25% of generation 1.

The Maximum Life Span field controls the maximum number of generations an individual can survive. For example, when set to 4, elite individuals are available for four generations, including the first generation in which they existed. So if you are in generation 15, Optimax will select individuals from the current generation, the top 50% of the individuals from generation 14, the top 25% of the individuals from generation 13, the top 12.5% of the individuals from generation 12, and stop there.

The absolution maximum life span is 10 generations. A value of 0 turns the elitism feature off.

Filling the Mating Pool
The first thing Optimax does when filling the mating pool is to copy the top N percent of the current population into the pool, where N is the value in the Top Percent field. For example, a value of 80 causes Optimax to copy the top 80% fittest individuals to the mating pool. This feature weeds out the poorest performers.

Individuals with negative fitness values are always considered unfit for mating and are never copied into the mating pool.

Next, Optimax copies elite individuals from previous generations into the mating pool.

Next, using the least fit members of the current population, Optimax generates the number of genetic complements that you specified in the Genetic Complement Number field, and places them into the mating pool. If individuals with negative fitness values exist in the current population, they can and will be used to generate complements.

The mating pool is now full, and mate selection begins.

Basic Mate Selection
In basic mating selection mode, Optimax now chooses a pair of individuals for mating from the mating pool completely at random, and performs crossover and mutation operations to create a brand new individual. This process repeats until all individuals of the next generation have been created.

Basic mode is enabled when all other modes (described below) are disabled.

Tournament Selection
When you enter a Tournament Group Size field value greater than 0, you enable tournament selection mode. In this mode, when Optimax wants to choose an individual from the population for mating, it first selects a group of individuals at random. Imagine this group as if they were competing in a tiny sparring match, where the individual with highest fitness value wins. That individual is chosen for mating. This method mimics scenarios in nature where small groups of individuals arrive at the same location and compete with each other for a mate. In those scenarios, the fittest individual is the one who wins and mates with the individual they compete for. The same thing happens in Optimax when you enable tournament selection.

For example, if you specify Tournament Group Size 3, Optimax selects 3 individuals at random. Suppose the three individuals had fitnesses of 1.2, 6.4 and 5.39. Optimax would deem the individual with the 6.4 fitness as the winner of the tournament and would select it for mating. Optimax would repeat this for a second individual, perhaps selecting 3 individuals with fit, and those two individuals would then mate.

This selection mode puts pressure on the selection process to select fitter individuals more frequently than the less fit individuals. The result helps to ensure that the fittest individuals mate more frequently than less fit individuals. The larger the group size, the more frequently the fittest individuals will be selected for mating. However, you need to maintain diversity in the gene pool, so Optimax will search many parts of the fitness landscape, so putting too much pressure on the fittest individuals will reduce your chances of discovering all of the landscape maximums, and thus reduce your chances of discovering the optimal solution.

Disable this selection mode by specifying 0 in the Tournament Group Size field.

Roulette Selection
In roulette selection mode, individuals are selected for mating at random but the probability of an individual being selected is proportional to it's fitness (relative to the others in the mating pool.) In this mode, the fittest individuals are selected more frequently than the less fit individuals, according to the frequency distribution of the fitnesses in the current generation.

For example, if you had a generation with only 3 individuals with fitness values of 10, 20 and 30, then the individual with the fitness value of 30 would be selected from the pool for mating three times more often than the one with the fitness value of 10. The individual with the fitness value of 20 would be selected for mating twice as often as the individual with fitness value 10.

The value you specify in the Roulette Scaling Factor field controls the strength of the weighting. The example in the previous paragraph is an example of a scaling factor of 1. If you were to specify a scaling factor of 2, then the individual with fitness 30 would be selected six times more often than the fitness 10 individual, and the fitness 20 individual four times as often. If you specify a scaling factor of 0.5, the selection pressure is reduced and the fitness 30 individual would only be selected 1.5 times as often as fitness 10, and fitness 20 would be selected 1.25 times as often.

Specifying a Roulette Scaling Factor of 0 turns roulette selection off.

Tournament and Roulette Selection
If both tournament and roulette selection modes are enabled, the individuals for each tournament are selected using the roulette selection method instead of at random. This can place additional pressure on the fitter members of the generation by selecting them even more frequently than either method alone, or with a low scaling factor and a small number of members in the tournament, you can end up with approximately the same about of pressure on fit members but with a more complex selection method that mimics natural methods better than either alone.

Incest Filtering
For all mate selection methods, before Optimax performs each mating operation it checks the Hamming distance between the two individuals to determine how closely related they are. If the Hamming distance is less than the value you specified in the Min nHamming Distance field, the individuals are considered too closely related, the match is rejected, and two new individuals are selected for mating instead. This is an advanced feature known as incest filtering. Every set of individuals is incest-checked before mating occurs.

Near the end of a successful optimization, individuals become more and more alike as they hone in on optimal solutions. Under those circumstances it is possible that all couples could be rejected because they fail the incest test, and the optimization would not continue. Optimax has a built-in mechanism to prevent this situation from occurring. If 10 couples are rejected because they are too closely related, after the 10th rejection, the Min nHamming Distance is divided in half and the process continues with the reduced distance value. This halving occurs each time 10 consecutive couples are rejected, and will always result in a Hamming value that will allow the most distant individuals to mate before the most closely related couples, no matter what the diversity may be in the mating pool.

When halved, the new Hamming distance is used for all future tests within the current optimization.

Summary of Advanced Features
Mate selection is an extremely important part of the evolutionary mechanism. Optimax gives you many more options than are available in any other genetic search programs:

·dynamic mating pool size  
·elitism  
·incest filtering  
·multiple mate selection modes, including simultaneous modes (unavailable anywhere else)  
·scalable roulette weighting (unavailable anywhere else)  

These are only some of the advanced genetic features available in Optimax. No other genetic algorithms implement this much flexibility in mating, or provide as many options for your to control the mating process. Since mating is at the core of the evolutionary process, these advanced options are exceptionally valuable and having them available for your use can make a world of difference during your optimizations.