Mixture Model-based Evolution Strategy (MMES)

class pypop7.optimizers.es.mmes.MMES(problem, options)[source]

Mixture Model-based Evolution Strategy (MMES).

Parameters:
  • problem (dict) –

    problem arguments with the following common settings (keys):
    • ’fitness_function’ - objective function to be minimized (func),

    • ’ndim_problem’ - number of dimensionality (int),

    • ’upper_boundary’ - upper boundary of search range (array_like),

    • ’lower_boundary’ - lower boundary of search range (array_like).

  • options (dict) –

    optimizer options with the following common settings (keys):
    • ’max_function_evaluations’ - maximum of function evaluations (int, default: np.Inf),

    • ’max_runtime’ - maximal runtime to be allowed (float, default: np.Inf),

    • ’seed_rng’ - seed for random number generation needed to be explicitly set (int);

    and with the following particular settings (keys):
    • ’sigma’ - initial global step-size, aka mutation strength (float),

    • ’mean’ - initial (starting) point, aka mean of Gaussian search distribution (array_like),

      • if not given, it will draw a random sample from the uniform distribution whose search range is bounded by problem[‘lower_boundary’] and problem[‘upper_boundary’].

    • ’m’ - number of candidate direction vectors (int, default: 2*int(np.ceil(np.sqrt(problem[‘ndim_problem’])))),

    • ’c_c’ - learning rate of evolution path update (float, default: 0.4/np.sqrt(problem[‘ndim_problem’])),

    • ’ms’ - mixing strength (int, default: 4),

    • ’c_s’ - learning rate of global step-size adaptation (float, default: 0.3),

    • ’a_z’ - target significance level (float, default: 0.05),

    • ’distance’ - minimal distance of updating evolution paths (int, default: int(np.ceil(1.0/options[‘c_c’]))),

    • ’n_individuals’ - number of offspring, aka offspring population size (int, default: 4 + int(3*np.log(problem[‘ndim_problem’]))),

    • ’n_parents’ - number of parents, aka parental population size (int, default: int(options[‘n_individuals’]/2)).

Examples

Use the optimizer to minimize the well-known test function Rosenbrock:

 1>>> import numpy  # engine for numerical computing
 2>>> from pypop7.benchmarks.base_functions import rosenbrock  # function to be minimized
 3>>> from pypop7.optimizers.es.mmes import MMES
 4>>> problem = {'fitness_function': rosenbrock,  # define problem arguments
 5...            'ndim_problem': 200,
 6...            'lower_boundary': -5*numpy.ones((200,)),
 7...            'upper_boundary': 5*numpy.ones((200,))}
 8>>> options = {'max_function_evaluations': 500000,  # set optimizer options
 9...            'seed_rng': 2022,
10...            'mean': 3*numpy.ones((200,)),
11...            'sigma': 0.1}  # the global step-size may need to be tuned for better performance
12>>> mmes = MMES(problem, options)  # initialize the optimizer class
13>>> results = mmes.optimize()  # run the optimization process
14>>> # return the number of function evaluations and best-so-far fitness
15>>> print(f"MMES: {results['n_function_evaluations']}, {results['best_so_far_y']}")
16MMES: 500000, 7.350414979801825

For its correctness checking of coding, refer to this code-based repeatability report for more details.

a_z

target significance level.

Type:

float

c_c

learning rate of evolution path update.

Type:

float

c_s

learning rate of global step-size adaptation.

Type:

float

distance

minimal distance of updating evolution paths.

Type:

int

m

number of candidate direction vectors.

Type:

int

mean

initial (starting) point, aka mean of Gaussian search distribution.

Type:

array_like

ms

mixing strength.

Type:

int

n_individuals

number of offspring, aka offspring population size.

Type:

int

n_parents

number of parents, aka parental population size.

Type:

int

sigma

final global step-size, aka mutation strength.

Type:

float

References

He, X., Zheng, Z. and Zhou, Y., 2021. MMES: Mixture model-based evolution strategy for large-scale optimization. IEEE Transactions on Evolutionary Computation, 25(2), pp.320-333. https://ieeexplore.ieee.org/abstract/document/9244595

See the official Matlab version from He: https://github.com/hxyokokok/MMES