Genetic algorithm implemented.