1 Genetic Algorithms “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations.

Slides:



Advertisements
Similar presentations
Genetic Algorithms Chapter 3. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Genetic Algorithms GA Quick Overview Developed: USA in.
Advertisements

Introduction to Genetic Algorithms
CS6800 Advanced Theory of Computation
Introduction to Genetic Algorithms Speaker: Moch. Rif’an
CSM6120 Introduction to Intelligent Systems Evolutionary and Genetic Algorithms.
Tuesday, May 14 Genetic Algorithms Handouts: Lecture Notes Question: when should there be an additional review session?
Genetic Algorithms Representation of Candidate Solutions GAs on primarily two types of representations: –Binary-Coded –Real-Coded Binary-Coded GAs must.
1 Wendy Williams Metaheuristic Algorithms Genetic Algorithms: A Tutorial “Genetic Algorithms are good at taking large, potentially huge search spaces and.
Genetic Algorithms for Bin Packing Problem Hazem Ali, Borislav Nikolić, Kostiantyn Berezovskyi, Ricardo Garibay Martinez, Muhammad Ali Awan.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
Genetic Algorithms (GAs)
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Evolutionary Computation 22c: 145, Chapter 9. What is Evolutionary Computation? A technique borrowed from the theory of biological evolution that is used.
Genetic Algorithms Overview Genetic Algorithms: a gentle introduction –What are GAs –How do they work/ Why? –Critical issues Use in Data Mining –GAs.
Genetic Algorithms: A Tutorial
Introduction to Genetic Algorithms
Heuristic Optimization Methods
Genetic Algorithm.
Genetic Algorithms and Ant Colony Optimisation
Evolutionary Intelligence
1 An Overview of Evolutionary Computation 조 성 배 연세대학교 컴퓨터과학과.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Evolution Strategies Evolutionary Programming Genetic Programming Michael J. Watts
Intro. ANN & Fuzzy Systems Lecture 36 GENETIC ALGORITHM (1)
Genetic algorithms Prof Kang Li
Optimization in Engineering Design Georgia Institute of Technology Systems Realization Laboratory Mixed Integer Problems Most optimization algorithms deal.
Lecture 8: 24/5/1435 Genetic Algorithms Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
Genetic Algorithms by using MapReduce
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Local Search: walksat, ant colonies, and genetic algorithms.
1 “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions.
Genetic Algorithms Siddhartha K. Shakya School of Computing. The Robert Gordon University Aberdeen, UK
Derivative Free Optimization G.Anuradha. Contents Genetic Algorithm Simulated Annealing Random search method Downhill simplex method.
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
A Simple Example The Traveling Salesman Problem: Find a tour of a given set of cities so that each city is visited only once the total distance traveled.
Introduction to Artificial Intelligence Evolutionary Computing Henry Kautz.
Voicu Groza, 2008 SITE, HARDWARE/SOFTWARE CODESIGN OF EMBEDDED SYSTEMS 1 Hardware/Software Codesign of Embedded Systems OPTIMIZATION Voicu Groza.
Introduction to Genetic Algorithms. Genetic Algorithms We’ve covered enough material that we can write programs that use genetic algorithms! –More advanced.
Edge Assembly Crossover
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Genetic Algorithms. 2 Overview Introduction To Genetic Algorithms (GAs) GA Operators and Parameters Genetic Algorithms To Solve The Traveling Salesman.
Evolutionary Algorithms K. Ganesh Research Scholar, Ph.D., Industrial Management Division, Humanities and Social Sciences Department, Indian Institute.
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
Genetic Algorithms - History
Genetic Algorithms MITM613 (Intelligent Systems).
Genetic Algorithms. Underlying Concept  Charles Darwin outlined the principle of natural selection.  Natural Selection is the process by which evolution.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Department of Computer Science Lecture 6: Genetic Algorithms
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
Overview Last two weeks we looked at evolutionary algorithms.
1 Comparative Study of two Genetic Algorithms Based Task Allocation Models in Distributed Computing System Oğuzhan TAŞ 2005.
Genetic Algorithms. Solution Search in Problem Space.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
Genetic Algorithms And other approaches for similar applications Optimization Techniques.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
Introduction to Genetic Algorithms
Genetic Algorithm in TDR System
Genetic Algorithms.
Neuro-Computing Lecture 6
Example: Applying EC to the TSP Problem
Genetic Algorithms: A Tutorial
Genetic Algorithms Chapter 3.
Traveling Salesman Problem by Genetic Algorithm
Population Based Metaheuristics
Genetic Algorithms: A Tutorial
Presentation transcript:

1 Genetic Algorithms “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions you might not otherwise find in a lifetime.” - Salvatore Mangano Computer Design, May 1995 Genetic Algorithms: Soft Computing Week 13

