Genetic Algorithm (GA)

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

Population-based metaheuristics Nature-inspired Initialize a population A new population of solutions is generated Integrate the new population into the.
CS6800 Advanced Theory of Computation
CSM6120 Introduction to Intelligent Systems Evolutionary and Genetic Algorithms.
Evolutionary Computational Intelligence
Introduction to Genetic Algorithms Yonatan Shichel.
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
7/2/2015Intelligent Systems and Soft Computing1 Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Genetic Algorithms: A Tutorial
Genetic Algorithm.
Evolutionary Intelligence
© Negnevitsky, Pearson Education, CSC 4510 – Machine Learning Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Genetic algorithms Prof Kang Li
Optimization in Engineering Design Georgia Institute of Technology Systems Realization Laboratory Mixed Integer Problems Most optimization algorithms deal.
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
Introduction to GAs: Genetic Algorithms How to apply GAs to SNA? Thank you for all pictures and information referred.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
1 “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions.
GENETIC ALGORITHM A biologically inspired model of intelligence and the principles of biological evolution are applied to find solutions to difficult problems.
Derivative Free Optimization G.Anuradha. Contents Genetic Algorithm Simulated Annealing Random search method Downhill simplex method.
© Negnevitsky, Pearson Education, Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
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.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Waqas Haider Bangyal 1. Evolutionary computing algorithms are very common and used by many researchers in their research to solve the optimization problems.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
In the name of ALLAH Presented By : Mohsen Shahriari, the student of communication in Sajad institute for higher education.
Introduction to GAs: Genetic Algorithms Quantitative Analysis: How to make a decision? Thank you for all pictures and information referred.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
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.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
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.
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
Introduction to Genetic Algorithms
Chapter 14 Genetic Algorithms.
Genetic Algorithms Author: A.E. Eiben and J.E. Smith
Genetic Algorithm in TDR System
Genetic Algorithms.
An Evolutionary Approach
USING MICROBIAL GENETIC ALGORITHM TO SOLVE CARD SPLITTING PROBLEM.
Artificial Intelligence Methods (AIM)
School of Computer Science & Engineering
Introduction to Genetic Algorithm (GA)
CSC 380: Design and Analysis of Algorithms
Intelligent Systems and Soft Computing
Artificial Intelligence (CS 370D)
Genetic Algorithms, Search Algorithms
Introduction to Operators
Genetic Algorithms: A Tutorial
GENETIC ALGORITHMS & MACHINE LEARNING
Genetic Algorithms Chapter 3.
EE368 Soft Computing Genetic Algorithms.
Searching for solutions: Genetic Algorithms
A Gentle introduction Richard P. Simpson
Machine Learning: UNIT-4 CHAPTER-2
Traveling Salesman Problem by Genetic Algorithm
Genetic Algorithm Soft Computing: use of inexact t solution to compute hard task problems. Soft computing tolerant of imprecision, uncertainty, partial.
Population Based Metaheuristics
Genetic Algorithms: A Tutorial
CSC 380: Design and Analysis of Algorithms
Population Methods.
Presentation transcript:

Genetic Algorithm (GA) Presented By: Sakeena Javaid Supervised By: Dr. Nadeem Javaid Research Domain: Energy Management in Smart Grid Department of Computer Science Comsats Institute of Information Technology, 44000, Islamabad, Pakistan.

Introduction GAs were developed By John Holland, David E. Goldberg and his students At the University of Michigan This is in line with the Darwinian Theory [1] “Survival of the Fittest”   Fittest: ability to adapt to the environment More individuals are produced each generation that can survive Phenotypic variation exists among individuals and the variation is heritable Those individuals with heritable traits better suited to the environment will survive Darwin’s Quotation "Variation is a feature of natural populations and every population produces more progeny than its environment can manage. The consequences of this overproduction is that those individuals with the best genetic fitness for the environment will produce offspring that can more successfully compete in that environment. Thus the subsequent generation will have a higher representation of these offspring and the population will have evolved." [1] Darwin's Theory of Evolution by Natural Selection. Available online: https://www.ndsu.edu/pubweb/~mcclean/plsc431/popgen/popgen5.htm (last accessed on 2 Feb 2017)

