saealib.DirectStrategy#
- class saealib.DirectStrategy(n_offspring=None)[source]#
Bases:
OptimizationStrategyPlain EA strategy without surrogate scoring.
Every candidate produced by
ask()is evaluated with the true objective function. No surrogate manager is required.- Parameters:
n_offspring (int | None)
Methods
Build the canonical direct strategy graph. |
|
Return the strategy's high-level Pipeline description. |
|
Return the strategy contract. |
|
Perform one generation step: generate, score, evaluate, and update. |
Method Details
- DirectStrategy.__init__(n_offspring=None)[source]#
- Parameters:
n_offspring (int | None)
- Return type:
None
- DirectStrategy.build_graph(provider)[source]#
Build the canonical direct strategy graph.
- Parameters:
provider (ComponentProvider)
- Return type:
- DirectStrategy.build_pipeline(provider)#
Return the strategy’s high-level Pipeline description.
- Parameters:
provider (ComponentProvider)
- Return type:
- DirectStrategy.contract()#
Return the strategy contract.
- Return type:
- DirectStrategy.step(ctx, provider)#
Perform one generation step: generate, score, evaluate, and update.
- Parameters:
ctx (OptimizationState) – Current optimization context.
provider (ComponentProvider) – Component provider.
- Returns:
Updated state returned by the pipeline.
- Return type:
OptimizationState