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.
engine.addEvolutionObserver(new EvolutionLogger<BitString>());
return engine.evolve(100, // 100 individuals in each generation.
0, // Don't use elitism.