2 Genetic Algorithms The Genetic Algorithm l Directed search algorithms based on the mechanics of biological evolution l Developed by John Holland, University of Michigan (1970’s)  To understand the adaptive processes of natural systems  To design artificial systems software that retains the robustness of natural systems

3 Genetic Algorithms The Genetic Algorithm (cont.) l Provide efficient, effective techniques for optimization and machine learning applications l Widely-used today in business, scientific and engineering circles

4 Genetic Algorithms Evolution in the real world l Each cell of a living thing contains chromosomes - strings of DNA l Each chromosome contains a set of genes - blocks of DNA l Each gene determines some aspect of the organism (like eye colour) l A collection of genes is sometimes called a genotype

5 Genetic Algorithms Evolution in the real world l A collection of aspects (like eye colour) is sometimes called a phenotype l Reproduction involves recombination of genes from parents and then small amounts of mutation (errors) in copying l The fitness of an organism is how much it can reproduce before it dies l Evolution based on “survival of the fittest”

6 Genetic Algorithms Start with a Dream… l Suppose you have a problem l You don’t know how to solve it l What can you do? l Can you use a computer to somehow find a solution for you? l This would be nice! Can it be done?

7 Genetic Algorithms A dumb solution A “blind generate and test” algorithm: Repeat Generate a random possible solution Test the solution and see how good it is Until solution is good enough

8 Genetic Algorithms Can we use this dumb idea? l Sometimes - yes:  if there are only a few possible solutions  and you have enough time  then such a method could be used l For most problems - no:  Too many possible solutions  No time to try them all  So this method can not be used

9 Genetic Algorithms A “less-dumb” idea (GA) Generate a set of random solutions Repeat Test each solution in the set (rank them) Remove some bad solutions from set Duplicate some good solutions make small changes to some of them Until best solution is good enough

10 Genetic Algorithms How do you encode a solution? l Obviously this depends on the problem! l GA’s often encode solutions as fixed length “bitstrings” (e.g , , ) l Each bit represents some aspect of the proposed solution to the problem l For GA’s to work, we need to be able to “test” any string and get a “score” indicating how “good” that solution is

11 Genetic Algorithms Adding Sex - Crossover l Although it may work for simple search spaces our algorithm is still very simple l It relies on random mutation to find a good solution l It has been found that by introducing “sex” into the algorithm better results are obtained l This is done by selecting two parents during reproduction and combining their genes to produce offspring

12 Genetic Algorithms Adding Sex - Crossover l Two high scoring “parent” bit strings (chromosomes) are selected and with some probability (crossover rate) combined l Producing two new offspring (bit strings) l Each offspring may then be changed randomly (mutation)

13 Genetic Algorithms Selecting Parents l Many schemes are possible so long as better scoring chromosomes more likely selected l Score is often termed the fitness l “Roulette Wheel” selection can be used

14 Genetic Algorithms Example population No.ChromosomeFitness

15 Genetic Algorithms Roulette Wheel Selection Rnd[0..18] = 7 Chromosome4 Parent1 Rnd[0..18] = 12 Chromosome6 Parent2

16 Genetic Algorithms Crossover - Recombination Crossover single point - random Parent1 Parent2 Offspring1 Offspring2 With some high probability (crossover rate) apply crossover to the parents.

17 Genetic Algorithms Mutation Offspring1 Offspring Offspring1 Offspring2 With some small probability (the mutation rate) flip each bit in the offspring (typical values between 0.1 and 0.001) mutate Original offspring Mutated offspring

18 Genetic Algorithms Back to the (GA) Algorithm l Generate a population of random chromosomes l Repeat (each generation)  Calculate fitness of each chromosome  Repeat »Use roulette selection to select pairs of parents »Generate offspring with crossover and mutation  Until a new population has been produced l Until best solution is good enough

19 Genetic Algorithms Many Variants of GA l Different kinds of selection (not roulette)  Tournament  Elitism, etc. l Different recombination  Multi-point crossover  3 way crossover etc. l Different kinds of encoding other than bitstring  Integer values  Ordered set of symbols l Different kinds of mutation

20 Genetic Algorithms Many parameters to set l Any GA implementation needs to decide on a number of parameters: Population size (N), mutation rate (m), crossover rate (c) l Often these have to be “tuned” based on results obtained - no general theory to deduce good values l Typical values might be: N = 50, m = 0.05, c = 0.9

21 Genetic Algorithms Why does crossover work? l A lot of theory about this and some controversy l Holland introduced “Schema” theory l The idea is that crossover preserves “good bits” from different parents, combining them to produce better solutions l A good encoding scheme would therefore try to preserve “good bits” during crossover and mutation

