This section describes general purpose operators. Related classes can be found in the package org.evolvica.core.common.
In addition to operators that are related to evolutionary computation several other operators are required and/or valuable. Such operators can be found in package org.evolvica.core.common and may be used out of the box.
Sinks are used to capture results of an algorithm. As their name implies they have one input and no outputs. A default implmentation is org.evolvica.core.common.DefaultSink. This operator searches for the best individual in a set and prints its contents to the console, if an appropriate individual comparator is attached.
A duplicator (org.evolvica.core.common.Duplicator) is very important in algorithms they do not include
recombinators (i.e. evolution strategies). When designing an algorithm it is important to check no individual
may ever run though a whole loop in an algorithm. Otherwise an individual may be inserted into a population
more than once and this may lead to unpredictable behaviour.
This is where duplicators come into play: they take an individual set as an input, create a copy of each
individual and send the copied set as their output. A default implementation is org.evolvica.core.common.Duplicator.
In the termination section the use of routers has been discussed. The opposite of routers are collectors. Collectors are join operators which have an arbitrary number of inputs and one output. Collectors accept data on one of their inputs and send it immediately to its output. They are used to close cycles in algorithm structures.
Writers do not alter an incoming individual set, they just send the set unchanged to their output. What they do is iterating over a set and printing information to the console or to a file. In addition binary and XML writers exist that save a whole individual set to a file which can be restored later with an appropriate initializer.