CoOperative CO-evolutionary Covariance Matrix Adaptation (COCMA)
- class pypop7.optimizers.cc.cocma.COCMA(problem, options)[source]
CoOperative CO-evolutionary Covariance Matrix Adaptation (COCMA).
Note
For COCMA, CMA-ES is used as the suboptimizer, since it could learn the variable dependencies in each subspace to accelerate local convergence. Here, the simplest cyclic decomposition is employed to tackle non-separable objective functions, argurably the common feature of most real-world applications.
- 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 setting (key):
’n_individuals’ - number of individuals/samples, aka population size (int, default: 100).
’sigma’ - initial global step-size (float, default: problem[‘upper_boundary’] - problem[‘lower_boundary’]/3.0),
’ndim_subproblem’ - dimensionality of subproblem for decomposition (int, default: 30).
Examples
Use the black-box optimizer COCMA to minimize the well-known test function Rosenbrock:
1>>> import numpy 2>>> from pypop7.benchmarks.base_functions import rosenbrock # function to be minimized 3>>> from pypop7.optimizers.cc.cocma import COCMA 4>>> problem = {'fitness_function': rosenbrock, # to define problem arguments 5... 'ndim_problem': 2, 6... 'lower_boundary': -5.0*numpy.ones((2,)), 7... 'upper_boundary': 5.0*numpy.ones((2,))} 8>>> options = {'max_function_evaluations': 5000, # to set optimizer options 9... 'seed_rng': 2022} 10>>> cocma = COCMA(problem, options) # to initialize the optimizer class 11>>> results = cocma.optimize() # to run the optimization/evolution process 12>>> print(f"COCMA: {results['n_function_evaluations']}, {results['best_so_far_y']}") 13COCMA: 5000, 0.0004
For its correctness checking of coding, we cannot provide the code-based repeatability report, since this implementation combines different papers. To our knowledge, few well-designed Python code of CC is openly available for non-separable black-box optimization.
- n_individuals
number of individuals/samples, aka population size.
- Type:
int
- sigma
initial global step-size.
- Type:
float
- ndim_subproblem
dimensionality of subproblem for decomposition.
- Type:
int
References
Mei, Y., Omidvar, M.N., Li, X. and Yao, X., 2016. A competitive divide-and-conquer algorithm for unconstrained large-scale black-box optimization. ACM Transactions on Mathematical Software, 42(2), pp.1-24. https://dl.acm.org/doi/10.1145/2791291
Potter, M.A. and De Jong, K.A., 1994, October. A cooperative coevolutionary approach to function optimization. In International Conference on Parallel Problem Solving from Nature (pp. 249-257). Springer, Berlin, Heidelberg. https://link.springer.com/chapter/10.1007/3-540-58484-6_269