Watchmaker Framework for Evolutionary Computation (logo by Charles Burdett)

Watchmaker Framework

for Evolutionary Computation

Current Stable Version: 0.7.1 Download API Docs User Manual Wiki Support Bugs Source Code Changelog / Roadmap

The Watchmaker Framework is an extensible, high-performance, object-oriented framework for implementing platform-independent evolutionary/genetic algorithms in Java. The framework provides type-safe evolution for arbitrary types via a non-invasive API. The Watchmaker Framework is Open Source software, free to download and use subject to the terms of the Apache Software Licence, Version 2.0.


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 EvolutionaryOperators (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.