View Source Genetix.Types.Chromosome (Genetix v0.4.1)
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
Link to this section Types
@type t() :: %Genetix.Types.Chromosome{ age: non_neg_integer(), fitness: number(), genes: Enum.t(), id: String.t(), size: non_neg_integer() }
Chromosome type.
Chromosomes are represented as a %Chromosome{}. At a minimum a chromosome needs :genes.
Fields
:genes:Enumcontaining genotype representation.:id:stringunique id of chromosome.:size:non_neg_integerrepresenting size of chromosome.:age:non_neg_integerrepresenting age of chromosome.:fitness:numberrepresenting fitness(es) of chromosome.