kalyan maydeb

Upload: swatiiiitm

Post on 09-Apr-2018

240 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 kalyan maydeb

    1/23

    Sadhana, Vol. 24, Parts 4 & 5, A ugust& Octobe r 1999, pp. 293-315. Printed in India

    An in t roduc t ion to gene t i c a lgor i thms

    K A L YA N M O Y D E B

    Kanpur G ene ti c A lgo r it hms Labora to ry (KanGAL) , Depa r tmen t o f M echan ica lEngineer ing , Indian Ins t itu te of Tech nology Kanpur, K anpur 208 016, Indiae-mail : [email protected]. in

    A bs tra ct . Gen et ic algori thms (GAs) are search and opt imizat ion tools , whichwo rk different ly com pared to classical search and opt imizat ion methods. Becau seof their broad applicabil ity, ease o f use, and global perspect ive, GA s hav e beenincreasingly applied to various search and opt imizat ion problems in the recentpast. In this paper, a brief description o f a simple GA is presented . Thereafter,GA s to han dle constrained opt imizat ion problems are described. Because of theirpopulat ion approach, they have also been extended to solve other search andoptimizat ion problems eff icient ly, including mult imodal , mult iobject ive andscheduling problems, as w el l as fuzzy-GA and ne uro-GA implementa t ions . Thepurpose of this paper is to famil iar ize readers to the concept of GAs and their

    scope of applicat ion.

    K e y w o r d s . Genet ic a lgor i thms; opt imiza t ion; op t imal des ign; nonl inearp rog ramming .

    1 . In t roduct ion

    Ov er the last decade , gen e t ic a lgor i thms (GAs) hav e been ex tens ive ly used as search andopt imiza t ion too ls in var ious problem domains , inc luding sc iences , commerce , andengine ering. The prim ary reasons for their success are their broad applicabi li ty, ease o f use,

    and global perspect ive (Goldberg 1989).The concept of a gene t ic a lgor i thm was f i r s t in t roduced by John Hol land of the

    Univers i ty of Michigan , Ann Arbor. Thereaf te r, he and h is s tudents have cont r ibutedmuch to the development of the f ie ld . Most of the in i t ia l research works can be foundin severa l conference proceedings . How ever, now there ex is t severa l tex t books on GA s(Holland 1975; Goldberg 1989; Michalewicz 1992; Mitchel l 1996; Gen & Cheng 1997).A mo re com prehens ive descr ip t ion of GAs a long wi th o ther evolu t ionary a lgor ithms canbe found in the recent ly compi ledHandbook on evolutionary computation publ i shed byOx ford Un iversi ty Press (B~icket al 1997). Tw o journ als ent i t ledEvolutionary Computa-tion (publ i shed by MIT Press ) andIEEE Transactions on Evolutionary Computation arenow ded icated to publishing sal ient research and applicat ion act ivi ties in the area. Besides,most GA appl ica t ions can a l so be found in dom ain-spec i f ic journa ls .

    In th is paper, w e descr ibe the working pr inc ip le of GAs. A num ber of ex tens ions to thes imple GA to so lve var ious o ther search and opt imiza t ion problems are a l so descr ibed .

    293

  • 8/7/2019 kalyan maydeb

    2/23

    294 Kalyanmoy Deb

    Par ticu la r ly, rea l -coded GA s, GA s to so lve mul t imod al , m ul t iob jec tive , and schedul ingproblems , and fuzzy-neuro-GA implementa t ions a re descr ibed .

    2 . C l a s s i ca l s e a r c h a n d o p t i m i z a t i o n m e t h o d s

    Tradi t iona l op t imiza t ion methods can be c lass i f i ed in to two d i s t inc t g roups : d i rec t andgrad ien t -based me thods (D eb 1995). In d i rec t search methods , on ly ob jec t ive func t ion( f ( x ) ) and constraint values(gj(x), hk(x)) areused to guide the search s t ra tegy, whereasgrad ien t -based methods use the f i r s t and /or second-order der iva t ives o f the ob jec t ivefunc t ion a nd /or cons t ra in t s to gu ide the search process . S ince der iva t ive in format ion i s no tused , the d i rec t search methods a re usua l ly s low,requiring many func t ion eva lua t ions forconvergence . For the same reason , they can a l so be appl ied to many prob lems wi thout amajor change of the a lgor ithm. On the o ther hand , g rad ien t -based m ethods qu ick ly

    converge to an op t imal so lu t ion bu t a re no t e ff ic ien t in non-d i ffe ren t iab le o r d i scont inuousproblems . In add i tion , there a re som e com mo n d i ff icu l t ies wi th m os t o f the t rad it iona ldirect and gradient-based techniques.

    The conv ergence to an op t imal so lu t ion depen ds on the chosen in it ia l so lu t ion . Mos t a lgor i thms tend to ge tstuck to a subopt imal so lu t ion . An a lgor i thm eff ic ien t in so lv ing one op t imiza t ion prob lem may no t be e ff ic ien t in

    so lv ing a d i ffe ren t op t imiza t ion prob lem. Algor i thms a re no t e ff ic ien t in handl ing pro b lem s hav ing d i sc re te var iab les . Algor i thms cannot be e ff ic ien t ly used on a para l le l machine .

    S ince nonl inear i t i es and complex in te rac t ions among prob lem var iab les o f ten ex is t inengineer ing des ign prob lems , the search space may have more than one op t imal so lu t ion ,of which m os t a re undes i red loca l ly op t imal so lu t ions hav ing in fe r io r ob jec t ive func t ionva lues . When so lv ing these prob lems , there i s no escape i f trad it ional metho ds g e t a t t rac tedto any o f these loca l ly op timal so lu tions .

    Every t rad i t iona l op t imiza t ion a lgor ithm i s des igned to so lve a spec i f ic type of p rob lem.For example , the geomet r ic p rogramming method i s des igned to so lve on ly po lynomia l -type ob jec t ive func t ions and cons t ra in t s . Geomet r ic p rogramming i s e ff ic ien t in so lv ingsuch prob lems bu t cannot be appl ied su i tab ly to so lve o ther types o f func t ions . Con juga ted i rec t ion or con juga te g rad ien t methods have convergence proofs fo r so lv ing quadra t ic

    ob jec t ive func t ions hav ing one op t imal so lu t ion , bu t a re no t expec ted to work wel l inproblem s hav ing mul t ip le op t imal so lu t ions . The success ive l inear p rogram ming me thod(Reklai t is et a l 1983) works eff ic ient ly on l inear- l ike funct ions and constraints , but forso lv ing nonl inear p rob lems i t s per formance la rge ly depends on the chosen in i t i a l condi -t ions . Thus , one a lgor i thm may be bes t su i ted for one prob lem whi le i t may no t even beappl icab le to a d i ffe ren t p rob lem. This requ i res des igners to know a num ber o f op t imiza t iona lgor ithms to so lve d i ffe ren t des ign prob lem s .

    In mos t eng ineer ing des igns , some prob lem var iab les a re res t r i c ted to t ake d i sc re teva lues on ly. This requ i rement o f ten a r i ses to m ee t m arke t condi t ions . F or exam ple , i f thed iameter o f a mechan ica l co mp onen t is a des ign variab le and the comp onen t is l ike ly to beprocured off - the-she l f , the op t imiza t ion a lgor i thm cannot use any a rb i t ra ry d iameter. Theusua l p rac t ice to t ack le such p rob lem s i s to assume tha t a ll va r iab les a re con t inuous dur ingthe opt imizat ion process . Thereaf ter, an avai lable s ize c loser to the obtained solut ion isrecommended. But there are major diff icul t ies with this approach. Firs t , s ince infeasible

  • 8/7/2019 kalyan maydeb

    3/23

    An introduction to genetic algorithms 295

    v a l u e s o f a d e s i g n v a r i a b l e a r e a l l o w e d i n t h e o p t i m i z a t i o n p r o c e s s , t h e o p t i m i z a t i o na l g o r i t h m s p e n d s e n o r m o u s t i m e i n c o m p u t i n g i n f e a s i b l e s o lu t i o n s (i n s o m e c a s e s , i t m a yn o t b e p o s s i b l e t o c o m p u t e a n i n f e a s i b l e s o l u ti o n ). T h i s m a k e s t h e s e a r c h e f f o r t in e f f ic i e n t .

    S e c o n d , a s p o s t - o p t i m i z a t i o n c a l c u l a ti o n s , t h e n e a r e s t l o w e r a n d u p p e r a v a i la b l e s i z es h a v eto be che cke d fo r each in feas ib le d i sc re te va r iab le . Fo r N such d i sc re te va r iab les , a to ta l o f2 N a d d i t io n a l s o l u t i o n s n e e d t o b e e v a l u a te d . T h i r d , t w o o p t i o n s c h e c k e d f o r e a c h v a r ia b l em a y n o t g u a r a n t e e t h e f o r m i n g o f t h e o p t i m a l c o m b i n a t i o n w i t h r e s p e c t t o o t h e r v a ri a b le s .A l l t h e s e d i f f i c u l ti e s c a n b e e l i m i n a t e d i f o n l y f e a s i b le v a l u e s o f . t h e v a r i a b l e s a r e a l l o w e dd u r i n g t h e o p t i m i z a t i o n p r o c e s s.

    M a n y o p t i m i z a t i o n p r o b l e m s r e q u i r e t h e u s e o f a s i m u l a t i o n s o f tw a r e i n v o l v i n g th e f i n it ee l e m e n t m e t h o d , c o m p u t a t i o n a l f l u i d m e c h a n i c s a p p r o a c h , n o n l i n e a r e q u a t i o n s o l v i n g , o ro t h e r c o m p u t a t i o n a l l y e x t e n s i v e m e t h o d s t o c o m p u t e t h e o b j e c t i v e f u n c t i o n a n d c o n s t r a in t s .B e c a u s e o f t h e a f f o r d a b i l i t y a n d a v a i l a b il i ty o f p a r a l le l c o m p u t i n g m a c h i n e s , i t is n o wc o n v e n i e n t t o u s e p a r a l l e l m a c h i n e s i n s o l v i n g c o m p l e x e n g i n e e r i n g d e s i g n o p t i m i z a t i o np r o b l e m s . H o w e v e r, s i n c e m o s t t ra d i t io n a l m e t h o d s u s e a p o i n t - b y - p o i n t a p p r o a c h , w h e r eo n e s o l u t io n g e t s u p d a t e d t o a n e w s o l u t io n i n o n e i t e r a ti o n , t h e a d v a n t a g e o f p a ra l le lm a c h i n e s c a n n o t b e e x p l o i t e d .

    T h e a b o v e d i s c u s s i o n s u g g e s t s t h a t t r a d i t i o n a l m e t h o d s a r e n o t g o o d c a n d i d a t e s a se f f i c i e n t o p t i m i z a t i o n a l g o r i t h m s f o r e n g i n e e r i n g d e s i g n . I n t h e f o l l o w i n g s e c t i o n , w ed e s c r i b e a G A t e c h n i q u e w h i c h c a n a l l e v i a t e s o m e o f t h e a b o v e d i f fi c u l t ie s a n d m a yc o n s t i tu t e a n e f f i c ie n t o p t i m i z a t i o n t o o l.

    3 . Gen e t i c a lgo r i thm s

    A s t h e n a m e s u g g e s t s , g e n e t i c a l g o r i t h m s ( G A s ) b o r r o w t h e i r w o r k i n g p r i n c i p l e f r o mnatura l gene t i cs . In th i s sec t ion , we desc r ibe the p r inc ip le o f the GA's opera t ion . Toi l l u s t r a t e t h e w o r k i n g o f G A s b e t t e r, w e a l s o s h o w a h a n d - s i m u l a t i o n o f o n e i t e r a t i o n o fG A s . T h e o r e t i c a l u n d e r p i n n i n g s d e s c r i b in g w h y G A s q u a l i f y a s ro b u s t s e a r c h a n do p t i m i z a t i o n m e t h o d s a r e d i s c u s s e d n e x t .

    3.1 Workingprinciples

    G A s a r e s e a r c h a n d o p t i m i z a t i o n p r o c e d u r e s t h a t a r e m o t i v a t e d b y t h e p r i n c ip l e s o f n a t u r a lg e n e t i c s a n d n a t u r a l s e l ec t io n . S o m e f u n d a m e n t a l id e a s o f g e n e ti c s a r e b o r ro w e d a n d u s e da r t if i c ia l l y t o c o n s t r u c t s e a r c h a l g o r i th m s t h a t a r e r o b u s t a n d r e q u i re m i n i m a l p r o b l e mi n f o r m a t i o n .

    T h e w o r k i n g p r i n c i p l e o f G A s i s v e r y d i f f e r e n t f r o m t h a t o f m o s t o f c l a s s i c a lo p t i m i z a t i o n t e c h n i q u e s . We d e s c r i b e t h e w o r k i n g o f a G A b y i l l u s t r a t i n g a s i m p l e c a nd e s i g n p r o b l e m . A c y l i n d r i c a l c a n i s c o n s i d e r e d t o h a v e o n l y t w o I d e s i g n p a r a m e t e r s -d i a m e t e r d a n d h e i g h t h . L e t u s c o n s i d e r t h a t t h e c a n n e e d s t o h a v e a v o l u m e o f a t le a s t3 0 0 m l a n d t h e o b j e c t i v e o f t h e d e s i g n i s t o m i n i m i z e t h e c o s t o f c a n m a t e ri a l . Wi t h t h e s ec o n s t r a in t s a n d o b j e c ti v e , w e f i r s t w r i t e t h e c o r r e s p o n d i n g n o n l i n e a r p r o g r a m m i n g p r o b l e m( N L P ) :

    1 t is imp ortant o note that man y other parameters such as thickness of c an, material properties, shape can alsobe considered, hut it will suffice o have two p arameters to illustrate the w orking of a GA.

  • 8/7/2019 kalyan maydeb

    4/23

    2 9 6 K a l y a n m o y D e b

    M i n i m i z e f ( d , h ) = c ( ( 7 r d 2 / 2 ) + 7 r d h) ,

    S u b j e c t t o g~(d,h)- ( T r d 2 h / 4 ) >_300 , (1 )

    Va r iab le bo un ds dm in < d _< dmax,hmin

  • 8/7/2019 kalyan maydeb

    5/23

    An introduction to gen etic algorithms 2 9 7

    C o d i n g t h e p a r a m e t e r s i n a b i n a r y s t ri n g i s p r i m a r i l y u s e d i n o r d e r t o h a v e a p s e u d o -c h r o m o s o m a l r e p r e s e n t a t i o n o f a d e s ig n s o l u ti o n . F o r e x a m p l e , t h e 1 0 - b it s tr in g i l lu s t r a te da b o v e c a n b e c o n s i d e r e d t o s h o w a b i o l o g i c a l r e p r e s e n t a t i o n o f a c a n h a v i n g 8 c m d i a m e t e r

    a n d 1 0 c m h e i g h t . N a tu r a l c h r o m o s o m e s a re m a d e o f m a n y g e n e s, e a c h o f w h i c h c a n t ak eo n e o f m a n y d i f f e r e n t a l le l ic v a l u e s ( s u c h a s , t h e g e n e r e s p o n s i b l e f o r th e e y e c o l o u r i n m yc h r o m o s o m e i s ex p r e s s e d a s b la c k , w h e r e a s i t c o u l d h a v e b e e n b l u e o r s o m e o t h e r c o lo u r ) .W h e n y o u s e e m e , y o u s e e m y p h e n o t y p i c r e p re s e n ta t io n , b u t e a c h o f m y f e a tu r e s isp r e c i s e ly w r i tt e n i n m y c h r o m o s o m e - t h e g e n o t y p i c r e p r es e n t a ti o n o f m e . I n t h e c a nd e s i g n p r o b l e m , t h e c a n i t s e l f i s th e p h e n o t y p i c r e p r e s e n t a t i o n o f a n a r ti f ic i a l c h r o m o s o m eo f 1 0 g e n e s. To s e e h o w t h e s e 1 0 g e n e s c o n t r o l t h e p h e n o t y p e ( th e s h a p e ) o f t h e c a n , l e t u si n v e s t i g a te t h e l e f t m o s t b i t ( g e n e ) o f t h e d i a m e t e r ( d ) p a r a m e t e r. A v a l u e o f 0 a t t h i s b i t ( th em o s t s i g n i f i c a n t b it ) a ll o w s t h e c a n t o h a v e d i a m e t e r v a l u e s i n t h e r a n g e [ 0 , 1 5 ] c m , w h e r e a st h e o t h e r v a l u e 1 a l lo w s t h e c a n t o h a v e d i a m e t e r v a l u e s i n t h e r a n g e [ 1 6 , 3 1 ] c m . C l e a rl y,th i s b i t (o r gen e ) i s r e spo ns ib le fo r d i c t a t ing the s l im ness o f the can . I f t he a l l e l e va lu e 0 i se x p r e s s e d , t h e c a n i s s li m a n d i f th e v a l u e 1 is e x p r e s s e d t h e c a n i s f a t. E a c h b i t p o s i t i o n o rc o m b i n a t i o n o f t w o o r m o r e b i t p o s it io n s c a n a l so b e e x p l a i n e d t o h a v e s o m e f e a t u r e o f th ec a n , b u t s o m e a r e i n t e re s t i n g a n d i m p o r t a n t a n d s o m e a r e n o t t h a t i m p o r t a n t . N o w t h a t w eh a v e a c h i e v e d a s tr i n g r e p r e s e n t a t i o n o f d e s i g n s o l u t i o n , w e a r e r e a d y t o a p p l y s o m eg e n e t i c o p e r a t i o n s t o s u c h s t r i n g s t o h o p e f u l l y f i n d b e t t e r a n d b e t t e r s o l u t i o n s . B u t b e f o r ew e d o t h a t, w e s h a l l d e s c ri b e a n o t h e r i m p o r t a n t s t e p o f a s si g n i n g a ' g o o d n e s s ' m e a s u r e t oe a c h s o l u t i o n r e p r e s e n t e d b y a s t r i n g .

    3 . 1 b Assig ning fitness to a solution: I t i s i m p o r t a n t t o r e i t e r a t e t h a t G A s w o r k w i t hs t ri n g s r e p r e s e n t i n g d e s i g n p a r a m e t e r s , i n s t e a d o f th e p a r a m e t e r s t h e m s e l v e s . O n c e a s tr i n g( o r a s o l u t i o n ) i s c r e a t e d b y g e n e t i c o p e r a t o r s , i t i s n e c e s s a r y t o e v a l u a t e t h e s o l u t i o n ,p a r t i c u l a r l y in t h e c o n t e x t o f t h e u n d e r l y i n g o b j e c t i v e a n d c o n s t r a i n t f u n c t i o n s . I n t h ea b s e n c e o f c o n s t r a in t s , t h e f i t n e s s o f a s tr i n g i s a s s ig n e d a v a l u e w h i c h i s a f u n c t i o n o f t h es o l u t i o n ' s o b j e c t i v e f u n c t i o n v a l u e . I n m o s t c a s e s, h o w e v e r, t h e f i tn e s s i s m a d e e q u a l t ot h e o b j e c t i v e f u n c t i o n v a l u e . F o r e x a m p l e , t h e f i t n e s s o f t h e a b o v e c a n r e p r e s e n t e d b y t h e10-bi t s t r ing is

    F (s ) = 0 . 0 6 5 4 ( 7 r ( 8 ) 2 / 2 + 7 r ( 8 ) ( 1 0 ) ) ,

    = 23,

    a s s u m i n g c = 0 . 0 6 5 4 . S i n c e t h e o b j e c t i v e o f t h e o p t i m i z a t i o n is to m i n i m i z e t h e o b j e c t i v ef u n c t i o n , i t i s t o b e n o t e d t h a t a s o l u t i o n w i t h a s m a l l e r f i t n e s s v a l u e is b e t t e r c o m p a r e d t oa n o t h e r s o l u t i o n .

    W e a r e n o w i n a p o s i t io n t o d e s c r i b e t h e g e n e t i c o p e r a t o r s t h a t a r e t h e m a i n p a r t o f th ew o r k i n g o f a G A . B u t b e f o r e w e d o t h a t l e t u s l o o k a t t h e s te p s i n v o l v e d i n a g e n e t i ca l g o r i t h m . F i g u r e 2 s h o w s a f l o w c h a r t o f t h e w o r k i n g o f a G A . U n l i k e c l a ss i c a l s e a r c h a n do p t i m i z a t i o n m e t h o d s , a G A b e g i n s i t s se a r c h w i t h a r a n d o m s e t o f s o l u t io n s , i n s t e a d o f j u s to n e s o l u t i o n . O n c e a p o p u l a t i o n o f s o l u t i o n s ( in t h e a b o v e e x a m p l e , a r a n d o m s e t o f b i n a r ys t ri n g s ) i s c r e a t e d a t r a n d o m , e a c h s o l u t i o n i s e v a l u a t e d i n t h e c o n t e x t o f t h e u n d e r l y i n gN L P p r o b l e m , a s d i s c u s s e d a b o v e . A t e r m i n a t i o n c r i t e r i o n i s t h e n c h e c k e d . I f t h e t e rm i n a -t i o n c r i t e ri o n i s n o t s a ti s fi e d , t h e p o p u l a t i o n o f s o l u t i o n s i s m o d i f i e d b y t h r e e m a i n o p e r a t o r sa n d a n e w ( a n d h o p e f u l l y b e t t e r ) p o p u l a t i o n i s c r e a t e d . T h e g e n e r a t i o n c o u n t e r i s i n c r e -m e n t e d t o i n d i c a t e t h a t o n e g e n e r a t i o n ( o r, i t er a t io n i n t h e p a r l a n c e o f c l a s si c a l s e a r c hm e t h o d s ) o f G A i s c o m p l e t e d . T h e f l o w c h a r t s h o w s t h a t t h e w o r k i n g o f a G A i s s im p l e

  • 8/7/2019 kalyan maydeb

    6/23

    298 Kalyanmoy Deb

    t = + 1

    In i t i a l i ze popula t ion

    I

    lR e p r o d u c t i o n ]

    1C r o s s o v e r I

    1M u t a t i o n ]

    I

    Fig ure 2. A flowchart of the working principle of a GA.

    and s t ra ightforward. We now discuss the genet ic operators , in the l ight of the can designprob lem.

    Figure 3 shows phenotypes o f a random popula t ion o f s ix cans . The f i tness (pena l izedcost) of each can is mark ed o n the can. I t i s in teres ting to note that two solut ions do nothave 300 ml vo lume ins ide and thus have been pena l ized by add ing an ex t ra a r t i f i c ia lcost, a mat ter which is discussed a l i t t le la ter. Current ly, i t suff ices to note that the extrapena l ty cos t i s l a rge enough to make a l l in feas ib le so lu t ions have worse f i tness va luesthan tha t o f any feas ib le so lu t ion . We a re now ready to app ly th ree gene t ic opera to rs , a sfol lows.

    3 .1c Reproduction operator: The pr imary ob jec t ive o f the reproduc t ion opera to r i s toemphas ize good so lu t ions and e l imina te bad so lu t ions in a popula t ion , whi le keep ing thepopula t ion s ize cons tan t . Th is i s ach ieved by per forming the fo l lowing tasks :

    Fig ure 3. A random population of six cans is created.

  • 8/7/2019 kalyan maydeb

    7/23

    An i n t rod uc t i o n t o g ene t i c a l go r i t hms 299

    (1) Iden t i fy ing goo d (usua l ly above-averag e) so lu t ions in a popula t ion .(2) M aking m ul t ip le cop ies o f good so lu tions .(3) E l imina t ing ba d so lu t ions f rom the popu la t ion so tha t mul t ip le co p ies o f good so lu t ions

    can be p laced in the popula t ion .The re ex i s t a nu m b er o f w a y s t o a ch i eve t he above ta sk s. So me com mo n m e th ods a r e

    tournament se lec t ion , p ropor t iona te se lec t ion , rank ing se lec t ion ,and o thers (Goldberg &Deb 1991) . In the fol lowing, we i l lustrate the binary tournament select ion.

    As the name sugges t s , tournaments a re p layed be tween two so lu t ions and the be t te rso lu t ion i s chosen and p laced in a popula t ion s lo t . Two o ther so lu t ions a re p icked aga inand another popula t ion s lo t i s f i l l ed up wi th the be t te r so lu t ion . I f done sys temat ica l ly,each so lu t ion can be m ade to par t ic ipa te in exac t ly two tournaments . The b es t so lu t ion in apopula t ion w i l l win b o th t imes , thereby m aking two co pies o f i t in the new popula t ion .S imi la r ly, the wors t so lu t ion wi l l lose in bo th tournaments and wi l l be e l imina ted f rom

    the popula t ion . This w ay, any so lu t ion in a popula t ion wi l l have zero , one , o r two c opies inthe new popula t ion . I t has been shown e l sewhere (Goldberg & Deb 1991) tha t thetournament se lec t ion has be t te r convergence and com puta t iona l t ime c om plex i ty p roper t iescompared to any o ther reproduc t ion opera tor tha t ex i s t s in the l i t e ra ture , when used inisolat ion.

    F igure 4 shows the s ix d i ffe ren t tournaments p layed be tween the o ld popula t ion me mb ers (each ge t s exac t ly two tu rns ) sh own in f igure 3 . Wh en cans w i th a cos t o f 23 un i tsand 30 un i t s a re chosen a t random for tournament , the can cos t ing 23 un i t s i s chosen andplaced in the new popula t ion . Bo th cans a re rep laced in the o ld popula t ion and two cans a rechosen for o ther tournaments in the nex t round . This i s how the mat ing po ol is fo rme d and

    the new popula t ion shown in f igure 5 i s c rea ted . I t i s in te res t ing to no te how be t te rso lu t ions (hav ing lesse r cos t s ) have made themse lves have more than one copy in the newpopula t ion and w orse so lu t ions have been e l imina ted f rom the popula t ion . T his is p rec i se lythe purpose of a reproduc t ion opera tor.

    @

    0@+28

    Mating Pool

    1

    ! ~ [~+28@

    Fig ure 4. Tournaments played between six population mem bers are shown. Solutionswithin the dashed box form the mating pool.

  • 8/7/2019 kalyan maydeb

    8/23

    3 0 0 Kalyanmoy Deb

    Figure 5. The population after reproduction operation. Go od solutions are retainedwith multiple copies and bad solutions are eliminated.

    3 . 1 d Crossover operator: T h e c r o s s o v e r o p e r a t o r i s a p p l i ed n e x t t o t h e s t r in g s o f th em a t i n g p o o l . A l i t tl e th o u g h t w i l l i n d i c a t e th a t t h e r e p r o d u c t i o n o p e r a t o r c a n n o t c r e a t e a n yn e w s o l u t io n s i n t h e p o p u l a t io n . I t o n l y m a k e s m o r e c o p i e s o f g o o d s o l u t i o n s a t t h e e x p e n s eo f n o t - s o - g o o d s o l u t i o n s. C r e a t i o n o f n e w s o l u t i o n s is p e r f o r m e d i n c r o s s o v e r a n d m u t a t i o no p e r a t o r s . L i k e t h e r e p r o d u c t i o n o p e r a t o r, t h e r e e x i s t a n u m b e r o f c r o s s o v e r o p e r a t o r s i n th eG A l i te r a tu r e ( S p e a r s & D e J o n g 1 9 9 1 ), b u t in a l m o s t a l l c r o s s o v e r o p e r a t o r s , tw o s t ri n g sa r e p i c k e d f r o m t h e m a t i n g p o o l a t r a n d o m a n d s o m e p o r t i o n s o f th e s t ri n g s a re e x c h a n g e db e t w e e n t h e s tr in g s . I n a s i n g l e - p o i n t c r o s s o v e r o p e r a to r, t hi s is p e r f o r m e d b y r a n d o m l ycho os in g a c ross ing s i t e a long the s t r ing and by exc han g in g a l l b i t s on the f igh t s ide o f thec ross ing s i t e .

    L e t u s i l l u s tr a te t h e c r o s s o v e r o p e r a t o r b y p i c k i n g t w o s o l u t i o n s ( c a l l e d p a r e n t s o l u t i o n s )f r o m t h e n e w p o p u l a t i o n c r e a t e d a f t e r a r e p r o d u c t i o n o p e r a to r. T h e c a n s a n d t h e i r g e n o t y p e( s t r ings ) a re shown in f igu re 6 . The th i rd s i t e a long the s t r ing l eng th i s chosen a t r andom

    and con ten t s o f the r igh t s ide o f th is c ross s it e are swa pped be tw een the two s t r ings . Th ep r o c e s s c r e a t e s t w o n e w s t ri n g s ( c a l l e d c h i ld r e n s o l u t i o n s ). T h e i r p h e n o t y p e s ( t h e c a n s ) a r ea l so shown in the f igu re . S ince a s ing le c ross s i t e i s chosen he re , t h i s c rossover ope ra to r i sca l l ed the single-point c r o s s o v e r o p e r a t o r.

    I t is i m p o r t a n t t o n o t e t h a t i n th e a b o v e c r o s s o v e r o p e r a t i o n w e h a v e b e e n l u c k y a n d h a v ec r e a t e d a s o l u t i o n ( 2 2 u n i t s ) w h i c h i s b e t t e r i n c o s t t h a n b o t h p a r e n t s o l u t i o n s . O n e m a yw o n d e r w h e t h e r i f a n o t h e r c r o s s s i t e w e r e c h o s e n o r t w o o t h e r s t r i n g s w e r e c h o s e n f o rc r o s s o v e r, w e w o u l d h a v e a b e t t e r c h i l d s o l u t i o n e v e r y t i m e . A g o o d p o i n t t o p o n d e r. I t i st r u e th a t e v e r y c r o s s o v e r b e t w e e n a n y t w o s o l u t i o n s f ro m t h e n e w p o p u l a t i o n i s n o t li k e l yto f ind ch i ld ren so lu t ions be t t e r than pa ren t so lu t ions , bu t i t w i l l be c l ea r in a wh i l e tha t t he

    c h a n c e o f c r e a t in g b e t t e r s o l u ti o n s i s f ar b e t t e r th a n r a n d o m . T h i s i s t ru e b e c a u s e p a r e n ts t ri n g s b e i n g c r o s s e d a r e n o t a n y t w o a r b i t r a r y r a n d o m s o l u t io n s , t h e y h a v e s u r v i v e dt o u r n a m e n t s p l a y e d w i t h o t h e r s o l u t i o n s d u r i n g t h e r e p r o d u c t i o n p h a s e . T h u s , t h e y a r ee x p e c t e d t o h a v e s o m e g o o d b i t c o m b i n a t i o n s i n t h e i r s tr i n g r e p re s e n t a t io n s . S i n c e a s in g l e -po in t c rosso ver on a pa i r o f pa ren t s t r ings can on ly c rea te l d i f f e ren t s t r ing pa i r s w i th b i t

    ( 8 ,1 0 ) 0 1 0 , , 0 0 0 1 0 1 0 0 11 ~ ,1 0 0 0 1 1 0 ( 10 ,6 )', ~ I

    @ ' ,(1 4,6 ) 0 1 1 ' 1 0 0 0 1 1 0 0 1 1 , 0 0 0 1 0 1 0 (1 2,1 0)

    F ig u re 6. An illustration of the single-point cross ov er operator. Tw o parent solutionschosen from mating pool to create two new children solutions.

  • 8/7/2019 kalyan maydeb

    9/23

    An i n t roduc t i o n t o g en e t i c a l go r i t hms

    ( 1 0 ,6 ) 0 1 0',_ 110 0 0 1 1 0 ~ 0 10 1_ 0,0 0 0 1 1 0 ( 8 , 6 )

    F ig ur e 7. An illustration o f the mutation operation. The fourth bit is mu tated to create

    a new string.

    301

    combina t ions f rom e i the r s t r ing , the c rea ted ch i ld ren so lu t ions a re a l sol ikely t o b e g o o ds t r ings . Moreover, every c rossover may no t c rea te be t t e r so lu t ions , bu t we do no t wor ryabou t i t too m uch . I f bad so lu t ions a re c rea ted , they ge t e l im ina ted in the nex t r eprod uc t ionopera to r and he nce hav e a shor t l if e . Bu t le t us th ink abou t the o the r poss ib i l i ty - wh en agoo d so lu t ion is c rea ted (and w hich has a be t t e r chan ce o f happ en ing) . S ince i t i s be t t er, i ti s l ike ly to ge t more cop ies in the nex t r eproduc t ion opera to r and i t i s l ike ly to ge t morechanc es to pe r fo rm c rossovers wi th o the r good so lu t ions . Thu s , more so lu t ions a re l ike ly toh a v e s i m i l ar c h r o m o s o m e s l i k e it . T h i s i s e x a c t l y h o w b i o l o g i st s a n d e v o l u t io n i s t s e x p l a i nt h e f o r m a t i o n o f c o m p l e x l if e f o r m s f r o m s i m p l e o n e s ( D a w k i n s 1 97 6, 1 98 6; E l d r e d g e1989) .

    In o rder to p rese rve some good s t r ings se lec ted dur ing the reproduc t ion opera to r, no t a l ls t rings in the pop u la t ion a re used in c rossover. I f a c rossover p robab i l i ty o f Pc is used the n1 0 0 pc % s t r in g s in t h e p o p u l a t i o n a r e u s ed i n th e c r o s s o v e r o p e r a t i o n a n d 1 0 0 (1 - p c ) % o ft h e p o p u l a t io n a re s i m p l y c o p i e d t o t h e n e w p o p u l a t i o n 2.

    3 .1e Muta t i o n op e ra t o r : T h e c r o s s o v e r o p e r a t o r is m a i n l y r e s p o n s ib l e f o r t h e s e a rc haspec t o f gene t i c a lgor i thms , even though the muta t ion opera to r i s a l so used fo r th i spurpo se spar ing ly. Th e m uta t ion op era to r changes a 1 to a 0 and v ice ve rsa wi th a smal lmuta t ion p robab i l i ty,Pm. T h e n e e d f o r m u t a t i o n i s t o k e e p d i v e r s i t y i n t h e p o p u l a t i o n .F i g u r e 7 s h o w s h o w a s t r in g o b t a i n e d a f t e r re p r o d u c t i o n a n d c r o s s o v e r o p e ra t o rs h a s b e e nmu ta ted to ano th er s t ring , r epresen t ing a s l igh t ly d i ffe ren t can . On ce aga in , the so lu t ionob ta ined i s be t t e r than the o r ig ina l so lu t ion . Al though , i t may no t happen a l l the t imes ,m u t a t i n g a s t r in g w i t h a s m a l l p r o b a b il i ty i s n o t a r a n d o m o p e r a t i o n s in c e t h e p r o c e s s h a s ab ias fo r c rea ting a few so lu t ions in the ne ighb ourh ood o f the o r ig ina l so lu t ion .

    These th ree opera to r s a re s imple and s t ra igh t fo rward . The reproduc t ion opera to r se lec t sg o o d s tr in g s a n d t h e c r o s s o v e r o p e r at o r r e co m b i n e s g o o d s u b s t r in g s f r o m t w o g o o d s tr in g stoge th er to fo rm a hopefu l ly be t t e r subs t r ing w hi le the muta t io n opera to r a l t e rs a s t ringloca l ly to c rea te a be t t e r s t r ing . Even though none o f these c la ims a re guaran teed and /ortes ted dur ing a GA genera t ion , i t is expec ted th a t i f bad s t rings a re c rea ted they wi l l be

    e l i m i n a t e d b y t h e r e p r o d u c t i o n o p e r a t o r i n t h e n e x t g e n e r a t i o n a n d i f g o o d s t r i n g s a r ec rea ted , they wi l l be emphas ized . La te r, we sha l l see some in tu i t ive reason ing as to whyG A s w i t h t h e se s i m p l e o p e r a to r s m a y c o n s t it u t e p o t e n ti a l s e a rc h a l g o r i th m s .

    3 .2 Funda men ta l d i f f e r e nces

    A s s e e n f r o m t h e a b o v e d e s c r i p t io n o f a G A ' s w o r k i n g p r in c i p le s , G A s a r e v e r y d i f f e re n tf r o m m o s t o f t h e t r a d i t i o n a l o p t i m i z a t i o n m e t h o d s . T h e f u n d a m e n t a l d i f f e r e n c e s a r edesc r ibed in the fo l lowing paragraphs .

    G A s w o r k w i t h a c o d i n g o f v a ri a b le s i n s t e ad o f t h e v a r ia b l e s th e m s e l v e s . B i n a r y G A s

    w o r k w i t h a d i s c r e t e s e a r c h s p a c e , e v e n t h o u g h t h e f u n c t i o n m a y b e c o n t i n u o u s . O n t h e

    2 E v e n t h o u g h t o p ( 1 - P c ) 1 0 0 % o f th e c u r r e n t p o p u l a t i o n c a n b e c o p i e d d e t e r m i n i s ti c a l l y t o t h e n e w p o p u l a t i o n ,t h i s is u s u a ll y p e r f o r m e d a t r a n d o m .

  • 8/7/2019 kalyan maydeb

    10/23

    302 Kalyanmoy Deb

    other hand , s ince func t ion va lues a t va r ious d i sc re te so lu t ions a re requ i red , a d i sc re te o rd i s c o n t i n u o u s f u n c t i o n m a y b e t a c k l e d u s i n g G A s . T h i s a l l o w s G A s t o b e a p p l i e d to a w i d ev a r i e t y o f p r o b l e m d o m a i n s . T h e o t h e r a d v a n t a g e i s t h a t G A o p e r a t o r s e x p l o i t t h e

    s imi la r i ti e s in s t r ing-s t ruc tu res to mak e an e ffec t ive sea rch . W e sha l l d i scuss m ore abo u t th i smat te r a l i t t l e l a t e r. One o f the d rawbacks o f us ing a cod ing i s tha t a su i t ab le cod ing mus tb e c h o s e n f o r p r o p e r w o r k i n g o f a G A . A l t h o u g h i t i s d i f fi c u l t t o k n o w b e f o r e h a n d w h a tcod ing i s su i t ab le fo r a p rob lem, a p le thora o f exper imenta l s tud ies (B/ icket al 1997)s u g g e s t th a t a c o d i n g w h i c h r e s p e c ts t h e u n d e r l y i n gbuilding block p r o c e s s i n g m u s t b e u se d .

    T h e m o r e s t r i k i n g d i f f e r e n c e b e t w e e n G A s a n d m o s t o f t h e t r a d i t i o n a l o p t i m i z a t i o nm e t h o d s i s th a t G A s w o r k w i t h a p o p u l a t i o n o f s o l u t io n s i n s t e a d o f a s in g l e s o l u ti o n . S i n c et h e r e is m o r e t h a n o n e s t ri n g t h a t i s p r o c e s s e d s i m u l t a n e o u s l y a n d u s e d t o u p d a t e a n y o n es t r ing in the popu la t ion , i t i s ve ry l ike ly tha t the expec ted GA so lu t ion may be a g loba ls o l u t i o n . E v e n t h o u g h s o m e t r a d i t i o n a l a l g o r i t h m s a r e p o p u l a t i o n - b a s e d , l i k e B o x ' sa l g o r i t h m ( B o x 1 9 6 5) , th e s e m e t h o d s d o n o t u s e t h e o b t a i n e d i n f o r m a t i o n e f fi c ie n t l y.Moreover, s ince a popu la t ion i s wha t i s upda ted a t every genera t ion , a se t o f so lu t ions ( int h e c a s e o f m u l t i m o d a l o p t i m i z a t io n , m u l t io b j e c t i v e P a r e to o p t i m i z a ti o n , a n d o t h e r s ) c a n b eo b t a i n e d s i m u l t a n e o u s l y, a m a t t e r w e d i s c u s s i n 5 .

    I n d i s c u s s i n g G A o p e r a t o r s o r t h e i r w o r k i n g p r i n c i p l e s a s a b o v e , n o t h i n g h a s b e e nm e n t i o n e d a b o u t t h e g r a d i e n t o r a n y o t h e r a u x i l ia r y p r o b l e m i n f o r m a t i o n . I n f a c t, G A s d on o t r e q u i re a n y a u x i l ia r y i n f o r m a t i o n e x c e p t t h e o b j e c t iv e f u n c t i o n v a lu e s , a l t h o u g hp r o b l e m i n f o r m a t i o n c a n b e u s e d t o s p e e d u p t h e G A ' s s e a r c h p r o c es s . D i r e c t s e a r c hm e t h o d s u s e d i n t ra d i t io n a l o p t i m i z a t i o n a l s o d o n o t r e q u i re g r a d i e n t i n f o r m a t i o n e x p l i c it ly,b u t i n s o m e o f t h e m e t h o d s s e a r c h d i r e c ti o n s a r e f o u n d u s i n g o b j e c ti v e f u n c t i o n v a l u e s t h a ta re s imi la r in concep t to the g rad ien t o f the func t ion . Moreover, some c lass ica l d i rec t

    s e a r c h m e t h o d s w o r k u n d e r t h e a s s u m p t i o n t h a t th e f u n c t i o n t o b e o p t i m i z e d i s u n i m o d a l .G A s d o n o t i m p o s e a n y s u c h r e s t r i c t i o n s .

    The o the r d i ffe rence i s tha t GAs use p robab i l i s t i c ru les to gu ide the i r sea rch . On the faceo f i t, t h is m a y l o o kad hoc, b u t c a r e f u l th i n k i n g m a y p r o v i d e s o m e i n t e r e s ti n g p r o p e rt ie s o ft h is t y p e o f s e a rc h . T h e b a s i c p r o b l e m w i t h m o s t o f t h e t r a d it io n a l m e t h o d s i s th a t t h e re a r ef i x e d tr a n s i ti o n r u le s t o m o v e f r o m o n e s o l u t io n t o a n o t h e r. T h a t i s w h y t h e s e m e t h o d s , i ng e n e r a l, c a n o n l y b e a p p l i e d t o a s p e c i a l c la s s o f p r o b l e m s , w h e r e a n y s o l u t io n i n t h e s e a r c hs p a c e l e a d s to t h e d e s i r e d o p t i m u m . T h u s , t h e s e m e t h o d s a r e n o t ro b u s t a n d s i m p l y c a n n o tb e a p p l i e d t o a w i d e v a r i e t y o f p r o b l e m s . I n t r y i n g t o s o l v e a n y o t h e r p r o b le m , i f a m i s t a k ei s made ea r ly on , s ince f ixed ru les a re used , i t i s ve ry ha rd to recover f rom tha t mis take .

    GAs , on the o the r hand , use p robab i l i s t i c ru les and an in i t i a l r andom popula t ion . Thus ,e a r l y o n , t h e s e a r c h m a y p r o c e e d i n a n y d i r e c t i o n a n d n o m a j o r d e c i s i o n i s m a d e i n t h eb e g i n n i n g . L a t e r o n , w h e n p o p u l a t i o n h a s c o n v e rg e d i n s o m e l o c a t io n s t h e s e a r c h d i r e c ti o nn a r r o w s a n d a n e a r - o p t i m a l s o l u t i o n is f o u n d . T h i s n a t u r e o f n a r r o w i n g t h e s e a r c h s p a c e a sgenera t ion p rogresses i s adap t ive and i s a un ique charac te r i s t i c o f GAs . Th i s charac te r i s t i co f G A s a l s o p e r m i t s t h e m t o b e a p p l ie d t o a w i d e c l a ss o f p r o b l e m s g i v i n g t h e m t h erobus tness tha t i s ve ry use fu l in so lv ing a va r ie ty o f op t imiza t ion p rob lems .

    A n o t h e r d i f f e r e n c e w i t h m o s t o f t h e t r a d i t i o n a l m e t h o d s i s t h a t G A s c a n b e e a s i l y a n dc o n v e n i e n t l y u s e d i n p a r a l le l m a c h i n e s . B y u s i n g t o u r n a m e n t s e l e c ti o n , w h e r e t w o s t r in g sa r e p i c k e d a t r a n d o m a n d t h e b e t t e r s tr in g i s c o p i e d i n t h e m a t i n g p o o l , o n l y t w o p r o c e s s o r sa r e i n v o l v e d a t a t im e . S i n c e a n y c r o s s o v e r o p e r a t o r re q u i r e s i n t e ra c t i o n b e t w e e n o n l y t w os t r ings , and s ince mu ta t ion requ i res a l t e ra t ion in on ly one s t r ing a t a time , G As a re su i t ab lef o r p a r a ll e l m a c h i n e s . T h e r e i s a n o t h e r a d v a n t a g e . S i n c e i n r e a l - w o r l d d e s i g n o p t i m i z a t i o np r o b l e m s , m o s t c o m p u t a t i o n a l t i m e i s s p e n t i n e v a l u a t i n g a s o l u t i o n , w i t h m u l t i p l e

  • 8/7/2019 kalyan maydeb

    11/23

    An introduction to genetic algorithms 303

    processors a l l so lu t ions in a popu la t ion can be eva lua ted in a d i s t r ibu ted manner. Th i s wi l lr e d u c e t h e o v e r a l l c o m p u t a t i o n a l t i m e s u b s t a n ti a ll y.

    E v e r y g o o d o p t i m i z a t i o n m e t h o d n e e d s t o b a l a n c e t h e e x t e n t o f e x p l o r a t i o n o f t h e

    i n f o r m a t i o n o b t a i n e d u p t o t h e c u r r e n t t i m e w i t h t h e e x t e n t o f e x p l o i t a t i o n o f t h e s e a r c hspace requ i red to ob ta in new and be t t e r so lu t ion(s ) . I f the so lu t ions ob ta in ed a re exp lo i t edt o o m u c h , p r e m a t u r e c o n v e rg e n c e i s e x p e c t e d . O n t h e o t h e r h a n d , i f t o o m u c h s t re s s isg i v e n o n s e a r c h , t h e i n f o r m a t i o n o b t a i n e d t h u s f a r m a y n o t h a v e b e e n u s e d p r o p e r l y.T h e r e f o r e , t h e s o l u t io n t im e m a y b e e n o r m o u s a n d th e s e a r c h i s s im i l a r t o a r a n d o m s e a r c hm e t h o d . M o s t t r a d it io n a l m e t h o d s h a v e f i x e d t ra n s i t io n r u le s a n d h e n c e h a v e f i x e d a m o u n t so f e x p l o r a t i o n a n d e x p l o i t a t i o n a l c o n s i d e r a t i o n s . F o r e x a m p l e , p a t t e r n s e a r c h a l g o r i t h m sh a v e a l o c a l e x p l o r a t o r y s e a r c h ( t h e e x t e n t o f w h i c h i s f ix e d b e f o r e h a n d ) f o l l o w e d b y ap a t t e rn s e a rc h . T h e e x p l o i t a ti o n a s p e c t c o m e s o n l y i n t h e d e t e r m i n a t i o n o f s e a rc h d i r e c ti o n s .B o x ' s m e t h o d ( B o x 1 9 6 5 ) h a s a l m o s t n o e x p l o r a t i o n c o n s i d e r a t i o n a n d h e n c e i s n o t v e r ye f f e c t i v e . I n c o n t r a s t , t h e e x p l o i t a t i o n a n d e x p l o r a t i o n a s p e c t s o f G A s c a n b e c o n t r o l l e da l m o s t i n d e p e n d e n t l y. T h i s p r o v i d e s a l o t o f f le x i b i l it y i n d e s i g n i n g a G A .

    3 .3 Theory of GAs

    The work ing p r inc ip le desc r ibed above i s s imple and GA opera to r s invo lve s t r ing copy ingand subs t r ing e xcha nge and occas iona l a l t e ra t ions o f b i ts . I t is su rpr i sing tha t wi th an y suchs imple opera to r s and m echan isms , a po ten t i a l sea rch i s poss ib le . We t ry to g ive an in tu it ivea n s w e r t o t h i s d o u b t a n d r e m i n d t h e r e a d e r t h a t a n u m b e r o f s tu d i es a r e c u r r e n t ly u n d e r w a y t of ind a r igorous m athem at ica l conve rgence p ro of fo r GAs (Vose 1990 ; W hi t l ey 1992; R udo lph1994) . Even though the opera t ions a re s imple , GAs a re h igh ly non l inear, mass ive ly mul t i -face ted , stochas t ic , and complex . There hav e been so me s tud ies us ing M arkov c ha in ana lys i stha t invo lve de r iv ing t r ans i tion p robab il i ti e s f rom one s t a te to ano ther and m anipu la t ing themto f ind the con vergence t ime and so lu t ion . S ince the num ber o f poss ib le s t a tes fo r a reasonab les tr in g l e n g t h a n d p o p u l a ti o n s i z e b e c o m e u n m a n a g e a b l e e v e n w i t h th e h i g h - s p e e d c o m p u t e r sava i l ab le today, o the r ana ly t i ca l t echn iques m ay b e u sed to p red ic t the con vergence o f GAs .This i s no t to say tha t no such p roo f i s poss ib le fo r GAs nor to d i scourage the reader f rompursu ing s tud ies re la ting to convergen ce o f GA s; ra the r th i s is a l l the mo re m ent ion ed here toh i g h l ig h t th a t m o r e e m p h a s i s n e e d s t o b e p u t i n t o t h e s t u d y o f G A c o n v e rg e n c e p ro o f s .

    I n o r d e r to i n v e s t ig a t e w h y G A s m a y w o r k , l e t u s r e c o n s i d e r t h e o n e - c y c l e G A a p p l i c a ti o nt o a n u m e r i c a l m a x i m i z a t i o n p r o b l e m .

    M a x i m i z e s i n (x ) ( 3)

    Var iab le bo un d 0 < x < 7r.

    W e us e f ive-b i t s t r ings to re prese nt th e var iab le x in the ran ge [0 , 7r] , so that the s t r ing(00000) rep resen t s x = 0 so lu t ion and the s t r ing (11111) represen t s x = 7r so lu t ion . Other30 s t r ings a re m app ed in the range [0 , 7 r]. Le t us a l so assu m e tha t we sha l l use a popu la t ionof s i ze four, p ropor t iona te se lec t ion3 , s ing le -po in t c rossover wi th p robab i l i ty one , and

    3 A string is given a co py in the m ating pool proportionate to its fitness value (Goldberg 1989). One way toimplement this op erator is to mark a roulette-wheel's circumference for ea ch solution in the population in

    proportion to the solution's fitness. Then , the whee l is spun N times (where N is the population size), each timepicking the so lutionmarked by the roulette-wheelpointer. This process m akes the exp ected numb er of copies ofa string having a fitness 5 p icked for the mating pool equaltofi#, w he ref is the average fitness of all strings inthe population.

  • 8/7/2019 kalyan maydeb

    12/23

    3 04 K a l y a n m o y D e b

    Ta ble 1. One generat ion of a GA simu lat ion on function sin(x).

    Initial population New population

    String DV" x f (x ) f i / f ACb Mating CS c String DV x f (x)pool

    01001 9 0.912 0.7 91 1.39 l 01001 3 01000 8 0 .8 1 1 0.72510100 20 2 . 0 2 7 0 .898 1.58 2 10100 3 10101 21 2 .1 2 8 0 ,84900001 1 0 .1 0 1 0 .1 01 0 .18 0 10100 2 11100 28 2 . 83 8 0 .29911010 26 2 .6 35 0 . 48 5 0 .85 1 11010 2 10010 18 1 . 82 4 0 .968

    Average, j~ 0.569 Average, f 0.7 11

    "DV decoded value of the string: bAC actual count of strings in the population; c CS stands for cross site

    b i t - w i s e m u t a t i o n w i t h a p r o b a b i l i t y 0 . 0 1 . To s t a r t t h e G A s i m u l a t i o n , w e c r e a t e a r a n d o mi n it ia l p o p u l a t i o n , e v a l u a t e e a c h s t r i ng , a n d u s e t h r e e G A o p e r a t o r s a s s h o w n i n t a b le 1. T h ef i r s t s t r i ng has a decoded va lue equa l t o 9 and th i s s t r i ng co r r e sponds to a so lu t ionx - - 0 .912 , w h ich h as a func t ion va lue equ a l t o s in (0 .912) = 0 .791 . S im i l a r ly, t he o the rt h r e e s t r i n g s a r e a l s o e v a l u a t e d . S i n c e t h e p r o p o r t i o n a t e r e p r o d u c t i o n s c h e m e a s s i g n s t h en u m b e r o f c o p i e s a c c o r d i n g t o a s t r i n g ' s f it n e s s, th e e x p e c t e d n u m b e r o f c o p i e s f o r e a c hs t r i n g i s c a l c u l a t e d i n c o l u m n 5 . W h e n apropor t iona te s e l e c t i o n s c h e m e i s a c t u a l l yi m p l e m e n t e d , t h e n u m b e r o f c o p i e s a l l o c a te d t o th e s t ri n g s a re s h o w n i n c o l u m n 6 .C o l u m n 7 s h o w s t h e m a t i n g p o o l . I t is n o t e w o r t h y t h a t th e t h i r d s t r in g i n t h e i ni ti a lp o p u l a t i o n h a d a f it n e s s v e r y s m a l l c o m p a r e d t o th e a v e r a g e f i tn e s s o f t h e p o p u l a t i o n a n dt h u s w a s e l i m i n a t e d b y t he s e l e c t io n o p e r a t o r. O n t h e o t h e r h a n d , t h e s e c o n d s t r i n g b e i n g a

    g o o d s t r i n g m a d e t w o c o p i e s i n t h e m a t i n g p o o l . C r o s s o v e r s i t e s a r e c h o s e n a t r a n d o m a n dt h e f o u r n e w s t r i n g s c r e a t e d a f t e r c r o s s o v e r a r e s h o w n i n c o l u m n 9 . S i n c e a s m a l l m u t a t i o np r o b a b i l i t y i s c o n s i d e r e d , n o n e o f t h e b i ts i s a l te r e d . T h u s , c o l u m n 9 r e p r e s e n t s t h e n e wp o p u l a t i o n . T h e r e a f t e r , e a c h o f t h e s e s t in g s i s d e c o d e d , m a p p e d , a n d e v a l u a t e d . T h i sc o m p l e t e s o n e g e n e r a t io n o f G A s i m u l a ti o n . T h e a v e r a g e f i tn e s s o f th e n e w p o p u l a t io n i sf o u n d t o b e 0 . 7 11 , a n i m p r o v e m e n t f r o m t h e i n i ti a l p o p u l a t i o n . I t is i n te r e s t i n g t o n o t e t h a te v e n t h o u g h a l l o p e r a t o r s u s e r a n d o m n u m b e r s , t h e r e i s a d i r e c t e d s e a r c h a n d t h e a v e r a g ep e r f o r m a n c e o f t he p o p u l a t i o n u s u a l l y i n c r e a s e s f r o m o n e g e n e r a t i o n t o a n o t h er.

    T h e s t r i n g c o p y i n g a n d s u b s t r i n g e x c h a n g e a r e al l v e r y in t e r e s t i n g a n d s e e m t o i m p r o v et h e a v e r a g e p e r f o r m a n c e o f a p o p u l a t i o n , b u t l e t u s n o w a s k th e q u e s t io n : W h a t h a s b e e n

    p r o c e s s e d i n o n e c y c l e o f G A o p e r a t o r s ? I f w e i n v e s ti g a te c a r e f u l ly w e o b s e r v e t h a t a m o n gt h e s t r in g s o f th e t w o p o p u l a t i o n s t h e r e a r e s o m e s i m i l a r i t ie s i n s t ri n g p o s i t i o n s a m o n g t h es t ri n g s. B y t h e a p p l i c a t io n o f t h r e e G A o p e r a t o r s , t h e n u m b e r o f s t r i n g s w i t h s i m i l a r i ti e s a tc e r t a i n s t r i n g p o s i t i o n s h a v e b e e n i n c r e a s e d f r o m t h e i n i t i a l p o p u l a t i o n t o t h e n e wp o p u l a t i o n . T h e s e s i m i l a r i t i e s a r e c a l l e dschema ( schemata , i n p lu ra l ) i n t he GA l i t e r a tu re .M o r e s p e c i f ic a l l y, a s c h e m a r e p r e s e n t s a s e t o f s t ri n g s w i t h a c e r ta i n s i m i l a r it y a t c e r t a ins t ri n g p o s i ti o n s . To r e p r e s e n t a s c h e m a f o r b i n a r y c o d i n g s , a tr i p l et ( 1 , 0 , a n d , ) i s u s e d . A ,r e p r e s e n t s b o t h 1 a n d 0 .

    Thu s a s che m a H1 = (1 0 * * * ) r ep r e sen t s e igh t s t r i ngs w i th a 1 i n t he f i rs t pos i t i on anda 0 in t he s e c o n d p o s i t i o n . F r o m t a b l e 1, w e o b s e r v e t h a t th e r e i s o n l y o n e s t r i n g c o n t a i n e din t h i s s che m a HL in t he i n i t ia l popu la t ion , w h i l e t he re a r e two s t r i ngs con ta in ed in t h iss c h e m a i n t h e n e w p o p u l a t i o n . O n t h e o th e r h a n d , e v e n t h o u g h t h e r e w a s o n e r e p r e s e n t a t i v es t ri n g o f t h e s c h e m a H 2 = ( 0 0 . . ) i n t he i ni t ia l p o p u l a t i o n , t h e r e is n o n e i n th e n e wp o p u l a ti o n . T h e r e a r e a n u m b e r o f o th e r s c h e m a t a t h at w e m a y i n v e s t ig a t e a n d c o n c l u d e

  • 8/7/2019 kalyan maydeb

    13/23

    An introduction to genetic algorithms 305

    whether the number of strings they represent is increased from the initial population to thenew population or not. But what do these schemata mean anyway?

    Since a schema represents certain similar strings, it can be thought of representing a

    certain region in the search space. For the above function the schema Hi represents stringswith x values varying from 1.621 to 2.331 with function values varying from 0.999 to0.725. On the other hand, the schema H2 represents strings with x values varying from 0.0to 0.709 with function values varying from 0.0 to 0.651. Since our objective is to maximizethe function, we would like to have more copies of strings representing schema Hi than H2.This is what we have accomplished in table 1 without having to count all these schemacompetitions and without the knowledge of the complete search space, but by manipulatingonly a few instances of the search space. The schema H1 for the above example has onlytwo defined positions (the first two bits) and both defined bits are tightly spaced (very closeto each other) and contain the possible near-optimal solution (the string (1 0 0 0 0) is theoptimal string in this problem). The schemata that are short and above-average are knownas building blocks.While GA operators are applied to a population of strings, a number ofsuch building blocks in various parts along the string get emphasized, like H1 in the aboveexample. Finally, these little building blocks get grouped together due to the combinedaction of GA operators to form bigger and better building blocks. This process causes theGAs to finally converge to the optimal solution. In the absence of any rigorous convergenceproofs, this is what is hypothesized to be the reason for GA's success. This hypothesis islargely known as building block hypothesis.

    4 . C o n s t r a i n e d o p t i m i z a t i o n u s i n g G A s

    The above discussion of the can design problem avoids detailed consideration of cons-traints, instead a simple penalty term is used to penalize infeasible solutions. Let us discussthe difficulties of such a simple method and present an eff icient way of handling constraints.

    Typically, an optimal design problem having N variables is written as a nonlinearprogramming (NLP) problem, as follows:

    Minimize f (x )Subject to gj(x) > 0, j = 1, 2, . . . , J ,

    h~(x)= 0, k = 1, 2, . . . , K, (4)

    x l l ) < X i < . ( u )- - ~ i , i = l , 2 , . . . , N .

    In the above problem, there are J inequality and K equality constraints. The can designproblem has two (N=-2) variables, one (J = 1) inequality constraint and no (K= 0)equality constraint. The simple penalty function method converts the above constrainedNLP problem to an unconstrained minimization problem by penalizing infeasible solutions:

    J K

    P(x , R, r) = f( x ) Z Rj(gj(x)>2 + Z rk [hk(X)]2. (5)j = l k = l

    The parameters Rj and rk are the penalty parameters for inequality and equality constraintsrespectively. The success of this simple approach lies in the proper choice of thesepenalty parameters. One thumb rule of choosing the penalty parameters is that they mustbe so set that all penalty terms are of comparable values within themselves and with

  • 8/7/2019 kalyan maydeb

    14/23

    306 K a l y a n m o y D e b

    the objective function values. This is intuitive because if the penalty corresponding toa particular constraint is very large compared to that of other constraints, the searchalgorithm emphasizes solutions that do not violate the" former constraint. This way other

    constraints get neglected and the search process gets restricted in a particular way. Inmost cases, search methods prematurely converge to a suboptimal feasible or infeasiblesolution.

    Since a proper choice of penalty parameters is the key aspect of the working of such ascheme, most researchers e x p e r i m e n twith different values of penalty parameter values andfind a set of reasonable values. In order to reduce the number of parameters, an obviousstrategy often used is to normalize the constraints so that only one penalty parameter valuecan be used (Deb 1995). Consider the constraint gl (d, h) in the can design problem. Afternormalizing, this constraint can be written as follows:

    7rd2hg l ( x ) ~ T / 3 0 0 - 1 _> 0, (6)

    so that the constraint violation is between [ - 1,0]. If there was another constraint in the candesign problem which was also normalized like gl, then both constraints would have beenemphasized equally. In such cases, a search and optimization method works much better ifan appropriate penalty parameter value (Deb & Goyal 1999) is used.

    Since GAs work with a population of solutions, instead of a single solution, a betterpenalty approach can be used. The penalty function approach also exploits the ability tohave pair-wise comparisons of tournament selection operators as discussed earlier. Duringtournament selection, the following criteria are always enforced.

    (1) Any feasible solution will have a better fitness than any infeasible solution,(2) Two feasible solutions are compared based only on their objective function values.(3) Two infeasible solutions are compared based on the amount o f constraint violations.

    Figure 8 shows a unconstrained single-variable function f ( x ) which has a minimumsolution in the infeasible region. The fitness F ( x ) of any infeasible or feasible solution isdefined as follows:

    F ( x ) = f f ( x ) , if g j (x ) > O , V j C J ,I .fmax + ~ := 1 ( g j ( x ) ~ ,otherwise. (7)

    The parameter fmax is the maximum function value of all feasible solutions in thepopulation. The objective funct ion f(x) , constraint violation (g(x)), and the fitness functionF(x) a r eshown in the figure. It is important to note that F ( x ) = f ( x )in the feasible region.When a tournament selection operator is applied to a such a fitness function F(x), all threecriteria mentioned above will be satisfied and there will be selective pressure towards thefeasible region. The figure also shows how the fitness value of six arbitrary solutions willbe calculated. Thus, under this constraint handling scheme, the fitness value of an infeasiblesolution may change from one generation to another, but the fitness value of a feasiblesolution will always be the same. Since the above constraint handling method establishes ahierarchy among infeasible solutions and tournament selection does not depend on theexact fitness values, their relative difference is important and any arbitrary penalty

    parameter will also work. In fact, there is no need for any explicit penalty parameter. Thisis a major advantage of this constraint handling method. It is important to note that such aconstraint handling scheme without the need for a penalty parameter is possible because

  • 8/7/2019 kalyan maydeb

    15/23

    A n introduction to gen etic algorithm s 3 0 7

    ~F(x)

    v "~ "~ ! ~ ~ v f

    X

    Figure 8. An efficient constraint handling schem e is i llustrated. Six solid circles aresolutions in a GA population.

    G A s u s e a p o p u l a t i o n o f s o l u t i o n s a n d p a i r - w i s e c o m p a r i s o n o f s o l u t i o n s i s p o s s i b l e u s i n gt h e t o u r n a m e n t s e l e c ti o n . F o r t h e s am e r e a s o n , s u c h s c h e m e s c a n n o t b e u s e d w i t h c l a s s ic a lp o i n t - b y - p o i n t s e ar c h a n d o p t i m i z a t io n m e t h o d s .

    To s h o w t h e e f f i c a cy o f t h is c o n s t r ai n t h a n d l in g m e t h o d , w e a p p l y G A s w i t h t h i s m e t h o dt o s o l v e a t w o - v a r i a b l e , t w o - c o n s t r a i n t N L P p r o b l e m :

    M i n i m i z e f l ( X l ,X 2 ) = (x ~ + x 2 - 11 ) 2 + ( x t + x 2 - 7 ) 2 ,

    Su bje ct to g l (x) -~ 4 .8 4 - x~ - (x2 - 2 .5) 2 > 0 ,( 8 )

    g2(x ) ~ (Xl - 0 .05 ) 2 + (x2 - 2 .5) 2 - 4 .8 4 > 0 ,

    0 _ < x ~ < _ 6 , 0 < x 2 _ < 6 .

    T h e u n c o n s t r a i n e d o b j e c t i v e f u n c t i o n f l ( x l , x 2 ) h a s a m i n i m u m s o l u t i o n a t (3 , 2 ) w i t h af u n c t i o n v a l u e e q u a l t o z e r o . H o w e v e r, d u e t o t h e p r e s e n c e o f c o n s t r a in t s , t h is s o l u t i o n i s n om o r e f e a s i b le a n d th e c o n s t r a i n e d o p t i m u m s o l u t i o n i s x * = ( 2 . 2 4 6 8 2 6 , 2 . 3 8 1 8 6 5 ) w i t h af u n c t i o n v a l u e e q u a l t o f l* = 1 3 . 5 9 0 8 5 . T h e f e a s i b l e r e g i o n i s a n a r r o w c r e s c e n t - s h a p e dr e g i o n ( a p p r o x i m a t e l y 0 . 7 % o f t h e to t a l s e a rc h s p a c e ) w i t h th e o p t i m u m s o l u t i o n ly i n g o nt h e s e c o n d c o n s t r a in t , a s s h o w n i n f ig u r e 9 . G A s w i t h a p o p u l a t i o n o f si z e 5 0 i s r u n f o r 5 0g e n e r a t i o n s . N o m u t a t i o n i s u s e d h e r e . F i g u r e 9 s h o w s h o w a t y p i c a l G A r u n d i s t r i b u t e ss o l u t i o n s a r o u n d t h e c r e s c e n t - s h a p e d f e a s i b l e r e g i o n a n d f i n a l l y c o n v e rg e s t o a f e a s i b l es o l u t i o n v e r y c l o s e t o t h e t r u e o p t i m u m s o l u t io n .

    5 . A d v a n c e d G A s

    T h e s i m p l e G A s d e s c r i b e d a b o v e h a s b e e n e x t e n d e d t o s o l v e d i f fe r e n t s e a rc h a n d o p t i m i z a -t i o n p r o b l e m s . S o m e o f th e m a r e l is t e d a n d d i s c u s s e d i n b r i e f i n t h e f o ll o w i n g :

  • 8/7/2019 kalyan maydeb

    16/23

    308 K a l y a n m o y D e b

    + f0 0 " ' " 0 "~

    . . . . . . . . . . . . 0 . . . .x . . . . . . . . . . . . . . , , q .

    " o " + "- - I ~ . o % ' .

    . . . . . 0 0 " " 0 "' ," o . . . . . . . . . . . . . . . . . . . . " . " ' . o '

    4 - "-+ +'.0 , . . . . . . . . . . . . . . . . . . . . . . . 0 . . . . . O . " " . " ' ,

    .+ . . . . . . . .. . . ' . . + + ' "++

    0 . . . . '

    ; .+ . . . - .+ . . , ,+o . . .... ". .. ".i ! ' . " ++ : + '+ '~ i o !

    ". ' '+ "o ". " ' " ! ,i" " - . o o , . x "" "" '+ ~ " ~ o; ;

    " % o " , x " . " + - , o T ; : ~ ;

    0 1 2 3 4 5 6

    x l

    Fi gu re 9. Population history at initial generation (marked with open circles), atgeneration 10 (marked w ith 'x') and at generation 5 0 (marked with open boxes) usingthe proposed scheme. The population converges to a solution very close to the trueconstrained optimum solution on a constraint boundary.

    5 . 1 R e a l - c o d e d G A s

    I n 3 w e h a v e d i s c u s s e d b i n a r y G A s w h e r e v a r i a b le s a re r e p r e s e n t e d b y a b i n a r y s t r in g .How ever, th i s i s no t a lways ne cessa ry an d var iab les t ak ing rea l va lues can be used d i rec t ly.A l t h o u g h t h e s a m e r e p r o d u c t i o n o p e r a t o r d e s c r i b e d h e r e c a n b e u s e d , t h e t ri c k li e s i n u s in ge f f ic i e n t c r o s s o v e r a n d m u t a t i o n o p e r a t o r s ( E s h e l m a n & S c h a f f e r 1 9 93 ; D e b & A g r a w a l1 9 95 ; D e b & K u m a r 1 99 5). T h e r e a l - c o d e d G A s e l i m i n a t e t h e d i ff i c u lt i e s o f a c h i e v i n ga r b i tr a r y p re c i s io n i n d e c i s i o n v a r i ab l e s a n d t h e H a m m i n g C l i f f p r o b l e m ( G o l d b e rg 1 9 89 )assoc ia ted wi th b ina ry s t r ing represen ta t ion o f r ea l numbers .

    The c rossover i s pe r fo rmed var iab le by va r iab le . For c ross ing the i th va r iab le be tweentwo paren t so lu t ion vec to rs (hav ing x ) and x /2 va lues ) , the fo l lowing p rocedure i s used to

    c rea te two new va lues (y ] and y2) us ing a p robab i l i ty d i s t r ibu t ion (T ' (3 ) ) desc r ibed asfo l lows (Deb & Agrawal 1995) :

    {.5(~7 + 1)/T~, i f 3 _< 1,1 ( 9 )7>(/3) = 0.5(7] + 1) ~---~, oth erw ise,whe re the pa ra m ete r /3 i s the ra t io o f the d i ffe rence in the ch i ld ren an d paren t so lu t ions :

    y) - y~/3 = ~ . (10)

    The p rocedure fo r ca lcu la t ing ch i ld ren so lu t ions a re as fo l lows :( 1 ) C r e a t e a r a n d o m n u m b e r u b e t w e e n 0 a n d 1 .( 2) F i n d a / 3 f o r w h i c h f 0 7 9 ( 3 ) d ~ = u .

  • 8/7/2019 kalyan maydeb

    17/23

    A n i n tr o d u c t io n t o g e n e t i c a l g o r i th m s 309

    (3) The chi ldren are calculated as

    y~ ---- 0.5[(x~ + ~ ) - ~lx ~ - x~ I],

    y2i = 0.5[(x~ + x~) + /3 1 ~ - x~l].

    The probabi l i ty dis t r ibut ion is chosen to produce near-parent solut ions with a largerprobabi l i ty than solut ions far away from parent solut ions. The parameter ~ determines howclose chi ldren solut ions can become with respect to parent solut ions. A small value of 7/ma kes chi ldren solut ions to be awa y from parents and a large value al lows chi ldren so lut ionsto be c lose to paren ts . I t has been ob served that a va lue of ~ /= 2 w orks wel l in mos t cases(Deb & Agrawal 1995) .

    Since the probabi l i ty term is def ined with a non-dimensional ized parameter /3 , thiscross ove r operato r is adapt ive in nature . Ini tial ly, wh en the populat ion is rand om ly created,

    paren ts a re l ike ly to be fa r aw ay f rom each o ther and th is c rossover opera tor has an a lmo s tuniform probabi l i ty to create any solut ion in the search space. On the other hand, af tersuff ic ien t number o f genera t ions when the popula t ion i s converg ing to a nar row reg ion ,parents are c lose r to each other. T his cro ssov er wil l then not a l low dis tant solut ions to becrea ted and ins tead wi l l f ind so lu t ions c loser to paren ts , the reby a l lowing GAs to havearb it rary prec i s ion in so lu tions. Th e abov e d i s tr ibu tions can a l so be ex tended for bounde dvariables . A discrete vers ion o f this probab i l i ty dis tr ibut ion is a lso designed to tackled isc re te search space prob lem s (Deb & G oyal 1999). Along th i s l ine , a rea l-coded m uta t ionopera tor ' i s a l so deve lope d to f ind a per tu rbed ch i ld so lu t ion f rom a paren t so lu t ion us ing aprobabi l i ty dis t r ibut ion (Deb & Goyal 1999) .

    5 .2 M u l t i m o d a l o p t i m i z a t i o n

    Ma ny rea l -wor ld pro b lem s conta in mul t ip le so lu t ions tha t a re op t imal o r near-op timal . Theknow ledge o f mul t ip le op t imal so lu t ions in a p rob lem provides f l ex ib i l ity in choos inga l te rna te y e t equa l ly good so lu t ions as and wh en requi red . In t ry ing to f ind more than on eopt imal so lu t ions us ing t rad it iona l po in t -by-poin t methods , repea ted app l icat ion of theopt imizat ion algori thm with different ini t ia l points is required. This requires somek nowledge o f t heb a s i n o f a t t r a c t io nof des i red op t ima in the prob lem, o therwise manyres ta r t s may converge to the same op t imum. S ince GAs work wi th popula t ion po in t s , a

    num ber o f op t imal so lu t ions ma y be m ade to coex is t in the popula tion , thereby a l lowing usto f ind mult iple opt imal solut ions s imultaneously.The idea of a number o f op t imal so lu t ions coexis t ing in a popula t ion requi res some

    change in the s imple gene t ic a lgor i thms descr ibed in the prev ious sec t ion . Bor rowing theana logy o f coex ist ing mul t ip le n iches in na ture , w e recognize tha t mul t ip le n iches (hum anand an imals , fo r exam ple) ex i s t by shar ing ava i lab le resources ( l and and fo od , fo r example) .A s imi la r sharing c oncep t i s in t roduced a r t i f ic ia l ly in a G A popula t ion b ys h a r i n g f u n c t i o n s(Goldberg & Richardson 1987; Deb 1989; Deb & Goldberg 1989) , which ca lcu la te theex ten t o f sharing tha t needs to be done b e tw een two s tr ings. I f the d i stance (cou ld be som enorm of the d i ffe rence in decod ed parameter va lues ) be tw een i th and j th s tr ings i sdij,usual ly a l inear shar ing funct ion is used:

    1 - (dij /cr), i f dij < o-; (11 )Sh(d i j )= 0, otherw ise.

  • 8/7/2019 kalyan maydeb

    18/23

    310 K a l y a n m o y D e b

    The parameter cr is the maximum distance between two strings for them to be shared and isfixed beforehand (Deb 1989). The sharing enhancement to the simple GAs is as follows.For every string in the population, the sharing function value is calculated for other strings

    taken either from a sample of the population or from the whole population. These sharingfunction values are added together to calculate the niche count, mi = ~-2~jSh(d i j ) . Finally,the shared fitness of the ith string is calculated as f/--f./mi and this shared fitness is usedin the reproduction operator instead of the objective function value ft. Other operators areused as before. This allows coexistence of multiple optimal solutions (both local andglobal) in the population for the following reason. If in a generation, there exist fewerstrings from one optimal solution in the population, the niche count for these strings will besmaller compared to strings from other optima and the shared fitness of these strings willbe higher. Since the reproduction operator will now emphasize these strings from theextinct optima, there will suddenly be more strings from this optima in the population. Thisis how sharing would maintain instances of multiple optima in the population. GAs withthis sharing strategy has solved a number o f multimodal optimization problems, including amassively multimodal problem having more than five million local optima, o f which only32 are global optima (Goldberg e t a l 1992).

    5.3 M u l t i - o b j e c t i v e o p t i m i z a t i o n

    In a multiobjective optimization problem, there are more than one objective functions,which are to be optimized simultaneously. Traditionally, the practice is to convert multipleobjectives into one objective function (usually a weighted average of the objectives is used)and to then treat the problem as a single objective optimization problem. Unfortunately,this technique is subjective to the user, with the optimal solution being dependent on thechosen weight vector. In fact, the solutions of the multiobjective optimization problem canbe thought as a collection of optimal solutions obtained by solving different single objectivefunctions formed using different weight vectors. These solutions are known as P a r e t o -o p t i m a l solutions.

    In order to find a number of Pareto-optimal solutions, different extensions of GAshave been tried in the recent past (Fonseca & Fleming 1993; Horn & Nafpliotis 1993;Srinivas & Deb 1995). Because of their population approach, GAs are ideal candidates tosolve these kinds of problems. In one implementation of GAs, the concept of nondominatedsorting of population members is used. We briefly describe this method in the following.

    GAs require only one fitness value for an individual solution in the population. Thus, anartificial fitness value must be assigned to each solution in the population depending on thecomparative values of each objective function. In order to assign a fitness measure to eachsolution, Srinivas & Deb (1995) have borrowed Goldberg's (1989) idea of nondominationamong population members. In a population, the nondominated solutions are defined asthose solutions which are better in at least one objective than any other solution in thepopulation. In order to implement nondomina ted sorting concept, the fo llowing procedureis adopted:

    The populat ion is sorted to find the nondominated set of solutions. All individuals in thissubpopulation are assigned a large artificial fitness value.

    Since the objective is to find a number of Pareto-optimal solutions, sharing proceduredescribed earlier is performed among these nondominated solutions and a new sharedfitness is calculated for each of these solutions.

  • 8/7/2019 kalyan maydeb

    19/23

    A n introduction to gen etic algorithm s 311

    These so lu t ions a r e t emp ora r i l y coun t ed ou t o f t he popu l a t i on and t he nex tnondominated set is found. These solut ions are ass igned an ar t i f ic ia l f i tness valuemarg ina l ly sm al le r than the leas t shared f i tness va lue in the prev ious non dom ina ted se t.

    This i s done to im pose a h igher p re fe rence for so lu t ions in the prev ious (and be t te r ) se tthan for the current set .

    Shar ing i s per formed aga in among the new nondom ina ted se t and th i s p rocess con t inuest il l a ll popula t ion m em bers a re ranked in descending order o f the nondo mina ted se ts .

    Thereaf ter, the reprod uct ion o perat ion is perfo rm ed with these ar t if ic ia l f i tness values . Crosso ver and muta t ion opera tors a re app l ied as usua l .

    This ex tens ion of GA s has been a ppl ied to so lve a num ber o f t es t p rob lem s (Sr in ivas &De b 1995) and a num ber o f eng ineering des ign op t imiza t ion prob lem s (Sr in ivas 1994; D eb& Kumar 1995) .

    5 .4 GA s in fuzzy logic control ler design

    Fuzzy log ic t echniques a re p r imar i ly app l ied in op t imal con t ro l p rob lems where qu ickcont ro l s t ra tegy i s needed and imprec i se and qua l i t a tive def in i t ion of ac t ion p lans a reavai lable . There are pr imari ly two act ivi t ies in designing an opt imal fuzzy control ler :

    (1 ) F ind op t imal membersh ip func t ions for con t ro l and ac t ion var iab les , and(2) f ind an op t imal se t o f ru les be tw een cont ro l and ac t ion var iab les .

    In bo th these cases, G As have been su i tab ly used. F igure 10 shows typ ica l m embersh ipfunct ions for a var iable (control or act ion) having three choices - low, medium, and

    high. S ince the maxim um mem bersh ip func t ion va lue of these choices i s a lways one ,the absc i ssas markedxi is usual ly chosen by the user. GAs can t reat these abscissas asvar iab les and an op t imiza tion pro b lem can b e pose d to f ind these variab les fo r min imiz ingor maxim izing a control s t ra tegy (such as t ime o f overal l operat ion, product quali ty, andothers) . A n um ber o f such appl icat ions exis t in the l i terature (Karr 1991; H errera & V erdegay1996).

    The second propos i t ion of f ind ing an op t imal ru le base us ing G As i s un ique and a l somo re in teres ting . Le t us t ake an exam ple to i llus tra te how GA s can be un iqu e ly appl ied toth is p rob lem. Le t us assum e tha t there a re two co nt ro l var iab les ( t empera ture and hum idi ty )and there a re th ree op t ions for each - low, med ium, and h igh . There i s one ac t ion var iab le(wate r j e t f low ra te ) wh ich a l so takes one of th ree choices - low, medium , and h igh . W i th

    D

    Parameter

    L o w M e d i um H i g h

    ZI Z2 Z 3

    Fig ure 10. Fuzzy membership functions and typical variables used for optimal design.

  • 8/7/2019 kalyan maydeb

    20/23

    3 1 2 Kalyanmoy Deb

    Ta ble 2. Ac tion variable for a string representin g a fuz zy rule base shownin slanted fonts.

    Temperature

    Hum idity Low Medium High Do n't care

    Low High Medium MediumMedium Low Medium MediumHigh Medium HighDo n't care High

    these op t ions , t he re a re a to t a l o f 3 x 3 o r 9 com bin a t ion s o f con t ro l va r i ab les poss ib le . In

    fac t , con s ide r in g the ind iv id ua l e ff e c t o f con t ro l va r i ab le sepa ra te ly, t he re a re a to t a l o f(4 x 4 - 1 ) o r 15 to t a l com bin a t ion s o f con t ro l va r iab les poss ib le . Thus , f ind ing an op t ima lr u l e b a s e i s e q u i v a l e n t t o f i n d i n g o n e o f t h e f o u r o p t i o n s ( f o u r t h o p t i o n i s n o a c t i o n ) o f th ea c t io n v a r i a b l e f o r e a c h c o m b i n a t i o n o f t h e c o n t r o l v a r ia b l e s . A G A w i t h a s tr i n g l e n g t h o f1 5 a n d w i t h a t e r n a r y - c o d i n g c a n b e u s e d t o r e p r e s e n t t h e r u l e b a s e f o r t h i s p r o b l e m . T h efo l lowing i s a typ ica l s t r ing :

    3 1 2 4 2 4 3 4 4 2 4 3 2 2 4 .

    E a c h p o s i t i o n i n t h e s t r in g s i g n i f ie s a c o m b i n a t i o n o f a c t i o n v a r ia b l e s . I n t h e a b o v e c o d i n g ,a 1 r ep resen t slow, a 2 r ep resen t smedium,a 3 r ep resen t shigh v a l u e o f t h e a c t i o n v a r i a b l e,a n d a 4 m e a n s n o a c t i o n , t h e r e b y s i g n i f y i n g th e a b s e n c e o f t h e c o r r e s p o n d i n g c o m b i n a t i o nof ac t ion va r i ab les in the ru le base. Th us , t he abo ve s t r ing r ep resen t s a ru l e base hav ing 9r u l e s ( w i th n o n - 4 v a l u e s ). T h e r u l e b a s e d o e s n o t c o n t a i n 6 c o m b i n a t i o n s o f a c ti o n v a r i ab l e s( n a m e l y, 4 t h , 6 th , 8 t h , 9 th , 1 l t h , a n d 1 5 t h c o m b i n a t i o n s ) . Ta b l e 2 s h o w s t h e c o r r e s p o n d i n gr u l e b a s e . A l t h o u g h t h i s r u l e b a s e m a y n o t b e t h e o p t i m a l o n e , G A s c a n p r o c e s s ap o p u l a t i o n o f s u c h r u l e b a s e s a n d f i n a l ly f i n d t he o p t i m a l r u l e b a se . O n c e t h e r u le s p r e s e n ti n th e r u l e b a s e a r e d e t e r m i n e d f r o m t h e s t r in g , u s e r - d e f i n e d f i x e d m e m b e r s h i p f u n c t i o n sc a n b e u s e d t o s i m u l a t e t h e u n d e r l y i n g p r o c e s s . T h e r e a f t e r , t h e o b j e c t i v e f u n c t i o n v a l u e c a nb e c o m p u t e d a n d t h e r e p r o d u c t i o n o p e r a t o r c a n b e u s e d . T h e u s u a l s i n g l e - p o i n t c r o s s o v e ra n d a m u t a t i o n o p e r a t o r ( o n e a l l el e m u t a t i n g t o o n e o f th r e e o t h e r a l l el e s ) c a n b e u s e d w i t h

    t h is c o d i n g . N o t i c e t h a t t h i s r e p r e s e n t a t i o n a l l o w s G A s t o f in d t h e o p t i m a l n u m b e r o f r u l e sa n d t h e o p t i m a l r u l e s n e e d e d t o s o l v e t h e p r o b l e m s i m u l t a n e o u s l y. I n t h e a b o v e p r o b l e m ,b ina ry s t r ings , in s t ead o f t e rna ry s t r ings , can a l so be used . Each o f fou r op t ion s in the ac t ionv a r i a b l e c a n n o w b e r e p r e s e n t e d b y t w o b i t s a n d a t o ta l o f 3 0 b i t s is n e c e s s a r y t o r e p r e s e n t ar u l e b a s e . S i n c e G A s d e a l w i t h d i s c r e t e v a r i a b l es a n d w i t h a s t r in g r e p r e s e n t a t i o n o f as o l u t io n , t h e a b o v e s c h e m e o f f in d i n g a n o p t i m a l r u l e b a s e w i th o p t i m a l n u m b e r o f r u le s i su n i q u e i n G A s . O n e s u c h t e c h n i q u e h a s b e e n u s e d t o d e s ig n a f u z z y l o g i c c o n t r o l l e r f o rm o b i l e r o b o t n a v i g a t i o n a m o n g d y n a m i c o b s t a c l e s ( D e bet a11998).

    I t i s i n t e r e st i n g t o n o t e t h a t b o t h o p t i m a l m e m b e r s h i p f u n c t i o n d e t e r m i n a t i o n a n d o p t i m a lr u l e b a s e i d e n t i f i c a t i o n t a s k s c a n b e a c h i e v e d s i m u l t a n e o u s l y b y u s i n g a c o n c a t e n a t i o n o ft w o c o d i n g s m e n t i o n e d a b o v e . A p a r t o f t h e o v e r a ll s t r in g w i l l r e p r e s e n t t h e a b s c is s a s o f t h econ t ro l va r i ab les an d the r e s t o f the s t r ing wi l l r ep resen t the ru le s p resen t in the ru le base .T h e o v e r a l l f it n e s s o f th e s t r in g i s t h e n c a l c u l a t e d u s i n g b o t h t h e m e m b e r s h i p f u n c t i o n a sw e l l a s t h e r u l e b a s e o b t a i n e d f r o m t h e s t r i n g .

  • 8/7/2019 kalyan maydeb

    21/23

    An introduction to genetic algorithms 313

    5.5 GAs with neural networks

    Neura l ne tworks have been pr imar i ly used in p rob lems where a non-mathemat ica l

    re la tionsh ip be tw een a g iven se t o f input and o u tpu t var iab les is des ired . GA s can b e usednice ly in two major ac t iv i t ies in neura l ne twork appl ica t ions .

    (1) GA s can be used as a l ea rn ing a lgor ithm ( ins tead of the popula r backp ropaga t ionmethod (McCle l land & Rumelhar t 1988) fo r a user-def ined neura l ne twork and ,

    (2) GAs can be used to f ind the op t imal connec t iv i ty among input , ou tpu t , and h iddenlayers (wi th iden t if i ca tion o f num ber o f neurons in the h idden layers ) .

    On ce the ne tw ork connec t iv i ty i s f ixed , each connec t ion w eigh t in the ne two rk inc lud ingthe biases can be used as a var iable in the GA str ing. Instead of using backprop agat ion o ro ther l ea rn ing ru les , GA s can b e c ranked to f ind the op t imal com bina t ion of weigh ts wh ich

    wou ld min imize the m ean-squared e r ror be tween the des i red and ob ta ined ou tpu ts . S ince thebackpropaga t ion a lgori thm upda tes the w eigh ts based on s teepest g rad ien t descen t approach ,the algori thm has a tendency to get s tuck at local ly opt imal solut ions. GA's populat ionapproach and inheren t para l le l p rocess ing m ay a l low them not to ge t s tuck a t loca lly op t imalsolut ions and m ay help proc eed near the true opt imal solut ions. The other advantage o f usingGA s i s tha t they can be used w i th a minor change to f ind an op t imal connec t ion weigh t fo r adifferent object ive (say, minim izing var iance of the difference be twe en desired and obtainedoutpu t values , and others) . To incorporate any such cha nge in the object ive of neural netw orktechnique using the s tandard pract ice wil l require development of a very different learningru le , which m ay no t be t rac tab le fo r som e ob jec t ives .

    The op t im al connec t iv i ty o f a neura l ne two rk can a l so be found us ing GAs. Th is p rob lemis s imi la r to f ind ing op t imal t russ s t ruc ture op t imiza t ion prob lems (Sandgren & Jensen1990; Chaturvediet al 1995) o r f ind ing op t imal ne tw ork ing prob lem s . The s tandard searchtechniques used in those prob lems can a l so be used in op t imal neura l ne twork des ignproblems . A b i t in a s t ring can represen t the ex is tence 1 or absence 0 of a connec t ionbe tween two neurons . Thus , in a ne twork hav ing I input neurons , O ou tpu t neurons , andone hidd en lay er having H neurons, the ove ral l st r ing length is I x H + H x O + I x O.Biases in each neuron can a l so be cons idered . Each s t r ing , thus , represen ts one neura lne two rk conf igura t ion and a f i tness can be ass igned base d on how c lose an ou tpu t i t f indscom pared to the des i red ou tpu t wi th a f ixed numb er o f epochs . Evolu t ion o f neura lne tworks in th i s fash ion has resu l ted in ne tworks which were more e ff ic ien t than what

    hum an des igners cou ld th ink o f (Mi l le ret al 1991) and i t i s important to real ize that bothproblem s o f f ind ing an op t imal ne tw ork and f ind ing op t imal conne c t ion weigh ts in theneura l ne twork can a l so be coded s imul taneous ly in a GA. The op t imal so lu t ion thus foundwi l l be the t rue op t imal so lu t ion o f the overa l l p rob lem wh ich i s l ike ly to be be t te r than tha tob ta ined in any o f the ind iv idua l op t im iza t ion prob lems . GA s offe r an e ff ic ien t wa y toso lve bo th the prob lem s s imul taneous ly (Winte ret al 1996).

    5 .6 Searching for optimal schedules

    Job-shop schedul ing , t ime tab l ing and t rave ll ing sa lesman prob lems a re so lved us ing GAs.A so lu t ion in these prob lems i s a permuta t ion o f N ob jec t s (name of machines o r c i ti es) .Al though reproduc t ion opera tor s imi la r to one descr ibed here can be used , the c rossoverand mu ta t ion opera tors mus t be d i fferen t . These opera tors a re des igned in o rder to p rodu ce

  • 8/7/2019 kalyan maydeb

    22/23

    3 1 4 K a l y a n m o v D e b

    o f f s p r i n g s w h i c h a r e v a li d a n d y e t h a v e c e r t a in p r o p e r t i e s o f b o t h p a r e n t s ( G o l d b e rg 1 9 89 ;D a v i s 1 9 9 1 ; S t a r k w e a t h e ret a l 1991) .

    5 .7 Non-s ta t ionary func t ion op timiza t ion

    T h e c o n c e p t o f d i p lo i d y a n d d o m i n a n c e c a n b e i m p l e m e n t e d i n a G A t o s o lv e n o n -s t a t i o n a r y o p t i m i z a t i o n p r o b l e m s . I n f o r m a t i o n a b o u t e a r l i e r g o o d s o l u t i o n s c a n b e s t o r e d i nr e c e s s i v e a l l e l e s a n d w h e n n e e d e d c a n b e e x p r e s s e d b y s u i t a b l e g e n e t i c o p e r a t o r s ( G o l d b e rg& Smi th 1987) .

    T h i s p a p e r w a s w r i tt e n w h i l e t he a u t h o r w a s v i si ti n g t he U n i v e r s i ty o f D o r t m u n d , G e r m a n y

    o n a n A l e x a n d e r y o n H u m b o l d t f e l l o w s h i p . T h e a u t h o r g r e a t l y a c k n o w l e d g e s t h e s u p p o r tf r o m t h e A l e x a n d e r y o n H u m b o l d t F o u n d a t i on a n d th e D e p a r t m e n t o f S c ie n c e a n dTe c h n o l o g y, G o v t . o f I n d i a .

    R e f e r e n c e s

    B~ick T, Fogel D, M ichalewicz Z (eds) 1997Handbook of evolutionar), computation.(New York:Inst. Phys. Publ. and Oxford Univ. Press)

    Box M J 1965 A new method of cons tra ined opt imiza t ion and a compar ison wi th o ther method