Logistics Checkpoint 1 -- Framework Due Friday, Dec 22nd. Group - - PDF document

logistics
SMART_READER_LITE
LIVE PREVIEW

Logistics Checkpoint 1 -- Framework Due Friday, Dec 22nd. Group - - PDF document

The Classic Genetic Algorithm 1 Logistics Checkpoint 1 -- Framework Due Friday, Dec 22nd. Group accounts Need one for you project? Let me know. Dropboxes open 24/7 Operators are standing by 2 1 Logistics Grad


slide-1
SLIDE 1

1

1

The Classic Genetic Algorithm

2

Logistics

 Checkpoint 1 -- Framework

 Due Friday, Dec 22nd.  Group accounts…

 Need one for you project? Let me know.

 Dropboxes open 24/7

 Operators are standing by…

slide-2
SLIDE 2

2

3

Logistics

 Grad Report

 Will need topics first week after we return

from break (Jan 11th).

4

Plan for today

 The Classic Genetic Algorithms  Questions before we start

slide-3
SLIDE 3

3

5

Evolutionary Algorithms

 An EA uses some mechanisms inspired by biological

evolution: reproduction, mutation, recombination, natural selection and survival of the fittest.

 Candidate solutions to the optimization problem play

the role of individuals in a population, and the cost function determines the environment within which the solutions "live".

 Evolution of the population then takes place after the

repeated application of the above operators.

6

Classic Genetic Algorithms

 Some history

 Introduced by John Holland (U of Mich) in

1975.

 “Adaptation in natural and artificial systems”

 Not the first to “apply” evolution to

computation

 However, is the origin of the framework in

which we have described.

slide-4
SLIDE 4

4

7

Evolutionary Computation process