22 Genetic Algorithms Classes of Search Techniques

23 Genetic Algorithms Components of a GA A problem to solve, and... l Encoding technique (gene, chromosome) l Initialization procedure (creation) l Evaluation function (environment) l Selection of parents (reproduction) l Genetic operators (mutation, recombination) l Parameter settings (practice and art)

24 Genetic Algorithms Simple Genetic Algorithm { initialize population; evaluate population; while TerminationCriteriaNotSatisfied { select parents for reproduction; perform recombination and mutation; evaluate population; }

25 Genetic Algorithms The GA Cycle of Reproduction reproduction population evaluation modification discard deleted members parents children modified children evaluated children

26 Genetic Algorithms Population Chromosomes could be:  Bit strings ( )  Real numbers ( )  Permutations of element (E11 E3 E7... E1 E15)  Lists of rules (R1 R2 R3... R22 R23)  Program elements (genetic programming) ... any data structure... population

27 Genetic Algorithms Reproduction reproduction population parents children Parents are selected at random with selection chances biased in relation to chromosome evaluations.

28 Genetic Algorithms Chromosome Modification modification children l Modifications are stochastically triggered l Operator types are:  Mutation  Crossover (recombination) modified children

29 Genetic Algorithms Evaluation l The evaluator decodes a chromosome and assigns it a fitness measure l The evaluator is the only link between a classical GA and the problem it is solving evaluation evaluated children modified children

30 Genetic Algorithms Deletion l Generational GA: entire populations replaced with each iteration l Steady-state GA: a few members replaced each generation population discard discarded members

31 Genetic Algorithms An Abstract Example Distribution of Individuals in Generation 0 Distribution of Individuals in Generation N

32 Genetic Algorithms A Simple Example “ The Gene is by far the most sophisticated program around.” - Bill Gates, Business Week, June 27, 1994

33 Genetic Algorithms A Simple Example The Traveling Salesman Problem: Find a tour of a given set of cities so that  each city is visited only once  the total distance traveled is minimized

34 Genetic Algorithms Representation Representation is an ordered list of city numbers known as an order-based GA. 1) London 3) Dunedin 5) Beijing 7) Tokyo 2) Venice 4) Singapore 6) Phoenix 8) Victoria CityList1 ( ) CityList2 ( )

35 Genetic Algorithms Crossover Crossover combines inversion and recombination: Parent1 ( ) Parent2 ( ) Children1 ( ) Children2 ( )

36 Genetic Algorithms Mutation changing the list: * Before: ( ) After: ( ) Mutation

37 Genetic Algorithms TSP Example: 30 Cities

38 Genetic Algorithms Solution i (Distance = 941)

39 Genetic Algorithms Solution j (Distance = 800)

40 Genetic Algorithms Solution k (Distance = 652)

41 Genetic Algorithms Best Solution (Distance = 420)

42 Genetic Algorithms Overview of Performance

43 Genetic Algorithms Considering the GA Technology “Almost eight years ago... people at Microsoft wrote a program [that] uses some genetic things for finding short code sequences. Windows 2.0 and 3.2, NT, and almost all Microsoft applications products have shipped with pieces of code created by that system.” - Nathan Myhrvold, Microsoft Advanced Technology Group, Wired, September 1995

44 Genetic Algorithms Issues for GA Practitioners l Choosing basic implementation issues:  representation  population size, mutation rate,...  selection, deletion policies  crossover, mutation operators l Termination Criteria l Performance, scalability l Solution is only as good as the evaluation function (often hardest part)

45 Genetic Algorithms Benefits of Genetic Algorithms l Concept is easy to understand l Modular, separate from application l Supports multi-objective optimization l Good for “noisy” environments l Always has an answer; answer gets better with time

46 Genetic Algorithms Benefits of Genetic Algorithms (cont.) l Many ways to speed up and improve a GA-based application as knowledge about problem domain is gained l Easy to exploit previous or alternate solutions l Flexible building blocks for hybrid applications l Substantial history and range of use

47 Genetic Algorithms When to Use a GA l Alternate solutions are too slow or overly complicated l Need an exploratory tool to examine new approaches l Problem is similar to one that has already been successfully solved by using a GA l Want to hybridize with an existing solution l Benefits of the GA technology meet key problem requirements

48 Genetic Algorithms Some GA Application Types

49 Genetic Algorithms Conclusions Question:‘If GAs are so smart, why ain’t they rich?’ Answer:‘Genetic algorithms are rich - rich in application across a large and growing number of disciplines.’ - David E. Goldberg, Genetic Algorithms in Search, Optimization and Machine Learning