geneticengine.representations.grammatical_evolution.ge
Classes
Module Contents
- class geneticengine.representations.grammatical_evolution.ge.ListWrapper
Bases:
geneticengine.random.sources.RandomSource- dna: list[int]
- index: int = 0
- randint(min, max)
- Parameters:
min (int)
max (int)
- Return type:
int
- random_float(min, max)
- Parameters:
min (float)
max (float)
- Return type:
float
- class geneticengine.representations.grammatical_evolution.ge.GrammaticalEvolutionRepresentation(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]- 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: