Genetic Algorithms By: Jacob Noyes 4/16/2013. Traveling Salesman Problem Given:  A list of cities  Distances between each city Find:  Shortest path.

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

Algorithm Design Techniques
Genetic Algorithm.
CS6800 Advanced Theory of Computation
Using Parallel Genetic Algorithm in a Predictive Job Scheduling
Tetris and Genetic Algorithms Math Club 5/30/2011.
Genetic Algorithms Representation of Candidate Solutions GAs on primarily two types of representations: –Binary-Coded –Real-Coded Binary-Coded GAs must.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
Evolutionary Computational Intelligence
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.
Pawel Drozdowski – November Introduction GA basics Solving simple problem GA more advanced topics Solving complex problem Question and Answers.
Universidad de los Andes-CODENSA The Continuous Genetic Algorithm.
Prepared by Barış GÖKÇE 1.  Search Methods  Evolutionary Algorithms (EA)  Characteristics of EAs  Genetic Programming (GP)  Evolutionary Programming.
Genetic Algorithm.
© Negnevitsky, Pearson Education, CSC 4510 – Machine Learning Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University.
Slides are based on Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
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.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Genetic Algorithms Michael J. Watts
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
G ENETIC A LGORITHMS Steve Foster. I NTRODUCTION Genetic Algorithms are based on the principals of evolutionary biology in order to find solutions to.
Genetic Algorithms Genetic Algorithms – What are they? And how they are inspired from evolution. Operators and Definitions in Genetic Algorithms paradigm.
Genetic Algorithms Introduction Advanced. Simple Genetic Algorithms: Introduction What is it? In a Nutshell References The Pseudo Code Illustrations Applications.
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.
Machine Learning 1 Machine Learning 1 Genetic Algorithms.
© Negnevitsky, Pearson Education, Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
Genetic Algorithms. Evolutionary Methods Methods inspired by the process of biological evolution. Main ideas: Population of solutions Assign a score or.
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
Learning by Simulating Evolution Artificial Intelligence CSMC February 21, 2002.
Evolution Programs (insert catchy subtitle here).
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
Genetic Algorithms Przemyslaw Pawluk CSE 6111 Advanced Algorithm Design and Analysis
Introduction to Genetic Algorithms. Genetic Algorithms We’ve covered enough material that we can write programs that use genetic algorithms! –More advanced.
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
ECE 103 Engineering Programming Chapter 52 Generic Algorithm Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.
Genetic Algorithms. 2 Overview Introduction To Genetic Algorithms (GAs) GA Operators and Parameters Genetic Algorithms To Solve The Traveling Salesman.
MAE 552 Heuristic Optimization Instructor: John Eddy Lecture #12 2/20/02 Evolutionary Algorithms.
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.
GENETIC ALGORITHM Basic Algorithm begin set time t = 0;
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Genetic Algorithms Chapter Description of Presentations
Selection Methods Choosing the individuals in the population that will create offspring for the next generation. Richard P. Simpson.
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.
EVOLUTIONARY SYSTEMS AND GENETIC ALGORITHMS NAME: AKSHITKUMAR PATEL STUDENT ID: GRAD POSITION PAPER.
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.
Genetic Algorithms Author: A.E. Eiben and J.E. Smith
Genetic Algorithms.
Optimization Of Robot Motion Planning Using Genetic Algorithm
Introduction to Genetic Algorithm (GA)
Genetic Algorithms overview
GENETIC ALGORITHMS & MACHINE LEARNING
Genetic Algorithms Chapter 3.
Searching for solutions: Genetic Algorithms
Introduction to Genetic Algorithm and Some Experience Sharing
Steady state Selection
Population Methods.
Presentation transcript:

Genetic Algorithms By: Jacob Noyes 4/16/2013

Traveling Salesman Problem Given:  A list of cities  Distances between each city Find:  Shortest path to reach every city once

Traveling Salesman Problem Brute force  Exact Algorithms Exact Algorithms Pro:  Will find the right answer Con:  Does not scale well

Evolution Change in inherited characteristics over time Natural Selection:  A mechanism through which evolution happens  Survival of the fittest  Genes of the more suitable organisms get passed on more often Deoxyribonucleic acid(DNA):  Genes encoded in amino acids  Used to pass genes from parent to offspring

