CmaesInitializer

class CmaesInitializer(*, bounds, initial_mean=None, initial_step_size=None, population_size=None, seed=None, rng_seed=None)

Configuration for the covariance matrix adaptation evolution strategy (CMA-ES) based optimizer. The optimizer uses a multivariate normal distribution to generate new test points. From an initial_mean and initial_step_size, this distribution is continually updated using an evolutionary strategy, with each update depending on the previous values and the current set of results. New test points are sampled from the distribution until convergence is reached. By default this optimizer requires at least \(P = 4 + \lfloor 3 \times \log N \rfloor\) test points each step, where \(N\) is the number of optimizable parameters, \(\log\) is the natural logarithm and \(\lfloor x \rfloor\) is the floor function. For more detail on CMA-ES see CMA-ES on Wikipedia.

Variables:
  • bounds (List[qctrl.dynamic.types.closed_loop_optimization_step.BoxConstraint]) – The per-parameter bounds on the test points. The bounds are defined by imposing a box constraint on each individual parameter. That is, for each parameter \(x_j\), the optimizer is only allowed to search the next test point subject to the constraint such that \(x^{\rm lower}_j \leq x_j \leq x^{\rm upper}_j\). These constraints must be in the same order as parameters in CostFunctionResult.

  • initial_mean (List[float], optional) – The initial mean of the multivariate normal distribution. Defaults to None, in which case a random value inside the bounds is used for each parameter. If passed, it must have the same length as the number of parameters, and the value must be within the corresponding bounds for each parameter.

  • initial_step_size (float, optional) – The initial step size \(\sigma\) for the multivariate normal distribution from which new test points are sampled. Defaults to one.

  • population_size (int, optional) – The population size of the test candidates. For \(N\) optimizable parameters it is recommended to use a population size of at least \(P\). Defaults to \(P\).

  • seed (int, optional) – Seed for the random number generator. If set, must be non-negative. Use this option to generate deterministic results from the optimizer.

  • rng_seed (int, optional) – This parameter will be removed, please use seed instead.