346 views

Uploaded by Noval Arsad

Bahan Kuliah

- Gen Algo-X2
- Car Racing Competition at WCCI2008 - Matt Simmerson
- Hybrid Techniques of Genetic Algorithm for Inventory of Auto Industry Model for Deteriorating Ttems with Two Warehouses
- IJETR041153
- aica94
- IRJET-ECONOMIC LOAD DISPATCH CONTAINING LOSS COEFFICIENT
- Path Planning for Mobile Robots Lab Outline
- p2 TSP with permutation encoded chromosome.pdf
- WSC6
- Comparison of Parents Selection Methods of Genetic Algorithm for TSP
- John Gero Lecture Genetic Algorithms
- Linard_1999-IsD_System Dynamics of Employment Planning - Employment Optimization
- Genetic Algorithm
- Optimum Size and Location of Distributed Generation and capacitor for Loss Reduction using different optimization technique in Power Distribution Network
- 4rwrfsd
- CAT 3 NNFLC with ans.docx
- Research on the Batch Production Process Planning Problem of Assembly Line Based on the Virtual Enterprises
- Distribution Feeder Re Configuration Using PSO
- 10.1.1.30.6625
- defend

You are on page 1of 21

Lecture 3

27/09/2011

1 2 3 4 5 1

Old population Selection Intermediate population Recombination Mutation New population one generation

A population is a (multi-) set of individuals An individual (genotype, chromosome) is a string alphabet, often:

S AL (A:

A = {0, 1})

Fitness = objective function = evaluation function. Fitness values can be replaced by ranks (high to low)

I. Plain variant

Mean tness

f =

1 n i fi

Each time the ball spins one individual is selected for the intermediate population Stochastic sampling with replacement Ratio of tness to average tness determines number of ospring, i.e. a new individual is a copy of an old individual (of tness If 1

fi ) with probability

fi = f

1

f nf

i

1 n n

Sector (French) bets in roulette: Here, the size of the sector represents the relative tness of an individual

NAT03 27/09/2011 J. M. Herrmann

II. A more practical variant

Mean tness

f =

1 n i fi

i Normalized tness: f

Remainder stochastic sampling Ratio of tness to average tness determines number of ospring

fi = f : If fi < f :

If If

i survives with prob. f

fi > f :

f f

i

number of ospring

int

f

i with probability f

int

fi

Now: Only the outer wheel with equidistant pointers spins once and pointers in each sector are counted

Both variants are equivalent in the sense that they produce an unbiased sample of the tness in the population, i.e. a new individual is a copy of an old individual (of tness

fi ) with probability

f nf

i

Preparation: Population was already shued by selection (but may contain multiple copies of the same string) Individuals are strings of equal length Choose a probability

pc :

Crossover:

Choose a pair of individuals With probability

pc :

L1

cut both individuals after this position re-attach crossed: xyxxxyyy, abbabbab

xyxxbbab, abbaxyyy

Move the obtained pair to the new population (even if not crossed over) Repeat for the remaining pairs (assert

even)

Preparation: Crossover nished Individuals are strings of length Choose a (small) probability

L made from k

dierent char's

pm

(possibly rank-dependent)

Mutation:

For all individuals (from new population)

for each position from 1 to with probability [this gives

k k

pm :

set the character (bit if binary) to a random value or change it binary, switch]

The obtained mutants (possibly including some unmutated individuals) form the new population

Repeat Evaluate tness Select intermediate population Do crossover or reproduction Do mutation Until solutions are good enough

The canonical GA

Evaluation function If

i {1, . . . , n}

F (i ) = fi

to

fi /

i fi

is

Select two parents at random from the intermediate population. Apply crossover with probability probability 1

pc

pc , with

generation reproduction.

Crossover:

Mutation: Take each bit in turn and ip it with probability pm (1 0 or 0 1). pm < 0.01 usually. Note that the probability pm is applied dierently from pc

This is one generation. Repeat for many generations until a

Termination of a GA

The generational process is repeated until a termination condition has been reached, e.g. A solution is found that has optimal tness (or is suciently close to the optimum) Fitness indicates a sucient improvement over alternative algorithms Fixed number of generations reached (only for safety!) Allocated budget (computation time/money) reached The diversity of the population has vanished (restart?) The tness of the highest ranking solution is reaching or has reached a plateau such that successive iterations no longer produce better results (restart?) Combinations of the above After Termination decide: Really nish or restart a variant of the GA on the same task

