geneticengine.representations.tree.operators
Module Contents
Classes
All individuals are created with full trees (maximum depth in all |
|
All individuals are created expanding productions until a maximum depth, |
|
All individuals are created expanding productions until a maximum depth, |
|
This method uses the grow method from the minimum grammar depth to the |
|
Half of the individuals are created with the maximum depth, and the |
|
Starts with an initial population, and relies on another initializer if |
- class geneticengine.representations.tree.operators.FullInitializer
Bases:
geneticengine.algorithms.gp.structure.PopulationInitializerAll individuals are created with full trees (maximum depth in all branches).
- initialize(problem, representation, random, target_size, **kwargs)
- Parameters:
problem (geneticengine.problems.Problem) –
representation (geneticengine.representations.api.Representation) –
random (geneticengine.random.sources.RandomSource) –
target_size (int) –
- Return type:
- class geneticengine.representations.tree.operators.GrowInitializer
Bases:
geneticengine.algorithms.gp.structure.PopulationInitializerAll 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:
problem (geneticengine.problems.Problem) –
representation (geneticengine.representations.api.Representation) –
random (geneticengine.random.sources.RandomSource) –
target_size (int) –
- Return type:
- class geneticengine.representations.tree.operators.PositionIndependentGrowInitializer
Bases:
geneticengine.algorithms.gp.structure.PopulationInitializerAll 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:
problem (geneticengine.problems.Problem) –
representation (geneticengine.representations.api.Representation) –
random (geneticengine.random.sources.RandomSource) –
target_size (int) –
- Return type:
- class geneticengine.representations.tree.operators.RampedInitializer
Bases:
geneticengine.algorithms.gp.structure.PopulationInitializerThis method uses the grow method from the minimum grammar depth to the maximum.
- initialize(problem, representation, random, target_size)
- Parameters:
problem (geneticengine.problems.Problem) –
representation (geneticengine.representations.api.Representation) –
random (geneticengine.random.sources.RandomSource) –
target_size (int) –
- Return type:
- class geneticengine.representations.tree.operators.RampedHalfAndHalfInitializer
Bases:
geneticengine.algorithms.gp.structure.PopulationInitializerHalf 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:
problem (geneticengine.problems.Problem) –
representation (geneticengine.representations.api.Representation) –
random (geneticengine.random.sources.RandomSource) –
target_size (int) –
- Return type:
- class geneticengine.representations.tree.operators.InjectInitialPopulationWrapper(programs, backup)
Bases:
geneticengine.algorithms.gp.structure.PopulationInitializerStarts 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:
problem (geneticengine.problems.Problem) –
representation (geneticengine.representations.api.Representation) –
random (geneticengine.random.sources.RandomSource) –
target_size (int) –
- Return type: