geneticengine.representations.tree.operators ============================================ .. py:module:: geneticengine.representations.tree.operators Classes ------- .. autoapisummary:: geneticengine.representations.tree.operators.FullInitializer geneticengine.representations.tree.operators.GrowInitializer geneticengine.representations.tree.operators.PositionIndependentGrowInitializer geneticengine.representations.tree.operators.RampedHalfAndHalfInitializer geneticengine.representations.tree.operators.InjectInitialPopulationWrapper Module Contents --------------- .. py:class:: FullInitializer(max_depth) Bases: :py:obj:`geneticengine.algorithms.gp.structure.PopulationInitializer` All individuals are created with full trees (maximum depth in all branches). .. py:attribute:: max_depth .. py:method:: initialize(problem, representation, random, target_size, **kwargs) .. py:class:: GrowInitializer Bases: :py:obj:`geneticengine.algorithms.gp.structure.PopulationInitializer` All individuals are created expanding productions until a maximum depth, but without the requirement of reaching that depth. .. py:method:: initialize(problem, representation, random, target_size, max_tries = 1000, **kwargs) .. py:class:: PositionIndependentGrowInitializer(max_depth) Bases: :py:obj:`geneticengine.algorithms.gp.structure.PopulationInitializer` All individuals are created expanding productions until a maximum depth, but without the requirement of reaching that depth. .. py:attribute:: max_depth .. py:attribute:: grow .. py:attribute:: full .. py:method:: initialize(problem, representation, random, target_size, **kwargs) .. py:class:: RampedHalfAndHalfInitializer(max_depth) Bases: :py:obj:`geneticengine.algorithms.gp.structure.PopulationInitializer` Half of the individuals are created with the maximum depth, and the other half with different values of maximum depth between the minimum and the maximum. There's an equal chance of using full or grow method. .. py:attribute:: max_depth .. py:method:: initialize(problem, representation, random, target_size) .. py:class:: InjectInitialPopulationWrapper(programs, backup) Bases: :py:obj:`geneticengine.algorithms.gp.structure.PopulationInitializer` Starts with an initial population, and relies on another initializer if it's necessary to fulfill the population size. .. py:attribute:: programs .. py:attribute:: backup_initializer .. py:method:: initialize(problem, representation, random, target_size)