1 / 32

4. GAs:Selected Topics

4. GAs:Selected Topics. GA theory provides explanations why we may obtain convergence Practical applications 이론 따르지 않는 경우 많음 이유 improper coding limit on iteration number limit on population size Premature convergence 가능성 ( local optimum). 4. GAs:Selected Topics.

Télécharger la présentation

4. GAs:Selected Topics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 4. GAs:Selected Topics • GA theory • provides explanations why we may obtain convergence • Practical applications • 이론 따르지 않는 경우 많음 • 이유 • improper coding • limit on iteration number • limit on population size • Premature convergence 가능성 (local optimum)

  2. 4. GAs:Selected Topics • Eshelman and Schaffer [105]: premature 방지 기법 (1) a mating strategy, called incest prevention (Chap.10 TSP) (2) uniform crossover (Sec. 4.6) (3) detecting duplicate strings in the population (Sec.4.1) • 대부분 research 다음과 관련 • sampling mechanism에 의한 error (Sec.4.1) • 함수 자체의 특성 (Sec.4.2)

  3. 4.1 Sampling Mechanism • Two important issues • population diversity (exploration) • selective pressure (exploitation) • DeJong [82]: several variations of simple selection in Chap.2 • elitist model: preserving the best chromosomes • expected value model • introducing a count for each chromosome • initially f(v)/f • decreasing by 0.5 or 1 when selected for reproduction • not available for selection when the count falls below 0 • elitist expected value model • crowding factor model • a newly generated chromosome replaces an old one • and the doomed chromosome is selected from those which resemble the new one

  4. 4.1 Sampling Mechanism • Brindle[49] 1981 • further modifications • deterministic sampling • remainder stochastic sampling without replacement • stochastic tournament • remainder stochastic sampling with replacement • superiority over simple selection • remainder stochastic sampling with replacement • most successful, and adopted as standard • Baker [23] 1987 • a comprehensive theoretical study • presented a new improved version called stochastic universal sampling

  5. 4.1 Sampling Mechanism • Artificial weight 도입 • 실제 evaluation 값 대신 순위 (rank)에 따라 selection • rapid (premature) convergence는 super individual 때문이라는 근거 • 많은 방법 • 예) Baker [22] user-defined value MAX 사용 • User-defined parameter q 사용 방법 • linear function prob(rank) = q - (rank-1)r • nonlinear function prob(rank) = q(1-q)rank-1 • in case of linear function •  prob(i) = 1, so q = r(pop_size-1)/2 + 1/pop_size • if r=0, q=1/pop_size and no selective pressure • if q-(pop_size-1)r=0, then q=2/pop_size and maximum selective pressure • 즉, 1/pop_size와 2/pop_size 사이 값을 갖는 q로 selective pressure 조절 가능 • 예) pop_size=100, q=0.015

  6. 4.1 Sampling Mechanism • in case of nonlinear function • q (0..1) • larger values of q imply stronger selective pressure • 예) q=0.1, pop_size=100 • prob(1)=0.100 • prob(2)=0.1*0.9 = 0.090 • prob(3)=0.1*0.9*0.9=0.081 • ….. • prob(100)=0.000003 • some apparent drawbacks • user responsibility, chromosome의 상대적인 우열 정보 무시, 모든 경우를 uniform하게 다룸, Schema Theorem 어김 • Tournament selection [159] • k individuals 선택하고 그 중 best one selection • pop_size번 만큼 반복 • k=2 (tournament size) 많이 사용

  7. 4.1 Sampling Mechanism • Back and Hoffmeister [16]: categories of selection procedures • dynamic vs. static • static:constant probabilities between generations (e.g., ranking selection) • dynamic: no such requirement (e.g., proportional selection) • extinctive vs. preservative • preservative: non-zero selection probability for each individual • extinctive: no such requirement • pure • fitness와 무관하게 1 세대만 생존 • generational vs. on-the-fly • generational: parents fixed until all the offspring for the next generation are completely produced • on-the-fly: an offspring replaces its parent immediately

  8. 4.1 Sampling Mechanism • New two-step variation of the basic selection algorithm • Category of dynamic, preservative, generational, and elitist model • modGA in Figure 4.1 • procedure modGA • begin t0 Initialize P(t) Evaluate P(t) While (not termination-dondition) do begin t  t+1 Select-parents from P(t-1) Select-dead from P(t-1) From P(t); reproduce the parents Evaluate P(t) end • end

  9. 4.1 Sampling Mechanism • procedure modGA • Do not perform “select P(t) from P(t-1)” • But, select r chromosomes for reproduction and r chromosomes to die, based on fitness • After selection, three groups • r (not necessarily distinct) strings to reproduce (parents) • Precisely r strings to die (dead) • The remaining strings, neutral strings (at least pop_size-2r and at most pop_size-r) • modGA는 Schema theorem 만족 • modGA idea • Better utilization of the available storage space (population size) • Avoids leaving exact multiple copies of the same chromosome

  10. 4.1 Sampling Mechanism • Method of forming new generation P(t+1) • Step 1: select r parents from P(t) • Step 2: select pop-size-r distinct chromosomes from P(t) and copy them to P(t+1) • Step 3: let r parents breed to produce exactly r offspring • Step 4: insert these r new offspring into P(t+1)

  11. 4.2 Characteristics of the function • 3 basic directions • simulated annealing technique 도입 • thermodynamic operator 사용 population convergence 조절 • rank 사용 • scaling mechanism 도입하여 function 자체를 fixing • linear scaling • fi’ = a * fi + b where fi is the i-th chromosome’s fitness • sigma truncation • fi’ = fi + (f – c * ) • power law scaling • fi’ = fik ((eg., k=01.005)

  12. 4.2 Characteristics of the function • The most noticeable problem • differences in relative fitness • 예) f1(x) and f2(x)=f1(x)+const • same optimum value • but if const>>f1(x), f2 has much slow convergence (in the extreme case, totally random search) • GA 시행 결과 • 시행 때마다 다름 • caused by errors of finite sampling

  13. 4.2 Characteristics of the function • GENESIS 1.2ucsd (the best known system) • uses two parameters to control the search wrt the characteristics of functions • scaling window • sigma truncation factor • the system minimizes a function • eval(x) = F – f(x) where F > f(x) for all x • scaling window W controls how often F is updated • if W>0, set F to the greatest value of f(x) which has occurred in the last W generations • if W=0, infinite window, I.e., F=max{f(x)} over all evaluations • if W<0, use another method, I.e., sigma truncation

  14. 4.2 Characteristics of the function • Termination condition 중요 • 가장 간단한 방법: generation 수 while (t>=T) do /* in Figure 4.1 */ …… • 또다른 방법 • count the number of function evaluations • 또다른 방법 • when the chance for a significant improvement is relatively slim

  15. 4.3 Contractive mapping GA • Convergence of GA • most challenging theoretical issues • lots of researches • One possible approach for explaining GA convergence • using Banach fixpoint theorem [386] • only requirement that there should be an improvement in subsequent populations • Banach fixpoint theorem deals with contractive mappings on metric space • metric space 정의: p.69 • f is contractive iff (f(x), f(y)) <=  * (x,y) where () is a distance • Banach fixpoint Theorem • x = lim i-> fi(x0) for any x0

  16. 4.3 Contractive mapping GA • procedure CM-GA begin t0 initialize P(t) evaluate P(t) while (not termination-dondition) do begin contractive mapping f(P(t))  P(t+1) t  t+1 select P(t) from P(t-1) recombine P(t) evaluate P(t) if(Eval(P(t-1)) >= Eval(P(t)) then t  t-1 end end • P* = lim i-> fi(P(0)) for any P(0) • converge to a unique solution independent of initial population in case of infinite generations

  17. 4.4 GA with varying population size • population size • very important and may be critical in many applications • two small  converge too quickly (local optimum) • too large  waste computational resources • two important issues (Section 4.1) • population diversity • selective pressure • lots of researches

  18. 4.4 GA with varying population size • GAVaPS [12] • population size varies over time • introducing concept of ‘age’ of a chromosome • number of generations the chromosome stays alive • replace the concept of selection • during the ‘recombine P(t)’ step, a new auxiliary population created • population of offspring • AuxPopSize(t) =  PopSize(t) *   •  is a reproduction ratio • 각 chromosome은 fitness와 무관하게 동일 확률로 선택 • 대신 ‘lifetime’ parameter 사용 • Popsize(t+1) = PopSize(t) + AuxPopSize(t) – D(t) • D(t): number of die-off chromosome

  19. 4.4 GA with varying population size • procedure GAVaPS begin t0 initialize P(t) evaluate P(t) while (not termination-dondition) do begin t  t+1 increase the age of each individual by 1 recombine P(t) evaluate P(t) remove from P(t) all individuals with age greater than their lifetime end end

  20. 4.4 GA with varying population size • Assignment of lifetime value • 방법 1: constant value for all the individuals  bad performance • 방법 2: fitness와 state of search 고려 • state of search • AvgFit, MaxFit, MinFit: 현재 population의 ave, max, min fitness • AbsFitMax, AbsFitMin: max, min fitness found so far • MaxLT and MinLT: max and min allowable lifetime •  = (MaxLT-MinLT)/2

  21. 4.4 GA with varying population size • Assignment of lifetime value • 방법 2: fitness와 state of search 고려 (1) proportional allocation min(MinLT+ (fitness[i]/AvgFit), MaxLT) • roulette-wheel selection • a serious drawback: ‘objective goodness’ 사용 안함 (2) linear allocation MinLT+2((fitness[i]-AbsFitMin)/(AbsFitMax-AbsFitMin)) • population 급히 증가할 위험 (3) bi-linear allocation MinLT+((fitness[i]-MinFit)/(AvgFit-MinFit)) if AvgFit>=fitness[i] (MinLT+MaxLT)/2+((fitness[i]-AvgFit)/(MaxFit-AvgFit)) otherwise • (1)과 (2)의 타협점

  22. 4.4 GA with varying population size • Testing of GAVaPS • 네개함수를 testbed로 사용 • covering the wide spectrum of possible function types • p.75 G1 ~ G4 • SGA(Simple GA)와 비교 실험 • chromosome length=20 • initial pop-size = 20 • =0.4, pm=0.015, pc=0.65 • MinLT=1, MaxLT=7 • two parameters (성능 측정 위한) • cost: evalnum (average number of function evaluations over all runs) • performance: avgmax (average of maximal values found over all runs) • Figure 4.4: generation number에따른 fitness와 pop-size • Figure 4.5&4.6: 에 따른 변화 • Figure 4.7&4.8: initial pop-size에 따른 변화 • Table4.1: 성능 비교

  23. 4.5 GA, Constraints, and the Knapsack Problem • Constraint handling techniques • solution은 주어진 constraint (조건)을 만족해야하는 문제 • feasible한 해와 infeasible한 해 • 예) TSP, Knapsack problem, ….. • GA 기법 세 가지: penalty function, repair, decoder (1) Penalty function • constraint violate하는 solution은 function evaluation에서 “goodness”를 줄임으로써 penalty 부여 penalty function • 즉, constraint problem ----------------------> unconstraint problem • penalty 값 • constant 부여, 또는 • violation 정도에 따라 부여, 또는 • violating solution을 population에서 제거 (즉, death penalty)

  24. 4.5 GA, Constraints, and the Knapsack Problem (2) Repair • infeasible solution을 feasible하게 repairing • repairing 계산량 많고, 경우에 따라 repairing이 매우 어려움 (3) Decoder • use of special representation mappings (decoders) which guarantee the generation of feasible solutions, or • use of problem-specific operators which preserve feasibility of the solutions • 모든 constraints 구현 가능한 건 아니고, 특정 문제에 맞게 tailoring 필요

  25. 4.5.1 The 0/1 Knapsack problem and the test data • 0/1 knapsack problem • n개 물건과 한 개 knapsack • W[i]: weight, P[i]: profit, C: knapsack capacity • find a binary vector x = <x[1], x[2], …., x[n]> such that • i=1,n x[i]W[i] <= C and • i=1,n x[i]P[i] is maximum

  26. 4.5.1 The 0/1 Knapsack problem and the test data • Three sets of test data • uncorrelated • W[i]: (uniformly) random ([1..v]), and • P[i]: (uniformly) random ([1..v]) • weakly correlated • W[i]: (uniformly) random ([1..v]), and • P[i]: W[i] + (uniformly) random ([-r..r]) • strongly correlated • W[i]: (uniformly) random ([1..v]), and • P[i]: W[i] + r (* W와 P간의 correlation정도가 문제 난이도와 관련, 즉, higher correlation --> higher difficulty)

  27. 4.5.1 The 0/1 Knapsack problem and the test data • Data 생성 • v=10 and r=5 • n=100, 250, 500 • 두 knapsack type • restricted • C1 = 2v • 적은 수의 item만 넣을 수 있음 • average • C2 = 0.5 i=1,n W[i] • 대략 전체의 반 정도 items를 넣을 수 있음

  28. 4.5.2 Description of Algorithms • Three types of algorithms • algorithms based on penalty function: Ap[i] • algorithms based on repair method: Ar[i] • algorithms based on decoders: Ad[i] • Algorithm Ap[i] • eval(x) = i=1,n x[i]P[i] - Pen(x) • Pen(x) = 0 for all feasible solutions > 0 otherwise • logarithmic, linear, and quadratic penalty functions • Ap[1]: Pen(x) = log2(1+ (i=1,n x[i]W[i] - C)) • Ap[2]: Pen(x) =  (i=1,n x[i]W[i] - C) • Ap[3]: Pen(x) = ( (i=1,n x[i]W[i] - C))2 • ( = max{P[i]/W[i]})

  29. 4.5.2 Description of Algorithms • Algorithm Ar[i] • eval(x) = i=1,n x’[i]P[i] • x = repaired version of the original vector x • replacement rate • 5% rule[301]: 5% is better than any other rate • 두 가지 select 방법 • Ar[1]: random repair • Ar[2]: greedy repair (based on P[i]/W[i])

  30. 4.5.2 Description of Algorithms Procedure repair(x) begin knapsack_overfilled = false x’ = x if i=1,n x[i]W[i] > C then knapsack_overfilled = true while (knapsack_overfilled) do begin i = select an item from the knapsack remove the selected item from the knapsack (i.e., x’[i]=0) if i=1,n x’[i]W[i] <= C then knapsack_overfilled = false end end

  31. 4.5.3 Experiments and Results • Experiments • pop_size=100 • pm=0.05, pc=0.65 • Table 4.2 • 5% repair rule • no influence for 0/1 knapsack problem: Table 4.3 • (5% rule [301]: network design problem, graph coloring problem에서 유효성 확인) • main conclusions • no feasible solution for C1 by Ap[] • quite intuitive [332] • Ap[1] is the best for C2 • Ar[2] is the best for C1

  32. 4.6 Other Ideas • Multi-point crossover • single-point crossover • S1=(001********01) • S2=(****11*******) 에서 • v1=(0010001101001)과 v2=(1110110001000)으로 • S3=(001*11*****01) 생성 불가능 • two-point crossover • v1’=(001|01100|01001) • v2’=(111|00011|01000) • v1’ is matched by S3 • uniform crossover • bitwise 교환

More Related