Genex v1.0.1-beta Genex.Evolution behaviour View Source

Evolution behaviour definition for Evolutionary algorithms.

Evolutions begin with init after the population has been created. The purpose of init is to define metrics, initiate a genealogy tree, and create a hall of fame. init is like the "constructor" of the evolution.

Link to this section Summary

Callbacks

Evaluates population according to fitness_fn.

Initialization of the evolution.

Recombine population.

Select parents for variation. Must populate selected field in Population.

Termination of the evolution.

Perform housekeeping before next generation. Includes Gene Repair.

Perform variation such as Crossover, Mutation, and Migration.

Link to this section Callbacks

Link to this callback

evaluation(population, opts)

View Source
evaluation(population :: Genex.Types.Population.t(), opts :: Keyword.t()) ::
  {:ok, Genex.Types.Population.t()}

Evaluates population according to fitness_fn.

Link to this callback

init(population, opts)

View Source
init(population :: Genex.Types.Population.t(), opts :: Keyword.t()) ::
  {:ok, Genex.Types.Population.t()}

Initialization of the evolution.

Link to this callback

reinsertion(population, opts)

View Source
reinsertion(population :: Genex.Types.Population.t(), opts :: Keyword.t()) ::
  {:ok, Genex.Types.Population.t()}

Recombine population.

Link to this callback

selection(population, opts)

View Source
selection(population :: Genex.Types.Population.t(), opts :: Keyword.t()) ::
  {:ok, Genex.Types.Population.t()}

Select parents for variation. Must populate selected field in Population.

Link to this callback

termination(population, opts)

View Source
termination(population :: Genex.Types.Population.t(), opts :: Keyword.t()) ::
  Genex.Types.Population.t()

Termination of the evolution.

Link to this callback

transition(population, opts)

View Source
transition(population :: Genex.Types.Population.t(), opts :: Keyword.t()) ::
  {:ok, Genex.Types.Population.t()}

Perform housekeeping before next generation. Includes Gene Repair.

Link to this callback

variation(population, opts)

View Source
variation(population :: Genex.Types.Population.t(), opts :: Keyword.t()) ::
  {:ok, Genex.Types.Population.t()}

Perform variation such as Crossover, Mutation, and Migration.