@@ -0,0 +1,1303 @@
+package org.jenetics.example;%0A%0Aimport org.jenetics.DoubleGene;%0Aimport org.jenetics.Mutator;%0Aimport org.jenetics.TruncationSelector;%0Aimport org.jenetics.engine.Codec;%0Aimport org.jenetics.engine.Engine;%0Aimport org.jenetics.engine.codecs;%0Aimport org.jenetics.util.DoubleRange;%0A%0A/**%0A * The (%CE%BC, %CE%BB) evolution strategy is among the simplest ES algorithms.%0A *%0A * 1) We begin with a population of (typically) %CE%BB number of individuals,%0A *    generated randomly.%0A * 2) %CE%BC is the number of parents which survive. This is realized by setting the%0A *    survivors selector to the TruncationSelector.%0A * 3) %CE%BB is the number of kids that the %CE%BC parents make in total. Since only the%0A *    offspring are altered, we also use the TruncationSelector for the offspring.%0A *%0A * @author Franz Wilhelmst%C3%B6tter %3Cfranz.wilhelmstoetter@emarsys.com%3E%0A */%0Apublic class MLStrategy %7B%0A%0A%09static double fitness(final double x) %7B%0A%09%09return x;%0A%09%7D%0A%0A%09public static void main(final String%5B%5D args) %7B%0A%09%09final int %CE%BC = 5;%0A%09%09final int %CE%BB = 20;%0A%0A%09%09final Codec%3CDouble, DoubleGene%3E codec = codecs%0A%09%09%09.ofScalar(DoubleRange.of(0, 1));%0A%0A%09%09final Engine%3CDoubleGene, Double%3E engine = Engine%0A%09%09%09.builder(MLStrategy::fitness, codec)%0A%09%09%09.populationSize(%CE%BB)%0A%09%09%09.survivorsSize(%CE%BC)%0A%09%09%09.selector(new TruncationSelector%3C%3E(%CE%BC))%0A%09%09%09.alterers(new Mutator%3C%3E())%0A%09%09%09.build();%0A%09%7D%0A%0A%7D%0A

Add ES code example.