Skip to content

@jenetics jenetics released this Sep 15, 2020 · 7 commits to master since this release

Improvements

  • #323: Fix leaky abstraction of CompositeCodec.
  • #434: Rewrite build scripts using Kotlin.
  • #695: Simplify MOEA for continious optimization.
  • #704: Add FlatTreeNode.ofTree factory method, for cleaner Tree API.
  • #706: The Constraint is now part of the Problem interface. If defined, it will automatically be part of the created Engine.
default Optional<Constraint<G, C>> constraint() {
    return Optional.empty();
}
  • #708: Additional Chromosome.map(Function) methods. This allows a more efficient mapping of chromosomes.
  • #731: Improve creation of constrained individuals, as defined in the Constraint interface.
  • #739: Add jenetics.incubator module. This module will contain classes which might be part of one of the main module.

Bugs

  • #700: GaussianMutator violates the DoubleGene's upper bound.
  • #707: Fix conversion of BitChromosome <-> BitSet.
Assets 2

@jenetics jenetics released this Jun 23, 2020 · 180 commits to master since this release

Bugs

  • #701: Invalid DoubleGene.isValid method.
  • #713: Fix numeric instability of RouletteWheleSelectorclass.
  • #718: IntermediateCrossover is not terminating for invalid genes.
Assets 2

@jenetics jenetics released this May 2, 2020 · 194 commits to master since this release

Improvements

  • #403: Converting library to Java 11.
  • #581: Minimize the required evaluation calls per generation.
  • #587: Fix Javadoc for Java 11.
  • #590: Improve serialization of Seq implementations.
  • #591: Remove deprecated classes and methods.
  • #606: Improve serialization of *Range classes.
  • #630: Fix inconsistency in Codec.of factory methods.
  • #659: Additional factory methods for VecFactory interface in the moea package.
  • #661: Allow the re-evaluation of the population fitness value
  • #665: Implement CombineAlterer, which is a generalization of th MeanAlterer class.
  • #669: Regression analysis with dynamically changing sample points.
final var scheduler = Executors.newScheduledThreadPool(1);
final var nullifier = new FitnessNullifier<ProgramGene<Double>, Double>();
final var sampling = new SampleBuffer<Double>(100);
scheduler.scheduleWithFixedDelay(
    () -> {
        // Adding a new sample point every second to the ring buffer.
        sampling.add(nextSamplePoint());
        // Force re-evaluation of populations fitness values.
        nullifier.nullifyFitness();
    },
    1, 1, TimeUnit.SECONDS
);

final Codec<Tree<Op<Double>, ?>, ProgramGene<Double>> codec =
    Regression.codecOf(OPS, TMS, 5, t -> t.gene().size() < 30);

final Regression<Double> regression = Regression.of(
    codec,
    Error.of(LossFunction::mse),
    sampling
);

final Engine<ProgramGene<Double>, Double> engine = Engine
    .builder(regression)
    .interceptor(nullifier)
    .build();

engine.stream()
    .flatMap(Streams.toIntervalMax(Duration.ofSeconds(30)))
    .map(program -> program.bestPhenotype()
        .genotype().gene()
        .toParenthesesString())
    // Printing the best program found so far every 30 seconds.
    .forEach(System.out::println);
  • #671: Adding helper methods in Streams class, which allows to emit the best evolution result of every n generation.
final ISeq<Integer> values = IntStream.range(0, streamSize).boxed()
    .flatMap(Streams.toIntervalMax(sliceSize))
    .collect(ISeq.toISeq());
  • #672: Introduce the StreamPublisher class, which allows to use a normal Java Stream in a reactive way.
final var publisher = new StreamPublisher<EvolutionResult<IntegerGene, Integer>>();
try (publisher) {
    final var stream= engine.stream();
    publisher.subscribe(new Subscriber<>() { ... });
    publisher.attach(stream);
    ...
}
  • #679: Additional constructor for the TournamentSelector, which allows to define own Phenotype comparator.
  • #685: Add Engine.Setup interface, which allows combining different dependent engine configurations.
  • #687: Add engine setup for (μ,λ)- and (μ+λ)-Evolution Strategy.

Bugs

  • #663: PartialAlterer uses fitness of unaltered phenotype.
  • #667: Fix Concurrency.close() method.
Assets 2

@jenetics jenetics released this Feb 18, 2020 · 485 commits to master since this release

Improvements

  • #542: Introduce InvertibleCodec interface. This interface extends the the current Codec interface.
