Cambrian.jl

An Evolutionary Computation framework
Author d9w
Popularity
11 Stars
Updated Last
6 Months Ago
Started In
November 2018

Cambrian.jl

Build Status Coverage Status codecov

A functional Evolutionary Computation framework.

Installation

Cambrian can be installed through the Julia package manager:

julia> ]
pkg> add Cambrian
pkg> test Cambrian

Usage

Cambrian is intended as a common framework for evolutionary computation algorithms in Julia. Algorithm implementations should define a subclass of the AbstractEvolution type which must have the following fields:

config::NamedTuple
logger::CambrianLogger
population::Array{<:Individual}

Each subclass must also implement

populate(e::<:AbstractEvolution)
evaluate(e::<:AbstractEvolution)
generation(e::<:AbstractEvolution)

An example Genetic Algorithm and the 1+λ algorithm are provided in src/GA.jl and src/oneplus.jl, with usage examples in test/ga.jl and test/oneplus.jl.

Algorithms can also define new Individual types or use the provided FloatIndividual and BoolIndividual. New Individual types should have the fields:

genes::<:AbstractArray
fitness::Array{Float64}

and implement the following methods:

mutate(i::<:Individual)
crossover(parents::Vararg{Individual})

or make use of the provided methods.

In Cambrian, individual fitness is always a vector of dimension d_fitness, defined in the provided configuration file. For the case of single-objective fitness, this adds slight overhead but is intended to make all methods flexible to multi-objective optimization.

Individual algorithms are encouraged to be separated as new packages which follow the Cambrian framework. Common functionality between multiple algorithms should be integrated into Cambrian as needed.

Ecosystem

Cambrian is used in the following packages:

There are other evolutionary computation packages in Julia:

There are also excellent optimization libraries in Julia which use evolutionary and other approaches:

Cambrian takes inspiration from evolutionary frameworks in other languages, notably:

Cambrian is also used in my course on evolutionary computation.

Development

Cambrian is still under development and the ecosystem is growing. Pull requests of bug fixes or features which can be used across multiple algorithms are greatly appreciated.

A non-exhaustive list of possible upcoming features:

  • better documentation using Documenter
  • Abstract evolution type for multiple dispatch
  • Parallelization and test
  • CMA-ES
  • NSGA-II
  • Novelty archive
  • co-evolution
  • genetic speciation
  • Island-based