Description Usage Arguments Details
crossover
is to perform the genetic operator crossover between two parent chromosomes, and return one offspring chromosome.
1 | crossover(chromo_1, chromo_2)
|
chromo_1, chromo_2 |
Numeric vectors with binary 0/1 elements. Should be of same length. |
To begin with, first select a random position between two adjacent loci, and split both parent chromosomes at this position. Then glue the left chromosome segment from one parent to the right segment from the other parent to form an offspring chromosome (the remaining segments are also combined to form a second offspring, but then discarded).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.