alogos.systems.whge.representation

Representations for WHGE.

Classes

Genotype

WHGE genotype.

Individual

WHGE individual having a WHGE genotype.

Population

WHGE population consisting of WHGE individuals.


Detailed object descriptions

class alogos.systems.whge.representation.Genotype(data)[source]

Bases: alogos.systems._shared.representation.BaseGenotype

WHGE genotype.

__init__(self, data)[source]

Create a WHGE genotype with immutable data.

Parameters:

data (bitarray, or str of "0" and "1" characters) – The provided data is converted to the first form.

Examples

The argument data could get following values of different types that all lead to the same result:

  • bitarray.bitarray("11110000")

    The package containing this data structure is available on PyPI under the name bitarray

  • "11110000"

Raises:

GenotypeError – If the provided data can not be converted to the desired form.

copy(self)[source]

Create a deep copy of the genotype.

class alogos.systems.whge.representation.Individual(genotype=None, phenotype=None, fitness=float('nan'), details=None)[source]

Bases: alogos.systems._shared.representation.BaseIndividual

WHGE individual having a WHGE genotype.

class alogos.systems.whge.representation.Population(individuals)[source]

Bases: alogos.systems._shared.representation.BasePopulation

WHGE population consisting of WHGE individuals.