Genetic Algorithm Evolutionary Computing JyhDa Wei 1 Why

  • Slides: 22
Download presentation
Genetic Algorithm -- Evolutionary Computing 魏志達 Jyh-Da Wei 1

Genetic Algorithm -- Evolutionary Computing 魏志達 Jyh-Da Wei 1

Why Genetic Algorithms Conventional Training Process v. s. n Evolutionary Computing n (John Holland,

Why Genetic Algorithms Conventional Training Process v. s. n Evolutionary Computing n (John Holland, 1975) 2

GA Evolution Population. . (chromosomes). 1. Gene Encoding Generation GA Operators 4 c. Crossover

GA Evolution Population. . (chromosomes). 1. Gene Encoding Generation GA Operators 4 c. Crossover 2. Evaluation Fitness value 4 b. Mutation 4 a. Reproduction Fitness value Environment 3 3. Selection

Gene Encoding (example 1) n Microarray for RNA Identification – 160 chromosome length –

Gene Encoding (example 1) n Microarray for RNA Identification – 160 chromosome length – 4 values: A, C, G, U – Search space = 4^160 (brute force) 4

Gene Encoding (example 2) n n 5 Game Playing f= w 1 f 1(

Gene Encoding (example 2) n n 5 Game Playing f= w 1 f 1( )+ w 2 f 2( )+ w 3 f 3( )+…wnfn( ) wk in {0, 0. 5, 1} search space = 3^n

Fuzzy Inference (example 3) Antecedents: (interval, velocity) X 1 = Very Close(VC), C, M,

Fuzzy Inference (example 3) Antecedents: (interval, velocity) X 1 = Very Close(VC), C, M, F, VF (Far) X 2 = Very Low (VL), L, A, H, VH (High) n Consequence: (acceleration) Y = NL, NM, NS, ZE, PS, PM, PL n Candidate Rule Bases: 7^ 25 n 6

Example of Rule Base X 2 7 X 1 VC VL ZE L NS

Example of Rule Base X 2 7 X 1 VC VL ZE L NS A NS H NM VH NL C PS ZE NS NS NM M PS PS ZE NS NS F PM PS PS ZE NS VF PL PM PS PS ZE

GA Evolution Population. . (chromosomes). 1. Gene Encoding Generation GA Operators 4 c. Crossover

GA Evolution Population. . (chromosomes). 1. Gene Encoding Generation GA Operators 4 c. Crossover 2. Evaluation Fitness value 4 b. Mutation 4 a. Reproduction Fitness value Environment 8 3. Selection

Evaluation n Evaluation Function – Fitness Value n Fitness Criteria – Good performance –

Evaluation n Evaluation Function – Fitness Value n Fitness Criteria – Good performance – Specific character (e. g. elegant rules) 9

Evolutionary Fuzzy Inference System n Gene Encoding: – Chromosome length # (5+1)*(5+1) – Gene

Evolutionary Fuzzy Inference System n Gene Encoding: – Chromosome length # (5+1)*(5+1) – Gene Value # 7+1 n Evaluation: – Bonus for <don’t care> to simplify rule base n Crossover and Mutation: – As usual 10

Selection n Evaluation Ratio l Fitness = 3, 4, 7, 8, 18 (sum =40)

Selection n Evaluation Ratio l Fitness = 3, 4, 7, 8, 18 (sum =40) l Probability = 3, 4, 7, 8, 18 / 40 n Ranking Ratio l n Probability = 1, 2, 3, 4, 5 / 15 Diversity l Also Select the Worst Instances? 11

GA Evolution Population. . (chromosomes). 1. Gene Encoding Generation GA Operators 4 c. Crossover

GA Evolution Population. . (chromosomes). 1. Gene Encoding Generation GA Operators 4 c. Crossover 2. Evaluation Fitness value 4 b. Mutation 4 a. Reproduction Fitness value Environment 12 3. Selection

GA Operation 13 n Crossover: n Mutation:

GA Operation 13 n Crossover: n Mutation:

Crossover Mechanisms (a) One-point crossover; crossover 14 (b) Two-point

Crossover Mechanisms (a) One-point crossover; crossover 14 (b) Two-point

GA Evolution Population. . (chromosomes). 1. Gene Encoding Generation GA Operators 4 c. Crossover

GA Evolution Population. . (chromosomes). 1. Gene Encoding Generation GA Operators 4 c. Crossover 2. Evaluation Fitness value 4 b. Mutation 4 a. Reproduction Fitness value Environment 15 3. Selection

GA for Solving TSP n n n 16 How to encode Cities A, B,

GA for Solving TSP n n n 16 How to encode Cities A, B, …, Z into genes? Each city must be visited JUST ONCE. It does not work to encode as

Priority Encoding to Solve TSP n Greedy algorithms: Double Ended Nearest Neighbor (DENN) 17

Priority Encoding to Solve TSP n Greedy algorithms: Double Ended Nearest Neighbor (DENN) 17 Shortest Edge First (SEF)

Priority Encoding to Solve TSP n First step of greedy algorithms – Sorting the

Priority Encoding to Solve TSP n First step of greedy algorithms – Sorting the edges by cost into sequence A[] n n Considering priorities in addition to the cost Greedy algorithms with priority encoding – First step is to sort the edges by priority and cost – Further steps are the same as other greedy algorithms – Greedy algorithms guarantee the correctness – GA evolution could be applied to find the optimum 18

Experimental Result 19

Experimental Result 19

Greedy Crossover n GX – Greffenstette, 1985 Parent 1 = Parent 2 = Xop

Greedy Crossover n GX – Greffenstette, 1985 Parent 1 = Parent 2 = Xop -- P -- N -- F --- A -- N -- K -N Follow the shortest path … 20 P F K A

Partially Matched Crossover n PMX – Goldberg, 1989 Par 1 = P N F

Partially Matched Crossover n PMX – Goldberg, 1989 Par 1 = P N F | G H Par 2 = D E A | N K Xop => P N F | N K Ofs 1= P G F | N K Ofs 2= D E A | G H 21 K B B B K | | | B P B H P E G E E N D F D D F A H A A B

Natural Crossover n 22 NX – Jung and Moon, 2002

Natural Crossover n 22 NX – Jung and Moon, 2002