metaheuristic_designer.algorithms.strategy_selection module#

Convenience wrapper that benchmarks strategies instead of pre-built algorithms.

class StrategySelection(objfunc, strategy_list, repetitions=10, **kwargs)[source]#

Bases: AlgorithmSelection

Evaluate a set of search strategies by automatically wrapping them in Algorithm objects.

This is a thin wrapper around AlgorithmSelection that accepts SearchStrategy instances and a shared configuration dictionary. It converts each strategy into an Algorithm with the same settings and then delegates to the parent class.

Parameters:
objfuncObjectiveFunc

Objective function to evaluate.

strategy_listiterable of SearchStrategy

The search strategies to compare.

repetitionsint, optional

Number of independent runs per strategy (default 10).

**kwargs

Keyword arguments forwarded to every Algorithm constructor (e.g., stop_cond="max_iterations", max_iterations=100).

Parameters:

Methods

optimize()

Execute all repetitions and return the best population found.

report()

Return an aggregated summary of the raw data.