Why GA? Exhaustive search (where every possible combination is checked) accurate result time consuming inefficient when the numbers of variables are large optimizers tend to : limit the number of variables they use limit the number of values these variables can take The genetic algorithm (does not try every possible combination) Optimal solution by selecting variables intelligently Far more variables can be utilized All values of a variable can be checked Simultaneous searching Less likely to become stuck in "local minima" Less time Efficient Solving Difficult Problems There is a large set of problems, which are NP-Hard

Why GA is applied? At least three situations where GA is applied [2] GA work with the coding of the parameters Randomly generates population GAs use objective function information (without any derivative or auxiliary information) GAs use probabilistic transition rules (instead of deterministic transition rules) GAs search from population of points instead of using single point [2] Golberg, D. E. (1989). Genetic algorithms in search, optimization, and machine learning. Addion Wesley. Reading.

Basic Terminologies of GA Representation Binary strings Crossover N-point or uniform Mutation (probability) Bitwise bit-flipping Parent selection Fitness-Proportionate Survivor selection children replace parents Speciality Emphasis on crossover

What is GA (1/2)? A search based algorithm based on the concepts of: natural selection and genetics [3] To find true or approximate solutions Particular class of evolutionary algorithms Use techniques inspired by evolutionary biology Inheritance Mutation Selection Crossover ( Recombination) [3] Genetic Algorithm. Available online: https://www.tutorialspoint.com/genetic_algorithms/genetic_algorithms_tutorial.pdf (last accessed 2 Feb 2017)

Figure 1: Solution Representation What is GA (2/2)? Solutions are represented in binary as strings 0s and 1s, however, Other encodings are also possible Implemented as a computer simulation Using abstract representations called Chromosomes, genotypes, phenotypes Candidate solutions (called individuals), Starts from a population Randomly generated individuals In each generation, fitness of every individual is evaluated Multiple individuals are selected (based on their fitness) The new population is used in next iteration Figure 1: Solution Representation

GA Requirements A typical genetic algorithm requires two things The solution domain (set search space) A fitness function to evaluate the solution A standard representation of the solution is as an array of bits Chromosomes could be Bit strings (0101 ... 1100) Real numbers (43.2 -33.1 ... 0.0 89.2) Permutations of element (E11 E3 E7 ... E1 E15) Lists of rules (R1 R2 R3 ... R22 R23) Program elements (genetic programming)

GA Steps (1/13) Complete cycle consists of some steps Initialization Selection Reproduction Survival Selection Termination Termination is based on the specified criteria Figure 2: GA Steps

GA Steps (2/13) Initialization Two primary methods to initialize a population in a GA Random Initialization Populate the initial population with completely random solutions. Random population is created with a group of individuals (the search space) Population size depends on the nature of the problem (typically contains several hundreds or thousands of possible solutions) Heuristic initialization Populate the initial population using a known heuristic for the problem. Starts with the couple of good solutions.

GA Steps (3/13) Selection Fitness Proportionate Every individual can become a parent with a probability Which is proportional to its fitness Fitter individuals have a higher chance of mating Propagating their features to the next generation Two popular fitness proportionate techniques Roulette Wheel Selection Tournament Selection

GA Steps (4/13) B A C Roulette Wheel Selection Main idea: better individuals get higher chance Chances proportional to fitness Implementation: roulette wheel technique Assign to each individual a part of the roulette wheel Spin the wheel n times to select n individuals A C 1/6 = 17% 3/6 = 50% B 2/6 = 33% fitness(A) = 3 fitness(B) = 1 fitness(C) = 2

GA Steps (5/13) Tournament Selection Binary tournament Two individuals are randomly chosen The fitter of the two is selected as a parent Probabilistic binary tournament Two individuals are randomly chosen; with a chance p, 0.5<p<1, The fitter of the two is selected as a parent Larger tournaments n individuals are randomly chosen The fittest one is selected as a parent

GA Steps (6/13) Fitness Function A fitness function simply defined is a function Which takes the solution as input Produces the suitability of the solution as the output In some cases, the fitness and the objective function may be same Premature convergence Fitness too large Relatively superfit individuals dominate population Population converges to a local maximum Too much exploitation; too few exploration Slow finishing Fitness too small No selection pressure After many generations, average fitness has converged, but no global maximum is found; not sufficient difference between best and average fitness Too few exploitation; too much exploration

GA Steps (7/13) Crossover and Mutation Crossover (also called recombination), and/or mutation Exploration: Discovering promising areas in the search space, i.e. gaining information on the problem Exploitation: Optimising within a promising area, i.e. using information Crossover is explorative It makes a big jump to an area somewhere “in between” two (parent) areas Mutation is exploitative Creating random small diversions, thereby staying near (in the area of ) the parent

