introduction to genetic algorithms
play

Introduction To Genetic Algorithms Dr. Rajib Kumar Bhattacharjya - PowerPoint PPT Presentation

R.K. Bhattacharjya/CE/IITG 1 Introduction To Genetic Algorithms Dr. Rajib Kumar Bhattacharjya Professor Department of Civil Engineering IIT Guwahati Email: rkbc@iitg.ernet.in 24 April 2015 References R.K. Bhattacharjya/CE/IITG 2 D. E.


  1. R.K. Bhattacharjya/CE/IITG 1 Introduction To Genetic Algorithms Dr. Rajib Kumar Bhattacharjya Professor Department of Civil Engineering IIT Guwahati Email: rkbc@iitg.ernet.in 24 April 2015

  2. References R.K. Bhattacharjya/CE/IITG 2  D. E. Goldberg, ‘Genetic Algorithm In Search, Optimization And Machine Learning’, New York: Addison – Wesley (1989)  John H. Holland ‘Genetic Algorithms’, Scientific American Journal, July 1992.  Kalyanmoy Deb, ‘An Introduction To Genetic Algorithms’, Sadhana, Vol. 24 Parts 4 And 5. 24 April 2015

  3. Introduction to optimization R.K. Bhattacharjya/CE/IITG 3 Global optima Local optima Local optima Local optima Local optima f X 24 April 2015

  4. Introduction to optimization R.K. Bhattacharjya/CE/IITG 4 Multiple optimal solutions 24 April 2015

  5. Genetic Algorithms R.K. Bhattacharjya/CE/IITG 5 Genetic Algorithms are the heuristic search and optimization techniques that mimic the process of natural evolution. 24 April 2015

  6. Principle Of Natural Selection R.K. Bhattacharjya/CE/IITG 6 “Select The Best, Discard The Rest” 24 April 2015

  7. An Example …. R.K. Bhattacharjya/CE/IITG 7 Giraffes have long necks  Giraffes with slightly longer necks could feed on leaves of higher branches when all lower ones had been eaten off.  They had a better chance of survival.  Favorable characteristic propagated through generations of giraffes.  Now, evolved species has long necks. 24 April 2015

  8. An Example …. R.K. Bhattacharjya/CE/IITG 8 This longer necks may have due to the effect of mutation initially. However as it was favorable, this was propagated over the generations. 24 April 2015

  9. Evolution of species R.K. Bhattacharjya/CE/IITG 9 Struggle for existence Survival of the fittest Surviving Initial individuals population of reproduce, animals propagate favorable characteristics Evolved species 24 April 2015

  10. R.K. Bhattacharjya/CE/IITG 10 Thus genetic algorithms implement the optimization strategies by simulating evolution of species through natural selection 24 April 2015

  11. Simple Genetic Algorithms R.K. Bhattacharjya/CE/IITG 11 T = 0 Initialize population Evaluate Solutions Start YES Is optimum Solution ? Stop NO Selection T=T+1 Crossover Mutation 24 April 2015

  12. Simple Genetic Algorithm R.K. Bhattacharjya/CE/IITG 12 function sga () { Initialize population; Calculate fitness function; While(fitness value != termination criteria) { Selection; Crossover; Mutation; Calculate fitness function; } } 24 April 2015

  13. GA Operators and Parameters R.K. Bhattacharjya/CE/IITG 13  Selection  Crossover  Mutation  Now we will discuss about genetic operators 24 April 2015

  14. Selection R.K. Bhattacharjya/CE/IITG 14 The process that determines which solutions are to be preserved and allowed to reproduce and which ones deserve to die out. The primary objective of the selection operator is to emphasize the good solutions and eliminate the bad solutions in a population while keeping the population size constant. “Selects the best, discards the rest” 24 April 2015

  15. Functions of Selection operator R.K. Bhattacharjya/CE/IITG 15 Identify the good solutions in a population Make multiple copies of the good solutions Eliminate bad solutions from the population so that multiple copies of good solutions can be placed in the population Now how to identify the good solutions? 24 April 2015

  16. Fitness function R.K. Bhattacharjya/CE/IITG 16 A fitness value can be assigned to evaluate the solutions A fitness function value quantifies the optimality of a solution. The value is used to rank a particular solution against all the other solutions A fitness value is assigned to each solution depending on how close it is actually to the optimal solution of the problem 24 April 2015

  17. Assigning a fitness value R.K. Bhattacharjya/CE/IITG 17 Considering c = 0.0654 23 h d 24 April 2015

  18. Selection operator R.K. Bhattacharjya/CE/IITG 18  There are different techniques to implement selection in Genetic Algorithms.  They are:  Tournament selection  Roulette wheel selection  Proportionate selection  Rank selection  Steady state selection, etc 24 April 2015

  19. Tournament selection R.K. Bhattacharjya/CE/IITG 19  In tournament selection several tournaments are played among a few individuals. The individuals are chosen at random from the population.  The winner of each tournament is selected for next generation.  Selection pressure can be adjusted by changing the tournament size.  Weak individuals have a smaller chance to be selected if tournament size is large. 24 April 2015

  20. Tournament selection R.K. Bhattacharjya/CE/IITG 20 Selected 32 22 22 25 25 22 25 +30 13 22 32 32 40 22 32 +30 13 25 40 22 Best solution will have two copies Worse solution will have no copies 7 +45 7 +45 Other solutions will have two, one 25 +30 13 or zero copies +30 13 25 24 April 2015

  21. Roulette wheel and proportionate selection R.K. Bhattacharjya/CE/IITG 21 Chrom # Fitness % of RW EC AC 1 50 26.88 1.61 2 Parents are selected 2 6 3.47 0.19 0 according to their 3 36 20.81 1.16 1 fitness values 4 30 17.34 0.97 1 5 36 20.81 1.16 1 The better 6 28 16.18 0.90 1 186 100.00 6 6 chromosomes have Roulet wheel more chances to be 6 1 16% 21% selected 2 3% 5 21% 3 21% 24 April 2015 4 18%

  22. Rank selection R.K. Bhattacharjya/CE/IITG 22 Chrom # Fitness Chrom # Fitness Rank Chrom # Sort Assign 1 37 1 37 1 6 according raking to fitness 2 6 3 36 3 5 3 36 5 36 5 4 4 30 4 30 3 4 5 36 6 28 6 2 6 28 2 6 2 1 Roulette wheel Chrom # % of RW Chrom # EC AC 1.714 2 1 29 1 1.429 1 3 24 3 1.143 1 5 19 5 4 14 4 0.857 1 0.571 1 6 10 6 0.286 0 2 5 2 24 April 2015 6 5 4 3 2 1

  23. Steady state selection R.K. Bhattacharjya/CE/IITG 23 The rest of In this method, a Then some bad population migrates few good chromosomes are to the next chromosomes are removed and the generation without used for creating new offspring is going through the new offspring in placed in their selection process. every iteration. places New Good Good offspring New Bad offspring 24 April 2015

  24. How to implement crossover R.K. Bhattacharjya/CE/IITG 24 The crossover operator is used to create new solutions from the existing solutions available in the mating pool after applying selection operator. This operator exchanges the gene information between the solutions in the mating pool. 0 1 0 0 1 1 0 1 1 0 Encoding of solution is necessary so that our solutions look like a chromosome Source: http://www.biologycorner.com/bio1/celldivision-chromosomes.html 24 April 2015

  25. Encoding R.K. Bhattacharjya/CE/IITG 25 The process of representing a solution in the form of a string that conveys the necessary information. Just as in a chromosome, each gene controls a particular characteristic of the individual, similarly, each bit in the string represents a characteristic of the solution. 24 April 2015

  26. Encoding Methods R.K. Bhattacharjya/CE/IITG 26 Most common method of encoding is binary coded. Chromosomes are strings of 1 and 0 and each position in the chromosome represents a particular characteristic of the problem Decoded value 52 26 Mapping between decimal and binary value 24 April 2015

  27. Encoding Methods R.K. Bhattacharjya/CE/IITG 27 Defining a string [0100001010] d h (d,h) = (8,10) cm h Chromosome = [0100001010] d 24 April 2015

  28. Crossover operator R.K. Bhattacharjya/CE/IITG 28 The most popular crossover A probability of crossover is The selection selects any two solutions strings point is selected also introduced in order to randomly from the mating pool randomly. give freedom to an and some portion of the strings individual solution string to is exchanged between the determine whether the strings. solution would go for Solution 1 crossover or not. Solution 2 Child 1 Child 2 24 April 2015

  29. Binary Crossover R.K. Bhattacharjya/CE/IITG 29 Source: Deb 1999 24 April 2015

  30. Mutation operator R.K. Bhattacharjya/CE/IITG 30 Mutation is the occasional introduction of new features in to the solution strings of the population pool to maintain diversity in the population. Though crossover has the main responsibility to search for the optimal solution, mutation is also used for this purpose. Before mutation After mutation 24 April 2015

  31. Binary Mutation R.K. Bhattacharjya/CE/IITG 31  Mutation operator changes a 1 to 0 or vise versa, with a mutation probability of .  The mutation probability is generally kept low for steady convergence.  A high value of mutation probability would search here and there like a random search technique. 24 April 2015 Source: Deb 1999

  32. Elitism R.K. Bhattacharjya/CE/IITG 32  Crossover and mutation may destroy the best solution of the population pool  Elitism is the preservation of few best solutions of the population pool  Elitism is defined in percentage or in number 24 April 2015

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend