simple genetic algorithm