Generic Genetic Algorithm