next up previous
Next: Example Up: l3 Previous: Mutation

Example

GA codes "guesses" as binary numbers (vector)

Score is now number of digits that match solution

      Solution = 001010

      Guess        Score
      ------------------
      A) 010101        1
      B) 111101        1
      C) 011011        3
      D) 101100        3

To ``evolve'' the correct answer, delete low scorers (A and B) and subject high scorers to ``genetic operators''. In particular, produce crossover offspring of C and D at two points.