CGA Assignment Adaptive System
CGA Assignment Adaptive System
Compact GA parameters: Population size, n=2 Chromosome length, l=16 Primary probability vector, p= {0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5} 1st Iteration: Now, we will generate chromosomes for A and B, based on probability factor p. a chromosomes probability for being 1 is 0.5 as for each i=0 to 15 probability is 0.5. A = {1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0} B = {1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1} Calculating fitness based on highest number of 1: fA = 8 fB = 6 Updating probability vector based on fitness of A and B. P = {0.5, 0.5, 0, 1, 1, 0.5, 0.5, 1, 0.5, 1, 0.5, 0.5, 0.5, 0.5, 0.5, 0} 2nd Iteration: A = {0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0} B = {1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0} Calculating fitness of A and B: fA = 8 fB = 10 Updating probability vector: P = {1, 0, 0.5, 0.5, 0.5, 1, 0, 0.5, 1, 0.5, 1, 0, 1, 0, 1, 0.5}