An Example Find the maximum of the following function f(x)=xsn(10rx)+20x∈[-1,2] We can differntia te the funtion to find the local maxima f'(x)=sin(10T.x)+10Z.xcos(10T. x)=0 tan(107x)=-107x There are an infinitive number of solutions to the above equation 20E,t=1,2, 2i+1 +C 20 (i=1,2,and i=-1,-2,is a decreasing small number (approxima ting to O) sequence 2021/1/30 EIE426-AICV
2021/1/30 EIE426-AICV 11 An Example ( ) ( ) ( ) ( ) ( ) ( ) ( ) (approxima ting to 0)sequence. 1,2,... and 1, 2,... is a decrasing small number , 1, 2,... 20 2 1 0 , 1,2,... 20 2 1 There are an infinitive number of solutions to the above equation : tan 10 10 sin 10 10 cos 10 0 We can differntia te the funtion to find the local maxima : sin 10 2.0 1,2 Find the maximum of the following function : 0 = = − − + = − − + = = + = − = = − = + = = + − i i i i x x i i x x x f x x x x f x x x x i i i i i
4.00 3.50 3.00 2.50 1.50 1.00 0.50 1.00 0.50 0.00 0.50 1.00 2.00 xg is the maximum in[-1, 2 1.85+E f(xg)is slightly greater th an f(1.85)=3.85 2021/1/30 EIE426-AICV
2021/1/30 EIE426-AICV 12 ( )is slighytly greater th an (1.85) 3.85. 1.85 is the maximum in [-1,2]. 1 9 1 9 1 9 1 9 = = + f x f x x
Use a genetic algorithm to solve the problem Coding(chromosome representation of a solution) Generation of initial population(solutions) Fitness calculation Genetic operation 2021/1/30 EIE426-AICV
2021/1/30 EIE426-AICV 13 Use a genetic algorithm to solve the problem: ◼ Coding (chromosome representation of a solution) ◼ Generation of initial population (solutions) ◼ Fitness calculation ◼ Genetic operation
Coding(chromosome representation) Use a binary string to represent X If the solution is to be precise to 10-6, then the interval(2 -(-1))=3 should be divided into 3x 106 At least 22 bits should be used because 2097152=22<3×106<22=4194304 x→>(b2 21020……60 ) a coding process phonotype >genotype mapping 2021/1/30 EIE426-AICV
2021/1/30 EIE426-AICV 14 ◼ Coding (chromosome representation): Use a binary string to represent x. If the solution is to be precise to 10-6 , then the interval (2-(-1)) = 3 should be divided into 3× 106 . At least 22 bits should be used because ( ) phonotype genotype mapping , ,..., , a coding process 2 097152 2 3 10 2 4194 304 2 1 2 0 0 2 1 6 2 2 → → = = x b b b
Decoding (b1b202…b)→x, a decoding process genotype>phonotype mapping 2120 2=∑h2 x=-1.0+x eg,S1=<10001011011010100011区无法最示该片 x=(1000101110110101000111),=2288967 x=-1.0+2288967 22 =0.63719′ 00000-1 1112 2021/1/30 EIE426-AICV
2021/1/30 EIE426-AICV 15 ◼ Decoding ( ) ( ) ( ) ( ) (1111111111111111111111) 2 0000000000000000000000 1 0.637197 2 1 3 1.0 2 288 967 ' 1000101110110101000111 2 288 967 e.g., 1000101110110101000111 2 1 2 ( 1) 1.0 ' , ,..., 2 ' genotype phonotype mapping , ,..., , a decoding process 2 2 2 2 2 1 2 2 1 0 2 1 0 2 1 2 0 0 2 2 1 2 0 0 → → − = − = − + = = = − − − = − + = = → → = x x s x x b b b b x b b b x i i i