There are two competing factors that need to be balanced in the selection process: selective pressure and genetic diversity. Selective pressure, the tendency to select only the best members of the current generation to propagate to the next, is required to direct the genetic algorithm to an optimum. Genetic diversity, the maintenance of a diverse solution population, is also required to ensure that the solution space is adequately searched, especially in the earlier stages of the optimization process. Too much selective pressure can lower the genetic diversity so that the global optimum is overlooked and the genetic algorithm converges prematurely. Yet, with too little selective pressure, the genetic algorithm might not converge to an optimum in a reasonable time. A proper balance between the selective pressure and genetic diversity must be maintained for the genetic algorithm to converge in a reasonable time to a global optimum.
The GA procedure uses a standard technique for the selection process commonly known as tournament selection. In general, the tournament selection process randomly chooses a group of members from the current population, compares their fitness, and selects the fittest from the group to propagate to the next generation. Tournament selection is one of the fastest selection methods, and it offers good control over the selection pressure.
You can control the selective pressure by specifying the tournament size, the number of members chosen to compete in each tournament. This number should be 2 or greater, with 2 implying the weakest selection pressure. Tournament sizes from 2 to 10 have been successfully applied to various genetic algorithm optimizations, with sizes over 4 or 5 considered to represent strong selective pressure. This selection option is chosen with the following SetSel call :
call SetSel(
'tournament', 'size', size);
where size is the desired tournament size.
For tournament size of 2, you can further weaken the selective pressure by specifying a probability for selecting the most fit solution from the 2 competing solutions. By default this probability is 1, but the GA procedure permits you to set it to a value between 0.5 (equivalent to pure random selection) and 1. This selection option is chosen with the following SetSel call :
call SetSel(
'duel', 'pbest', bestprob);
where bestprob is the probability for choosing the most fit solution. This option can prove useful when conventional tournament selection tends to result in premature convergence.
One potential problem with tournament selection is that it does not guarantee that the best solution in the current generation is passed on to the next. To resolve this problem, the GA procedure enables you to specify an elite parameter, which ensures that the very best solutions are passed on to the next generation unchanged by mutation or crossover. Use the SetElite call :
call SetElite(
elite);
where elite is an integer greater than or equal to 0. The GA procedure preserves the elite best solutions in the current generation and ensures that they are passed on to the next generation unchanged. When writing out the final solution population, the first elite members are the best of the generation and are sorted by their fitness, such that the fittest is first. By default, if you do not call SetElite in your program, an elite value of 1 is used. Setting the elite parameter to a higher number accelerates the convergence of the genetic algorithm; however, it can also lead to premature convergence before reaching a global optimum, so it should be used with care.
If you do not call SetSel in your input, then the default behavior for the GA procedure is to use tournament selection with size 2.