CS 495:  Evolutionary Computation,  Fall 2002  Instructor:  Jeffrey Horn


Final Exam Part 1:                                 Name:    ______________________


(1)  A GA GENERATION, BY HAND!

Fill out the table by following the steps below.  The problem at hand (black box to be optimized) is a real-valued function of 8-bit chromosomes, f(chrom), which simply computes the binary coded integer of the8-bit chromosome, and divides this (non-neg) integer by the number of ones in the chromosome.  Let's see if a single generation improves the average fitness! 

CURRENT POP  (fitness) TOURNAMENT COMPETITORS TOURNAMENT WINNERS OFFSPRING after Xover OFFSPRING after mutation  (fitness)
           
00010110     (7.333)         
11000110     (49.5)        
11100010     (_____)        
00010000     (_____)        
10001000     (_____)        
         
Avg. fitness:        
         
         
         
 

 

 

 

GA PARAMETERS VALUES
   
Pop Size  5
prob. crossover  (pc) 0.7

prob. mutation  (pm)

0.1

tournament size

2
  1. First finish calculating the fitnesses in the current pop., and calculate the avg. fitness.  By the way, what is the range of this fitness function?  That is, what is the lowest possible value for f and what chromosome will yield that result?   (Note that I mean over the entire search space of 256 different chromosomes!)
    f Chromosome Fitness
    Minimum    
    Maximum    
  2. Now start a new generation by conducting five binary tournaments.  Here is the sequence of random numbers you need to select the 10 competitors:  (3, 2,1,0,2,4,1,0,1,3)  these are the indices into the pop. array.  Fill out the two columns for tourn. select.

  3. Conduct crossover as follows:  (1)  for each consecutive pair in the "tourn. winners" column, cross them with prob. pc .  (That is, with prob. 1-pc  do NOT cross them; merely copy them directly into the next column.)  Here is your sequence of random numbers for determining whether to cross, for all three pairs of parents:  (0.351, 0.591, 0.684).   If crossing, do two-point Xover, by selecting two Xover points at random and exchanging the bits in between those points, yielding two complementary offspring.  Here is your sequence of random crossing points:  (5,3,8,6,4,1,0,3,2,5)  You probably won't need them all, right?  (Each crossover involves two parents producing two offspring, but we need FIVE new individuals in the next generation, pick three pairs, and for the third pair, produce two offspring but only keep one (choose at random between the two offspring).  This is a common way to handle odd population sizes.)
  4. Now for the last column.  Do bit-wise mutation, by flipping each bit in each chromosome with prob. pm .  Here is your sequence of numbers to determine whether to flip the bits (two groups of 20 num.s each) (0.75,0.54,0.82,0.27,0.21,0.72,0.13,0.54,0.29,0.04,0.53,0.57,0.47,0.86,0.36,0.56,0.75,0.28,0.38,0.99)

    (0.50,0.20,0.43,0.72,0.11,0.69,0.01,0.07,0.90,0.01,0.95,0.53,0.23,0.19,0.88,0.58,0.30,0.37,0.30,0.21)

    This is your new generation.  Compute their fitnesses, and their average fitness, and you are DONE!  (with this question)

next