You are on page 1of 21
: Key Concepts Charles Darwi Chromosome, Chromosome encoding/decoding, Cony Crossover, Crossover probability, DNA, Dominance relation, Elitism, Extclidean function, GA’ parameters, Genetic algorithms (GAs), Initiel Population, Mating om, Minimization, Multi-cut-point crossover, Muli-objective fitness, Multi-objective Mutation’ probability, Natural evolution, Natural selection, Niche count, ‘Niche | fitness function, One cut-point crossover, Optimization problems, Pareto-optimal eptimal ranking; Pareto-optimal solution, Population, Population size, Roulette wheel ction “Shared fitness value, Sulated Annealing (SA), Survival of the fitest, Termination rnament selection. Chapter Outline 121 Natural Evolution: A Brief Review Chapter Summary 122 Genetic Algorithms (GAs) Solved Problems 23 Multi-Objective Genetic Algorithms ‘Test Your Knowledge I24 Simulated Annealing (SA) Exercise Bibliography and Historical Notes “Portant class of problems encountered in real life is the so called optimization problems. Typically ‘problem has numerous solutions of varying qualities where the quality of a solution is judged the bass of certain criteria, presented in the form ofa real valued objective function. Depending her the function is to be maximized or minimized, the optimization problem is further catego- 4Sa maximization, or minimization, problem. Now, classical optimization techniques can be ae YON continuous differentiable functions, In the realm of computational problems, inl the yt function being continuous and differentiable is quite low, and therefore fae ted ae Tltteg Scope. Moreover, often the classical techniques have the tendency of settling down at 530 | introduction to Soft Computing reality, there are computational prof, rout solution, Hitelliyenst wer ty oly ag to auch problema, Howeyey points instead of the global beat solutions 10 as computational efforts to find the employed to obtaltt reasonably good solutions rious problem of nottling (0 Aub optimal solutions remaining. in thy Alyorithins (GAB) and Simulated Annealing (5A) are tye fonary processes and have the capacity to overcome in large search apacen. GAs try to nine the procens s Darwinian principle of survival of the fittest minima or maxima Jems which require tremendo' gies like hill climbing may be ¢ hill dimbing suffers from the set search space as local optimal points, Genetle search strategies that are inspired by natural evolut the problem posed by the existence of local optinua of natural evolution through natural selection based on the It is essentially a maximization proce simulated Annealing (SA) follows the proe of physical an nealing where a metal is first he ted fo a molten state and then gradually cooled to get a uniforancryst structure. This uniform crystal structure corresponds (0 & minimal energy level, Hence annesting, minimization process. Both GAs and SAs have been extensively employed to solve com 1 various fields including engineering, economics, biology ele. In the subsequent sections of this chapter these two search techniques are discussed in greater details. : roblens of 12.1 NATURAL EVOLUTION: A BRIEF REVIEW Natural, or biological, evolution is the process of emergence of higher and complex life forms from a life-forms over billions of years. ‘The scientific theory of evolution was proposed by simpl oe : 8 \ 4 proposed by Charles =— in is 9 through his celebrated work entitled ‘The Origin of Species by Means of Natural Selection. ins theory had a great impact on humanity. It is widely perceive Bee ra eee y. It is widely perceived as one of greatest in ret Reena Ne ERS heory is one of the few scientific discoveries thal have ¢ mechanism Nature employs ¢ me ploys to realize evi e y 1 Bib the principle of Survive! of the phar called Natural Selection. ‘Ihe basis of Natural Gresolotion is based on three observations: (a) a epe Soon eauee pence Demi he " ere than possibly can survive, (b) the mere See ee a : . dual members of a s traits resul ee varied probabilities of survival and repeadualian ait Oh PME aneotite vaiteat their paren I a certain environment, individuals havin trate fy ind (c) children inherit the traits of - re igher< tance of survival At peeae Ge the aheeiat t nour to live in that environment nd thereby, have less opportuni ror individuals lacking such traits ae like! natural selection is the gradual ie in sae to have children. This is natural pis ae Rees cari in the relative number of individuals ee een i repre in ran environment. Individuals who RES MG ie better adapted to ns and eventually die ou, The phenomenon of ntact ts become scares over radical change in a species. If th Is fourteen tat feat ieee rei he change ir AVOOMLIEHE et helps to introduce a ran ons, extinguishes : hen it is likel coupled with occasional aaa in the process of natural ge Benet continue ls main features of natural evolution that ney es highe® forms aioe cs cat : n that are significant from con of | ife on earth from lower nputational point of view are an individual are encod ies. led and store, Bete Pia, nets are 23 Na in each cell with the help of of a structure called the s of genes and th » OF 46, chroi € genes are made mosomes in human cells, Chi s. Chro Up of two Lo; pry ng thin strands omosomes Strands of DNA in a double Advanced Search Strategies | 531 pelicstructure. Roughly speaking, a gene may be though ; z it of the shape of the lips etc. The idea of chromosome ae, ace ai atte in Genetic Algorithms (GAs). In GAs. on Beiediaxa:string of bi so ¢ As, each feasible solution is of a given optimization problem Epromosattics over successive mien Process consists of processing a number of such ni : : jsencoded solution. ‘en mapping the chromosome returned by the GA to 8 a trait, e.g., colour of eye, or 0 of individual traits is used 42.1.2 Natural Selection Bs As mentioned co natural selection is Nature's way to support and Perpetuate ‘good’ qualities in al species against t e bad’ qualities. Consider the case of polar bears that survive under the harsh: : a weather. ‘The fur is different from all other members of the bear family and coloured white vi ne of only helps in camouflaging but also contains body heat, Itis also adapted to store more fat within, to beat r, : thecold. This fat, accumulated mostly during summers, when the bears overfeed s nutritional value daring frozen winters when food becomes scarce. This kind of adaptability, seen in most animals inclus ing man is an example of ‘survival of the fittest? Only those bears that could adapt, survived. Offspring of highly adaptable survivors over generations are passed on these survival traits and result in permanent changes in the genetic structure of the species. 1 12.1.3 Crossover Grossover is a genetic operation, which results in exchange of genetic material between two chromo- somes. In biological world, crossover occurs when the reproductive cells of the parents unite to form azygote. It can be considered to be a string operation where two similar strings of same length swap pattial contiguous contents. Crossover is the mechanism to ensure reshuffle of traits of the parents in their children. 12.1.4 Mutation Ingenetics, a gene mutation is a permanent change that may occur in the DNA goes coos agene. Such changes permanently alter the gene and thereby bring about reaailoess en oe thing organism. In biological sense, mutation can occur in one of the two following ways: InhelT Patents (through crossover), or acquired by an individual during its lifetime due to altered environeeth schabits of individuals, or some unforeseen circumstances like radioactive or cosmic radiation. tom is the main vehicle of evolving new species from old ones. 12.2 GENETIC ALGORITHMS (GAs) rocess. The problem it addresse inside it. The GA process the | rocess it may find the global B sist approximation ofits the outcome usually has a very large has to ensure that it is not maxima. Even if the fthe GA Computationally, GA is a maximization p' arch space with probable multiple local maxim ‘ripped at local maxima, so that, at the end of the me maximum is not returned, we may expect a ¢ hd imal) t Toachieve this, GA works on a set of solutions ree a roses stops wher ‘Volves it through a number of generations. ‘The evo! fo the given. problem instance, some predefined iction to Soft Computing a 532. | Introducti ediate stage, the old generation is replaced by the interm . d with the help of tion are processes noe Jation of a general Se es ‘ individuals of the popu! is iheakt of sestiony, 7 new generation. ‘The indi (a eadiind nn genera i number of GA nraairs in ee ee ee ate : ish ae ny 2 a gen impi md in comparison with old generation. In this way obtain better and b ‘olutions as the sear o ion will be retu ra near-best solution wil irned roceed: he search when we expect the best, ewe h a re e aad Fig. oe present the outline of the procedure and the corresponding by the GA process. Fig. 12. . 12. flow chart. h termination condition is satisfied. At ead! a nha Gd oa ulation Step 1 Initialize thé population’: Call this’ the current pop! Fs Beer Sosae step S tarougnietep ayeuit termination condition is satis- Bey, fied. Le aa Apply ‘selection operation on the current’ population to obtain the mating pool. Apply crossover and mutation operators. erate the new population. the mating pool to gen- Replace the current population by the new population. Return the best solution|of the current. population. Fig. 12.1 Procedure Basic-GA There are certain features associated with a GA. ‘These are 1. The chromosomes. _ 2. Procedures to pee a solution as a chromosome, and procedure to decode a chromosome to the _ corresponding solution. inction to evaluate each solution, i.e. each chromosome. size. population. mating pool, i.c., the set of chromosomes select i an ed from current population who will generate operators, e.g, selection, crossover, and mutation. GA parameters, re &g., crossover Probability (ps, mutation probability (p,), population nination condition. are usually one or multidimensi chromosome encodes a solution digits, characters, or other suit- res to map the solution to the cor; mization probk s a i lem. There must be valuatea ctomOsOMe and vice-versa. Moreover, pena ‘osome/solution, A Population is a set FOMOsome of ponte Ae PoPUlation is initialized with Population is evaluated with the help of the ‘onal arrays of bits, to the given Maxi Each chy Jjaness function. ‘The value Advanced s °d Search Strate, 8 Of the fitnes a a paid 88 function for the chromosomes i trae indicate the quality of the cor Proved Search ews Ta) ONnding 8 [“initiatze ne Population | | Perform the job with decoded ] _Versions of the sting | tis the —— Termination ~ criterion : Yes reached = eee No Reproduce/select strings to creale new mating pool Generate new population | by crossover and mutation | pe Retum the best ‘solution nie t Cee > Fig. 12.2 Flow chart of the basic genetic algorithm (GA) process iting every iteration, a g pool is created by s mosomes fr‘ population. The se- ing chromosot 0 Ny n, a mating p a mn procedure is desi he bi i i e of survival of the fittest. Therefore, ; igned on sis e Darwinian principle of pales irae ett eee a Se erie the less fit ones. Consequently, the average fitness 0 often 8S fit are selected more mig peti asualy higher than that of the current population. in the e ent population. The individual ce Se rman rap 4 ‘a aes Pages Sor ne ee oa the help of the crossover et rect rentnn an en ist es 7 Foran bf getting stuck at local — ‘me tae i GA process to overcome the pt See etal es "ss, The mutation operator helps the tion of population from old are Sita, The Process of obtaining a new genera 534 | Introduction to Soft Computing New lation of chromosomes Fig. 12.3 Formation of new generation from old one i ly, when the search space is sufliciently ¢ ‘eds, the search is ected to converge. Usually, is es rae of the population, or the fitness of the best-fit chromosome of the population, ends on how finely the GA parameters fs . isdep secutive generations. However, this A Jues. The search maybe terminated after a pre-defined number of generations, does not show any improvement over @ pre-defined number of consecutive parts of this subsection the details of various GA features. As the GA proce’ plored, the average does not improve over con: are tuned to appropriate va! or, when the average fitness generations. ‘The subsequent present 12.2.1 Chromosomes n maximization problem must been string of bits. However, alphanumeric characters, eme on the basis of the natu has been found to be ideal for function better suited for combinatorial optim! to one-dimensional strings as chromosomes. data structure to coded as a chromosome. In its simplest various other types of chromosomes real numbers and so on. ‘The de- re of the problem to be solved. optimization. ation problems ‘A feasible solution for a give form, a chromosome is 2 one-dimensional have been tries ¢.g., strings of denary digits, hhas to select an appropriate encoding sch example, the real number encoding scheme ‘The integer or literal permutation encoding is “others, However, these techniques are applicable only ‘more complex real world problems, it might be essential to have an appropriate a the nature of the problem. Depending upon the structure of the encodings, the further classified as one-dimensional or multi-dimensional. ‘Though most problems are solvable using one-dimensional encoding, some more com plex problems need a multi-dimensional approach. Whatever the chosen encoding scheme, it is necessary that it ds an effective solution to the problem. ‘There exist several criteria to decide the effectiveness of an methods can be Requirement of space by the encoded chromosomes. "The time to perform operations like crossover, mutation and fitness evaluation. ncoded chromosomes must map to feasible solutions. : chromosomes resulting from crossover and mutation must map to feasible solutions. | given below illustrates the concept ofa chromosome as an encoded form of a solution and s to map a solution to the corresponding chromosome and vice versa. saree “Peabeet i 12.4, For the sake of simplicity and ‘ensures that any permutation of ne network of cities under consideration i Shon ark i cities represent a feasible tour by the = it mee easily converted to such one by adding PeReeEiG Carhichinc: cnedinonal links. Each et WEEN TWO ities ig A880, nk. The TSP problem iso fe Mth a co With a cost w total cost of the toys mtlinal ciently ex. Pulation, -arameter, N€rations secutive . g-12.4 An instance of Travelli son ing Si Problem (TSP), 19 Salesper. Fig. 12.5 The TSP of Fig. 12.4 @ posed as a ‘maximization problem, maximum rew. with a reward, instead of a cost, is shown ae oe the network of citi in Fi a ne cities shown in Fig. 12.5 where the cities are denoted by the letters a, b, c,d 4 represented simply as a permutation of five letters a, b, c, d and e. Th. ming that the permutation is circular, ie, the last and the first node in the pitas any such permutation is a chromosome. However, if we prefer binary chromosomes, tea is alphanumeric string must be transformed to its binary equivalent and vice-versa. ‘This can be yee by substituting each letter by its designated bit pattern. The technique is illustrated in 12.6(a) shows the tour c—> d > b -» a > ¢ in the network under consideration. The table in Fig. 12.6(b) contains the binary code for each node. ‘The codes are chosen arbitrarily. re are 5 nodes, we need| log , 5] =3 bits to encode them. However, the remaining 3 (= 2! icodes are unused. Fig. 12.6(c) depicts the mapping of the tour c—> d > b> a>. toits cor- SP chromosome. ‘Therefore, for this problem a chromosome is any binary string responding tour, the chromosome is partitioned th of these 3 bit codes is then substituted by the convert an arbitrary 3 bit string to a node 001. Here the leftmost 3 chromosome to its cor! u g of 3 bits. Bac! not be possible to ae me ch = 101 011 001 110 Be ode at all. The same is true for the fourth pattern 110. has ide is allowed to be visited exactly once curred twice, though ano 538 | Introduction to Soft Computing . 4} /* Assigna bit randomly*, 0, Chr[i] (j] = Random { End-For : i 3 lation oe TsP-Generate-Initial ‘Popu. Fig. 12.8 Procedure TSP-Generate-Initial-Population ig. 12. Table 12.1. Randomly Generated Initial Population # Chromosome Tour Fitness 1 011 101111011001 d-e-a-b-c 193 c-e-b-d-a 172 2 010 100001 101 110 3 100100001 111010 e-ab-c-d 193 4 011100110001 101 d-e-ab-c 193 5 110011101110001 ad-e-b-c 141 6 — 010100010011011 c-ed-a-b 197 7 100100011 111110 e-a-d-b-c 222 8 — 010 101011011001 cd-eab 193 9 | 100110101011110 abcde 224 10111011 101 100 100 141 12.2.4 GA Operators As in natura i . ee ia een, Sas smmply three operators, viz. selection, crossover and mutation, on the . Fe cen st the optimal solution of the target optimization problem. While the Operators help to explore the ens a ae Suites in the solutions, the crossover and mutation ice mr i Fi, - tions. Each of these operators is desert Jie ae ae esha Of individual traits and varia- ae eiecs lon. "The members of the mating pool are picked up f ion ey ed up from the vi e selection operator. There are various technicnae zh fe Current population with the . winian : ‘perator is designed in such a way the ene of survival of the fittest. In other words, the their chance of "mating pool. However th _ Ness values have a greater offspring. ‘th » the lower fit chr al 3 arlene ne ‘bey should not be beck : ‘OMOsomes should also h: Itogether. | " selection and st Widel gether. There are several selection rt ectcton, sedans below, '°4 Selection operators, viz, emslane aha! e Popsize sum_fitness ~ om & Fehr) as ea egies f(ohr,) +...+ Fong ) Popsize-1 "ehr)+...4 t(chr, 3) F(chr,)+...+ F(che) Fig. 12.9 4 roulette wheel ulette Wheel. Roulette u . wh ion was M eciiee oe Proposed by John Holland and is possi a a = so es that the survival probability of a chr jaan, its fitness val et us consider a population of PopSize number of custom ie" fe, somes chr,, cl ear, with fitness values f (chr,), f (ch ae a is (chr), 2. F (Chrsoysx) Pespectively. Now imagine a circular disk Popsce sum_fitness= f (chr) (12a) a circumference, we demarcate successive regions of length f (chr,), f (chr,), .... f (Cht,,....) So that cessive regions correspond to the chromosomes chir,. cht,» ..- dit, respectively. This is the wheel. Fig. 12.9 explains the structure of a roulette wheel graphically. order to select a chromosome from the current population for the mating pool, a random number ted between 0 and sum_fitness. Let x be the random number generated in this way. We now the point P on the circumference of the wheel at a distance x from the starting point S. The chro- within whose limits this point P is situated is selected for the mating pool. This procedure is d PopSize times. Since the regions on the circumference of the roulette wheel are proportional fitness values of the corresponding chromosomes, those with high fitness values are likely to get more often than those with Jow fitness values. The pseudocode for the roulette wheel technique esented in Big. 12.10. 1-Selection g + fitness (Chromosome ()) 540 | Introduction to Soft Computing tness * oa each baa T ieeee between 0 and sum_fitness */ * generate a random ni : = random (0, sun tienes) 7* locate the point Pp jel, sume 0 F6,) m en 21 w Genetio Algorithm cry cuarTt ds forthe observed 2¥2" age fitness of schema Hin time step f: 3, Theterm F (Ht) sta ‘Theorem (Schema ‘Theorem ~ Holland 1975)- Consider 4 simple GA, the following inequali schema H: ity holds § 2 fOr eve, (HDL, SUD) (Pega) — Pu) our) ea ce select an individual fulfilling His LD fe.) dsb) Proof. The probability that w ‘This probability does not chan; ge through selected independent ofthe others. He Sauna le reece ce eco ee eof aeons tl Moret cach ofthe india Freee hatte eabdiimberof sec nomial dha selected individuals fulfil filling His x fe.) X fe) ois { ‘Pisa mittieetl Tne Piven \ Miva a, sen) ZF L,)/m 2se,) hs Tye j If two individuals. an are crossed, which only decrease ifone string, whit both ul, the two off springs again fulfill Hl. The numb The number of strings fling ‘r08s site is chosen fulfil a somewher lab defnloglengthot is meen the sage with a string which do 0 es ns of H. The probability Pe but, obi only ifthe ss site is chosen within ii asl canbe estimaed a gp et Ps AH, be, the i fins (crosoer ison oY that at ne with ring fulfilling H prod produces an offspring also fulfiling Probability P): P21 p, Se) nl $0 we may com ipute fe the expected number of strié® utiles Tina Ps FH, t) pew Fi (- Pe ) oot frer © spect The art operati ‘The Se eration proble! proble! su into th matical of the of trial / 21.13. The Schema Theorem ressoves the number of strings fulfilin i Hean H, The probability that all specifi 8 ONLY decrease i rion of v Specifications of H remain unt ling Scones pe ched by mutation is obviously (1p, youn serunents in the proof ofthe Schema Theoret can jy eentions plied an, ty alogously to many other crossover and mutation gle fom statistical decision theory Although this seems like a detou oe s i.e. the difference betwee seca. Let us assume that the lft arm produces an outcome wah = smpojaces an outcome with mean value 44 and variance o With sotknow this, assume that 14, > y. Now the question arises which arm should be played. Since we do not know beforehand which arm is associated with Sehigher outcome, we are faced with an interesting dilemma, Not only must we make a sequence of decisions about sticharm to play, we have to collect, at the same time, information about which is the better arm. This trade-off between elation of knowledge and its exploitation is the key issue in thie problem ang, ‘ment Suppose we have N coins. If we first allocate an equal number n (where 2n< N) of trials to both arms, we could ade the remaining N —2n trials to the observed better arm, Assuming we know all involved parameters, the expected dasis given as, LON, n) = (dt, = fy {(N =n) gn) + nf = g(n)]} Bee) th probability that the worst arm is the observed best arm after 2n experimental als. The underlying idea Hitons Incase that we observe that the worse arms the best, which happens with probability q(n), the total number pe to the right arm is N — n. The loss is, therefore, (4, ~ )(N —n). In the reverse case eee ual "ne tat the best arm is the best, which happens with probability 1— q(n), the loss is only what we get less cae 2 the worse arm n times, ie., (4, ~ 4,)n. Taking the central limit theorem into account, we can approximate q tail ofa normal distribution: 2a 1 an~ jae © i lea lo +0; = cd information is poten- sly, if we choose n = 1, the obtaine /2 there ee me il left to make use of the eee ae ae! WR rateo i h almost no exploration (n= exploitation witl expl pee t Ae 3 eos winner to see that the optimal way is somewhere Joes not eriment size”. Ol n @ | CHAPTER 21 ™ Genetic Algorithm ; . to the conclusion that the optima ied this problem in detail. He came tudied this pro! in the middle. Holland has s lowing equation: 87b' InN’ where Making a few transformations, we obtain that 4 joy? N=n' ~./87b' InN7e" ? That is, the optimal strategy is to allocate slightly more than an exponentially increasing number of trials to the observed best arm. Although no gambler is able to apply this strategy in practice, because it requires knowledge of the mean value #, and 42, we still have found an important bound of performance that a decision strategy should try to approach. GA, although the direct connection is not yet fully clear, actually comes close to this ideal, giving at least an exponen: tially increasing number of trials to the observed best building blocks. However, one may still wonder how the two-armed bandit problem and GAs are related. Let us consider an arbitrary string position. Then there are two schemata of order one which have their only specification in this position. According to the Schema Theorem, GA implicitly decides between these two schemata, where only incomplete data are available (observed average fitness values). In this sense, GA solves! lot of two-armed problems in parallel, The Schema Theorem, however, i 20130) Implicit Parallelism peaetegs ST re ee

You might also like