1 / 19

Genetic Algorithms

Genetic Algorithms. Genetic Algorithms : mimicking the process of natural evolution. Nature as an optimizer (adapting to the environment): Structural Engineer : Bee-hive, Bamboo CFD solver: Birds , fishes Drag reducer : Penguin body Optimization procedure :

minya
Download Presentation

Genetic Algorithms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Genetic Algorithms

  2. Genetic Algorithms : mimicking the process of natural evolution • Nature as an optimizer (adapting to the environment): • Structural Engineer : Bee-hive, Bamboo • CFD solver: Birds , fishes • Drag reducer : Penguin body • Optimization procedure : • Inheritance :Useful information is passed on from one generation to another • Crossover and mutation: Offspring having characteristics of both parents are created • Natural selection : “Better” individuals are retained while the “weaker” ones die out.

  3. Working principle of GA

  4. Problem • Design a can with a volume of at least 300ml and least cost.

  5. Representation(Coding of decision variables) • All the decision variables are represented as binary strings. • Depending on variable bounds and required precision the length of string is decided as follows: • In current example let: 0< d,h <31 and we represent both with strings of length 5 each : • So a can with height 10 cm and diameter 8 cm is represented as (d,h)=(8,10)cm Chromosome: 01000 01010 d h

  6. Fitness Assignment • Based on value of decision variables the objective function value is calculated and accordingly a fitness value is assigned, if the solution is infeasible, it is penalized by adding an extra artificial cost. • Can1: 01000 01010  (d,h)=(8,10) f= 0.065[π(8)2 /2 + π(10)(8) ] = 23 g= π(8)2 (10) /4 =502 >300 Fitness of Can1 is 23 • Can2: 00100 00101  (d,h)=(4,5) f= 0.065[π(4)2 /2 + π(4)(5) ] = 5.72 g= π(4)2 (5) /4 =63 < 300 Penalty = (300-g)/7.5 = 32 Fitness of Can2 is 37.72 23 38

  7. Population initialization • To start a GA run, randomly the decision variables are initialized : Can1 : 01000 01010 ------ Can2 : 00100 00101 -------------------------- Can3 : 01110 00110 ------ Can4 : 01010 00111 -------------------------- Can5 : 01100 01010----- Can6: 00100 01000 ----------------------------

  8. Survival of fittest : Selection operator • Tasks of selection operator : • Identify good solutions • Make multiple copies of good solutions • Eliminate bad solutions from the population so that the population size remains constant. • Various selection operators • Tournament selection • Proportionate selection • Ranking selection

  9. Tournament selection MATING POOL 30 23 23 30 8 +14 30 + 32 25 23 25 23 + 32 6 37 25 25 37 37 8 +14

  10. Creation by Crossover • New solutions having characteristics of both “parents” are created, i.e crossover is responsible for search aspect of GA • Single point crossover : • Two point crossover : • In order to preserve some good individuals selected during reproduction operator ,not all individuals are crossed over. (10 6) 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 0 22 (8 10) 23 0 1 1 1 0 0 0 1 1 0 (14 6) (12 10) 0 1 1 0 0 0 1 0 1 0 39 37 (14 10) 0 1 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 0 (8 10) 23 49 0 1 1 1 0 0 0 1 1 0 (14 6) (8 6) 0 1 0 0 0 0 0 1 1 0 16 37

  11. Creation by mutation • Changes a 1 to 0 and vice versa with a certain mutation probability. • Keeps diversity in population. • Very helpful in taking out population from a local optima (8 6) 0 1 0 1 0 0 0 1 1 0 (10 6) 0 1 0 0 0 0 0 1 1 0 22 16

  12. Simulation • Rastrigin function: • Local optima at each integer • Global Optima at xi = 0 • In present simulation, • n = 2 • Population = 20 initialized in range [20 60]

  13. Rastrigin : Two variable version

  14. Rastrigin : Two variable version

  15. Simulation:

  16. Rastrigin : 100 variable version

  17. Advantages Of GA and Comparison with Classical Methods • Work with a discrete search space hence discontinuous functions can be handled. • Exploits similarities in the string structures to make an effective search. • Unlike classical methods which use single solution ,GA ’s work with population of solutions that are processed simultaneously ,hence chances of obtaining global optimum are more. • No auxiliary problem information like gradient is required. • Classical methods work on fixed transition rules to move from one solution to another i.e the destiny of these methods is predetermined, so these methods can only be applied to a certain class of problems. GA’s on the other hand use probabilistic rules to guide their search, this allows GA’s to recover quickly from early mistakes , if any , and also enables them to handle wide class of problems

  18. Refernces • Kalyanmoy Deb , Multi-objective using Evolutionary Algorithms

  19. Questions • What can be the possible drawbacks of GA • In process of finding global optimum can we also report the local optimum solutions. • Is it guaranteed that GA will always find the global optimum or even a local optimum • What can be the possible termination criteria's of a GA run • In case of problems having multiple optima’s will GA always give the same solution.

More Related