Genetic Algorithms: The Basics Genetic algorithms are specialized search heuristics which use the fundamental principles of evolution through natural selection to find the best solution to a problem.

Genetic Algorithms: The Basics Encoding Initialization Selection Crossover Mutation

Encoding Changeable representation of individual's traits is created Completed only at the start Its “string” is designed a series of bits Concatenate multiple parameters

Examples: Max y-values? Example 1:  y = -x^ x  0 ≤ x ≤ 255  String: ≤ x ≤ Example 2:  y = 2w + x + 3z  0 ≤ w ≤ 7, 0 ≤ x ≤ 7, 0 ≤ z ≤ 7  String: 000/000/000 – 111/111/111

Initialization Beginning population is created Each bit(gene) is randomly generated to create variety Performed only for the first generation and not repeated

Example: Initialization Given  y = -x^ x  0 ≤ x ≤ 255 X Binary x

Selection Assign a fitness  measure of how close a solution is to fulfilling the problem  Assigned to each individual Select individuals  Individuals with higher fitness will reproduce more often  Non-selected individuals will “die off”

Example: Fitness Given  y = -x^ x  0 ≤ x ≤ 255 X Binary xFitness

Optimums Local optimum: A point where small changes will lead to worse results Overall optimum: The best solution

Selection: Categories Proportionate Selection: Fitness relative to other individuals Ranking Selection: Chance to reproduce based on order Tournament Selection: Pits individuals against each other in smaller brackets Gender Specific Selection: Splits Individuals into groups based on “sex” Genetic Relatedness Based Selection: Individuals are selected based on their genetic distance from others in the population

Selection: Proportionate Selection Roulette wheel selection Deterministic Sampling Stochastic Remainder Sampling with Replacement Stochastic Remainder Sampling without Replacement Stochastic Universal Selection

Roulette Wheel Selection 1. Find Pf: Population fitness = sum of all fitness factors 2. Find Psel: Each individual's probability of selection  Psel = (fitness factor) / Pf 3. Load each Psel into an array 4. Generate random number between Start at beginning of array, subtract each Psel from number until number <= 0

Deterministic Sampling 1. Average fitness is found 2. Individual fitnesses are divided by the average 3. Whole number results = number of spots in the mating pool 4. Extra slots filled starting by highest decimal 5. Random numbers generated to select individuals from the mating pool

Stochastic Remainder with Replacement Uses Deterministic Sampling to fill slots with whole number results Left over slots are then filled using the remainders with the Roulette Wheel Selection Method

Stochastic Remainder without Replacement Uses Deterministic Sampling to fill slots with whole number results Uses a “weighted-coin toss” to determine the rest  1. Each remainder multiplied by 100  2. Random number between generated  3. If random number <= remainder, accept  4. Loop until all spots are filled

Ranking Selection Chance to breed based on order of fitness, not proportion Pro: Easy to implement and understand Con: Generally less accurate, less efficient, and phase out diversity too quickly Due to cons, not used often Types:  Linear ranking selection  Truncate Selection

Linear Ranking Selection 1. Probabilities are set up for each rank before fitnesses are even assessed 2. Individuals are ordered based on fitness level 3. The predefined probabilities are assigned to their rank 4. Individuals are selected based on the probabilities

Truncate Selection 1. Candidates are put in order based on fitness 2. The top predefined percentage are chosen to reproduce

Tournament Selection Individuals are pitted against each other in smaller brackets The winner(s) of each bracket reproduces Bracket participants only need to know fitness levels of others in bracket  No need for total or average population fitness factors  Good for situations when it is impossible or implausible to calculate totals

Tournament Selection: Categories Binary Tournament Selection Larger Tournament Selection Boltzmann Tournament Selection Correlative Tournament Selection

Binary Tournament Selection 1. Two candidates are randomly selected out of possible solutions 2. Candidate with best fitness factor is chosen to reproduce

Larger Tournament Selection 1. More than two candidates are randomly selected out of possible solutions 2. Candidate with best fitness factor is chosen to reproduce Only difference from Binary Tournament Selection is number of candidates in each bracket  More candidates = higher selection pressure

