Sei sulla pagina 1di 17

GENETIC ALGORITHM

BY M.Janani IE336/11L07

GENETIC ALGORITHM-INTRODUCTION
Inspired by Darwin's theory about evolution. Population based search (parallel)
simultaneous search from multiple points in search space useful in complex, unstructured search spaces (less prone to local failures)

Population members: potential solutions

Population of solutions evolve from one generation to the next

GENETIC ALGORITHM-INTRODUCTION
Search objective
Fitness score for population members (fitness function)

Survival of the fittest


selection

Generating new solutions


Mating and reproduction of individuals (crossover, mutation)

Outline of the Basic Genetic Algorithm


[Start] Generate random population of n chromosomes (suitable solutions for the problem) [Fitness] Evaluate the fitness f(x) of each chromosome x in the population [New population] Create a new population by repeating following steps until the new population is complete
[Selection] Select two parent chromosomes from a population according to their fitness (the better fitness, the bigger chance to be selected) [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. [Mutation] With a mutation probability mutate new offspring at each locus (position in chromosome). [Accepting] Place new offspring in a new population

[Replace] Use new generated population for a further run of algorithm [Test] If the end condition is satisfied, stop, and return the best solution in current population [Loop] Go to step 2

Basic Operation
Selection Recombination

String1 (f1) String2 (f2) String3 (f3) String4 (f4) ... ... StringN (fN)

String1 String2 String2 String4 ... ... Stringx

Crossover Mutation Offspring1(1,4)


Offspring2(1,4) Offspring3(2,7) Offspring4(2,7) ... ... OffspringN(x,y)

Basic parameters
Crossover probability-: no crossover- offspring is exact copy of parents. crossover- offspring is made from parts of parents chromosome. crossover probability is 100%- all offspring is made by crossover & vice versa.

Basic parameters[Continued]
Mutation probability : says how often will be parts of chromosome mutated. no mutation,-offspring is taken after crossover (or copy) without any change. mutation is performed-part of chromosome is changed.

Other parameters
Population size : -says how many chromosomes are in population -Too many chromosomes, GA slows down. -After some limit, not useful to increase population size , because it does not make solving the problem faster.

GAs: Basic Principles


Representation of individuals
String of parameters (genes) : chromosome eg. optimize a function F(p,q,r,s,t) Population members: p q r s t genotype and phenotype

Survival of the fittest (Fitness function)


numerical figure of merit /utility measure of an individual tradeoff amongst a multiple evaluation criteria efficient evaluation population evolves over generations

Iterative search Convergence


progression towards uniformity in population premature convergence? (local optima)

Typical GA Run
Fitness Best Average

Generations

Operators: Selection
Fitness proportionate selection (fi/f ) number of reproductive trials for individuals

Selection
Premature converge Fitness scaling f = f - (2*avg. - max.)
Ranked fitness Elitism Steady-state selection Demetic grouping

Selection-Types
Roulette-wheel selection
(stochastic sampling with replacement) wheel spaced in proportion to fitness values N (pop size) spins of the wheel

Stochastic universal sampling


N equally spaced pins on wheel single turn of the wheel

Genetic search: Issues


Stochastic search initial populations, probabilistic operators multiple runs with different random streams Initializing population with known solutions seeding initial population with solutions from multiple, independent runs

Using GAs
population size mutation, crossover rates how many generations multiple runs

GA Application Examples
Function optimizers
difficult, discontinuous, multi-modal, noisy functions

Combinatorial optimization
layout of VLSI circuits, factory scheduling, traveling salesman problem

Design and Control


bridge structures, neural networks, communication networks design; control of chemical plants, pipelines. Machine learning
classification rules, economic modeling, scheduling strategies portfolio design, optimized trading models, direct marketing models, sequencing of TV advertisements,adaptive agents, data mining, etc.

THANK YOU

Potrebbero piacerti anche