Genetic Programming

Evolutionary.TreeGP — Type

Implementation of Koza-type (tree-based) Genetic Programming

The constructor takes following keyword arguments:

  • populationSize: The size of the population
  • terminals: A dictionary of terminals with their their corresponding dimensionality
    • This dictionary contains (Terminal, Int) pairs
    • The terminals can be any symbols (variables), constant values, or 0-arity functions.
  • functions: A collection of functions with their corresponding arity.
    • This dictionary contains (Function, Int) pairs
  • initialization: A strategy for population initialization (default: :grow)
    • Possible values: :grow and :full
  • mindepth: Minimal depth of the expression (default: 0)
  • maxdepth: Maximal depth of the expression (default: 3)
  • mutation: A mutation function (default: crosstree)
  • crossover: A crossover function (default: subtree)
  • simplify: An expression simplification function (default: :nothing)
  • Use mutation and crossover parameters to specify GP-related mutation operation.
  • Use selection parameter to specify the offspring selection procedure
source

Description

The Genetic Programming is a technique of evolving programs, starting from a population of unfit (usually random) programs, fit for a particular task by applying operations analogous to natural genetic processes to the population of programs. It is essentially a heuristic search technique, i.e. searching for an optimal or at least suitable program among the space of all programs[1].

Auxiliary Functions

Base.rand — Method
rand(t::TreeGP, maxdepth=2; mindepth=maxdepth-1)::Expr

Create a random expression tree given the specification from the TreeGP object t.

source

Protected Functions

The following protected operators guard against domain errors (e.g. division by zero, logarithm of zero) so that arbitrary expression trees can be evaluated safely.

References

  • 1John R. Koza, "Genetic Programming: On the Programming of Computers by Means of Natural Selection", MIT Press, 1992.