metaheuristic_designer.strategies.classic.ES module#

Evolution Strategy.

class ES(initializer, mutation_op, crossover_op=None, parent_sel=None, survivor_sel=None, offspring_size=None, name='ES', rng=None, **kwargs)[source]#

Bases: ShuffledPopulationStrategy

Evolution Strategy (μ+λ or μ,λ).

Applies mutation (and optionally crossover) to the selected parents, then selects survivors. By default, no parent selection is performed (all individuals are used).

Parameters:
initializerInitializer

Population initializer.

mutation_opOperator

Mutation operator.

crossover_opOperator, optional

Crossover operator. If None, only mutation is applied.

parent_selParentSelection, optional

Parent selection (default: use the whole population).

survivor_selSurvivorSelection, optional

Survivor selection (default: generational).

offspring_sizeint, optional

Number of offspring per generation.

namestr, optional

Display name (default "ES").

**kwargs

Forwarded to VariablePopulation.

Attributes:
initializer
params

Access parameter values by attribute-style lookup.

population_size

Gets the amount of individuals in the population.

Parameters:

Methods

extra_report()

Hook called at the end of the optimization (intended for subclasses).

extra_step_info()

Hook called after each generation (intended for subclasses).

gather_parameters()

Collect the current parameters from all sub-components.

get_params()

Return a copy of the current parameter dictionary.

get_state()

Gets the current state of the search strategy as a dictionary.

initialize(objfunc)

Initializes the optimization search strategy.

step(prev_population, objfunc)

Performs a single iteration of the algorithm on a given population.

store_kwargs([progress])

Store keyword arguments and evaluate them at the given progress.

update(progress)

Advances the state of the search by one iteration.

update_kwargs([progress])

Add or replace parameters and immediately evaluate them.

reset