pure genetic algorithm