Genetic optimizer