View Source Genetix.Types.Chromosome (Genetix v0.1.0)

Chromosome type definition that represents a single solution. A Chromosome represents one solution to the problem you are trying to solve. Solutions are encoded into a collection of genes. The Chromosome is then evaluated based on some criteria you define.

Chromosomes must be defined as very "self-aware" containing all of the information necessary to repair and evaluate themselves.

Link to this section Summary

Types

t()

Chromosome type. Chromosomes are represented as a %Chromosome{}. At a minimum a chromosome needs :genes.

Link to this section Types

@type t() :: %Genetix.Types.Chromosome{
  age: non_neg_integer(),
  fitness: number(),
  genes: Enum.t(),
  size: non_neg_integer()
}

Chromosome type. Chromosomes are represented as a %Chromosome{}. At a minimum a chromosome needs :genes.

Fields

  • :genes: Enum containing genotype representation.
  • :size: non_neg_integer representing size of chromosome.
  • :age: non_neg_integer representing age of chromosome.
  • :fitness: number representing fitness(es) of chromosome.