saealib.DirectStrategy#

class saealib.DirectStrategy(n_offspring=None)[source]#

Bases: OptimizationStrategy

Plain 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

__init__

build_graph

Build the canonical direct strategy graph.

build_pipeline

Return the strategy's high-level Pipeline description.

contract

Return the strategy contract.

step

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:

ComponentGraph

DirectStrategy.build_pipeline(provider)#

Return the strategy’s high-level Pipeline description.

Parameters:

provider (ComponentProvider)

Return type:

Pipeline

DirectStrategy.contract()#

Return the strategy contract.

Return type:

ComponentContract

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