NAT03 27/09/2011 J. M. Herrmann

Maximise

f (x ) = x 2

for integer

Encoding: Write

signicant bits to the left). Initialisation: All strings = (or random) Mutations: Generate 1s Cross-over: Combine 1s from dierent individuals Termination criterion

(0, 0, 0, 0, 0)

Represent 00000 00001 00010 . . . 11111

x

0 1 2 . . . 31

as 5 bits 0 1 4 . . . 961 Roulette-wheel selection Here raw tness values will be used instead of ranks. Does this make any dierence?

Use a population size of 4 (far too small!) i 1 2 3 4 genome 01101 11000 01000 10011 raw tness 169 576 64 361 % of total 14.4 49.2 5.5 30.9

Further Recombinations

So our new (intermediate) population might be: 1, 2, 2, 4 Create next generation: Crossover:

pc = 1.0

0110 0 1100 1

11 011 10 000

pm = 0.001, 20 bits

0.001 = 0.02)

( ... wouldn't be a good idea if all individuals had a 0 in the same place!)

Results for the second generation: i 1 2 3 4 genome 01100 11001 11011 10000 raw tness 144 625 729 256 % of total 8.2 35.6 41.6 14.6

What is the average evaluation of this population? How does it compare with the average evaluation of the previous generation? Continue until no improvement in the best solution for

So our new (intermediate) population might be: 1, 2, 2, 4 Create next generation: Crossover:

pc = 1.0

Pair parents randomly, choose crossover points randomly Parents: 1 and 2 0110 1 1100 0 Parents: 2 and 4 11 000 10 011 2. Generation 3. Generation

11 011 10 000

110 00 100 11

... assuming that by chance the same pairings have taken place. Now there is a chance to nd the optimal solution. What chance? Choose (what is now) parents 2 and 4: probability 1/3; cut after third place probability 1/4, i.e. a chance of 1/12.

NAT03 27/09/2011 J. M. Herrmann

Conclusions

Larger populations may improve exploration Large populations, may contain many identical individuals

redundant representation if they are t some of them will survive

Choice of the representation is crucial: E.g. 10000 is better (higher tness!) than 01111 although the latter is closer (in Hamming distance but not w.r.t. tness!). Low evolutionary pressure can be helpful: The algorithm will typically nd signicant bits rst, (e.g.) 11100 has much higher tness than 00011, but together they could form the optimal solution if some of the latter individuals did survive Mutations are important! Termination is a non-trivial problem

Climbing up the tness curve (landscape) Promote fast climbers Putting together building blocks of good subsolutions

What would happen if we choose a linear tness function? What would happen if tness just counts the bits?

Number of generations required to discover the optimal solution Strings of 20 characters initialization: or b)

Si = (0, . . . , 0)

f (x ) =

961

x2

for

The Philosophy of GA

Encoding: Create a space of solutions Fitness function: Discriminate good from bad solutions Initialization: Start with good candidate solutions Selection: Prefer better solutions to worse ones Recombination: Combine parental traits in a novel manner Mutation: Creating individual traits by random local search Termination: Comparing achieved and achievable tness How do the simple mechanisms create something useful when combined? Selection + Mutation = Continual improvement Selection + Recombination = Innovation

Minimise Rastrigin's Function

x = xmin + xmax xmin b/ (2m 1) x = 5.12 + 10.24 b/ 28 1 E.g. if b = 10011001 (represents 153 in

base 10)

x = 5.12 + 10.24

153/255

= 1.024

Optimally, the algorithm nds (for this setting) x = 0.0201 with f (x ) = 0.0799 rather than x = 0 and f (x ) = 0. Why?

More on this example: Search for Rastrigin at www.mathworks.com,

www.obitko.com/tutorials/genetic-algorithms/example-function-minimum.php

NAT03 27/09/2011 J. M. Herrmann

Outlook

What is a schema? A non-empty subset of a string (in other words: a string with some wildcards) Short, low-order, above-average schemata receive exponentially increasing trials in subsequent generation of a genetic algorithm.

Variants of GA Performance analysis: More examples General formulation, theory, convergence etc. Other algorithms