GA Steps (8/13) Crossover Operator Generating offspring from two selected parents Single point crossover Two point crossover (Multi point crossover) Uniform crossover Choose a random point on the two parents Split parents at this crossover point Create children by exchanging tails Pc typically in range (0.6, 0.9) Crossover is a generalization of one point crossover Wherein alternating segments are swapped To get new off-springs

GA Steps (9/13) Uniform crossover Mutation We don’t divide the chromosome into segments We treat each gene separately We essentially flip a coin for each chromosome To decide whether or not it’ll be offspring We can also bias the coin to one parent Mutation Is used to maintain and introduce diversity Is usually applied with a low probability Bit Flip Mutation Random Resetting Swap Mutation Scramble Mutation Inversion Mutation

GA Steps (10/13) Bit flip mutation Random Resetting Swap Mutation We select one or more random bits and flip them Used for binary encoded GAs Random Resetting Extension of the bit flip for the integer representation A random value from the set of permissible values is assigned to a randomly chosen gene Swap Mutation We select two positions on the chromosome at random Interchange the values

GA Steps (11/13) Scramble Mutation Inversion Mutation Popular with permutation representations Entire chromosome, a subset of genes is chosen Their values are scrambled or shuffled randomly Inversion Mutation Select a subset of genes like in scramble mutation Instead of shuffling the subset invert the entire string in the subset

GA Steps (12/13) approaches Most of methods above used for parent selection Survivor Selection Policy Which individuals are to be kicked out Which are to be kept in the next generation Survivor selection can be divided into two approaches Age-Based Selection e.g. SGA In SSGA can implement as “delete-random” (not recommended) or as first-in-first-out (a.k.a. delete-oldest)

GA Steps (13/13) Fitness-Based Selection Elitism Termination Criteria Using one of the methods above Elitism Always keep at least one copy of the fittest solution Termination Criteria No improvement in the population Absolute number of generations Objective function value has reached a certain pre-defined value

Algorithm Algorithm Randomly generate population Evaluate fitness of population While (termination criteria is reached) do Parent selection Crossover with probability pc Mutation with probability pm Decode and fitness calculation Survivor selection Find best Return best

GA Example 1 (1/3) Example x2 example: selection Population of four strings Initial population is generated Simple ‘x’ value is calculated Fitness is evaluated For the specified criteria x2

Example 1 (2/3) Example 1 x2 example: Crossover Number of strings 1-bit crossover is chosen For finding the suitable offspring Crossover point is selected Offspring after crossover Simple ‘x’ value is calculated Fitness value (x2) is determined

Example 1 (3/3) Example 1 x2 example: Mutation To maintain the population diversity 1-bit mutation is applied Four strings are taken X value is calculated Fitness function is evaluated

Example 2 Example 2 f(x) = {MAX(x2): 0 <= x <= 32 } Encode Solution Use 5 bits (1 or 0) Generate initial population Evaluate each solution against objective Create next generation of solutions Probability of “being a parent” depends on the fitness Ways for parents to create next generation Reproduction Crossover (Cut and paste portions of one string to another) Mutation (Randomly flip a bit) A 1 B C D Sol. String Fitness % of Total A 01101 169 14.4 B 11000 576 49.2 C 01000 64 5.5 D 10011 361 30.9

Example 3 Example 3 Works by constructing a table listing which edges are present in the two parents if an edge is common to both, mark with a + e.g. [1 2 3 4 5 6 7 8 9] and [9 3 7 8 2 6 5 1 4]

Example 4 Edge Selection Pick an initial element at random put it in the offspring Set the variable current element entry Remove all references to current element from the table Examine list for current element: If there is a common edge, pick that to be next element Otherwise pick the entry in the list, which itself has the shortest list Ties are split at random In the case of reaching an empty list: Examine the other end of the offspring is for extension Otherwise a new element is chosen at random

Applications Other Applications Optimization Parallelization Most commonly used in optimization problems To maximize or minimize a given objective function value under a given set of constraints Parallelization Good parallel capabilities, and prove to be very effective means in solving certain problems, and also provide a good area for research Image Processing Used for various digital image processing (DIP) tasks as well like dense pixel matching Scheduling applications GAs are used to solve various scheduling problems Particularly the time tabling problem

Thanks Questions and Answers