Designing quantum experiments with a genetic algorithm