0% found this document useful (0 votes)
9 views

Genetic Algorithm

The document discusses evolutionary computation and genetic algorithms, highlighting their ability to simulate natural evolution through processes like reproduction, mutation, and selection. It includes a case study on maintenance scheduling, illustrating how genetic algorithms can optimize complex scheduling problems by evaluating fitness and generating new populations of solutions. The document emphasizes the iterative nature of genetic algorithms and the importance of parameters such as crossover and mutation probabilities in achieving optimal solutions.

Uploaded by

Tanya Sapra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
9 views

Genetic Algorithm

The document discusses evolutionary computation and genetic algorithms, highlighting their ability to simulate natural evolution through processes like reproduction, mutation, and selection. It includes a case study on maintenance scheduling, illustrating how genetic algorithms can optimize complex scheduling problems by evaluating fitness and generating new populations of solutions. The document emphasizes the iterative nature of genetic algorithms and the importance of parameters such as crossover and mutation probabilities in achieving optimal solutions.

Uploaded by

Tanya Sapra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 47
Lecture Pvolutionary Computation: Genetic algorithms e Introduction, or can evolution be intelligent? e Simulation of natural evolution e Genetic algorithms e Case study: maintenance scheduling with genetic algorithms e Summary Can evolution be ATs ats Sas Glick Cuuteleehuteclcleiie? of a system to adapt its behaviour to ever- changing environment. According to Alan Turing, the form or appearance of a system is irrelevant to its intelligence. e Evolutionary computation simulates evolution ona computer. The result of sucha simulation is a series of optimisation algorithms, usually based on a simple set of rules. Optimisation iteratively improves the quality of solutions until an optimal, or at least feasible, solution is found. computational selection and gene term that combines Simulation of natural evolution eOn 1 July 1858, Charles Darwin presented his theory of evolution before the Linnean Society of London. This day marks the beginning of a revolution in biology. e Darwin's classical theory of evolution, together with Weismann’s theory of natural selection and Mendel’s concept of genetics, now represent the neo-Darwinian paradigm. e Neo-Darwinism is based on processes of reproduction, mutation, competition and selection. The power to reproduce appears to be an essential property of life. The power to mutate is also guaranteed in any living organism that reproduces itself ina continuously changing environment. Processes of competition and selection normally take place in the natural world, where expanding populations of different species are limited by a finite space. e Evolution can be seen as a process leading to the maintenance of a population's ability to survive and reproduce in a specific environment. This ability is called evolutionary fitness. e Evolutionary fitness can also be viewed as a measure of the organism's ability to anticipate changes in its environment. e The fitness, or the quantitative measure of the ability to predict environmental changes and respond adequately, can be considered as the quality that is optimised in natural life. How is a population with increasing fitness generated? i oy Pee fitness. Over time the € rabbits becomes faster tc environmental challenges i Simulation of natural evolution eAll methods of evolutionary computation simulate natural evolution by creating a population of individuals, evaluating their fitness, generating a new population through genetic operations, and repeating this process a number of times. eWe will start with Genetic Algorithms (GAs) as most of the other evolutionary algorithms can be viewed as variations of genetic algorithms. Genetic Coal) Reeser Holland introduced the concept of genetic algorithms. eHis aim was to make computers do what nature does. Holland was concerned with algorithms that manipulate strings of TIA Ae le leH al artificial Rees (Le) MOLE WHEE of “ as and each aene is e Nature has an ability to adapt and learn without being told what to do. In other words, nature finds good chromosomes blindly. GAs do the same. Two mechanisms link a GA to the problem it is solving: encoding and evaluation. CMa Mey WU Koer- Maal -XcK0 1g Me) MTU Stoel individual chromosomes to carry out reproduction. As reproduction takes place, the crossover operator exchanges parts of two single chromosomes, and _ the mutation operator changes the gene value in some randomly chosen location of the chromosome. Basic genetic Bem seek Step 3: Randomly generate an initial population of chromosomes of size N- Mi, X2,..., Xn Step 4: Calculate the fitness of each individual chromosome: F(x), F(%),..., F(Xn) Step 5: Select a pair of chromosomes for mating from the current population. Parent chromosomes are selected with a probability related to their fitness. Step 6: Opekators crossover Step 7: population. RTM Ceca b) Chromosome final ein natural selection, only the fittest species can survive, breed, and thereby pass their genes on to the next generation. GAs use a similar approach, but unlike nature, the size of the chromosome population remains unchanged from one generation to the next. e The last column in Table shows the ratio of the individual chromosome's fitness to the population’s total fitness. This ratio determines the chromosome's chance of being selected for mating. The chromosome'’s average fitness improves from one generation to the next. Roulette. wheel Sean roulette wheel SeTeC OTT X1: 16.5% X2: 20.2% X3: 6.4% Hi X4: 6.4% XS: 25.3% wi X6: 24.8% Crossover Comolels ae |S Ba an initial population of 6 chromosomes. Thus, to establish the same population in the next generation, the roulette wheel would be spun six times. eOnce a pair of parent chromosomes is selected, the crossover operator is applied. First, the crossover operator randomly chooses a crossover point where two parent chromosomes “break”, and then exchanges the chromosome parts after that point. As a result, two new offspring are created. elf a pair of chromosomes does not cross over, then the chromosome cloning takes place, and the offspring are created as exact copies of each parent. Crossove O yy XSi 0 |] 0 | 0| i X2 Mutation operator e Mutation represents a change in the gene. e Mutation is a background operator. Its role is to provide a guarantee that the search algorithm is not trapped on a local optimum. e The mutation operator flips a randomly selected gene in a chromosome. e The mutation probability is quite small in nature, and is kept low for GAs, typically in the range between 0.001 and 0.01. i fe “4 "an o 4 2 | 8] xs 2 lixgil( ~i1)2 RHC é xa 8 yo (xix fy)e e The first step is to represent the problem variables as a chromosome il parameters x CMI ami SNe RCC ot m binary (base 2) to decimal (base 10) (10001010). 182 HOH2ZRONZTONAHW2GOU2HW2GOG2 U (138)0 and (00111011). 08 2'200 2°01 2°a wW2"y W2HOw2H W2'L 1L 2° (59) eNow the range of integers that can be handled by 8-bits, that is the range from 0 to (2°81), is mapped to the actual range of parameters xand y, that is the range from K3 to 3: 6 eTo obtain the actual values of x and y, we multiply their decimal values by 0.0235294 and subtract 3 from the results: xt! (138)r0l! 0.0235294 li 3 11 0.2470588 and y!l (59)iofl 0.0235294 fi 3 81.6117647 e Using decoded values of x and yas inputs inthe mathematical function, the GA calculates the fitness of each chromosome. eTo find the maximum of the “peak” function, we will use crossover with the probability equal to 0.7 and mutation with the probability equal to 0.001. As we mentioned earlier, a common practice in GAs is to specify the number of generations. Suppose the desired number of generations is 100. That is, the GA will create 100 generations of 6 chromosomes before stopping. Chromosome locations on the surface of the “peak” function: initial population Chromosome locations on the surface of the, “peak” function: first generation me loc e surface of ) lean ia) maximum : Chromosome locations on the surface of the “peak” function: global maximum Performance graphs for 100 generations of 6) chromosomes: local maximum ‘pe=0.7, pn= 0,001 4050 oo Generations Performance graphs for 100 generations of 6 chromosomes: global maximum P:=0.7, P= 0.01 ss Best Av erage Generations Performance graphs for20 generations of 60 chromosomes (pe=0.7, p= 0.001 E1012 Generations Casestudy: maintenance Fett scheduling problems are usually solved using a combination of search techniques and heuristics. e These problems are complex and difficult to solve. e They are NP-complete and cannot be solved by combinatorial search techniques. e Scheduling involves competition for limited resources, and is complicated by a great number of badly formalised constraints. Steps in thaGA : Ra oleae sh define constraints and optimum criteria; . Represent the problem domain as a chromosome; Define a fitness function to evaluate the chromosome performance; 4, Construct the genetic operators; 5. Run the GA and tune its parameters. Scheduling of-7 units in 4 equal intervals The problem constraints: e The maximum loads expected during four intervals are 80, 90, 65 and 70 MW; e Maintenance of any unit starts at the beginning of an interval and finishes at the end of the same or adjacent interval. The maintenance cannot be aborted or finished earlier than scheduled; e The net reserve of the power system must be greater or equal to zero at any interval. The optimum criterion is the maximum of the net reserve at any maintenance period. CaS@iamdy Unit. data and\maintenance requirements Unit Unit Number of intervals numbe capacity required for unit NAIA maintanan 1 2 2 15 2 3 35 1 4 40 1 5 15 1 6 15 1 7 10 1 CaSerei Te Unitgene Unit 1: 1100; 0110; 0011 Unit 2: 1100; 0110; 0011 Unit 3: 1000; 0100; 0010) 0001 Unit 4: 1000; 0100; 0010) 0001 Unit 5: 1000; 0100; 0010; 0001 Unit 6: 1000; 0100; 0010) 0001 1000) |0100 01 Unit Unit 4 Unit 5 Unit 6 Unit 7 CaSeian Gy The crossover Child1 ChiJd2 The mutation operator Performance graphs and the best maintenance schedules created in a population of 20 chromog 7m Generation sNetresery ow 35 2 nz Tat imine (a) 50 generations Performance graphs and the best maintenance schedules created in a papulatiey of 20 chromog : = Bat erage 71020 30 40 50 60 70 8090 100 Generations Netreserves: 40 2520, 25 ‘nie? ‘it? One Tat itz vate tae 1 23 4 Timeinterval 100 generations Performance graphs and the best maintenance schedules created in a populatiomof 100 Meats 30 ‘N= 100, p-=07,po= 0.001 4050 8090700 Generation s Netresery 9525, uatt ne? Daz Une Unt 1234 Timeinterval (EQ Meecicns Performance graphs and the best maintenance schedules created in a populatiomof 100 Chromos N=100,p:=07, p=001 st Average 7102030 20 5060 708050100 Generations Netreserves: 253030 Tn nt On Taz g 4 Timeinterval (b) Mutation rate is 0.01

You might also like