metaheuristic_designer.strategies.classic.DE#

class DE(initializer, de_operator_name='DE/best/1', survivor_sel=None, name='DE', rng=None, F=0.8, Cr=0.9, p=0.1, **kwargs)[source]#

Differential Evolution algorithm.

Uses a DE mutation operator (e.g., "DE/best/1") and one-to-one survivor selection by default. The population size stays constant, and every individual is perturbed each generation.

Parameters:
initializerInitializer

Population initializer.

de_operator_namestr, optional

DE variant (default "DE/best/1").

survivor_selSurvivorSelection, optional

Survivor selection; defaults to one-to-one competition.

namestr, optional

Display name (default "DE").

rngRNGLike, optional

Random number generator.

Ffloat or SchedulableParameter, optional

Scale factor (default 0.8).

Crfloat or SchedulableParameter, optional

Crossover probability (default 0.9).

pfloat or SchedulableParameter, optional

Elite fraction for /pbest/ variants (default 0.1).

**kwargs

Forwarded to StaticPopulation.

Attributes:
params

Access parameter values by attribute-style lookup.

population_size

Gets the amount of individuals in the population.

Parameters:

Methods

reset

__init__(initializer, de_operator_name='DE/best/1', survivor_sel=None, name='DE', rng=None, F=0.8, Cr=0.9, p=0.1, **kwargs)[source]#
Parameters:

Methods

__init__(initializer[, de_operator_name, ...])

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.

reset(objfunc)

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.