GENETIC ALGORIT
HMSubmitted by…
Pratheeban RRegister Number
103478165Date
03/11/2012Event
Seminar 1
AgendaIntroductionBiological BackgroundSearch SpaceGenetic AlgorithmOutline of Basic GAOperators of GACrossoverMutationParameters of GARecommendationsApplication of GAAdvantage & DisAdvantage
Introduction Inspired by Darwin's theory about EvolutionPart of Evolutionary ComputingRapid growing area of AIEA Idea – I. Rechenberg – 1960 - “Evolution Strategies”GA Invent & Develop – John Holland team – “Adaption and
Artificial Systems” - 1975 John Koza – 1992 – GA to evolve programs to perform
certain task – “Genetic Programming”
Biological Background CHROMOSOMES
Each Cell – same set of chromosomes String of DNA & serves as model for whole organism Consist of Genes, blocks of DNA TRAIT - each Gene encodes a particular protein. E.g. Eye Color ALLELES - possible settings for Trait (e.g. blue, brown) LOCUS - each Gene’s own position in chromosome GENOME – complete set of genetic material GENOTYPE – particular set of genes in genome PHENOTYPE – genotype’s physical and mental characteristics (eye
color, intelligence) REPRODUCTION
CROSSOVER (RECOMBINATION) – 1st occurs during reproduction Genes from parents form in some way the whole new chromosome
(OFFSPRING) & can be Mutated MUTATION – elements of DNA are a bit change
This changes mainly caused by errors in copying genes from parents. FITNESS – measured by success of the organism in life
Search SpaceSpace of all feasible solutions Each point in the search space represent one feasible
solutionEach feasible solution can be "marked" by its value or
fitness for the problem
Considered as good solution (not often possible to prove what is real optimum)
Genetic AlgorithmSolution to a problem solved by genetic algorithms, is evolved
Algorithm is started with a set of solutions (represented by chromosomes) called Population
Solutions from one population are taken and used to form a new population for a better one.
Solutions which are selected to form new solutions (offspring) are selected according to their fitness - the more suitable they are the more chances they have to reproduce
Repeated until some condition is satisfied.
Outline of the Basic Genetic Algorithm1. [Start] Generate random population of n chromosomes
(suitable solutions for the problem)2. [Fitness] Evaluate the fitness f(x) of each chromosome x in the
population3. [New population] Create a new population by repeating
following steps until the new population is complete1. [Selection] Select two parent chromosomes from a population
according to their fitness (the better fitness, the bigger chance to be selected)
2. [Crossover] With a crossover probability cross over the parents to form a new offspring (children). If no crossover was performed, offspring is an exact copy of parents.
3. [Mutation] With a mutation probability mutate new offspring at each locus (position in chromosome).
4. [Accepting] Place new offspring in a new population
4. [Replace] Use new generated population for a further run of algorithm
5. [Test] If the end condition is satisfied, stop, and return the best solution in current population
6. [Loop] Go to step 2
Operators of GACrossover + Mutation
Encoding of a Chromosome
represent chromosome in Binary String
each chromosome has one binary stringeach bit in this string can represent some characteristic
of the solution(OR)
whole string can represent a numbermany ways to Encode – Depends on solved problem
Chromosome 1 1101100100110110Chromosome 2 1101111000011110
CrossoverSelects genes from parent chromosomesCreates a new offspring
Depends on encoding of chromosomeSpecific crossover - specific problem – performance
improvement of GANew chromosomes will have good parts of old
chromosomes & better
Chromosome 1 11011 | 00100110110Chromosome 1 11011 | 00100110110
Offspring 1 11011 | 11000011110Offspring 2 11011 | 00100110110
MutationPrevents falling all solutions in population into a local
optimum of solved problem (local extreme)Changes randomly the new offspring for binary encoding, switch random chosen bit from 0 to 1 /
1 to 0
Depends on encoding & crossoverShould not occur very often, else GA will change to
Random Search
Original offspring 1 1101111000011110Original offspring 2 1101100100110110Mutated offspring 1 1100111000011110Mutated offspring 2 1101101100110110
Parameters of GA Probability of Crossover & Mutation
Crossover Probabilitycrossover performationno crossover – offspring is exact copy of parents if crossover – offspring is made from parts of parents100 % - all offsprings made by crossover0 % - exact copies of old population
Mutation Probabilitychromosome mutationno mutation – offspring crossover without any changeif mutation - part of chromosome is changed100 % - whole chromosome change0 % - no change
Recommendations Crossover rate
should be high ~ 80% - 95%. for some problems ~ 60% is the best
Mutation rate mutation rate should be very low. best rates reported - 0.5% - 1%.
Population size best population size depends on size of encoded string very big population size usually does not improve performance of GA good population size is about 20-30 sometimes sizes 50-100 are reported as best 32 bits chromosome – population 32 16 bits chromosome - two times more than the best population size
Selection basic roulette wheel selection rank selection can be better simulated annealing – sophisticated methods elitism should be used try steady state selection.
Encoding Encoding depends on the problem & size of instance of the problem.
Crossover and mutation type Operators depend on encoding & problem.
Applications of GANonlinear dynamical systems - predicting, data analysis
Designing neural networks, both architecture and weights
Robot trajectory
Evolving LISP programs (genetic programming)
Strategy planning
Finding shape of protein molecules
TSP and sequence scheduling
Functions for creating images
Advantage & DisAdvantageAdvantage
parallelism travelling in a search space with more individuals so
they are less likely to get stuck in a local extreme like some other methods
easy to implementhave some GA, just write new chromosome to solve
another problemsame encoding - change the fitness function
DisAdvantagecomputational timeslower than some other methodschoosing encoding and fitness function can be difficultBut with today’s computers it is not so big problem
Reference
Rechenberg, Ingo (1973). Evolutionsstrategie. Stuttgart: Holzmann-Froboog. ISBN 3-7728-0373-3.
Srinivas. M and Patnaik. L, "Adaptive probabilities of crossover and mutation in genetic algorithms," IEEE Transactions on System, Man and Cybernetics, vol.24, no.4, pp.656–667, 1994.
http://www.obitko.com/tutorials/genetic-algorithms/ga-basic-description.php
Thank You!