This genetic algorithm (GA) is mostly a set of mutation operators designed specifically for mutating networks. The type of network being mutated is not restricted to recognised artificial neural network (ANN) types such as CTRNN, but can be any structure composed of nodes and connections. I wrote this GA to allow me to evolve network topologies for various experimental types of ANN (all derived from CTRNN) without having to modifiy the GA everytime I altered the ANN. GeNGA was used to evolve my path integration system, and can evolve CTRNN, ModCTRNN or CiTRuS networks.
A network in GeNGA consists of a set of objects which can form connections to each other. The user defines what class or classes of object are available for building networks, how objects can be connected to each other and what data are needed to define all the other internal properties of each object. The GA has mutation operators which then add, delete and mutate network objects according to these rules. Encoded GeNGA objects are referred to as genes and are stored together in genotypes. The GA evolves a poplation of genotypes just like a normal GA. Object classes are defined in a configuration file and are referred to as gene classes. As an example, here is how a CTRNN network might be encoded using GeNGA.
This example network has two sensors, three CTRNN nodes and five weights. Three gene classes are needed to define this system. Sensors each have an internal parameter s governing some aspect of their function. Nodes each have a time constant tau and a bias parameter b. Weights each have a weight parameter w. In addition to defining internal data each gene class can define two further properties which are used to govern network topology: links and targets. Links are shown as arrows and targets are shown as rectangles. Sensors have one target called 'sen', nodes have two targets called 'in' and 'out'. Weights have two links called 'from' and 'to'. 'from' links are allowed to point to targets called 'sen' or 'out'. 'to' links are allowed to point to targets called 'in'. In the simulator code, a weight is created to link the 'from' object to the 'to' object of each weight. This creates only valid networks since weights can never link 'to' a sensor, which does not process incoming weights.
The configuration file also defines the minimum and maximum number of instances allowed of each gene class in any genotype, and the valid ranges allowed for each internal parameter. New genes are created with randomly initialised parameters and links, and existing genes maybe deleted, but the number of genes in each class are kept within the specified ranges.
The link and target system is the only way of constraining network topology, and is based purely on local rules. The only exception to this is a pruning system, which (if activated) removes redundant genes. The pruning system requires that some gene classes are marked as phenotypically active, such as motor output nodes perhaps. After topological mutations have been performed the GA performs a mark and sweep operation starting from the marked genes to determine which genes are topologically disconnected from the phenotype. These genes can then be deleted, since they usually cannot have any influence on the fitness of the individual.
Aside from this there are no further constraints on the topologies produced by mutation. There is no general way to constrain to feedforward topologies of arbitrary size for example.