geneticengine.representations.grammatical_evolution.structured_ge
Attributes
Classes
This version uses a list of lists of integers to represent individuals, |
Module Contents
- geneticengine.representations.grammatical_evolution.structured_ge.INFRASTRUCTURE_KEY = '$infrastructure'
- class geneticengine.representations.grammatical_evolution.structured_ge.Genotype
- dna: dict[str, list[int]]
- class geneticengine.representations.grammatical_evolution.structured_ge.StructuredListWrapper(dna)
Bases:
geneticengine.random.sources.RandomSource- dna: dict[str, list[int]]
- indexes: dict[str, int]
- randint(min, max, prod=INFRASTRUCTURE_KEY)
- Parameters:
min (int)
max (int)
prod (str)
- Return type:
int
- random_float(min, max, prod=INFRASTRUCTURE_KEY)
- Parameters:
min (float)
max (float)
prod (str)
- Return type:
float
- class geneticengine.representations.grammatical_evolution.structured_ge.StructuredGrammaticalEvolutionRepresentation(grammar, decider, gene_length=256)
Bases:
geneticengine.representations.api.Representation[Genotype,geneticengine.solutions.tree.TreeNode],geneticengine.representations.api.RepresentationWithMutation[Genotype],geneticengine.representations.api.RepresentationWithCrossover[Genotype]This version uses a list of lists of integers to represent individuals, based on non-terminal symbols.
- Parameters:
grammar (Grammar) – The grammar to use in the mapping
max_depth (int) – the maximum depth when performing the mapping
decider (geneticengine.representations.tree.initializations.SynthesisDecider)
gene_length (int)
- grammar
- decider
- gene_length = 256
- create_genotype(random, **kwargs)
- Parameters:
- Return type: