A genetic algorithm