The simplest (although not shortest) genetic algorithm I can think of.