{
List<EvolutionaryOperator<BitString>> operators = new ArrayList<EvolutionaryOperator<BitString>>(2);
operators.add(new BitStringCrossover(1, new Probability(0.7d)));
operators.add(new BitStringMutation(new Probability(0.01d)));
EvolutionaryOperator<BitString> pipeline = new EvolutionPipeline<BitString>(operators);
GenerationalEvolutionEngine<BitString> engine = new GenerationalEvolutionEngine<BitString>(new BitStringFactory(length),
pipeline,
new BitStringEvaluator(),
new RouletteWheelSelection(),
new MersenneTwisterRNG());
engine.setSingleThreaded(true); // Performs better for very trivial fitness evaluations.