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:
AlgorithmSelectionEvaluate a set of search strategies by automatically wrapping them in
Algorithmobjects.This is a thin wrapper around
AlgorithmSelectionthat acceptsSearchStrategyinstances and a shared configuration dictionary. It converts each strategy into anAlgorithmwith 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
Algorithmconstructor (e.g.,stop_cond="max_iterations",max_iterations=100).
- Parameters:
objfunc (ObjectiveFunc)
strategy_list (Iterable[SearchStrategy])
repetitions (int)
Methods
optimize()Execute all repetitions and return the best population found.
report()Return an aggregated summary of the raw data.