metaheuristic_designer.encodings.special.self_adapting_ES_encoding module#
Encoding for self-adapting Evolution Strategies that appends mutation strength parameters.
- class SelfAdaptingESEncoding(dimension, single_sigma=True, base_encoding=None)[source]#
Bases:
ParameterExtendingEncodingEncoding for self-adapting Evolution Strategies.
Appends one or more mutation strength values (
F) to the solution vector. Whensingle_sigma=Truea single step size is shared by all dimensions; otherwise each dimension gets its own step size.- Parameters:
- dimensionint
Number of decision variables.
- single_sigmabool, optional
If
True(default), a singleFvalue is added. IfFalse,dimensionvalues are added.- base_encodingEncoding, optional
Encoding applied to the solution part. Defaults to
DefaultEncoding.
- Attributes:
paramsAccess parameter values by attribute-style lookup.
- Parameters:
dimension (int)
single_sigma (bool)
base_encoding (Optional[Encoding])
Methods
decode(population_matrix)Decodes a population matrix into a list/array of solutions.
decode_params(genotype[, copy])Extract the auxiliary parameter blocks from a genotype matrix.
encode(solution[, params])Encodes a list of solutions to our problem to an population matrix.
encode_params(param_dict)Stack a dictionary of parameter arrays into a single matrix.
extract_params(population_matrix)Return only the auxiliary-parameter part of the genotype matrix.
extract_solution(population_matrix)Return only the solution part of the genotype matrix.
gather_params()Overridable thin wrapper around get_params
get_params()Return a copy of the current parameter dictionary.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Re-evaluate all stored parameters at the current progress.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
get_state