public interface InvertibleCodec<T, G extends Gene<?, G>> extends Codec<T, G> {
    public Function<T, Genotype<G>> encoder();
    public default Genotype<G> encode(final T value) {
        return encoder().apply(value); 
    }
}
  • #543: Simplified Constraint factory methods.
  • #566: New parameter class, EvolutionParams, contains all Engine parameters which influence the evolution performance.
  • #607: More flexible MOEA optimization. It is now possible to do minimization/maximization on every dimension independently.
  • #614: Generalize the ConstExprRewriter class. It can no be used with every type, not only with Double values.
  • #635: Mark the Chromosome.toSeq() and Genotype.toSeq() methods as deprecated. This methods are no longer needed, because the Chromosome and Genotype itself will implement the new BaseSeq interfaces and are now sequences itself.
  • #645: Mark all bean-like getter methods as deprecated. This methods will be replaced by simple accessor-methods, and is a preparation step for using the new Java records.

Bugs

  • #621: ìo.jenetics.prog.op.Program.arity() returns the wrong value.
Assets 3

@jenetics jenetics released this Nov 18, 2019 · 759 commits to master since this release

Improvements

  • #522: Replace io.jenetics.ext.engine.AdaptiveEngine with io.jenetics.ext.engine.UpdatableEngine. The AdaptiveEngine has been marked as deprecated.
  • #557: Implementation io.jenetics.util.ProxySorter class, which sorts a proxy array instead of an sequence itself.
  • #563: Introduction of Evolution interface, which makes the concept of an evolution function more explicit.
  • #579: Improve internal RingBuffer implementation.
  • #585: Improve EphemeralConst serialization.
  • #592: Add Tree.path() and Tree.pathElements() methods.

Bugs

  • #539: Fix JHM tests.
  • #599: Recombinator performs recombine on an individual with itself.
  • #600: Duplicates in Pareto set owing to the equals method in Phenotype class.
Assets 2

@jenetics jenetics released this Aug 3, 2019 · 1218 commits to master since this release

Bugs

  • #550: Erroneous index check for Sample.argAt(int) method in io.jenetics.prog.regression package.
  • #554: ClassCastException in io.jenetics.prog.regression.Regression class.
Assets 3

@jenetics jenetics released this Jun 23, 2019 · 1243 commits to master since this release

Improvements

  • #534: Generify Regression classes so it can be used for regression analysis of arbitrary types.
  • #529: Implementation of Hybridizing PSM and RSM mutation operator (HPRM)
  • #518: Implementation of Symbolic Regression classes. This makes it easier to solve such optimization problems.
  • #515: Rename Tree.getIndex(Tree) to Tree.indexOf(Tree).
  • #509: Allow to collect the nth best optimization results.
final ISeq<EvolutionResult<DoubleGene, Double>> best = engine.stream()
    .limit(Limits.bySteadyFitness(50))
    .flatMap(MinMax.toStrictlyIncreasing())
    .collect(ISeq.toISeq(10));
  • #504: Rename Tree.getChild(int) to Tree.childAt(int).
  • #500: Implementation of Reverse Sequence mutation operator (RSM).
  • #497: Implement Boolean operators for GP.
  • #496: Implement GT operator for GP.
  • #493: Add dotty tree formatter
  • #488: Implement new tree formatter TreeFormatter.LISP. This allows to create a Lisp string representation from a given Tree.
  • #487: Re-implementation of 'MathTreePruneAlterer'. The new implementation uses the newly introduced Tree Rewriting API, implemented in #442.
  • #486: Implement TreeRewriteAlterer, based on the new Tree Rewriting API.
  • #485: Cleanup of MathExpr class.
  • #484: The Tree.toString() now returns a parentheses string.
  • #481: The parentheses tree representation now only escapes "protected" characters.
  • #469: Implementation of additional Evaluator factory methods.
  • #465: Remove fitness scaler classes. The fitness scaler doesn't carry its weight.
  • #455: Implementation of CompletableFutureEvaluator.
  • #450: Improvement of FutureEvaluator class.
  • #449: The Engine.Builder constructor is now public and is the most generic way for creating engine builder instances. All other builder factory methods are calling this primary constructor.
  • #447: Remove evolution iterators. The whole evolution is no performed via streams.
  • #442: Introduce Tree Rewriting API, which allows to define own rewrite rules/system. This is very helpful when solving GP related problems.