Initialize population Select individuals for crossover (based on fitness function Crossover Mutation Insert new offspring into population Are stopping criteria satisfied? Finish

8

Classic Genetic Algorithms

 Goals:

 Define an application independent

algorithm based on evolution.

 Explore processes of evolution  Framework for analysis

slide-5
SLIDE 5

5

9

Evolutionary Algorithms

 To use evolutionary algorithms your must:

 Define your problem  Define your genotype  Identify your phenotype  Define the genotype -> phenotype translation  Define crossover and mutation operators  Define fitness  Determine selection criteria  Set population parameters 10

What made GAs unique

  • 1. Universal Genetic Codes
slide-6
SLIDE 6

6

11

Bit strings

 Classic GA representation

1 1 1 1 1

CHROMOSOME GENE

12

Bit strings

 Can use to represent any phenotype

1 1 1 1 1

integer float List whatever color … Question of whether genetic mapping is required was mute

slide-7
SLIDE 7

7

13

Grey coding

 a binary numeral system where two

successive values differ in only one digit.

 Named after Frank Grey (Bell Labs) who

invented it to prevent spurious output from electromechanical switches.

14

Grey coding

 Three digit grey codes:

 Dec Gray Binary  0 000 000  1 001 001  2 011 010  3 010 011  4 110 100  5 111 101  6 101 110  7 100 111

slide-8
SLIDE 8

8

15

What made GAs unique

1.

Universal Genetic Codes

2.

Multi-Parent Reproduction

16

Bit strings

 Easy to define crossover and mutation

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Does not introduce any new allele

slide-9
SLIDE 9

9

17

What made GAs unique

1.

Universal Genetic Codes

2.

Multi-Parent Reproduction

3.

“fitness proportional” selection

18

Selection

Classic GAs use “fitness proportional” selection:

For each generation:

1.

Compute fitness u(i) for each individual i

2.

Define selection probabilities p(i) proportional to u(i).

3.

Generate m offspring (using crossover / mutation) by probabilistically choosing parents (Parents can be chosen more than once).

4.

Select only the offspring to survive.

slide-10
SLIDE 10

10

19

Selection

 Individuals only live for one generation

 Compete to reproduce  No elitism

 Parental suitability based on fitness

 The more fit you are, the more likely you

are to be chosen as a parent.

 Avg fitness is not necessarily increasing

 Good parents can produce bad children. 20

What made GAs unique

1.

Universal Genetic Codes

2.

Multi-Parent Reproduction

3.

“fitness proportional” selection

4.

Problem independent

slide-11
SLIDE 11

11

21

Problem independence

 Mechanism for evolution defined in a

general manner

 To apply:

 Genetic mapping from bit string  Define fitness.

 Advantage:

 Theoretic study of why and how well GAs work.

22

Top 5 misconceptions about this course.

1.

Only cover GAs

2.

Will have an awfully hard final exam

3.

Hey, aren’t you Prof Anderson?

4.

Will cover an awful lot of theory (leading to an awful final exam)

5.

Long PBS documentaries will be shown each class.

slide-12
SLIDE 12

12

23

Some GA Theory

 Goals:

 Holland’s motivations  Intuitive idea of why GAs work  Taste of formal analysis of Gas

 Discussion derived from [Michalewicz],

Chapter 3.

24

Schemata Analysis

 Schema:

 Built by adding a * (don’t care) symbol to

the set of valid gene values

 Represents all bit strings that match on all

positions except those with *

slide-13
SLIDE 13

13

25

Schemata Analysis

 Schema:

 Example: ( *111100100 )

 Matches (0111100100) and (1111100100)

 Example: ( *1*1100100)

 Matches (0111100100) , (1111100100) and  Matches (0101100100) , (1101100100)

26

Schemata Analysis

 Schema:

 Any schema can match 2r strings where r is

the number of * in the schema.

 Each string can be matched by 2m schemas

where m is the length of the string.

slide-14
SLIDE 14

14

27

Schema properties

 Order of a Schema:

 The order of a schema, o(S) is the number of

“fixed” (I.e. non-don’t care positions)

 Defining Length

 Defines the “compactness” of a schema  The defining length, δ(S) is the distance between

the first and last fixed position in the schema

 Schemas with a single fixed position has δ(S) = 0. 28

Schema properties

 S1 = (***001*110)  S2 = (****00**0*)  S3 = (11101**001)  o(S1) = 6 δ(S1) = 10-4 = 6  o(S2) = 3 δ(S2) = 9-5 = 4  o(S3) = 8 δ(S1) = 10-1 = 9

slide-15
SLIDE 15

15

29

More schema properties

 Strings / generation

 ξ (S, t) = number of strings in a population

at time t, that match schema S.

 Fitness

 eval(S,t) = average fitness for all strings

that match schema S at time t.

30

Selection

 Step 1 is to be selected as a parent.  Probability, pi of individual i being chosen is

proportional to fitness.

 pi = eval (vi) / F(t)

Where vi is the individual eval (vi) is its fitness F(t) is total fitness for all individuals at time t.

slide-16
SLIDE 16

16

31

Selection of a schema

 Probability for an individual matching

schema S to get chosen as a parent:

 eval (S, t) / F(t)

 Number of strings matched by a

schema in current generation:

 ξ (S, t)

 Number of parents to be selected =

pop_size

32

Selection of a schema

 Number of parents matching the schema for

the next generation is:

 ξ (S, t+1) = ξ (S, t) • pop_size • (eval (S, t) /

F(t))

 Letting Fa = average fitness of all in

generation

 Fa = F(t) / pop_size

 Then

 ξ (S, t+1) = ξ (S, t) • (eval (S, t) / Fa(t))

slide-17
SLIDE 17

17

33

Selection of a schema

 Let’s consider this

 ξ (S, t+1) = ξ (S, t) • (eval (S, t) / Fa(t))

 Observations:

 Number of strings in a schema grows based on

ratio of total fitness to average fitness.

 Good schemas get more members in next

generation

 Bad schemas don’t. 34

One small problem

 Selection is non-elitist.  We only chose parents, not offspring.  Must consider what the operations of

crossover and mutation do to the chances of a schema surviving.

 Questions so far?

slide-18
SLIDE 18

18

35

Crossover

 Using standard one point crossover.  Illustate using example:

 v1 = (111011111010001000110000001000110)

 This matches schemas

 S0 = (****111**************************)  S1 = (111****************************10) 36

Crossover

 v1 =

(111011111010001000110000001000110)

 v2 =

(000101000010010101001010111111011)

 Producing offspring:

 (111011111010001000111010111111011)  (000101000010010101000000001000110)

slide-19
SLIDE 19

19

37

Crossover

 Producing offspring:

 (111011111010001000111010111111011)  (000101000010010101000000001000110)

 Schemas:

 S0 = (****111**************************) δ(S0) = 2  S1 = (111****************************10) δ(S1) = 32

Note:

 S0 survives, S1 does not 38

Crossover

 Observation:

 Defining length of a schema has much to

do with survivability due to crossover.

 In fact, if crossover site is selected uniformly

  • ver entire string (with length m), the

probably of destruction due to crossover:

 pd (S) = δ(S0) / (m-1)  Probablility of survival:

 ps (S) = 1 - pd = 1 - (δ(S) / (m-1))

slide-20
SLIDE 20

20

39

Mutation

 Using standard mutation operator.  Illustate using example:

 v1 = (111011111010001000110000001000110)

 This matches schemas

 S0 = (****111**************************)

 As long as mutation point is a don’t care the schema

new individual will remain in the schema.

40

Mutation

 Standard mutation operator, randomly

choose a gene and flip the bit.

 From survivability of the schema,

 Schema survives if the flipped bit is an *.  Probability of the flipped bit being * can be

approximated using the order (o(S)) of the schema.

 The higher the order, the higher the probably

  • f schema destruction.
slide-21
SLIDE 21

21

41

Schema survivability

 Depends on:

 Probability of schema members being

chosen as parents

 Probably of schema survivabilty under

crossover

 Probability of schema survivability under

mutation.

42

What we’ve learned

 Survival of schemas with above average

fitness will grow exponentially.

 Schema with low order have better

probability to survive under mutation.

 Schema with small defining length have

better probability to survive under crossover.

slide-22
SLIDE 22

22

43

Schema Theory

 Short, low-order, above-average

schemata receive exponentially increasing trials in subsequent generations of a genetic algorithm.

 Leading to…

44

Building Block Hypothesis

 “A genetic algorithm seeks near-optimal

performance through the juxtaposition

  • f short, low-order, high-performance

schemata, called the building blocks”

slide-23
SLIDE 23

23

45

Building Blocks Hypothesis

 “Just as a child creates magnificent

fortresses through the arrangement of simple blocks of wood [building blocks], so does a genetic algorithm seek near

  • ptimal performance through the

juxtaposition of short, low-order, high- performance schemata, or building blocks.”

  • - Goldberg, 1989

46

Reality check…

 Note:

 Nowhere in the analysis was any mention

made of any specific problem!

 Advantage of using a common standard.

 Something was learned, not only about

GAs, but perhaps also about evolution in general.

 Questions?

slide-24
SLIDE 24

24

47

Take home messages

 Classic Genetic Algorithms are a

subtype of Evolutionary Algorithms.

 With standard genotype, reproduction

  • perators, selection mechanism.

 In depth analysis, can, and has been

done on this specific subtype.

 Not just solving problems, but exploring

evolution…

48

Questions?

 Now take those messages home…

 And have a good break!!!!

 But remember:

 Checkpoint 1 -- due tomorrow  Checkpoint 2 -- due when we return (1/9)

 Enjoy!