This page gives a quick overview of the main components of EpochX and how they interact.
Framework
The framework module contains only the features which are necessary to model and override the evolutionary algorithm, it doesn't contain any representation specific code. This keeps it small, fast and makes it much easier to maintain and test. It's also very convenient if you want to implement your own representation, but don't want the overhead of hundreds of irrelevant classes.
Evolver Pipeline
Found in the Evolver class, the evolver pipeline specifies the high-level structure of the evolutionary algorithm to be executed. To execute an algorithm, an instance of Evolver must be set up with a sequence of Component objects. Each Component object defines a process method, which takes a population and returns a population. The evolver's pipeline of components are executed in sequence, with the first component passed an empty population. The population returned from the final component is the result of the algorithm.
Config
Configuration of the algorithm is performed through the Config. The Config class is defined as a singleton, which is obtained by calling Config.getInstance(). Set and get methods are supplied to specify values for configuration options. Any new components, operators or other new classes defined to work with EpochX can make use of the Config by defining their own ConfigKeys. Having the configuration defined in one centralised place makes it simple to . A feature called Templates are also available in order to make use of default configurations, these are explained fully later in the guide.
Selection
The selection of individuals based on fitness is in most cases not dependent on representation, so is found in the framework. A range of common selection methods are provided built-in, including a Tournament selector and Roulette selector. It is also simple to implement new selection methods.
Events
The events system provides a mechanism for hooking into the algorithm to manipulate or output information in real-time as it progresses. This is controlled by the EventManager singleton, which uses the standard Observer design pattern. Observers register their interest in an event and are then notified when that event occurs. Extensions to EpochX can listen for events, fire events and also define new event types.
Stats
The stats system is built on top of the events system to provide a powerful and efficient way of accessing data about an evolutionary algorithm as it executes.
Representation Modules
All the representation specific code is kept completely separate from the framework.
STGP
The STGP module implements tree-based Strongly Typed Genetic Programming. This is a complete implementation, including support for generic functions as proposed by Montana.
CFG-GP (GR)
The CFG-GP module provides an implementation of Whigham's grammar-guided GP system. Individuals are represented as a parse tree (Concrete Syntax Tree).
GE
The GE module provides an implementation of Grammatical Evolution, the grammar-guided system proposed by Ryan and O'Neill. Individuals are represented as sequences of 'codons', which are mapped to parse trees (Concrete Syntax Trees).
Common Module
Some features of the representation modules are useful to more than one representation. In order to share this code between the modules it is put in to the Common module, which all representation modules are dependent on.