genetic algorithm in terms of shapeless