# Reproduction in Genetic Algorithms

October 19, 2009

I've come up with three different ways of performing the reproduction process in the genetic algorithm engine.  Note that all processes start out with ten individuals and, accordingly, perform ten reproductions.  The question is how to optimize the outcome of the reproduction so that the children end up with an optimal gene pool but still retain some diversity.

The first method, which I call "nearest neighbor," simply pairs the individual of rank n with the individual of rank n+1. The last individual pairs with the first.

The second method, "first priority," pairs the top-ranked individual with all other individuals, then pairs the second-ranked individual with the third.

The final method, "multiple neighbor," starts at the top-ranked individual, n, and pairs it with n+1n+2, ..., n+i, then moves on to individual n+1, pairing it with n+2, n+3, ..., n+1+i, continuing this pattern until the number of reproductions matches the number of individuals in the original population.  The integer i should be chosen based on population size.  Note that the "first priority" method is essentially a special case of the multiple neighbor method wherein i is equal to the size of the original population.

I'm betting that multiple neighbor with an i value of about a third of the population size will probably perform the best.  Only tests will tell which of these methods of reproduction (if not all of them) should be implemented in the final engine.