devolve is a genetic programming library written in the D programming language. The core goal of the project is to create a flexible, easy-to-use interface while still maintaining performance. Inspiration for some of the interface design was originally taken from Pyevolve.
The library may be built with
make, for release builds. Alternatively, run
make debug for a debug build. The examples in
examples/ may be built with
make examples, and unittests may be built and run with
Examples of usage can be found in the 'examples' folder. To use the library simply
import devolve. If only one genome representation is required, it may be sufficient
import devolve.tree, for example.
The general usage of the library is as follows:
Select a genome representation (i.e., list, tree, etc.). These should typically be able to represent a solution to your problem easily.
Choose from one of the existing generators / mutators / crossover functions. For example, mutators for the
treerepresentation live in
Write a fitness function for your application. This function should accept an individual of the type chosen in step 1. (so for a
list, a static or dynamically sized array).
Construct a Genetic Algorithm using the parts chosen or written in the above steps. These follow the convention of 'NameGA', so for
list, the class is named
Set additional information such as the mutation rate / population ordering (is a larger or smaller number more or less fit) or termination criteria.
evolve(), specifying the maximum number of generations over which the algorithm should run.
You're finished. Sit back and wait while the algorithm runs.
Keeping in mind that devolve is still under heavy development, pull requests are always welcome.
This software is released under the Boost license. See LICENSE for more details.
The BitSet used in BStringGA was written by Per Nordlöw and is used with only very minor modifications.