next up previous

4.2.2 Reproduction

To model sexual reproduction, each locus needs to be considered individually. This step reveals another advantage of the bit vector representation of the genome.

Suppose we want to create a new individual x from parents y and z. The ith word in the genome of x will be determined by the ith word in the two parents. Strand 0 of the child's genome will come from one parent, the strand 1 from the other parent. We need to form one word by randomly selecting bits from the strands of y, and form a second word by selecting random bits from the strands of z, and do this for all words in the genome:

  for (i = 0; i < gl; i++) {
    x[i][0] = combine(y[i]);
    x[i][1] = combine(z[i]);
  }
Here gl is the genome length, the number of words in the genome.

The parents themselves are represented by two strands. To combine the genes from a parent to form a new strand, we choose randomly from one strand or the other. For example, if the parent is

  01000101
  00101110
the new individual might be
  00100100
because we may take genes from the top, bottom, bottom, top, top, top, bottom, and bottom strands, in that order (from left to right). This process of selecting randomly from either strand at each locus, without consideration of how we select from neighboring loci, is known as ``free recombination.'' It is another simplification over the true situation, in which a sequence of genes are selected from one strand before ``crossing over'' to the other strand.