final TRS<String> trs = TRS.parse(
    "add(0,$x) -> $x",
    "add(S($x),$y) -> S(add($x,$y))",
    "mul(0,$x) -> 0",
    "mul(S($x),$y) -> add(mul($x,$y),$y)"
);

// Converting the input tree into its normal form.
final TreeNode<String> tree = TreeNode.parse("add(S(0),S(mul(S(0),S(S(0)))))");
trs.rewrite(tree);
assert tree.equals(TreeNode.parse("S(S(S(S(0))))"));
  • #372: Allow to define the chromosome index an Alterer is allowed to change. This allows to define alterers for specific chromosomes in a genotype.
// The genotype prototype, consisting of 4 chromosomes
final Genotype<DoubleGene> gtf = Genotype.of(
    DoubleChromosome.of(0, 1),
    DoubleChromosome.of(1, 2),
    DoubleChromosome.of(2, 3),
    DoubleChromosome.of(3, 4)
);

// Define the GA engine.
final Engine<DoubleGene, Double> engine = Engine
    .builder(gt -> gt.getGene().doubleValue(), gtf)
    .selector(new RouletteWheelSelector<>())
    .alterers(
        // The `Mutator` is used on chromosome with index 0 and 2.
        PartialAlterer.of(new Mutator<DoubleGene, Double>(), 0, 2),
        // The `MeanAlterer` is used on chromosome 3.
        PartialAlterer.of(new MeanAlterer<DoubleGene, Double>(), 3),
        // The `GaussianMutator` is used on all chromosomes.
        new GaussianMutator<>()
    )
    .build();
  • #368: Remove deprecated code.
  • #364: Clean implementation of async fitness functions.
  • #342: The Tree accessor names are no longer in a Java Bean style: getChild(int) -> childAt(int). This corresponds to the childAtPath(path) methods.
  • #331: Remove hashCode and equals method from Selector and Alterer.
  • #314: Add factory method for AdaptiveEngine, which simplifies its creation.
  • #308: General improvement of object serialization.
  • #50: Improve Genotype validation. The new Constraint interface, and its implementation RetryConstraint, now allows a finer control of the validation and recreation of individuals.

Bugs

  • #520: Fix tree-rewriting for Const values. This leads to non-matching nodes when trying to simplify the GP tree.
  • #475: Level function returns different results depending on whether the iterator is iterating through a ProgramGene or TreeNode.
  • #473: DynamicGenotype example causes IllegalArgumentException.
Assets 3

@jenetics jenetics released this Feb 19, 2019 · 2086 commits to master since this release

Improvements

  • #316: Improve implementation of tree rewriting. This is a preparation step for #442.
  • #414: Use Gradle 'implementation' instead of 'compile' dependency
  • #426: Relax final restriction on some Alterer implementations. All alterers can now be sub-classed.
  • #430: Codec for numeric 2d matrices.
  • #433: Upgrade Gradle to 5.x.
  • #443: Precondition check for XXXChromosome.of(Gene...) factory methods.
  • #445: Mark Phenotype.newInstance methods as deprecated.
  • #457: Add <A> A[] Seq.toArray(IntFunction<A[]> generator) method.

Bugs

  • #425: Manual fixes.
Assets 3

@jenetics jenetics released this Oct 28, 2018 · 2287 commits to master since this release

Improvements

  • #347: Improve hashCode and equals methods.
  • #349: Cleanup of chromosome constructors. Make the constructors more regular.
  • #355: Simplify implementation of numeric genes.
  • #361: Add NumericChromosome.primitiveStream() methods.
  • #366: Deprecate reference to fitness function property from Phenotype. Preparation step for generalizing the fitness evaluation.
  • #377: Add Tree.childAt method. Lets you fetch deeply nested child nodes.
  • #378: Convert tree to parentheses tree string.
  • #379: Parse parentheses tree string to tree object.
  • #380: Add TreeNode.map method.
  • #400: Codec for mapping source- and target objects.
  • #406: Make the library compilable under Java 11.
  • #411: Improve the behaviour of the MathExpr.format method.

Bugs

  • #357: Invalid length of selected population in MonteCarloSelector.
  • #420: Limits.byFitnessThreshold termination strategy is missing best generation.
Assets 3

@jenetics jenetics released this Sep 28, 2018 · 2524 commits to master since this release

Bugs

  • 416: Method internal comb.subset doesn't create all possible combinations. The PermutationChromosome is therefore not able to create solutions for the whole search space.
Assets 3
You can’t perform that action at this time.