Presentation is loading. Please wait.

Presentation is loading. Please wait.

Genetic Algorithms Siddhartha K. Shakya School of Computing. The Robert Gordon University Aberdeen, UK

Similar presentations


Presentation on theme: "Genetic Algorithms Siddhartha K. Shakya School of Computing. The Robert Gordon University Aberdeen, UK"— Presentation transcript:

1 Genetic Algorithms Siddhartha K. Shakya School of Computing. The Robert Gordon University Aberdeen, UK ss@comp.rgu.ac.uk

2 What are GAs?  Class of Evolutionary algorithm  Based on Darwinian Evolution  First proposed by John Holland 1960s. 1970s  Used to solve wide verity of Optimization problems occurring in engineering Science and Business.

3 What is an Optimization Problem?  Is to find optimum or near optimum solution from the possible set of candidate solution  Search through big solution space to find best solution  There is some scoring criteria for evaluating goodness of solution also called fitness of solution

4 Example: Graph colouring problem (GCP) Given a set of colours, GCP is to try and assign Colour to each nodes in such the way that neighbouring nodes will not have same colour a b d e f c

5 What is a solution and a fitness?  Solution is a set of colours assigned to the nodes of graph.  Fitness is the number of correctly coloured nodes.

6 What is a solution and a fitness? Given 2 colour Black = 0 White = 1 a b d e f c 1 1 0 0 10 a b d e f c 1 1 1 0 00 a b d e f c 1 1 0 0 00 a b d e f c 1 1 0 1 10 a b d e f c Fitness = 1 Fitness = 2 Fitness = 6 Fitness = 0

7 Graph Colouring Problem (GCP)  Looks very simple  But as the size of the graph grows, it becomes increasingly difficult.  Lots of different problems can be see as a GCP  One of the approach to solve GCP is GA

8 Representation of Problem in GA  Solution is usually represented as a bit string called chromosome 1 1 0 1 10 a b d e f c 100111 abcdef 1 fitness 1 1 1 0 00 a b d e f c 101010 6

9 Work flow of GA 1. Initialization of parent population 2. Evaluation 3. Selection 4. Crossover/recombination 5. Mutation 6. Evaluate child and Go to step 3 until termination criteria satisfies

10 Initialization of parent population  Generate the M number of solution string known as parent population  Mostly random 101001001011101011010011

11 Evaluation  Give fitness to each of the solution a b d e f c 101101 001011 101011 010011 Parent population 2 2 4 3 fitness

12 Selection  Fit solution are likely to survive and bad solution are likely to die off  Select some of the best fit chromosomes from parent population according some selection criteria (eg. Roulette wheel selection) 101101 001011 101011 010011 Parent population 2 2 4 3 fitness 101011 4 010011 3 010011 3 101101 4 selectionfitness

13 Crossover/Recombination  Exchange partial solution between pair of selected solution with some probability value eg 70% 101011 010011 010011 101101 Selected Solution 011011100011010101101011 Child Population After Crossover

14 Mutation  Change the value of an allele of solution with some small probability value eg 1%  Motivation is to explore new point in the solution space 011011 100011 010101 101011 Child Population After Crossover 011011100010010101101011 Child Population After mutation

15 Replace with parent population and repeat process  Evaluate child population and replace parent population  Go to selection step and repeat the process until termination criteria satisfies  Eg. Exit after given number of iteration finishes 011011 100010 010101 101011 Replaced Parent Population 1 2 4 6 fitness a b d e f c

16 Putting Everything together 101101 001011 101011 010011 Parent population 2 2 4 3 fitness 101011 010011 010011 101101 Selected Solution 011011100011010101101011 After Crossover 011011 100010 010101 101011 After mutation 1 2 6 4 fitness InitializationEvaluation Selection Crossover Mutation Repeat iteration a b d e f c Given 2 colours (0,1)

17 Conclusion  Different selection, crossover and mutation operators exists.  Different GAs designed for different problems  Hybridise GA with other search algorithms  Probabilistic Model Building Genetic Algorithms (PMBGAs)

18 Links  Introductory tutorial on GA By D.E Goldberg http://online.engr.uiuc.edu/shortcourses/innovation/index.html  GA Archive http://www.aic.nrl.navy.mil/galist/ Introductory Books  David E. Goldberg. 1989. Genetic Algorithms in search, optimization and machine learning. Addison-Wesley.0-201-15767-5  Mitchell, M. (1998). An Introduction to genetic Algorithm. MIT Press. 0-262-113316- 4(HB)


Download ppt "Genetic Algorithms Siddhartha K. Shakya School of Computing. The Robert Gordon University Aberdeen, UK"

Similar presentations


Ads by Google