full-fledged genetic algorithm