Boltzmann Tournament Selection N = temperature = variable describing number of differences in bit string between two individuals 1. First candidate is chosen randomly 2. Second candidate is chosen as having exactly n differences in gene string from first candidate 3. Third candidate is chosen  Half of the time has exactly n differences in gene string from first AND second candidate (strict choice)  Other half of the time has exactly n difference in gene string from ONLY first candidate (relaxed choice) 4. Choose the winner of the three to reproduce

Correlative Tournament Selection Not so much a separate selection method as much as an extension of other tournament selections Once mating pool is selected, pairs are created based on how closely they are related Pairing similar individuals allows a better chance of passing on their (probably) good similar trait

Gender Specific Selection Genetic Algorithm with Chromosome Differentiation(GACD) Restricted Mating Correlative Family-based Selection

Genetic Algorithms with Chromosome Differentiation Every individual has an extra 00 or 01 attached to their bit string  00 = female, 01 = male  When a male and female mate each parent randomly selects a bit to pass onto the child Females(00) can pass on 0 or 0 Males(01) can pass on 0 or 1 Hamming distance: the sum of the differences between each bit of two individuals  Ex: and have a hamming distance of 3.

Genetic Algorithm With Chromosome Differentiation 1. Males generated first randomly 2. Females created for each male with maximum hamming distance 3. Select individuals to put into mating pool by either:  Using a separate selection method for each sex  Or, lumping them together and using one selection method over all of them 4. Mate each individual in the mating pool twice 5. If there are fewer of one sex in the mating pool, mate leftovers with the highest fitness individual of the opposite sex

Restricted Mating In nature, different species cannot or will not mate Restricted mating is based on species differentiations Certain traits (predefined sections of the bit string) must be the same to mate two candidates Keeps several variations from converging to a local optimum

Correlative Family-based Selection 1. Two candidates are mated together twice 2. Between the two candidates and the two children, the most fit solution is chosen 3. The hamming distance is calculated for each individual compared to the other three 4. The individual with the highest hamming distance is also chosen to reproduce

Genetic Relatedness Based Selection Purpose is to search unexplored areas of the search space Groups candidates based on similar fitness factors Does not try to find most fit candidates Includes:  Fitness Uniform Selection Scheme(FUSS)  Reserve Selection

Fitness Uniform Selection Scheme Candidates with similar fitness factors are grouped together Random numbers are generated from the range of minimum fitness to maximum fitness Candidates with fitnesses closest to the random number are selected This gives a higher probability of selecting unexplored areas Helps avoid local optimums

Reserve Selection Candidates split into two categories  Non-reserved: Normal candidates with normal selection process applied  Reserved: Specific less fit candidates that are carried over from generation to generation to keep variety in the population Keeps pool out of local maximums

Elitism Automatically carry over most fit individual to next generation Extension of other selection methods Makes sure best fit does not just get unlucky

Example: Selection Given  y = -x^ x  0 ≤ x ≤ 255  Top half truncate selection Gene pool X Binary xFitness

Crossover Genes(bit strings) are combined from both parents to create offspring Locus: the randomly generated point(s) at which each parent's bit string is separated

Example: Crossover CandidateGene poolLocus ParentsP1 String P2 StringOffspring 1, , , , , , , ,

Mutation in The Natural World Brings diversity to a population Without mutation, just different combinations of the same traits Mutations happen when DNA is not copied properly If the mutation has a benefit, or is just not a hindrance, it may be passed on to new generations

Mutation in Genetic Algorithms Purposely inject after crossover Rate of mutation is decided beforehand  Ex: 1/2000th chance of mutation per bit For every bit in a population, a random number is generated If the probability hits, the bit is XOR'ed with 1

Given  mutation rate: 1/64 Example: Mutation Pre-mutatedXOROffspring

Genetic Algorithms: End Fitness threshold based  Each solution's fitness level is checked after each generation  If a given minimum fitness level is achieved, the algorithm finishes running and outputs the maximum fitness candidate Generation threshold based  Genetic algorithm runs for a predefined number of generations  Most fit solution over all generations is outputted

Uses of Genetic Algorithms Optimal water network layouts Facial recognition Robotics Trajectories for spacecraft Fun with walking Much More

Questions?