Internatonal Journal of Machne Learnng and Computng, Vol. 2, o. 4, August 2012 Blendng Roulette Wheel Selecton & Rank Selecton n Genetc Algorthms Rakesh Kumar, Senor Member, IACSIT and Jyotshree, Member, IACSIT Abstract Both exploraton and explotaton are the technques employed normally by all the optmzaton technques. In genetc algorthms, the roulette wheel selecton operator has essence of explotaton whle rank selecton s nfluenced by exploraton. In ths paper, a blend of these two selecton operators s proposed that s a perfect mx of both.e. exploraton and explotaton. The blended selecton operator s more exploratory n nature n ntal teratons and wth the passage of tme, t gradually shfts towards explotaton. The proposed soluton s mplemented n MATLAB usng travellng salesman problem and the results were compared wth roulette wheel selecton and rank selecton wth dfferent problem szes. Index Terms Genetc algorthm; rank selecton; roulette wheel; selecton. I. ITRODUCTIO Genetc algorthms are adaptve algorthms proposed by John Holland n 1975 [1] and were descrbed as adaptve heurstc search algorthms [2] based on the evolutonary deas of natural selecton and natural genetcs by Davd Goldberg. They mmc the genetc processes of bologcal organsms. Genetc algorthm works wth a populaton of ndvduals represented by chromosomes. Each chromosome s evaluated by ts ftness value as computed by the obectve functon of the problem. The populaton undergoes transformaton usng three prmary genetc operators selecton, crossover and mutaton whch form new generaton of populaton. Ths process contnues to acheve the optmal soluton. Basc flowchart of genetc algorthm s llustrated n Fg. 1. Generally all the optmzaton technques are nfluenced by two mportant ssues - exploraton and explotaton. Exploraton s used to nvestgate new and unknown areas n the search space and generate new knowledge. Explotaton makes use of the generated knowledge and propagaton of the adaptatons. Both technques have ther own merts and demerts. Both the terms are contradctory to each other and need to be balanced. In common vew, exploraton of search space s done by search operators n evolutonary algorthms and explotaton s done by selecton. It has been observed n prevous researches that any one technque s not enough to obtan best optmal soluton, especally wth large TSPs [3,4]. So, many researches are beng carred out to combne two or more algorthms n order to mprove performance and obtan better results. Manuscrpt receved May 27, 2012; revsed June 26, 2012. Rakesh Kumar s wth Department of Computer Scence & Applcatons, Kurukshetra Unversty, Kurukshetra, Haryana, Inda (e-mal: rsgawal@gmal.com). Jyotshree s wth Department of Computer Scence, Guru anak Grls College, Yamunanagar, Haryana, Inda (e-mal: yotshreer@gmal.com). Defne ftness functon Generate ntal 5populaton Evaluate ftness of each chromosome Selecton Crossover Mutaton Replace old populaton by new generaton Convergence check Fg. 1. Basc flowchart of genetc algorthm In ths paper, focus s to blend the two selecton operators and generate a new selecton operator to obtan perfect mx of exploraton and explotaton. The blended selecton operator shows exploratory nature ntally and shfts to explotaton later. The paper s organzed n the followng sectons. In secton II, lterature revew s gven on dfferent researches usng combnaton technques related to ths feld. Dfferent notatons used throughout the paper are gven n secton III. Selecton methods and ther computaton formulae are descrbed n secton IV. Algorthms related to selecton methods under study n ths paper are presented n secton V. Implementaton procedure and computatonal results are provded n secton VI and concludng remarks are gven n secton VII. II. RELATED WORK Holland showed that both exploraton and explotaton are used optmally by genetc algorthm at the same tme usng k-armed bandt analogy [1]. Ths work s also descrbed by Davd Goldberg [2]. It has been observed that due certan parameters, stochastc errors occur n genetc algorthms and ths may lead to genetc drft [5,6]. In certan cases, selecton operaton gets based towards hghly ft ndvduals. Ths can be avoded by use of Rank Selecton technque. Rank scalng ranks the ndvduals accordng to ther raw obectve value [2]. Another problem that arses wth genetc algorthms s premature convergence whch 365
Internatonal Journal of Machne Learnng and Computng, Vol. 2, o. 4, August 2012 occurs when the populaton reaches a state where genetc operators can no longer produce offsprng that outperforms ther parents [7]. Ths would lkely trap the search process n a regon contanng a non-global optmum and would further lead to loss of dversty. Genetc algorthms and smulated annealng are wdely used n search and optmzaton problems. Dan Adler proposed a method of hybrdzng genetc algorthms wth smulated annealng and replaced standard mutaton and recombnaton operator by ther smulated annealng varants SAM and SAR [8]. The hybrd algorthm mproved accuracy of genetc algorthm and exhbted more consstency. Modfed operators mproved convergence and speed of smulated annealng. Eben and Schppers [9] surveyed dfferent operators and revewed dfferent exstng vewponts on exploraton and explotaton. They dstngushed three levels at whch exploraton and explotaton occur. Selecton was found to be source of explotaton and mutaton and crossover were adudged as source of exploraton. Van Dck etal proposed 2-stage GA based feature subset selecton algorthm n whch the correlaton structure of the features was exploted [10]. Smulatons on a real-case data set wth correlated features showed that the 2-stage GA found better solutons n fewer generatons compared to a standard GA. Al addan et al. compared the roulette wheel selecton GA (RWS) and ranked based roulette wheel selecton GA (RRWS), by applyng them on eght test functons from the GA lterature [11]. They concluded that RRWS outperformed the conventonal RWS n convergence, tme, relablty, certanty, and more robustness. Tsenov proposed a combned way of usng smulated annealng and genetc algorthm on telecommuncatons concentrator networks and obtaned good performance [12]. Eben et al. suggested that the selecton pressure s an aggregated parameter determned collectvely by the ndvduals n the populaton. They mplemented ther vewpont n two dfferent ways Self adaptaton and hybrd self adaptaton [13]. They compared three genetc algorthms n ther study - Smple GA (SGA) as benchmark, the GA wth hybrd self adaptve tournament sze (GAHSAT), and the GA wth self adaptve tournament sze (GASAT). They concluded that GAHSAT was very compettve and lead to 30-40% performance ncrease n terms of speed. Wang et.al proposed a new hybrd of genetc algorthm and smulated annealng, referred to as GSA and then evaluated ts performance aganst a standard set of benchmark functons [14]. otably, there was remarkable mprovement n performance of Mult-nche crowdng PGSA and normal PGSA over conventonal parallel genetc algorthm. Lu et.al. proposed a new heurstc algorthm for classcal symmetrc TSP and tested ts performance aganst benchmark TSP problems [15]. They presented overlapped neghbourhood based local search algorthm to solve TSP and concluded that the proposed algorthm s superor n terms of average devaton and smallest devaton from optmal solutons. In order to mprove the balance between the exploraton and explotaton n dfferental evoluton algorthm, Sa Angela et al. proposed a modfcaton of the selecton that was successful n avodng entrapment n local optma and could be helpful n many real world optmzaton problems [16]. R.Thamlselvan and P.Balasubramane presented a Genetc Tabu search Algorthm (GTA) for TSP and compared wth Tabu search [17]. They concluded that GTA s better than GA and TS. Elhaddad and Sallab proposed a new Hybrd Genetc and Smulated Annealng Algorthm (HGSAA) to solve the TSP [18]. The proposed hybrd algorthm combned both the SA and GAs, n order to help each other overcome ther problems to obtan the best results n the shortest tme. HGSAA mproved the convergence rate of the algorthm wth better solutons to TSP compared wth other algorthms. III. OTATIOS Some of the symbols used n these algorthms are lsted below: ngen total number of generatons nogen current number of generaton total populaton sze PS Problem Sze, n terms of number of ctes RWS Roulette Wheel Selecton RS Rank Selecton PBS Proposed Blended Selecton FRW, ftness of th ndvdual n th generaton for roulette wheel selecton r, rank of th ndvdual n th generaton for rank selecton rsum sum of ranks n th generaton, ftness of th ndvdual n th generaton for proposed blended selecton mpool number of chromosomes n matng pool C Generaton number after whch there was no change n populaton Average Ftness of the populaton n th generaton n Proposed Blended Selecton FRW Average Ftness of the populaton n th generaton n Roulette Wheel Selecton FR Average Ftness of the populaton n th generaton n Rank Selecton F best Best Ftness value.e. mnmum dstance of the route computed n all generatons FR Average Ftness of the populaton n all generatons n Rank Selecton FRW Average Ftness of the populaton n all generatons n Roulette Wheel Selecton Average Ftness of the populaton n all generatons n Proposed Selecton IV. SELECTIO Selecton s the frst genetc operaton n the reproductve phase of genetc algorthm. Its purpose s to choose the ftter ndvduals n the populaton that wll create offsprngs for next generaton, commonly known as matng pool. The matng pool thus selected takes part n further genetc operatons, advancng the populaton to the next generaton and hopefully close to the optmal soluton. Selecton of ndvduals n the populaton s ftness dependent and s 366
Internatonal Journal of Machne Learnng and Computng, Vol. 2, o. 4, August 2012 done usng dfferent algorthms [19]. Selecton chooses more ft ndvduals n analogy to Darwn s theory of evoluton survval of fttest [20]. Too strong selecton would lead to sub-optmal hghly ft ndvduals and too weak selecton may result n too slow evoluton [21]. There are many methods n selectng the best chromosomes. Some are roulette wheel selecton, rank selecton, steady state selecton and many more. The paper would focus on frst two approaches and compare them wth proposed selecton approach. A. Roulette Wheel Selecton Roulette wheel s the smplest selecton approach. In ths method all the chromosomes (ndvduals) n the populaton are placed on the roulette wheel accordng to ther ftness value [2,19,22]. Each ndvdual s assgned a segment of roulette wheel. The sze of each segment n the roulette wheel s proportonal to the value of the ftness of the ndvdual - the bgger the value s, the larger the segment s. Then, the vrtual roulette wheel s spnned. The ndvdual correspondng to the segment on whch roulette wheel stops are then selected. The process s repeated untl the desred number of ndvduals s selected. Indvduals wth hgher ftness have more probablty of selecton. Ths may lead to based selecton towards hgh ftness ndvduals. It can also possbly mss the best ndvduals of a populaton. There s no guarantee that good ndvduals wll fnd ther way nto next generaton. Roulette wheel selecton uses explotaton technque n ts approach. The average ftness of the populaton for th generaton n roulette wheel selecton s calculated as FRW = 1 FRW = (1), where vares from 1 to ngen and vares from 1 to. Therefore, the probablty for selectng the th strng s FRW PRW = 1 = (2) FRW where s the populaton sze and FRW s the ftness of ndvdual. B. Rank Selecton Rank Selecton sorts the populaton frst accordng to ftness value and ranks them. Then every chromosome s allocated selecton probablty wth respect to ts rank [23]. Indvduals are selected as per ther selecton probablty. Rank selecton s an exploratve technque of selecton. Rank selecton prevents too quck convergence and dffers from roulette wheel selecton n terms of selecton pressure. Rank selecton overcomes the scalng problems lke stagnaton or premature convergence. Rankng controls selectve pressure by unform method of scalng across the populaton. Rank selecton behaves n a more robust manner than other methods [24,25]. In Rank Selecton, sum of ranks s computed and then selecton probablty of each ndvdual s computed as under: rsum = r (3) = 1, where vares from 1 to ngen and vares from 1 to. r, PRAK = (4) rsum C. Proposed Annealed Selecton The proposed selecton approach s to move the selecton crtera from exploraton to explotaton so as to obtan the perfect blend of the two technques. In ths method, ftness value of each ndvdual s computed. Dependng upon the current generaton number of genetc algorthm, selecton pressure s changed and new ftness contrbuton, X, of each ndvdual s computed. Selecton probablty of each ndvdual s computed on the bass of X,. As the generaton of populaton changes, ftness contrbuton changes and selecton probablty of each ndvdual also changes. The proposed blended selecton operator computes ftness of ndvdual dependng on the current number of generaton as under: FRW = (5) ( ngen + 1) nogen The probablty for selectng the th strng s PX = (6) = 1 V. ALGORITHMS Algorthms of three methods of selecton to be compared n the paper are gven below. Here, c s varable storng cumulatve ftness and r s random number generated between gven nterval. A. Roulette wheel selecton 1. Set l=1, =1, =nogen 2. Whle l <= mpool a) Whle <= Compute FRW, b) Set =1, S=0 c) Whle <= Compute S=S+FRW, d) Generate random number r from nterval (0,S) e) Set =1, S=0 f) Whle <= Calculate c =c -1 +FRW, If r<=c, Select the ndvdual g) l=l+1 367
Internatonal Journal of Machne Learnng and Computng, Vol. 2, o. 4, August 2012 B. Rank Selecton 1. Set l=1, =1, =nogen 2. Whle l <= mpool a) Whle <= Compute rsum, b) Set =1 c) Whle <= Compute PRAK d) Generate random number r from nterval (0,rsum) e) Set =1, S=0 f) Whle <= Calculate c =c -1 +PRAK If r<=c, Select the ndvdual g) l=l+1 C. Proposed Annealed selecton 1. Set l=1, =1, =nogen 2. Whle l <= mpool a) Whle <= Compute, b) Set =1, S=0 c) Whle <= Compute S=S+, d) Generate random number r from nterval (0,S) e) Set =1, S=0 f) Whle <= Calculate c =c -1 +, If r<=c, Select the ndvdual g) l=l+1 VI. IMPLEMETATIO AD OBSERVATIO In ths paper, MATLAB code has been developed to assess the performance of genetc algorthm by usng three dfferent selecton technques on the same populaton. for ts mplementaton usng the same ntal populaton. Except selecton crtera, all other factors affectng the performance of genetc algorthm are kept constant. The code consders the Travellng Salesman Problem (TSP) whch s a classcal combnatoral optmzaton problem. The problem s to fnd the shortest tour or Hamltonan path through a set of vertces so that each vertex s vsted exactly once [26]. The problem s solved under followng assumptons: Each cty s connected to every other cty. Each cty has to be vsted exactly once, The salesman s tour starts and ends at the same cty. The TSP problem have been consdered for four dfferent populaton szes 10 ctes, 20 ctes, 50 ctes and 100 ctes. The soluton was run for 100 generatons n each case. Frstly, the rank selecton s appled and then the roulette wheel selecton followed by the mplementaton of proposed blended selecton operator on the same populaton. Convergence pont of populaton was noted when no further changes occurred n the generaton. Average and mnmum ftness n each generaton s computed over 100 generatons and plotted to compare the performance of three approaches. Fg. 2 depcts the comparson of FRW, FR, and Fg. 3 depcts the comparson of F best n three dfferent selecton methods. Table I lsts the detaled data for four dfferent problem szes and varous parameters to analyze performance of the three methods. Comparson of FRW, FR, s presented n Fg. 4 and comparson of F best n Fg. 5. Mnmum Dstance Average Dstance 260 250 240 230 220 210 200 190 180 170 Comparson of average dstance n three approaches of Selecton Roulette wheel selecton Rank selecton Proposed selecton 160 0 10 20 30 40 50 60 70 80 90 100 Generaton 240 220 200 180 160 140 Fg. 2. Comparson of average dstance of TSP tour Comparson of mnmum dstance n three approaches of Selecton Roulette wheel selecton Rank selecton Proposed selecton 120 0 10 20 30 40 50 60 70 80 90 100 Generaton Fg. 3. Comparson of mnmum dstance of TSP tour 368
Internatonal Journal of Machne Learnng and Computng, Vol. 2, o. 4, August 2012 TABLE I: COMPARISO OF THREE SELECTIO APPROACHES PS RS RWS PBS Fbest C Fbest FR C Fbest FRW C 100 424.78 97 525.24 424.78 15 520.21 417.19 96 457.14 50 181.94 98 253.15 176.70 30 220.42 163.43 94 209.99 20 61.62 57 93.45 62.29 28 85.31 56.71 41 71.07 10 25.83 14 43.61 22.92 9 26.23 15.37 14 17.69 dversty n populaton. PBS had both the features and outperformed the other two technques. Its performance was dependent on the current number of generaton. In early generatons, there s less pressure on selecton, so t had exploratory nature. As the number of generaton ncreased, selecton pressure also ncreased and exploratory nature gradually turned nto explotng nature. It s evdent from above results that performance of PBS s superor over than that of RS and RWS. Further research n ths area s ntended to ncorporate factors nfluencng performance of genetc algorthms and knowledge based operatons. Fg. 4. Comparson of Average Ftness for dfferent problem szes Fg. 5. Comparson of Mnmum Ftness for dfferent problem szes It was observed that the RWS had more of explotaton approach and found better chromosomes n early runs of generaton and converged earler than RS. On the contrary, RS had more of exploratory nature and kept on explorng new solutons. In case of PBS, and PX reduced gradually wth ncreasng number of generaton. In early runs of generaton, the method depcted exploraton and wth ncreasng generaton, t had explotng nature and converged to fnd the better soluton. It s clear from the Fg. 1 and Fg. 2 that PBS performs better than the other two selecton methods. Further, fgure 4 and fgure 5 show the comparson of results for dfferent number of ctes. It has been found that wth ncreasng problem sze, problem dd not converge prematurely and PBS gave better performance n each case. VII. COCLUSIO In ths paper, a blended selecton operator - PBS s proposed havng balanced tradeoff between exploraton and explotaton. The performance of PBS selecton operator s compared wth RS and RWS technque on standard TSP problem. RWS performed lke nature selectng the most ft ndvduals. RS dd more of exploraton and mantaned REFERECES [1] J. Holland, Adaptaton n natural and artfcal systems, Unversty of Mchgan Press, Ann Arbor, 1975. [2] D. E. Goldberg, Genetc algorthms n search, optmsaton, and machne learnng, Addson Wesley Longman, Inc., ISB 0-201- 15767-5, 1989. [3] P. Merz and B. Fresleben, Genetc Local Search for the TSP: ew results, Proceedngs of IEEE Internatonal Conference on Evolutonary Computaton, IEEE Press, pp 159-164, 1977. [4] S. Ray, S. Bandyopadhyay and S.K. Pal, Genetc operators for combnatoral optmzaton n TSP and mcroarray gene orderng, SprngerScence + Busness Meda, LLC, 2007. [5] D. E. Goldberg and P. Segrest, Fnte Markov chan analyss of genetc algorthms, Proceedngs of the the Second Internatonal Conference on Genetc Algorthms, Lawrence Erlbaum Assocates, pp 1-8, 1987. [6] L. Booker, Improvng search n genetc algorthms, Genetc Algorthms and Smulated Annealng, Ptman, chapter 5, pp 61-73, 1987. [7] D. Fogel, An ntroducton to smulated evolutonary optmzaton, IEEE Trans. eural etworks 5 (1), pp 3-14, 1994. [8] Dan Adler, Genetc Algorthms and Smulated Annealng: A Marrage Proposal, IEEE Internatonal Conference on eural etworks 1993, San Francsco (CA), 1993. [9] A. E. Eben and,c.a.schppers, On evolutonary exploraton and explotaton, Fundamenta Informatcae, 35 IOS Press, pp 1-16, 1998. [10] G. Van Dck, M. M. Van Hulle and M.Wevers, Genetc Algorthm for Feature Subset Selecton wth Explotaton of Feature Correlatons from Contnuous Wavelet Transform: a real-case Applcaton, Internatonal Journal of Informaton and Mathematcal Scences 1:4 2005 pp 233-237, 2005. [11] O. Al addan, L. Raaman and C. R. Rao, Improved Selecton Operator for GA, Journal of Theoretcal and Appled Informaton Technology, pp 269 277, 2005. [12] A. Tsenov, Smulated Annealng and Genetc Algorthm n Telecommuncatons etwork Plannng, Internatonal Journal of Informaton and Mathematcal Scences 2:4, pp 240-245, 2006. [13] A. E. Eben, M. E. Schut and A. R. de Wlde, Boostng Genetc Algorthms wth Self-Adaptve Selecton, IEEE Congress on Evolutonary Computaton, Vancouver, BC, Canada, pp 1584-1589, 2006. [14] Z. G. Wang, M. Rahman, Y. S. Wong and K.S.eo, Development of Heterogeneous Parallel Genetc Smulated Annealng Usng Mult- che Crowdng, Internatonal Journal of Informaton and Mathematcal Scences 3:1, pp 55-62, 2007. [15] S. B. Lu, K. M. g and H. L. Ong, A ew Heurstc Algorthm for the Classcal Symmetrc Travellng Salesman Problem, Internatonal Journal of Computatonal and Mathematcal Scences, Volume 1, umber 4, pp 234-238, 2007. [16] A. R. Sa Angela, A. O. Andrade, A. B. Soares and S.J. asuto, Exploraton vs. Explotaton n Dfferental Evoluton, Volume 11: Proceedngs of the AISB 2008 Symposum on Swarm Intellgence Algorthms and Applcatons, ISB 1 902956 70 2, pp 57-63, 2008. [17] R. Thamlselvan and P.Balasubramane, A Genetc Algorthm wth a Tabu Search (GTA) for Travellng Salesman Problem, Internatonal Journal of Recent Trends n Engneerng, Issue I, Vol I, pp 607 610, 2009. [18] Y. Elhaddad and O. Sallab, A ew Hybrd Genetc and Smulated Annealng Algorthm to Solve the Travelng Salesman Problem, Proceedngs of the World Congress on Engneerng 2010, Vol. I, ISB: 978-988-17012-9-9, ISS: 2078-0958 (Prnt); ISS: 2078-0966 (Onlne), pp 11-14, 2010. [19] D. E. Golberg and K. Deb, A comparatve analyss of selecton schemes used n genetc algorthms, Foundatons of Genetc Algorthms, San Mateo, CA, Morgan Kaufmann, pp 69-93, 1991. [20] D. Fogel, Evolutonary Computaton, IEEE Press, 1995. [21] Melane Mtchell, An Introducton to genetc algorthm,. Prentce Hall of Inda, ew Delh, ISB-81-203-1358-5, 1996. 369
Internatonal Journal of Machne Learnng and Computng, Vol. 2, o. 4, August 2012 [22] K. A. De Jong, An Analyss of the behavor of a class of genetc adaptve systems (Doctoral dssertaton, Unversty of Mchgan) Dssertaton Abstracts Internatonal 36(10), 5140B Unversty Mcroflms o. 76/9381, 1975. [23] J. E. Baker, Adaptve selecton methods for genetc algorthms, Proceedngs of an Internatonal Conference on Genetc Algorthms and ther applcatons, pp 101-111, 1985. [24] D. Whtley, The GEITOR algorthm and selecton pressure: why rank-based allocaton of reproductve trals s best, Proceedngs of the Thrd Internatonal Conference on Genetc Algorthms, Morgan Kaufmann, pp 116-121, 1989. [25] T. Back and F.Hoffmester, Extended Selecton Mechansms n Genetc Algorthms,ICGA4, pp. 92-99, 1991. [26] Perlng,M.and GeneTS, A Relatonal-Functonal Genetc Algorthm for the Travellng Salesman Problem, Techncal Report, Unverstat Kaserslautern, ISS 09460071, 1997. Mrs. Jyotshree s workng as Assstant Professor n the Department of Computer Scence and Applcatons, Guru anak Grls College, Santpura, Yamunanagar. She s M.Sc Gold Medalst from Guru Jambheshwar Unversty, Hsar and s pursung PhD from Kurukshetra Unversty. She s member of Internatonal Assocaton of Computer Scence and Informaton Technology (IACSIT). She has presented papers n 3 Internatonal and 5 atonal Conferences. Her research nterests are Genetc Algorthms, Soft Computng methods and etworkng. Dr. Rakesh Kumar obtaned hs B.Sc. Degree, Master s degree Gold Medalst (Master of Computer Applcatons) and PhD (Computer Scence & Applcatons) from Kurukshetra Unversty, Kurukshetra. Currently, he s Assocate Professor n the Department of Computer Scence and Applcatons, Kurukshetra Unversty, Kurukshetra, Haryana, Inda. Hs research nterests are n Genetc Algorthm, Software Testng, Artfcal Intellgence, etworkng. He s a Senor member of Internatonal Assocaton of Computer Scence and Informaton Technology (IACSIT). 370