View Source Genetix.Problems.ZeroMax (Genetix v0.1.0)

A specific genetic problem implementation for ZeroMax. The Zero-Max problem is a trivial problem: What is the minimum sum of a bitstring (a string consisting of only 1s and 0s) of length N.

Hyperparameters

  • size length of the bitestring (0s, 1s). Default 42.
  • sort_criteria due its a minimal optimization problem, we need to override the defaul value based on max, with the &<=2 operator.

examples

Examples

iex> Genetix.Evolution.run(Genetix.Problems.ZeroMax, size: 1000, sort_criteria: &<=/2)

Link to this section Summary

Functions

fitness function implementation for ZeroMax problem.

Genotype implementation for ZeroMax problem. Bitstring

Terminate function implementation for ZeroMax problem.

Link to this section Functions

Link to this function

fitness_function(chromosome, opts \\ [])

View Source

fitness function implementation for ZeroMax problem.

Genotype implementation for ZeroMax problem. Bitstring

Link to this function

terminate?(list, opts \\ [])

View Source

Terminate function implementation for ZeroMax problem.