Genetc Algorthms A Self Adaptve Hybrd Genetc Algorthm Felpe P. Espnoza Department of Cvl & Envronmental Engneerng Unversty of Illnos 49 Newmark Lab, MC-5 5 N. Mathews Ave. Urbana, IL 68 fespnoz@uuc.edu (7)-333-6979 Barbara S. Mnsker Department of Cvl & Envronmental Engneerng Unversty of Illnos 33 Newmark Lab, MC-5 5 N. Mathews Ave. Urbana, IL 68 mnsker@uuc.edu (7)-333-97 Davd E. Goldberg Department of General Engneerng Unversty of Illnos Urbana, IL 68 7 Transportaton, MC 38 4 S. Mathews Ave. Urbana, IL 68 deg@uuc.edu (7)-333-897 Abstract Ths paper presents a self-adaptve hybrd genetc algorthm (SAHGA) and compares ts performance to a non-adaptve hybrd genetc algorthm (NAHGA) and the smple genetc algorthm (SGA) on two mult-modal test functons wth complex geometry. The SAHGA s shown to be far more robust than the NAHGA, provdng fast and relable convergence across a broad range of parameter settngs. For the most complex test functon, the SAHGA requred over 75% fewer functon evaluatons than the SGA to dentfy the optmal soluton at a 99% relablty level. INTRODUCTION A hybrd genetc algorthm (HGA) s the couplng of two processes: the smple GA and a local search algorthm. HGAs have been appled to a varety of problems n dfferent felds, such as optcal network desgn [Snclar, ], sgnal analyss [Sabatn, ], and graph problems [Magyar et al, ], among others. In these prevous applcatons, the local search part of the algorthm was problem specfc and was desgned usng tral-and-error expermentaton wthout generalzaton or analyss of the characterstcs of the algorthm wth respect to convergence and relablty. The purpose of ths study s to develop a self-adaptve HGA (SAHGA) that can be used to relably solve dfferent applcatons wthout extensve tral-and-error expermentaton. Ths paper presents the SAHGA approach and compares ts performance wth the smple GA (SGA) and a nonadaptve HGA (NAHGA) for several test functons. The results show consderable promse for the SAHGA. Usng two multmodal test functons, the SAHGA requred less than 5% of the number of functon evaluatons requred for the SGA at a 99% relablty level. The SAHGA algorthm was also more robust than the NAHGA, performng optmally across a broad range of parameter values. HYBRID GENETIC ALGORITHM METHODOLOGY. BASIC ELEMENTS.. Genetc Algorthm The smple Genetc Algorthm (SGA) used n ths work s defned by three basc operators: bnary tournament selecton, sngle pont crossover, eltsm, and smple mutaton. Through the successve applcaton of these three operators, an ntal populaton of solutoms s evolved nto a hghly ft populaton... Local Search The local search operator looks for the best soluton startng at a prevously selected pont, n ths case a soluton n the SGA populaton. For ths applcaton, the steepest descent method was chosen as the local search operator. Ths method moves along the drecton of the steepest gradent untl an mproved pont s found, from whch a new local search starts. The algorthm ends when
no new pont can be found (ths s equvalent to a gradent equal to zero). For functons wth multple local optmum, the method fnds one local optma but s not guaranteed to fnd the global mnmum. For geometres wth concal shape, for example, the method fnds the local optmum n one local search startng from any pont nsde the basn of attracton. For other geometres, the local search operator requres more than one teraton to acheve the soluton...3 Evoluton: Lamarckan v/s Baldwnan To combne the SGA and local search methods, HGAs typcally use one of two approaches: Lamarckan or Baldwnan evoluton [Hnton and Nolan, 987], [Whtley et al., 994]. Lamarck presented hs theory of learned evoluton n 8 [Lamarck, 8], n whch drect learnng passes the best characterstcs of each ndvdual from generaton to generaton. Ths means that both the change n genotypc nformaton and ftness are passed to the ndvdual as genotypc nformaton at the end of local search (.e., the chromosome of the ndvdual s changed). Baldwnan evoluton, also known as the Baldwn effect [Baldwn, 896], s survval of the fttest followng the drecton of learnng. In ths case, only the mproved ftness functon value s changed after local search and not the genotypc nformaton. Lamarckan evoluton has been shown to cause faster convergence than Baldwnan evoluton, but sometmes causes premature convergence problems [Whtley et al., 994].. NON-ADAPTIVE HYBRID GENETIC ALGORITHM (NAHGA) The NAHGA algorthm s a standard, non-adaptve hybrd genetc algorthm that combnes an SGA wth local search. The local search step s defned by three basc parameters: frequency of local search, probablty of local search, and number of local search teratons. The frst element for the defnton of the algorthm s the frequency of local search, whch s the swtch between global and local search. In the NAHGA algorthm, ths swtch s performed every?g global search generatons, where?g s a constant number called the local search frequency. For example, f?g =3, local search would be performed every 3 generatons durng the SGA. The second element of the algorthm s the probablty of local search P, whch s the probablty that local search wll be performed on each member of the SGA populaton n each generaton where local search s nvoked. Ths probablty s constant and s defned before the applcaton of the algorthm. Fnally, each tme local search s performed, t s performed a constant number of local search teratons before local search s halted..3 SELF-ADAPTIVE HYBRID GENETIC ALGORITHM (SAHGA) The SAHGA algorthm works wth the same operators as the NAHGA algorthm: frequency of local search, probablty of local search and number of local search teratons. The major dfference n the approaches s that the SAHGA adapts n response to recent performance as the algorthm converges to the soluton. The detals of the adaptatons are gven below..3. Local Search versus Global Search Instead of a constant local search frequency, local search s nvoked only when the SGA s performance, as reflected by chasnges n the relatve coeffcent of varaton of the ftness functon between generatons, ndcates that ths s needed. The coeffcent of varaton s defned as the rato of the mean and the standard devaton of the populaton ftness. Fgure shows the change n the coeffcent of varaton and the coeffcent of varaton tself for a partcular experment usng the SGA alone. The trend for the coeffcent of varaton s decreasng and approachng to zero as the populaton converges to the optmal soluton. Usng the CV, we defne a new parameter CV rato (CVR) gven n equaton and shown n Fgure : CV() CVR = () CV ( ) where CV() s the coeffcent of varaton at generaton. CVR represents the change n the coeffcent of varaton from one generaton to the next. When CVR >, the soluton at generaton s worse than the soluton at generaton -, whch mples that local search may provde more nformaton to mprove performance. In Fgure, a threshold of one s shown on the CVR curve to llustrate when the SAHGA would nvoke local search. Coeffcent of Varaton (CV).5.5..75.5.5. 5 5 5 3 35 4 Generaton CV CVR Local Search Threshold.5..5..5. CV Rato (CVR) Fgure : Global Search-Local Search Threshold Effect
.3. Probablty of Local Search Selecton In an HGA, local search typcally operates over a small porton of the total populaton because the addtonal functon evaluatons requred for local search can be very expensve. Therefore, when local search s achevng greater performance than the most recent global search teraton (usng the crteron shown n the next secton), the SAHGA algorthm s adapted to search a smaller porton of the populaton usng the relatonshp shown n equaton. n P = P ( ε () ) In ths equaton, the local search probablty P decreases n a constant way from the ntal value. P s the userspecfed ntal value of the local search probablty, n s the local teraton number n the local search step, and e s a user-specfed parameter governng the rate of decrease n the local search probablty. The probablty P s reset to P at the begnnng of every local search step n order to start wth the same samplng sze at the begnnng of every local search..3. Number of Local Search Iteratons One mportant ssue for the applcaton of the algorthm s how long the local search lasts before swtchng back to the global GA search. In order to make ths decson, we compare the most recent ftness mprovement by local search wth the latest ftness mprovement by global search. Ths crteron s presented n equaton 3: do local search f Global Local < pop fev where Global s the mprovement acheved between the two prevous global search generatons, Local s the current mprovement n the local search step, pop s the populaton sze (whch s the number of functon evaluatons requred for global search), and fev s the number of functon evaluatons requred for the local search step. Ths crteron scales the ftness mprovements by the computatonal effort requred (pop and fev) so that the ratos are comparable. When equaton (3) s no longer true, or when the number of teratons exceeds a user-specfed maxmum value, the algorthm swtches back to global search. 3 EXPERIMENTS 3. TEST FUNCTION The test functons gven n equaton 4 are mult-modal functons wth multple basns of attracton. The (3) coordnates (x o,,y o, ) are the coordnates of the basn of attracton, whch has radus r and depth d. For ths analyss, we worked wth two dfferent functons wth random geometry (radus and depth). The basns of attracton for both functons are randomly dstrbuted. Functon (f) (Goldberg and Voessner, 999) has concal basns of attracton and Functon (f) has ellptcal basns of attracton. Functon represents the best case for local search, n whch only one local search s requred to fnd the local mnmum, and Functon represents a more realstc case n whch multple local searches are requred to fnd the local mnmum. d r f (x,y ) = ( x + y ) x + d y r f(x,y ) = x = x x, y = y y, d 3. EXPERIMENTS x + y r d x + d y r x + d y > r x + y r x + y > r In order to evaluate the behavor of the SAHGA wth respect to the NAHGA and SGA, we performed several experments to test the capabltes of the method. The settngs for the parameters controllng the SGA for all of the experments (populaton sze of 8 and, ndvduals, respectvely, for f and f; probablty of crossover of.4; and probablty of mutaton of.3 and.8, respectvely, for f and f) were dentfed usng the 3-step methodology developed by Reed et al. (). For local search, we used a mxture of Baldwnan and Lamarckan evoluton: 5% of the local searches worked wth the Baldwnan effect and 75% wth Lamarckan evoluton. Our ntal experments found that ths mxture represented the optmal choce, gvng the speed of Lamarckan evoluton wthout causng dversty problems. The stoppng crteron for the algorthm was that at least 8% of the populaton had converged to the soluton. In order to evaluate the relablty of the method for dfferent condtons, we averaged the results of, dfferent ntal populatons from, random seeds. The results are presented n terms of average number of functon evaluatons because generatons take dfferent amounts of tme for the hybrd genetc algorthm approach, dependng on how many local searches are done. (4)
3.. Frequency of Local Search The frst experment was desgned to evaluate the effect of local search frequency on the soluton of the problem. For the NAHGA algorthm, local search was performed at a pre-defned nterval?g; for the SAHGA algorthm, local search followed the threshold requrements prevously explaned. Fgures a) and b) show the results for the NAHGA and for the SAHGA algorthms, respectvely. For both algorthms, the maxmu m number of local search teratons was three and the ntal probablty of local search was.. For the NAHGA, t s clear that the optmal results are acheved only for one value of the varable n study, a local search frequency of (meanng that local search s performed n every generaton). On the other hand, for the SAHGA the optmal results are acheved for a set of dfferent values of the local search threshold, so the algorthm s more robust. The performance of each of the algorthms for dfferent local search frequences and threshold parameter values was smlar for both functons. a) 4 3.. Probablty of Local Search The second experment tested the effect of the probablty of local search parameter on performance. In the SAHGA, the probablty of local search s adapted usng the parameter e n equaton. Fgure 3 a) shows the effect of the adaptve parameter for a specfc probablty of local search (P =.). For the other parameters n the algorthm, the threshold was set to.6 and a maxmum of 3 local search teratons were performed. Ths experment shows that there s only a slght mprovement n performance for dfferent values of the adaptve parameter for the two dfferent functons. Agan, ths s another ndcaton of the robustness of the SAHGA algorthm. a) Average # of Functon Evaluatons (x 3 ) 3 Average # of Functon Evaluatons (x 3 ) 3 b)...4.6.8. e SAHGA (f) SAHGA (f) b) 3 4 5 Local Search Frequency (DG) NAHGA (f) NAHGA (f) Average # of Functon Evaluatons (x 3 ) 7 6 5 4 3 4....3.4.5.6.7.8.9. Average # of Functon Evaluatons (x 3 ) 3 Probablty of Local Search (P) NAHGA (f) NAHGA (f) SAHGA (f) SAHGA (f) Fgure 3: Adaptve Parameter Effect on Probablty of Local Search (a) and Probablty of Local Search Effect (b)...4.6.8. Local Search Threshold SAHGA (f) SAHGA (f) Fgure : Local Search Effect for NAHGA Algorthm (a) and SAHGA Algorthm (b) The next step s to evaluate the behavor of both algorthms for dfferent probabltes of local search. For the NAHGA, the generaton gap selected was, whch gave the best performance n the frst experment. Fgure 3 b) shows the results of ths experment, whch ndcates that the mnmum number of functon evaluatons occurs at almost the same probablty for both the NAHGA and the SAHGA algorthm. The major
dfference s that the NAHGA acheves the mnmum for only one probablty of local search and the SAHGA acheves optmal or very near optmal performance for a broader range of ntal probabltes of local search due to ts adaptaton of P durng the run. Ths effect s acheved for both functons. 3..3 Maxmum Number of Local Search Iteratons The fnal experment analyzes the number of teratons n the local search step. For ths analyss, we worked wth a probablty of local search equal to. for both algorthms, a G equal to for the NAHGA, and a threshold of.6 and an adaptve parameter (e) equal to. for the SAHGA. Fgure 4 shows the results of ths experment. These results ndcate that the number of functon evaluatons for the NAHGA algorthm ncreases wth the number of local search teratons allowed, but for the SAHGA algorthm the number of functon evaluatons remans constant because of the adaptve stoppng crteron n the SAHGA local search algorthm evaluatons. For each level of relablty, Fgure 6 shows the average number of functon evaluatons requred for the SAHGA as a percentage of the number requred for the SGA. For a relablty of 99%, the number of functon evaluatons requred n the SAHGA for functon f s 95% less than the number of functon evaluatons for the SGA algorthm. For functon f, the SAHGA requres 75% fewer functon evaluatons requred for the SGA. More functon evaluatons are requred for functon f because f s much more complex than f and requres more local search teratons. These results were acheved for a populaton sze equal to 5% and 35% of the optmal populaton sze for the SGA, for f and f, respectvely. The mproved performance shown n Fgure 5 s a combned effect of smaller populaton szes and faster convergence of the SGA. a).% 9.% Average # of Functon Evaluatons (x 3 ) 4 3 3 5 7 9 Maxmum Number of Local Search Iteratons b) Relablty (%) 8.% 7.% 6.% 5.% 4.% 3.% 5 5 5 3 Populaton Sze SGA (F) SAHGA (F) SGA (F) SAHGA (F) NAHGA (f) NAHGA (f) SAHGA (f) SAHGA (f) Fgure 4: Maxmum Number of Local Search Iteratons Effect for NAHGA and SAHGA Algorthm 3..4 Relablty To complete the analyss, we performed a fnal experment to nvestgate the relablty of the SAHGA relatve to the SGA for dfferent populaton szes. The analyss was performed only for the SAHGA algorthm because, as shown n the prevous experments, ths algorthm worked for a broader range of parameters than the NAHGA. Fgure 5 a) shows the relablty of each algorthm for dfferent populaton szes, where relablty s defned as the percentage of the, dfferent ntal populatons that found the optmal soluton. It s clear that the SAHGA acheves much hgher levels of relablty at smaller populaton szes than the SGA. Fgure 5 b) shows relablty versus number of functon evaluatons. From ths plot, t s clear that the SAHGA s able to acheve much hgher relablty wth far fewer functon Relablty (%) % 9% 8% 7% 5 5 75 5 5 Average # of Functon Evaluatons (x 3 ) SGA (f) SGA (f) SAHGA (f) SAHGA (f) Fgure 5: Relablty v/s Populaton Sze a) and Relablty versus Number of Functon Evaluatons b) 4 Conclusons The results presented n ths paper clearly ndcate that the adaptve capabltes of the SAHGA algorthm enabled robust soluton of complex, mult-modal problems for a much greater range of parameter settngs than the NAHGA. Compared wth the SGA, the SAHGA was able to solve complex problems much faster because of the
combned effect of smaller populaton szes and ncreased nformaton from local search. For the same level of relablty, the SAHGA requred as much as 95% fewer functon evaluatons than the SGA for functon f and as much as 75% fewer functon evaluatons for functon f. Further research s needed to assess the performance of the algorthm on other types of functons. 5% G. Magyar, M. Johnsson, and O. Nevalanen, An adaptve hybrd genetc algorthm for the three-matchng problem, IEEE Transactons on Evolutonary Computaton, 4(), 35-46,. P. Reed, B. S. Mnsker, and D. E. Goldberg, Desgnng a competent smple genetc algorthm for search and optmzaton. Water Resources Research, 36(), 3757-376. Percentage of Functon Evaluatons for SGA (%) % 5% % 5% % 7% 8% 9% % Relablty (%) Rato f Rato f A. Sabatn, A hybrd genetc algorthm for estmatng the optmal tme scale of lnear systems approxmatons usng Laguerre models, IEEE Transactons on Automatc Control, 45(5), 7-,. M. Snclar, Mnmum cost wavelength-path routng and wavelength allocaton usng a genetc-algorthm/heurstc hybrd approach, IEEE Proceedngs Comuncatons, 46(), 999. Fgure 6: Average Number of functon Evaluatons for the SAHGA as a Percentage of the Number for the SGA at each Level of Relablty D. Whtley, V. S. Gordon, and K. Mathas, Lamarckan evoluton, the Baldwn effect and functon optmzaton, Parallel Problem Solvng from Nature- PPSN III, 6-5, 994. Acknowledgments Ths materal s based upon work supported by the Natonal Scence Foundaton under Grant No. BES 97-3476 CAR. References J. M. Baldwn, A new factor n evoluton. Amercan Naturalst, 3:44-45, 896. R. French and A. Messnger, Genes, phenes and the Baldwn effect: learnng and evoluton n a smulated populaton. Artfcal Lfe IV, 77-8, 994. G. E. Hnton and S. J. Nolan, How learnng can gude evoluton. Complex Systems, :495 5, 987. D. E. Goldberg and S. Voessner, Optmzng global-local search hybrds, Illgal Report No. 99, January 999. J. Lamarck, Zoologcal Phlosophy, 89.