geneticengine.representations.tree.operators

Module Contents

Classes

FullInitializer

All individuals are created with full trees (maximum depth in all

GrowInitializer

All individuals are created expanding productions until a maximum depth,

PositionIndependentGrowInitializer

All individuals are created expanding productions until a maximum depth,

RampedInitializer

This method uses the grow method from the minimum grammar depth to the

RampedHalfAndHalfInitializer

Half of the individuals are created with the maximum depth, and the

InjectInitialPopulationWrapper

Starts with an initial population, and relies on another initializer if

class geneticengine.representations.tree.operators.FullInitializer

Bases: geneticengine.algorithms.gp.structure.PopulationInitializer

All individuals are created with full trees (maximum depth in all branches).

initialize(problem, representation, random, target_size, **kwargs)
Parameters:
Return type:

Iterator[geneticengine.solutions.individual.Individual]

class geneticengine.representations.tree.operators.GrowInitializer

Bases: geneticengine.algorithms.gp.structure.PopulationInitializer

All individuals are created expanding productions until a maximum depth, but without the requirement of reaching that depth.

initialize(problem, representation, random, target_size, **kwargs)
Parameters:
Return type:

Iterator[geneticengine.solutions.individual.Individual]

class geneticengine.representations.tree.operators.PositionIndependentGrowInitializer

Bases: geneticengine.algorithms.gp.structure.PopulationInitializer

All individuals are created expanding productions until a maximum depth, but without the requirement of reaching that depth.

initialize(problem, representation, random, target_size, **kwargs)
Parameters:
Return type:

Iterator[geneticengine.solutions.individual.Individual]

class geneticengine.representations.tree.operators.RampedInitializer

Bases: geneticengine.algorithms.gp.structure.PopulationInitializer

This method uses the grow method from the minimum grammar depth to the maximum.

initialize(problem, representation, random, target_size)
Parameters:
Return type:

Iterator[geneticengine.solutions.individual.Individual]

class geneticengine.representations.tree.operators.RampedHalfAndHalfInitializer

Bases: 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.

initialize(problem, representation, random, target_size)
Parameters:
Return type:

Iterator[geneticengine.solutions.individual.Individual]

class geneticengine.representations.tree.operators.InjectInitialPopulationWrapper(programs, backup)

Bases: geneticengine.algorithms.gp.structure.PopulationInitializer

Starts with an initial population, and relies on another initializer if it’s necessary to fulfill the population size.

Parameters:
initialize(problem, representation, random, target_size)
Parameters:
Return type:

Iterator[geneticengine.solutions.individual.Individual]