View Source Genetix.Problems.OneMax (Genetix v0.4.1)

A specific genetic problem implementation for OneMax. The One-Max problem is a trivial problem: What is the maximum 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.

examples

Examples

iex> Genetix.Evolution.run(Genetix.Problems.OneMax, size: 1000)

Link to this section Summary

Functions

Fitness function implementation for OneMax problem.

Genotype implementation for OneMax problem. Bitstring.

Terminate implementation for OneMax problem.

Link to this section Functions

Link to this function

fitness_function(chromosome, opts \\ [])

View Source

Fitness function implementation for OneMax problem.

Genotype implementation for OneMax problem. Bitstring.

Link to this function

terminate?(list, generation, opts \\ [])

View Source

Terminate implementation for OneMax problem.