# Ref Chapter 14 Evolution Algorithms Genetic Programming Genetic

• Slides: 22

Ref. : Chapter 14 Evolution Algorithms (Genetic Programming - Genetic Algorithm) Decision Support Systems. 1 -1

กรรมวธววฒนาการ Decision Support Systems. -Evolution Algorithm 1 -5

Outline of the Basic Genetic Algorithm 1. ]Start [Generate random population of n chromosomes (suitable solutions for the problem ( 2. ]Fitness] Evaluate the fitness f(x) of each chromosome x in the population 3. ]New population [Create a new population by repeating following steps until the new population is complete 1. ]Selection] Select two parent chromosomes from a population according to their fitness )the better fitness, the bigger chance to be selected ( 2. ]Crossover [With a crossover probability cross over the parents to form new offspring (children). If no crossover was performed, offspring is the exact copy of parents. 3. ]Mutation] With a mutation probability mutate new offspring at each locus )position in chromosome. ( 4. ]Accepting [Place new offspring in the new population 4. ]Replace] Use new generated population for a further run of the algorithm 5. ]Test [If the end condition is satisfied, stop , and return the best solution in current population 6. ]Loop] Go to step 2 Decision Support Systems. 1 -8

Crossover • 1 -Point Crossover – Chromosome 1 – Chromosome 2 00100110110 | 11011 11000011110 | 11011 • ผลลพธ – Offspring 1 – Offspring 2 11000011110 | 11011| 00100110110 • 2 -Point Crossover – Chromosome 1 – Chromosome 2 0110 | 0010011 | 1101 1110 | 1100001 | 1101 • ผลลพธ – Offspring 1 – Offspring 2 Decision Support Systems. 0110 | 1100001 | 11011|| 0010011 1110 1 -10

Mutation • วธนถอวาใชนอยมาก ทเปนการเปลยนแปลงตวเอง มกจะใชในขนทายๆ ของการแกปญหา โดยเฉพาะปญหาทไมสามารถเขาสเปาหมายทดทส ดได (Optimal) • Original offspring 1 • Original offspring 2 1101111000011110 1101100100110110 • Mutated offspring 1 • Mutated offspring 2 1100111000011110 110110110 Decision Support Systems. 1 -11

x 2 example: selection 169/1170 = 0. 14*4 = 0. 58 ����������� 1 max x 2 Decision Support Systems. 1 -15

X 2 example: cross-over Decision Support Systems. 1 -16

X 2 example: mutation Decision Support Systems. 1 -17

กำหนดเปาหมาย Decision Support Systems. 500 1 -19

ผสมพนธไมเกด Decision Support Systems. 100 1 -20

เรมทำงาน Decision Support Systems. 1 -21

ผลสำเรจไดคาเฉลย Decision Support Systems. 500 1 -22