120 likes | 213 Views
Chapter 3 GA2: Why do they work?. Schema don’t care symbol * 사용 예) chromosome length 10 (*111100100 matches {(0111100100), (1111100100)} (*1*11100100) matches {(01011100100), (11011100100), (01111100100), (11111100100)} r 개 *를 가진 string 은 2 r 개 string 과 match
E N D
Chapter 3 GA2: Why do they work? • Schema • don’t care symbol * 사용 • 예) chromosome length 10 (*111100100 matches {(0111100100), (1111100100)} (*1*11100100) matches {(01011100100), (11011100100), (01111100100), (11111100100)} • r개 *를 가진 string은 2r개 string과 match • 길이 m인 string은 2m schema와 match
Properties of schema • Order • o(S) = number of non-don’t care bits • 예) S1 = (***001*110), o(S1) = 6 S2 = (****00**0*), o(S2) = 3 S3 = (11101**001), o(S3) = 8 • used for defining the specialty of a schema • mutation에서 survival probability 계산에 사용 • Defining length • (S) = distance between the first and the last fixed string positions • 예) (S1) = 10-4 = 6, (S2) = 9-5=4, (S3) = 10-1 = 9 • define the compactness of information contained in a schema • crossover에서 survival probability 계산에 사용
Reproductive schema growth equation • Schema의 다음 세대에서의 번식력 계산 • GA 알고리즘 t <- t+1 select P(t) from P(t-1) recombine P(t) // crossover and mutation evaluate P(t) • (S,t) • number of strings in a population at time t, matched by schema S • 예) Chapter 2의 예 사용 • pop_size=20, m=33 • v1~v20 (p.47, same as p.37) • S0 = (****111**************************)라면 • (S0,t)=3 // v13, v15, v16 matched by S0 • o(S0)=3, (S0)=2
Reproductive schema growth equation • Fitness of a schema • eval(S,t) = average fitness of all strings in the population matched by S • assuming p strings {vi1, ….. vip}, • eval(S,t) = j=1p eval(vij)/p
Selection 단계 reproductive schema growth equation • 하나의 string vi • selection probability pi=eval(vi)/F(t) • F(t)=total fitness of population at t • (S0,t+1)=(S,t)*pop_size*eval(S,t)/F(t) • (S0,t+1)=(S,t)*eval(S,t)/F(t) ------------ (3.1) • 특성 • “above average” schema: increasing in next generation • “below average” schema: decreasing in next generation • “average” schema: stay on the same level • long-term effect • “above average” schema increases exponentially in next generations
Selection 단계 reproductive schema growth equation • 예) • S0 matches 3 strings v13, v15, v16 • eval(S0,t) = (27.316702+30.060205+23.867227)/3=27.081378 • F(t)= 387.776822/20=19.388841 • S0는 “above average” • eval(S0,t)/F(t) = 1.396751 • (S0,t+1)=3*1.396751=4.19 • (S0,t+2)=3*1.3967512=5.85 • …………… • Chapter 2에서는 • v1’~v20’ (p.39) • S0는 t+1에서 5개 string (v7’, v11’, v18’, v19’ v20’)과 match
Crossover 단계 reproductive schema growth equation • 예) • v18’ matches S0=(****111***********…****) and S1=(111********…….*******10) • p.40의 crossover 예 • v18’=(11101111101000100011|0000001000110) • v13’=(00010100001001010100|1010111111011) • v18’’=(11101111101000100011|1010111111011) • v13’’=(00010100001001010100| 0000001000110) • S0는 survived • S1은 destroyed pos=20
Crossover 단계 reproductive schema growth equation • Defining length가 survival/destruction에 중대한 영향 • probability of destruction • pd(S) = (S) /(m-1) • probability of survival • ps(S) = 1 - (S) /(m-1) • S0와 S1 예 • (S0)=2 --> pd(S0)=2/32, ps(S0)=30/32 • (S1) =32 --> pd(S1)=32/32, ps(S1)=0 • pc (crossover 확률) 고려하면 • ps(S) = 1 - pc*((S) /(m-1)) • 예) ps(S0) = 1 - 0.25*(2/32)=0.984375 • 우연히 survive할 경우 고려하면 • ps(S) >= 1 - pc*((S) /(m-1))
Crossover 단계 reproductive schema growth equation • Selection (수식3.1)과 crossover 모두 고려한 수식 • (S,t+1) >= (S,t)*(eval(S,t)/F(t))*(1 - pc*((S) /(m-1))) ----- (3.2) • S0 예에 적용하면 • (eval(S,t)/F(t))*(1-pc*((S) /(m-1))) = 1.396751*0.984375=1.374927 • (S0,t+1) = 3*1.374927 = 4.12 • (S0,t+2) = 3*1.3749272 = 5.67 • ………….. • selection만 고려한 것보다 약간 작은 값
Mutation 단계 reproductive schema growth equation • 예 • v19’=(111011101101110000100011111011110) • S0=(****111***************….******) • v19’에서 5,6,7번째 bit중 하나라도 mutate되면 S0는 destroyed • Mutation에 대한 survival 확률 • Ps(S)=(1-pm)o(S) • Ps(S) 1-o(S)*pm (since pm<<1) • 예) pm=0.01 • Ps(S0) 1-3*0.01 = 0.97
Selection, crossover, mutation 모두 고려한 reproductive schema growth equation (S,t+1)>=(S,t)*(eval(S,t)/F(t))*(1-pc*((S) /(m-1))-o(S)* pm) ----- (3.3) • 예) • (eval(S,t)/F(t))*(1-pc*((S) /(m-1))-o(S)* pm) =1.396751*0.954375=1.333024 • (S0,t+1) = 3*1.333024 = 4.00 • (S0,t+2) = 3*1.3330242 = 5.33 • …………..
Schema theorem & building block hypothesis • Schema theorem • “Short, low-order, above-average schemata receive exponentially increasing trials in subsequent generations of a genetic algorithm” • Building block hypothesis • “A genetic algorithm seeks near-optimal performance through the juxtaposition of short, low-order, high-performance schemata, called the building blocks”