alogos.systems.whge.init_individual
¶
Initialization functions to create a WHGE individual.
Functions¶
|
Create an individual from a given genotype. |
|
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:
grammar (
Grammar
)parameters (
dict
orParameterCollection
, optional) – Following keyword-value pairs are considered by this function:init_ind_given_genotype
: Data for a WHGEGenotype
.
- 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
orParameterCollection
, optional) – Following keyword-value pairs are considered by this function:genotype_length
: Number of bits in the WHGEGenotype
.
- Raises:
InitializationError – If the initialization of the individual fails.