- Gen Algo-X2Uploaded bysudhanandasahu
- Car Racing Competition at WCCI2008 - Matt SimmersonUploaded bydaniele.loiacono
- Hybrid Techniques of Genetic Algorithm for Inventory of Auto Industry Model for Deteriorating Ttems with Two WarehousesUploaded byEditor IJTSRD
- IJETR041153Uploaded byerpublication
- aica94Uploaded byDhwal Mehta
- IRJET-ECONOMIC LOAD DISPATCH CONTAINING LOSS COEFFICIENTUploaded byIRJET Journal
- Path Planning for Mobile Robots Lab OutlineUploaded byumairazizz
- p2 TSP with permutation encoded chromosome.pdfUploaded byWissal Abid
- WSC6Uploaded byJohn Pragasam
- Comparison of Parents Selection Methods of Genetic Algorithm for TSPUploaded byChetan Chudasama
- John Gero Lecture Genetic AlgorithmsUploaded bybbddd
- Linard_1999-IsD_System Dynamics of Employment Planning - Employment OptimizationUploaded byKeith Linard
- Genetic AlgorithmUploaded byseunnuga93
- Optimum Size and Location of Distributed Generation and capacitor for Loss Reduction using different optimization technique in Power Distribution NetworkUploaded byIRJET Journal
- 4rwrfsdUploaded byNaeem Younis
- CAT 3 NNFLC with ans.docxUploaded bySHAIK ROSHAN
- Research on the Batch Production Process Planning Problem of Assembly Line Based on the Virtual EnterprisesUploaded bySEP-Publisher
- Distribution Feeder Re Configuration Using PSOUploaded bybhaidada
- 10.1.1.30.6625Uploaded byAndreiPricopie
- defendUploaded byMAcryan Pacquiao Pactol
- 10.1.1.97.9405Uploaded bySiddharth Parekh
- The Optimization of a Technological Process Forms a Competitive Position of the FactoryUploaded byrossifam777
- Multiple Facility Location Analysis Problem With Weighted Euclidean DistanceUploaded bydinesh
- 174184_Lec03.pdfUploaded byalb3rtnet
- Analytical vs. heuristics approaches for robustness analysis in UTA MethodsUploaded byntsotsol
- MYr Power System OptimizationUploaded byTesfahun Girma
- 7534-POWERSYSTEM.docxUploaded byDeepakDeep
- GA MATLAB Algoritmos GeneticosUploaded byEduardo Fornazieri
- Long Term Energy Consumption Forecasting Using GeneticUploaded byJyothimon Chandran
- 7205152Uploaded bybaran65h

- EE106A_Lab2_ROS (1)Uploaded byburhan ök
- 22007537-Management-Thsis-on-rajasthan-patrika.pdfUploaded byAnkit Bissa
- Article Firing Delay AngleUploaded byborsio10
- All About DeckingUploaded bycelmic84
- Sample Bussiness Plan for EntruprenerUploaded byRavi Botve
- Polymers Lasers EnUploaded byMustafa Demircioğlu
- IT321- Data - Part 1Uploaded byrayden22
- X370 Killer SLI_multiQIGUploaded byDario Solano Angel
- Key Account Management Can Truly Help Your FirmUploaded byfglabrador
- Main Fuel Valve – Liquid Rocket Engines (J-2X, RS-25, General)Uploaded byygzylmz
- A Contingent Framework for Project Organization_goodUploaded byjohnalis22
- Harmonised Colours and Alphanumeric MarkingUploaded bycivilprogs
- Using LINQ to SQL (Part 1) - ScottGu's BlogUploaded byMohamad A. Waked
- Apr1999BalakrishnanUploaded bysuperkan619
- Critical Appraisal of Health Care LiteratureUploaded byDaniar Supriyadi
- BCA OOPSUploaded byAnonymous BOreSF
- Simplified Analysis of PWM Converters Using Model of PWM DCMUploaded byChih-Yuan Hsu
- Tranzum ProfileUploaded bySajid Ali Maari
- Currency Notes for Visually ImpairedUploaded byRohit Nain Srk Georgian
- WILCOXON - MODEL 731A-P31.pdfUploaded byubacyt
- Final Project of Stu_Info222Uploaded bymalinijoshi
- Salinity of Ocean WaterUploaded byyzavelita
- EE216 Electircal EngineeringUploaded bytrismahesh
- Erichsen Scratch Tester TBE-413Uploaded byLluís Font
- eBook - Guitar Rig - Tutorials by Jerry McphersonUploaded byJoe Masso
- SelfUploaded byerine5995
- Assignment Ist 887 BP&M Spring 2010Uploaded byexplorationist
- Modeling of EDMUploaded bypkuppan
- Articulo s Never AUploaded byPaulino Bueno C
- X001CMRUploaded byjbudhan