Modified Version of Roulette Selection for Evolution Algorithms - the Fan Selection Adam S lowik, Micha l Bia lko Department of Electronic, Technical University of Koszalin, ul. Śniadeckich 2, 75-453 Koszalin, Poland e-mail: adamslowik@go2.pl Abstract. In this paper modified version of roulette selection for evolution algorithms - the fan selection, is presented. This method depends on increase of survive probability of better individuals at the expense of worse individuals. Test functions chosen from literature are used for determination of quality of proposed method. Results obtained for fan selection are compared with results obtained using roulette selection and elitist selection. 1 Introduction In literature we can find different methods of selection used in genetic algorithms. These are: roulette method, elitist method, deterministic methods, random choise method according to rest (with repetition and without repetition), randomly tournament method. But the most common selection methods used in practice are roulette and elitist methods. However in the roulette selection the best chromosome (solution) can be destroyed and schemata coded in it can be stopped to spread out. To avoid this situation the elitist selection is used, in which the best individual found is remembered and replaces an individual with the worst fitness in the next generation (when the best individual did not survive). With such an approach we know for sure that the best solution found will not be destroyed. However we can make a modification of the roulette method and increase survive probability for the best individual (survive schemata existing in it) without guarantee that the best individual will be in the next population for sure (thus, we assure a certain random factor during selection). Such a modification described in this paper is called the fan selection. 2 The Fan Selection In the fan selection a selection probability of the best individual (potential solution) is increased with a decrease of selection chances for other individuals, at the same time. Relative fitness values for particular individuals (that is probability values of selection to the next generation) are modified in suitable way using formulae (1) and (2):
For the best individual rfitness max = rfitness max +(1 rfitness max ) a (1) For other individuals ( rfitness =(1 rfitness max) rfitness + rfitness ) max (2) popsize 1 where: rfitness max-new relative fitness of the best individual; rfitness max -relative fitness of the best individual; a-parameter causing the fan expansion a [0, 1]; rfitness -new relative fitness of chosen individual; rfitness-relative fitness of chosen individual; popsize-population size Depending on value of parameter a, the value of selection probability for given individual (potential solution) changes as is show in Fig. 1. Fig. 1. Roulette wheel: roulette selection(a), fan selection for different a (b, c, d) 3 Experiments with Fan Selection Experiments were performed using evolutionary algorithm with individual representations in the form of lists of real numbers (each gene was represented by a real number from a given range). One point crossover (simple) and uniformly distributed mutation are used. Several test functions (from literature) are chosen for verification and comparison of different selection methods (abbreviation GM stands for global minimal value): De Jong function F1 3 i=1 x2 i ; -5.12 x i 5.12; GM=0 in (x 1, x 2, x 3 )=(0, 0, 0) De Jong function F2 100 (x 2 1-x 2 ) 2 +(1-x 1 ) 2 ; -2.048 x i 2.048; GM=0 in (x 1, x 2 )=(1, 1)
De Jong function F3 5 i=1 integer(x i); -5.12 x i 5.12; GM=-25 for all -5.12 x i 5.0 De Jong function F4 30 i=1 i x4 i ; -1.28 x i 1.28; GM=0 in (x 1, x 2,..., x 30 )=(0, 0,..., 0) De Jong function F5 1 1/K+ ; f 25 j=1 f 1 j (x 1,x 2) j(x 1,x 2 )=c j + 2 i=1 (x i a ij ) 6 ; -65.536 x i 65.536, [ ] 32 16 0 16 32 32 16... 0 16 32 K=500, c j = j, and [a ij ]= 32 32 32 32 32 16 16... 32 32 32 GM=0.998 in (x 1, x 2 )=(-32, -32) Schaffer function F6 0.5+ sin2 x 2 1 +x2 2 0.5 [1.0+0.001 (x 2 1 +x2 2 )]2 ; -100 x i 100; GM=0 in (x 1, x 2 )=(0, 0) Schaffer function F7 (x 2 1 + x 2 2) 0.25 [sin 2 (50 (x 2 1 + x 2 2) 0.1 )+1.0]; -100 x i 100; GM=0 in (x 1, x 2 )=(0, 0) Goldstein-Price function F8 [1 + (x 1 + x 2 +1) 2 (19 14 x 1 +3 x 2 1 14 x 2 +6 x 1 x 2 +3 x 2 2)] [30 + (2 x 1 3 x 2 ) 2 (18 32 x 1 +12 x 2 1 +48 x 2 36 x 1 x 2 +27 x 2 2)]; -2 x i 2; GM=3 in (x 1, x 2 )=(0, -1) Six-humps camel back function F9 [ 4 2.1 x 2 1 + x4 1 3 ] x 2 1 +x 1 x 2 +( 4+4 x 2 2) x 2 2;-3 x 1 3 and -2 x 2 2; GM=-1.0316 in (x 1, x 2 )=(-0.0898, 0.7126) and (0.0898, -0.7126) Coldville function F10 100 (x 2 x 2 1) 2 +(1 x 1 ) 2 +90 (x 4 x 2 3) 2 +(1 x 3 ) 2 + +10.1 ((x 2 1) 2 +(x 4 1) 2 )+19.8 (x 2 1) (x 4 1); -10 x i 10; GM=0 in (x 1,x 2,x 3,x 4 )=(1, 1, 1, 1) Evolutionary algorithms were searching for test function minima with different selection methods (roulette, elitist, fan). Evolutionary algorithm parameters were as follows: probability of crossover 0.7, probability of mutation 0.1, population size 50, fan expension parameter a 0.3, number of generations 100; computations were repeated 10 times. The best obtained values of minima are shown in Table 1, and in Table 2 average values of minima after 10-fold evolutionary algorithm (EA) running are presented.
Table 1. The best minimal function values after 10-fold EA repetition Test function GM Roulette Elitist Fan F1 0 0.0418242379 0.0042113859 0.0000541613 F2 0 0.0832227970 0.0178523657 0.0004724523 F3-25 -23-23 -25 F4 0 24.9520119980 8.9775226397 0.8073591386 F5 0.998 0.9980038468 0.9983851080 0.9980046406 F6 0 0.0222164039 0.0116290217 0.0100615968 F7 0 0.5523068587 0.7287314706 0.2766703935 F8 3 11.8576124230 4.53552008698 3.00122213608 F9-1.0316-1.0107767187-1.0011167311-1.0316258036 F10 0 788.6252691000 34.1297397950 0.8440666100 Table 2. Average values of function minima after 10-fold EA repetition Test function GM Roulette Elitist Fan F1 0 0.1841809694 0.1599502473 0.0023664491 F2 0 0.6953592685 0.5983826940 0.0677531789 F3-25 -21.8-22.3-24.9 F4 0 41.3072482397 24.3159325593 4.5070213132 F5 0.998 5.0637858363 3.0972643133 1.0068605951 F6 0 0.0630875070 0.0527291985 0.0237162355 F7 0 2.0273245243 1.4804677983 0.9439756637 F8 3 144.5219502725 31.2145634872 3.0448517040 F9-1.0316-0.8008051940-0.8829070527-1.0300083243 F10 0 1724.2734558910 363.4354645230 11.7094948051 It follows from Table 1, that the solutions found using the fan selection (after 100 generations) are much better than solutions found in the same run-time using roulette selection, and are better (or comparable) than solutions found using elitist selection. Also, average values after 10 repetitions (Table 2) show that the fan selection (for selected parameter a) is the most stable, that is it gives the least deviation from the best solutions. It is understandable, because higher part of the best individuals have a chance to enter to the next population. The highest differences we can find for De Jong function F4, Goldstein-Price function F8, and Coldvill function F10. Those differences apply to both the best solutions found after 100 generations and average values of solutions found in 10 subsequent tests. In the case of De Jong function F4 it is probably caused by fact, that this function has 30 variables, what with mutation probability of order of 0.1, and population size of order of 50 causes that during one generation, approximately 150 genes can be mutated. That means that each individual in the population will undergo mutation, that is the searching will have more random character. It is possible to conclude from this, that the fan selection behaves much better,
in the case of existence of large number of mutated genes in population, than remaining selection methods. In the second experiment it was examined how fan expanding parameter a influences the solution quality found by evolutionary algorithm. Here only parameter a was changed and has values selected from the range [0.1; 0.5], and other algorithm parameters were constant. Two function were chosen to this experiment: F6, because it has the lowest variations of average value (after 100 generations), and function F4 for which the highest variations of average value were observed (after 100 generations). The best values of function minima and their average values after 10 repetitions of evolutionary algorithm are shown in Table 3. Table 3. Influence of parameter a on function minimum values Function F6 Function F4 Param. a F thebest F average F thebest F average 0.10 0.00973789 0.02911110 11.66665770 17.66929815 0.15 0.00971622 0.03286266 6.82471561 14.25474764 0.20 0.00971812 0.01906702 5.03260339 9.58437152 0.30 0.00978173 0.02835693 2.33821870 4.21488056 0.50 0.01006137 0.03371673 0.31903844 1.03942541 It follows from Table 3, that in the case of Schaffer F6 function, increasing of value of the parameter a does not cause considerable improvement in obtained results. We can conclude from this, that in the case when the computed function values are slightly spread around the minimum value (it may happen when algorithm converges to the best solution or local extremum), the increase of the fan expanding parameter a does not improve significantly the results. In the case of De Jong F4 function the increase of parameter a value causes considerable improvement of obtained minima and improve algorithm convergence (during the same run-time better and better solutions are found). In the subsequent experiment performed, an algorithm convergence with the fan selection (for different a values) was checked and compared with roulette and elitist selections. Evolutionary algorithm parameters were the same as before. Computations were repeated 10 times after each change of parameter a. Evolutionary algorithm with fan selection has shown the same or better convergence for all test functions. In Fig. 2 average values of function F4 minima for different selection methods are presented (signs represent: -roulette, o-elitist, -fan); global extremum has value 0; X axis represents generation number, and Y axis represent average values of function minima for 10 repetitions of evolutionary algorithm.
Fig. 2. Average values of minima: a=0.00 (a), a=0.05 (b), a=0.15 (c); From graphs of Fig. 2 we can see, that in case when parameter a is equal to 0.0 then fan selection is similar to roulette selection. When value of parameter a is equal to 0.05 then results for fan selection are placed between results for roulette selection and results for elitist selection. For parameter value a=0.15 obtained results using fan selection are better than two remaining selections. From graphs of Fig. 2 is also visible, that together with increase of parameter a value a random dispersion of generated results by the fan selection becomes smaller. Summing up, we can observe, that a new selection method called the fan selection is better or not worse than roulette and elitist selections. References 1. Z. Michalewicz, Genetic Algorithms + Data Structures = Evolution Programs (in polish), WNT, Warsaw, 1999 2. D. Goldberg, Genetic Algorithms in Search, Optimization, and Machine Learning (in polish), WNT, Warsaw, 1998 3. J. Arabas, Lectures of evolutionary algorithms (in polish), WNT, Warsaw, 2001