The Standard Genetic Algorithm Dr. Chrisantha Fernando Systems Biology Centre University of Birmingham Dr. Chrisantha Fernando Systems Biology Centre University.

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

12 October 2010Artificial Life Lecture 31 Artificial Life lecture 3 More on Evolutionary Algorithms In Lecture 2 we covered the basics of evolution and.
A First Course in Genetic Algorithms
Genetic Algorithms By: Anna Scheuler and Aaron Smittle.
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.
Genetic Programming 김용덕 Page 2 Contents What is Genetic Programming? Difference between GP and GA Flowchart for GP Structures in GP.
Non-Linear Problems General approach. Non-linear Optimization Many objective functions, tend to be non-linear. Design problems for which the objective.
EASy 12 October 2009Artificial Life Lecture 21 Evolution and Genetic Algorithms The original definition of Artificial Life, by Langton and others, concentrated.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Evolutionary Computational Intelligence
Introduction to Genetic Algorithms Yonatan Shichel.
Genetic Algorithms GAs are one of the most powerful and applicable search methods available GA originally developed by John Holland (1975) Inspired by.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Genetic Algorithm for Variable Selection
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Tutorial 1 Temi avanzati di Intelligenza Artificiale - Lecture 3 Prof. Vincenzo Cutello Department of Mathematics and Computer Science University of Catania.
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.
Genetic Algorithms Overview Genetic Algorithms: a gentle introduction –What are GAs –How do they work/ Why? –Critical issues Use in Data Mining –GAs.
Genetic Algorithm.
Genetic Algorithms and Ant Colony Optimisation
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
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"
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Computational Complexity Jang, HaYoung BioIntelligence Lab.
1 Machine Learning: Lecture 12 Genetic Algorithms (Based on Chapter 9 of Mitchell, T., Machine Learning, 1997)
GENETIC ALGORITHM A biologically inspired model of intelligence and the principles of biological evolution are applied to find solutions to difficult problems.
1 Genetic Algorithms and Ant Colony Optimisation.
Why do GAs work? Symbol alphabet : {0, 1, * } * is a wild card symbol that matches both 0 and 1 A schema is a string with fixed and variable symbols 01*1*
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
Chapter 9 Genetic Algorithms.  Based upon biological evolution  Generate successor hypothesis based upon repeated mutations  Acts as a randomized parallel.
Edge Assembly Crossover
Genetic Algorithms Genetic algorithms provide an approach to learning that is based loosely on simulated evolution. Hypotheses are often described by bit.
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Genetic Algorithms An Example Genetic Algorithm Procedure GA{ t = 0; Initialize P(t); Evaluate P(t); While (Not Done) { Parents(t) = Select_Parents(P(t));
Genetic Algorithms. 2 Overview Introduction To Genetic Algorithms (GAs) GA Operators and Parameters Genetic Algorithms To Solve The Traveling Salesman.
Genetic Algorithms. The Basic Genetic Algorithm 1.[Start] Generate random population of n chromosomes (suitable solutions for the problem) 2.[Fitness]
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;
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
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.
Selection and Recombination Temi avanzati di Intelligenza Artificiale - Lecture 4 Prof. Vincenzo Cutello Department of Mathematics and Computer Science.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
Overview Last two weeks we looked at evolutionary algorithms.
CAP6938 Neuroevolution and Artificial Embryogeny Evolutionary Comptation Dr. Kenneth Stanley January 23, 2006.
1 Comparative Study of two Genetic Algorithms Based Task Allocation Models in Distributed Computing System Oğuzhan TAŞ 2005.
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
Chapter 14 Genetic Algorithms.
Dr. Kenneth Stanley September 11, 2006
Evolutionary Algorithms Jim Whitehead
USING MICROBIAL GENETIC ALGORITHM TO SOLVE CARD SPLITTING PROBLEM.
Artificial Intelligence Methods (AIM)
GENETIC ALGORITHMS & MACHINE LEARNING
Searching for solutions: Genetic Algorithms
Non-Symbolic AI Lecture 2
A Gentle introduction Richard P. Simpson
Genetic Algorithm Soft Computing: use of inexact t solution to compute hard task problems. Soft computing tolerant of imprecision, uncertainty, partial.
Steady state Selection
Population Based Metaheuristics
GA.
Presentation transcript:

The Standard Genetic Algorithm Dr. Chrisantha Fernando Systems Biology Centre University of Birmingham Dr. Chrisantha Fernando Systems Biology Centre University of Birmingham

DIY Evolution.

Genotype  Binary String  Real numbered String  Binary String  Real numbered String , 0.5, 0.2, 0.83, 0.01, , 0.1, 0.5, 0.8, 0.9, 1.0 Represents length of left leg. Size of head, etc…

Evaluation  Interpret the genotype to produce the phenotype.  In the simplest case they are the same thing.  E.g. Imagine we desire the string   We can define fitness of any string as the number of places where it is the same as the above string, e.g.    = 5 = Fitness  Interpret the genotype to produce the phenotype.  In the simplest case they are the same thing.  E.g. Imagine we desire the string   We can define fitness of any string as the number of places where it is the same as the above string, e.g.    = 5 = Fitness

A Trivial Example  int evaluate(int *g) {  int i,  r=0;  for (i=0;i<10;i++)  r += (g(i) == 0);  return(r);  }  int evaluate(int *g) {  int i,  r=0;  for (i=0;i<10;i++)  r += (g(i) == 0);  return(r);  } I. Harvey

So first initialize a population  int popn[30][10];  void initialise_popn() {  int i,j;  for (i=0;i<30;i++)  for (j=0;j<10;j++)  popn[i][j]= flip_a_bit();  }  int popn[30][10];  void initialise_popn() {  int i,j;  for (i=0;i<30;i++)  for (j=0;j<10;j++)  popn[i][j]= flip_a_bit();  } I. Harvey

Main Loop  For n times round generation loop  evaluate all the population (of 30)  select preferentially the fitter ones as parents  for 30 times round repro loop  pick 2 from parental pool  recombine to make 1 offspring  mutate the offspring  end repro loop  throw away parental generation and replace with offspring  End generation loop  For n times round generation loop  evaluate all the population (of 30)  select preferentially the fitter ones as parents  for 30 times round repro loop  pick 2 from parental pool  recombine to make 1 offspring  mutate the offspring  end repro loop  throw away parental generation and replace with offspring  End generation loop I. Harvey

More complicated Evaluations  Genotype encodes a neural network. Dario Floreano’s Lab

Even More Complicated Evaluations

Problems in Practice  An evaluation may take a long time, in which case the genetic algorithm will be slow.  An evaluation may be noisy, so the same agent may have different fitness each time you make an evaluation. If it is too noisy, then good agents may be lost from the population.  An evaluation may take a long time, in which case the genetic algorithm will be slow.  An evaluation may be noisy, so the same agent may have different fitness each time you make an evaluation. If it is too noisy, then good agents may be lost from the population.

Selection Methods  Truncation Selection  All parents come from top 50% or top 20% etc..  Fitness Proportionate Selection  E.g. if all fitnesses are 2, 4, 6, 8, 9, then select parent using roulette wheel selection with probability 2/29, 4/29, 6/29, 8/29, 9/29  Problems with this are  If early on one agent dominates there is too much selective pressure.  If later agents have very similar fitnesses there is too little selective pressure.  Scaling methods can be used to get around these problems.  Truncation Selection  All parents come from top 50% or top 20% etc..  Fitness Proportionate Selection  E.g. if all fitnesses are 2, 4, 6, 8, 9, then select parent using roulette wheel selection with probability 2/29, 4/29, 6/29, 8/29, 9/29  Problems with this are  If early on one agent dominates there is too much selective pressure.  If later agents have very similar fitnesses there is too little selective pressure.  Scaling methods can be used to get around these problems.

 Rank Selection: Ignore absolute fitness, can use other slopes, but here the best is selected 2x more than the average. 0 2

Elitism  Force a direct un-mutated copy of the best of the last generation.  Never loose the best.  Useful if there is a lot of noise in fitness assessments, or if mutation is very likely to produce a low fitness offspring.  Force a direct un-mutated copy of the best of the last generation.  Never loose the best.  Useful if there is a lot of noise in fitness assessments, or if mutation is very likely to produce a low fitness offspring.

Mutation (Asexual Reproduction)  Mutate at randomly chosen loci with a small probability.  Mutate all loci by a very small amount (vector mutation).  With binary you do bit flips, with real valued mutation you might multiply the value by a Gaussian distributed random number.  Mutate at randomly chosen loci with a small probability.  Mutate all loci by a very small amount (vector mutation).  With binary you do bit flips, with real valued mutation you might multiply the value by a Gaussian distributed random number.

Recombination (Sexual Reproduction) Parent A Parent B point random equal crossover Uniform crossover

The Competing Conventions Problem Head, Eye, Face, Leg Face, Eye, Leg, Head Head, Eye, Face, Leg Face, Eye, Leg, Head Head, Eye, Face, Head Face, Eye, Leg, Leg OK, so two heads, and two legs. Sometimes competing conventions can help, some- times it can hinder.

Schema Theorem  John Holland.  A theory of how GAs work. Not everyone agrees with this, but it is worth reading his book if you are interested.  John Holland.  A theory of how GAs work. Not everyone agrees with this, but it is worth reading his book if you are interested.

A Black Art  No universal algorithm suitable for all cases.  Need to get a feeling for it by doing it.  No universal algorithm suitable for all cases.  Need to get a feeling for it by doing it.

Relationship to Real Genomes  Usually GAs use haploid genomes, not diploid ones, i.e. there is only one copy of each ‘gene’.

Homework. I’m happy to help if you need.  The Card Problem  You have 10 cards numbered from 1 to 10. You have to choose a way of dividing them into 2 piles, so that the cards in Pile_0 SUM to a number as close as possible to 36, and the remaining cards in Pile_1 MULTIPLY to a number as close as possible to 360.  Genotype encoding  Each card can be in Pile_0 or Pile_1, there are 1024 possible ways of sorting them into 2 piles, and you have to find the best. Think of a sensible way of encoding any possible solution-attempt as a genotype.  Fitness  Some of these solution-attempts will be closer to the target than others. Think of a sensible way of evaluating any solution-attempt and scoring it with a fitness-measure.  The GA  Write a program, in any sensible programming language, to run a GA with your genotype encoding and Fitness function. Run it 100 times and see what results you get. Who can write the GA that solves the problem in the least number of generations?  The Card Problem  You have 10 cards numbered from 1 to 10. You have to choose a way of dividing them into 2 piles, so that the cards in Pile_0 SUM to a number as close as possible to 36, and the remaining cards in Pile_1 MULTIPLY to a number as close as possible to 360.  Genotype encoding  Each card can be in Pile_0 or Pile_1, there are 1024 possible ways of sorting them into 2 piles, and you have to find the best. Think of a sensible way of encoding any possible solution-attempt as a genotype.  Fitness  Some of these solution-attempts will be closer to the target than others. Think of a sensible way of evaluating any solution-attempt and scoring it with a fitness-measure.  The GA  Write a program, in any sensible programming language, to run a GA with your genotype encoding and Fitness function. Run it 100 times and see what results you get. Who can write the GA that solves the problem in the least number of generations?