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.