Genetic Algorithms Siddhartha K. Shakya School of Computing. The Robert Gordon University Aberdeen, UK
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.
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
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
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.
What is a solution and a fitness? Given 2 colour Black = 0 White = 1 a b d e f c a b d e f c a b d e f c a b d e f c a b d e f c Fitness = 1 Fitness = 2 Fitness = 6 Fitness = 0
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
Representation of Problem in GA Solution is usually represented as a bit string called chromosome a b d e f c abcdef 1 fitness a b d e f c
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
Initialization of parent population Generate the M number of solution string known as parent population Mostly random
Evaluation Give fitness to each of the solution a b d e f c Parent population fitness
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) Parent population fitness selectionfitness
Crossover/Recombination Exchange partial solution between pair of selected solution with some probability value eg 70% Selected Solution Child Population After Crossover
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 Child Population After Crossover Child Population After mutation
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 Replaced Parent Population fitness a b d e f c
Putting Everything together Parent population fitness Selected Solution After Crossover After mutation fitness InitializationEvaluation Selection Crossover Mutation Repeat iteration a b d e f c Given 2 colours (0,1)
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)
Links Introductory tutorial on GA By D.E Goldberg GA Archive Introductory Books David E. Goldberg Genetic Algorithms in search, optimization and machine learning. Addison-Wesley Mitchell, M. (1998). An Introduction to genetic Algorithm. MIT Press (HB)