Practical Issues in Implementing Genetic Algorithms: Constraint Handling and Convergence, Slides of Computational Physics

Practical issues encountered in the implementation of genetic algorithms, focusing on constraint handling and convergence criteria. It provides examples of penalty functions and methods for determining convergence, as well as steps for encoding solutions, generating an initial population, evaluating design fitness, and implementing selection and variation operators.

Typology: Slides

2011/2012

Uploaded on 07/05/2012

imran
imran 🇵🇰

5

(1)

16 documents

1 / 21

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
GA Examples: Practical Issues
Dr. Nasir M Mirza
Computational Physics
Computational Physics
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download Practical Issues in Implementing Genetic Algorithms: Constraint Handling and Convergence and more Slides Computational Physics in PDF only on Docsity!

GA Examples:

Practical Issues Dr. Nasir M Mirza

Computational Physics^ Computational Physics

Email: [email protected]

Practical Implementation Issues The next set of slides will deal with some issuesencountered in the practical implementation of agenetic algorithm. Specifically constraint handling and convergencecriteria.

Constraint Handling Example of a penalty term. This will provide a numerical violation value.

It is

up to you to decide how this will effect yourfitness.

∑^

=^

m = j

l k

k

j^

x

h

x

g

xP

1

1

2

2

] 0 ),

max[

Convergence Common ways of determining convergence: 1.^

No change in best quality design over chosennumber of gens.

2.^

No change in average quality of population ofchosen number of gens.

3.^

Set a maximum allowable number ofgenerations.

4.^

Set a maximum allowable number of objectivefunction evaluations.

Example

ON OFF

ON OFF

ON OFF

ON OFF

ON OFF

Payoff ($)

f (s)

We will toggle the switches to alter the payoff.

Black Box

Example According to our 5 basic components, what shouldour first step be? Considering the nature of our problem, is there anencoding scheme that we think may work well? How can we encode solutions to our problem inthis way?

Example What’s next? We must decide how to generate an initialpopulation. We will use a random approach.

This would be

like flipping a coin a sufficient number of times tofill each of our initial designs with 1’s and 0’s.

Example Now what? We must decide how we are going to evaluate our designfitness.

This is not (necessarily) the objective function value. In our case, we will consider the output (payoff) of ourblack box to be the design fitness (We will treat the switchsettings as a binary number and our fitness will be thesquare of the decimal equivalent).

Example Variation - Crossover Recall the approaches presented for crossover onvectors of bits. (random parameter selection andn-pt crossover) We will choose to use single point uniformcrossover.

(uniform refers to the means by which

we generate our random crossover pt.)

Example Variation – Mutation We will use random bit mutation which in this caseis exactly the same as random design variablereassignment since each of our design variables isin itself a bit.

Example Execution We will maintain a population of 4 members andperform 2 crossovers per generation.

With 4

members, there are 6 possible parings (excludingorder) so this is a 33% crossover rate.

We will use

a 5% mutation rate (bitwise).

Example Initial Population – Gen. #0 (recall f = x

string

X^

f^

f/favg

cop.

avg

Example Generation #1 - evaluation + selection for 2^ string

X^

f^

f/favg

cop.

avg

Example Generation #2 - variation^ string

after cross. after mutation