Features
- Multi-Threaded Evolution Engine - Takes advantage of parallelism to improve performance on multi-core and multi-processor machines.
- Non-Invasive - Objects of any type can be evolved without the evolvable class having to implement a particular interface or extend from a common base class. This means that there are no restrictions on the implementation of the evolvable type and no dependencies on any framework classes. The evolvable type is completely decoupled.
- Pluggable Selection Strategies - Roulette Wheel Selection, Tournament Selection and several other selection strategies are provided. Alternatively, you can implement your own selection strategy quickly and easily.
- Flexible Evolution Schemes - The evolution process can be as simple or as complicated as you like. A single step or several operators combined in sequence and/or with branching. Use the provided operators, implement your own, or use a combination of both.
- Re-usable Operators for Common Types - Ready-to-use cross-over and mutation implementations are provided for several data types including bit strings, character strings, arrays and lists.
- Island Model Evolution (new in version 0.7.0) - Evolve multiple populations in parallel with periodic migration of individuals between islands.
- Steady-State Evolution (new in version 0.7.0) - Evolve one member of the population at a time.
- Evolution Strategies (new in version 0.7.1) - Support for both (μ+λ) and (μ,λ) evolution strategies.
- Interactive Evolutionary Algorithms - Support for user-guided selection makes the framework suitable for applictions in which defining an adequate fitness function is difficult, such as evolutionary art and evolutionary music.
- Distributed Processing - Support for distributed fitness evaluations using either Hadoop (via the Apache Mahout project) or Terracotta.
- Swing Component Library - Re-usable components to simplify the building of graphical user interfaces for evolutionary programs. Includes a generic Evolution Monitor component that provides information about a running evolutionary program.
Getting Started
If you are already familiar with evolutionary algorithms, you can download the latest version of the Watchmaker Framework and dive straight in. If you need a primer, start with chapter one of the user manual or refer to the resources listed under "Background Reading" on the right of this page.
The core component of the Watchmaker Framework is the EvolutionEngine
.
To write an evolutionary program using the Watchmaker Framework you have to instantiate an EvolutionEngine
and invoke one of its evolve
or evolvePopulation
methods.
To create an evolution engine you will need to provide a few other objects. The only class that you will always have to write yourself is an implementation
of the FitnessEvaluator
interface. This is specific to the problem
that you are trying to solve.
You'll also need a CandidateFactory
and one or more
EvolutionaryOperator
s (i.e. mutation and/or cross-over).
Depending on the type of object that you are evolving, you might find the classes you need are already included in the framework. If not, it's straightforward
to write the required implementations for any type that you choose to evolve. Finally, you need to pick one of the included selection strategies and a random
number generator (RNG). You could use the standard java.util.Random
RNG but there are faster and more random alternatives. The Watchmaker Framework
bundles the Uncommons Maths library, which includes several RNGs.
The MersenneTwisterRNG
is a good
choice in most cases.
The Watchmaker download includes source code for several example programs, including the applets that are featured on this website. This code may help in understanding how the various components are combined into working programs.
The Evolution Monitor
The Watchmaker Swing module includes a generic EvolutionMonitor
component. This can be added to any EvolutionEngine
to provide feedback on the progress of the evolution. The information displayed by the monitor includes
a visual representation of the fittest candidate found so far and a graph of population fitness over time. An EvolutionMonitor
is added to an
EvolutionEngine
via the addEvolutionObserver
method.
To see the evolution monitor in action, refer to the Mona Lisa example applet. The lower half of the UI is an embedded
EvolutionMonitor
component.