geneticengine.representations.grammatical_evolution.ge ====================================================== .. py:module:: geneticengine.representations.grammatical_evolution.ge Classes ------- .. autoapisummary:: geneticengine.representations.grammatical_evolution.ge.Genotype geneticengine.representations.grammatical_evolution.ge.ListWrapper geneticengine.representations.grammatical_evolution.ge.GrammaticalEvolutionRepresentation Module Contents --------------- .. py:class:: Genotype .. py:attribute:: dna :type: list[int] .. py:class:: ListWrapper Bases: :py:obj:`geneticengine.random.sources.RandomSource` .. py:attribute:: dna :type: list[int] .. py:attribute:: index :type: int :value: 0 .. py:method:: randint(min, max) .. py:method:: random_float(min, max) .. py:class:: GrammaticalEvolutionRepresentation(grammar, decider, gene_length = 256) Bases: :py:obj:`geneticengine.representations.api.Representation`\ [\ :py:obj:`Genotype`\ , :py:obj:`geneticengine.solutions.tree.TreeNode`\ ], :py:obj:`geneticengine.representations.api.RepresentationWithMutation`\ [\ :py:obj:`Genotype`\ ], :py:obj:`geneticengine.representations.api.RepresentationWithCrossover`\ [\ :py:obj:`Genotype`\ ] :param grammar: The grammar to use in the mapping :type grammar: Grammar :param max_depth: the maximum depth when performing the mapping :type max_depth: int .. py:attribute:: grammar .. py:attribute:: decider .. py:attribute:: gene_length :value: 256 .. py:method:: create_genotype(random, **kwargs) .. py:method:: genotype_to_phenotype(genotype) .. py:method:: mutate(random, genotype, **kwargs) .. py:method:: crossover(random, parent1, parent2, **kwargs)