classic genetic algorithm