Top Banner
Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!
23

Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

Jan 02, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

Design of an Evolutionary Algorithm

M&F, ch. 7

why I like this textbook and

what I don’t like about it!

Page 2: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

M&F’s model ofEvolutionary Algorithm

Five aspects of specification1. (7.1) representation (e.g., set of variable values)

2. (7.5) initial population (e.g., random)

3. (7.2) evaluation function ( e.g., fitness)

4. (7.4) selection procedure (next generation pop.)

5. (7.3) random variation operators(e.g., crossover, mutation)

Page 3: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

7.1 Representation

• SAT representation, n propositions– vector of n boolean values

• effective when variables are independent (no or few constraints between variables)

--> vector of parameters or symbols

Page 4: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

7.1.1 Fixed length vector

V = {v1, v2, …, vn}, vi Di

size of search space is |D1| x |D2| x…x |Dn|

e.g., SAT, sum of integers puzzle

Page 5: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

7.1.2 permutation

• for TSP and similar problems, the vector representation includes too many bad solutions (repeated or missing cities)– because all variables are from same domain

{D, A, E, C, B} “without replacement”

n variables as permutationsize of search space is n!

Page 6: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

Vector vs PermutationVector

{x1, x2, x3}Space{1,1,1}, {1,1,2}, {1,1,3},{1,2,1}, {1,2,2}, {1,2,3}, {1,3,1}, {1,3,2}, {1,3,3},{2,1,1}, {2,1,2}, {2,1,3},{2,2,1}, {2,2,2}, {2,2,3},{2,3,1}, {2,3,2}, {2,3,3},{3,1,1}, {3,1,2}, {3,1,3},{3,2,1}, {3,2,2}, {3,2,3},{3,3,1}, {3,3,2}, {3,3,3}

Permutation

{x1, x2, x3}

Space{1,2,3}

{1,3,2}

{2,1,3}

{2,3,1}

{3,1,2}

{3,2,1}

Page 7: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

Permutation applications

• TSP• job shop scheduling

– k processing machines– n jobs

• each job must be processed at some subset of the k machines in a specific order and takes some time to be processed at each machine

– determine best order of job processing at each machine to minimize time of processing schedule

Page 8: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

7.1.3 Finite state machines

• extension of vector representation:

• e.g., DFA

(Q, ∑, , q0, F)

– Q: set of states {qi}

– ∑: alphabet of input symbols {sj}

: transition table Q x ∑ --> Q– F: subset of Q, accepting states

Page 9: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

Searching for a DFA

: transition table Q x ∑ --> Q

s1 s2 s3 s4 s5

q1

q2 q22

q3

q4

(Q, ∑, , q0, F)

– Q: set of states {qi}

– ∑: alphabet of input symbols {sj}

: transition table Q x ∑ --> Q

– F: subset of Q, accepting states

representation*: {q11, …, q45,q0, f1, …, f4}

*could include number of states - variable length vector

Page 10: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

7.1.4 Symbolic expressions

• searching for an expression defining a function based on input data and a set of available operations– learning programs– Spore game of evolution

Page 11: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

Symbolic expression

• syntax tree, size variable

x + sin(3.y) +

sin

.

y3

x

example representation: PreOrder traversal

{+, x, sin, ., 3, y}

Page 12: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

Symbolic expression

• syntax tree, size variable

vv, a value, belongs to domain that includes the input data (e.g., x and y) and the set of possible operations with operand(s) (tree is extended)

opop, an operator, belongs to domain that includes the set of possible operations with same number of operands and the input data (tree is pruned)

Page 13: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

Symbolic expressionx

+

sin

.

y3

x

+

yx

+

sin

x

x

/

yx

transformation to neighbour

Page 14: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

7.2 Evaluation function

• may be the fitness function of the problem, …, or not

• must measure progress toward an optimal or satisficing solution

• should operate on the chosen representation (avoid transformation)

Page 15: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

Desirable evaluation features

• efficient - searches typically spend most resources on evaluation

• incremental - revise evaluation when going from one solution to a neighbour, instead of redo

Page 16: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

7.3 Variation operators• equivalent of neighbourhood definition in local

search:– rules for getting next candidate solution(s)

• determining the connectivity of the solution space (edges) and the metric

• dependent on any number of current solutions:– 0: e.g., random– 1: e.g., mutation– 2: e.g., crossover

Page 17: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

variation of fixed length vectors

• one parent: change value of one of n variables (mutation)– densely connected space - maximum n variation

between any two solution– less densely connected - vary by single step, 1

• two or more parents: crossover, many variations that each connect space differently– one or more cut points– random choice for each variable

Page 18: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

• one parent: – 2-opt, etc.

• two or more parents: – many attempts to simulate crossover

• most need ‘repair’ to avoid repetition• most are more costly of resources• most inherit some properties but destroy others• e.g., p175

variation of permutations

Page 19: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

variation offinite state machines

• like vectors

except

• when states and symbols can be added or deleted

Page 20: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

variations ofsymbolic expressions

• one parent: see representation section

• two parents:– exchange subtrees

Page 21: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

7.4 Selection

two selection factors1. which solutions

should contributed to variation?

2. which solutions should survive to next generation?

s1,s2,s3,s4,s5,s6 at t

SELECTIONSELECTION

VARIATION

s1,s2,s3,s4,s5,s6 , c1,c2,c3,c4

SELECTIONSELECTION

s1,s2,s3,s4,s5,s6 at t+1

Page 22: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

selection strategies

deterministic

• evaluation comparison

• faster convergence

stochastic

• probabilistic selection

1. based on fitness

2. best of subsets

3. ranking in subsets

• broader sampling

Page 23: Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!

7.5 Initial populations

• uniform sampling– try to span the search space

• random sampling

• informed sampling – “guidance” - use good solutions from other

sources