alogos.systems.whge.init_individual

Initialization functions to create a WHGE individual.

Functions

given_genotype(grammar, parameters=None)

Create an individual from a given genotype.

random_genotype(grammar, parameters=None)

Create an individual from a random genotype.


Detailed object descriptions

alogos.systems.whge.init_individual.given_genotype(grammar, parameters=None)[source]

Create an individual from a given genotype.

Parameters:
Raises:

InitializationError – If the initialization of the individual fails.

Notes

The genotype is converted to a derivation tree and phenotype with the forward mapping function of this system.

alogos.systems.whge.init_individual.random_genotype(grammar, parameters=None)[source]

Create an individual from a random genotype.

Parameters:
  • grammar (Grammar)

  • parameters (dict or ParameterCollection, optional) – Following keyword-value pairs are considered by this function:

    • genotype_length : Number of bits in the WHGE Genotype.

Raises:

InitializationError – If the initialization of the individual fails.