Skip to main content

Package Containing Modular CMA-ES optimizer

Project description

Modular CMA-ES Banner


Unittest Codacy Badge Codacy Badge PyPI - Version PyPI - Downloads

The Modular CMA-ES is a Python and C++ package that provides a modular implementation of the Covariance Matrix Adaptation Evolution Strategy (CMA-ES) algorithm. This package allows you to create various algorithmic variants of CMA-ES by enabling or disabling different modules, offering flexibility and customization in evolutionary optimization. In addition to the CMA-ES, the library includes an implementation of the Matrix Adaptation Evolution Strategy (MA-ES) algorithm, which has similar emprical performance on most problems, but signifanctly lower runtime. All modules implemented are compatible with both the CMA-ES and MA-ES.

This implementation is based on the algorithm introduced in the paper "Evolving the Structure of Evolution Strategies. (2016)" by Sander van Rijn et. al. If you would like to cite this work in your research, please cite the paper: "Tuning as a Means of Assessing the Benefits of New Ideas in Interplay with Existing Algorithmic Modules (2021)" by Jacob de Nobel, Diederick Vermetten, Hao Wang, Carola Doerr and Thomas Bäck.

This README provides a high level overview of the implemented modules, and provides some usage examples for both the Python-only and the C++-based versions of the framework.

Table of Contents

Installation

You can install the Modular CMA-ES package using pip.

Python Installation

pip install modcma

Installation from source

If you want to work on a development version of the library, you should follow the following steps. A C++ compiler is required, and the following is valid for g++ (v11.1.0):

  1. Clone the repository:

    git clone git@github.com:IOHprofiler/ModularCMAES.git
    cd ModularCMAES
    
  2. Install dependencies (in a virtual environment)

    python3 -m venv env
    source ./env/bin/activate
    pip install -r requirements.txt   
    
  3. Compile the library, we can optionally install the package globally:

    python setup.py install
    

    or install in develop mode, which is recommended if one would like to actively develop the library:

    python setup.py develop 
    
  4. Ensure all functionality works as expected by running the unittests:

    python -m unittest discover   
    

Usage

Note:
The C++ backend is the primary and recommended interface for ModularCMAES.
The pure Python implementation remains available for reference and educational purposes,
but is no longer actively developed and may not include all new module options or performance improvements.

C++ Backend

For performance, completeness, and modularity, the C++ backend is the recommended interface for ModularCMAES. It exposes all available modules and options through a direct Python binding.

High Level interface

In addition to the fully specified method described below, we can run an optimization via a friendly fmin interface:

x0 = [0, 1, 2, 3] # Location to start the search from
sigma0 = 0.234    # Initial estimate of the stepsize, try 0.3 * (ub - lb) if you're unsure
budget = 100      # Total number of function evaluations
xopt, fopt, evals, cma = c_maes.fmin(
    func, x0, sigma0, budget,
    # We can specify modules and setting values as keyword arguments
    active=True,
    target=10.0,
    cc=0.8  
    matrix_adaptation='NONE'
)

Note that the func, x0, sigma0 and budget arguments are required. Modules and settings can be specified via keyword arguments by they corresponding names in the Modules and Settings objects. Module options, such as matrix_adaptation in the above example, can be specified by their name as str.

Low Level interface

To run an optimization, first create a Modules object specifying which modules and options to enable. Then construct a Settings object (which defines problem dimension and strategy parameters), and pass it through a Parameters object to the optimizer:

from modcma import c_maes

# Instantiate module configuration
modules = c_maes.parameters.Modules()
modules.active = True
modules.matrix_adaptation = c_maes.parameters.MatrixAdaptationType.MATRIX

# Create Settings and Parameters objects
settings = c_maes.parameters.Settings(dim=10, modules=modules, sigma0=2.5)
parameters = c_maes.Parameters(settings)

# Instantiate the optimizer
cma = c_maes.ModularCMAES(parameters)

# Define objective function
def func(x):
    return sum(x**2)

# Run the optimization
cma.run(func)

The API provides fine-grained control over the optimization process. Instead of calling run, you can explicitly step through the algorithm:

while not cma.break_conditions():
    cma.step(func)

Or execute the internal components of each iteration separately:

while not cma.break_conditions():
    cma.mutate(func)
    cma.select()
    cma.recombine()
    cma.adapt()

This modularity allows experimentation with specific parts of the evolution strategy, such as custom selection, recombination, or adaptation routines.


Tuning

To facilitate automated hyperparameter tuning, ModularCMAES now provides functionality to create and manipulate configuration spaces directly compatible with popular optimization and AutoML tools, such as SMAC, BOHB. This functionality allows users to systematically explore both algorithmic module combinations and numerical hyperparameters (e.g., population size, learning rates, damping coefficients).

Configuration Space Generation

The configuration space is automatically derived from the available modules and tunable parameters via the function:

from modcma.cmaescpp import get_configspace

Usage:

from modcma.cmaescpp import get_configspace

# Create a configuration space for a 10-dimensional problem
cs = get_configspace(dim=10)

This function returns a ConfigSpace.ConfigurationSpace object containing:

  • Categorical parameters for all available modules (e.g., mirrored sampling, restart strategy, bound correction).
  • Numeric parameters for key internal strategy settings such as lambda0, mu0, sigma0, cs, cc, cmu, c1, and damps.
  • A built-in constraint ensuring mu0 ≤ lambda0.
  • Optionally, the configuration space can include only module-level options by setting add_popsize=False, add_sigma=False, add_learning_rates=False.

Example:

# Get only the module configuration space (no numeric parameters)
cs_modules = get_configspace(add_popsize=False, add_sigma=False, add_learning_rates=False)

Creating Settings from a Configuration

Once a configuration has been selected—either manually or from a tuner—the library provides a simple interface to construct a corresponding Settings object:

from modcma.cmaescpp import settings_from_config
from ConfigSpace import Configuration

# Sample or load a configuration
config = cs.sample_configuration()

# Or for defaults
default = cs.default_configuration()

# The config can be edited
config['sampler'] = 'HALTON'

# Convert the configuration to a Settings object
# Note that keyword arguments like lb in the next example, can be passed to settings like so
settings = settings_from_config(dim=10, config=config, lb=np.ones(10))

The resulting Settings object can then be passed directly to the C++ backend:

from modcma import c_maes

parameters = c_maes.Parameters(settings)
cma = c_maes.ModularCMAES(parameters)
cma.run(func)

Integer Variables

A rudimentary mechanism for dealing with integer variables is implemented, which applies a lower bound on sigma for integer coordinates and rounds them to the nearest integer before evaluation, inspired by http://www.cmap.polytechnique.fr/~nikolaus.hansen/marty2024lb+ic-cma.pdf.

An option can be provided to the Settings object or settings_from_dict/settings_from_config functions:

dim = 5
settings = Settings(
    dim,
    integer_variables=[1, 2] # A list or numpy array of integer indices
)

settings = settings_from_dict(
    dim, 
    integer_variables=list(range(dim)) # All variables are integer
)

Python-only (Legacy)

Legacy notice:
The Python-only implementation is no longer actively developed and does not include all features of the C++ version.
It remains available for experimentation and teaching purposes. A complete API documentation can be found here (under construction).

The Python interface provides a simple API and includes a convenience fmin function for optimizing a single objective function in one call:

from modcma import fmin
xopt, fopt, used_budget = fmin(func=sum, x0=[1, 2, 3, 4], budget=1000, active=True, sigma0=2.5)

The main class is ModularCMAES, which mimics the structure of the C++ version but runs entirely in Python:

from modcma import ModularCMAES
import numpy as np

def func(x: np.ndarray):
    return sum(x)

dim = 10
budget = 10_000

# Instantiate and run
cma = ModularCMAES(func, dim, budget=budget)
cma = cma.run()

You can also run the algorithm step by step:

while not cma.break_conditions():
    cma.step()

Or explicitly call each internal phase — analogous to the C++ interface:

while not cma.break_conditions():
    cma.mutate()
    cma.select()
    cma.recombine()
    cma.adapt()

Ask–Tell Interface

The Ask–Tell interface is only available in the Python implementation. It provides an alternative interaction model where function evaluations are managed externally. This is particularly useful for parallel, asynchronous, or expensive objective evaluations,
where you want to control when and how points are evaluated.

The optimizer generates candidate solutions via ask(), and their objective values are later supplied with tell().

from modcma import AskTellCMAES

def func(x):
    return sum(x**2)

# Instantiate an ask-tell CMA-ES optimizer
# Note: the objective function is not passed at construction
cma = AskTellCMAES(dim=10, budget=10_000, active=True)

while not cma.break_conditions():
    # Get a candidate solution
    xi = cma.ask()
    # Evaluate externally
    fi = func(xi)
    # Report the result back
    cma.tell(xi, fi)

This design provides flexibility when the evaluation process is nontrivial,
such as when objectives are computed through simulations, APIs, or distributed systems.
However, note that this interface is not available in the C++ backend.

Modules

The CMA-ES Modular package provides various modules, grouped into 13 categories. For each of these categories a given option can be selected, which can be arbitrarly combined. The following table lists the categories and the available options. Not all modules are available in both versions (i.e. some are only implemented in C++), an overview is given in the table. By default, the first option in the table is selected for a given category. Boolean modules, i.e. modules that only can be turned on or off are turned off by default.

| Category | Option | Python | C++ | |---|---|---|---| | [Matrix Adaptation](#matrix-adaptation) | COVARIANCE | :green_circle: | :green_circle: | | | MATRIX | :red_circle: | :green_circle: | | | SEPARABLE | :red_circle: | :green_circle: | | | NONE | :red_circle: | :green_circle: | | | CHOLESKY | :red_circle: | :green_circle: | | | CMSA | :red_circle: | :green_circle: | | | NATURAL_GRADIENT | :red_circle: | :green_circle: | | [Active Update](#active-update) | Off/On | :green_circle: | :green_circle: | | [Elitism](#elitism) | Off/On | :green_circle: | :green_circle: | | [Orthogonal Sampling](#orthogonal-sampling) | Off/On | :green_circle: | :green_circle: | | [Sequential Selection](#sequential-selection) | Off/On | :green_circle: | :green_circle: | | [Threshold Convergence](#threshold-convergence) | Off/On | :green_circle: | :green_circle: | | [Sample Sigma](#sample-sigma) | Off/On | :green_circle: | :green_circle: | | [Base Sampler](#base-sampler) | GAUSSIAN | :green_circle: | :red_circle: *(use Sample Transformer = GAUSSIAN)* | | | SOBOL | :green_circle: | :green_circle: | | | HALTON | :green_circle: | :green_circle: | | | UNIFORM | :red_circle: | :green_circle: | | [Sample Transformer](#sample-transformer) | GAUSSIAN | :red_circle: | :green_circle: | | | SCALED_UNIFORM | :red_circle: | :green_circle: | | | LAPLACE | :red_circle: | :green_circle: | | | LOGISTIC | :red_circle: | :green_circle: | | | CAUCHY | :red_circle: | :green_circle: | | | DOUBLE_WEIBULL | :red_circle: | :green_circle: | | [Recombination Weights](#recombination-weights) | DEFAULT | :green_circle: | :green_circle: | | | EQUAL | :green_circle: | :green_circle: | | | 1/2^λ | :green_circle: | :red_circle: *(use EXPONENTIAL instead)* | | | EXPONENTIAL | :red_circle: | :green_circle: | | [Mirrored Sampling](#mirrored-sampling) | NONE | :green_circle: | :green_circle: | | | MIRRORED | :green_circle: | :green_circle: | | | PAIRWISE | :green_circle: | :green_circle: | | [Step size adaptation](#step-size-adaptation) | CSA | :green_circle: | :green_circle: | | | TPA | :green_circle: | :green_circle: | | | MSR | :green_circle: | :green_circle: | | | XNES | :green_circle: | :green_circle: | | | MXNES | :green_circle: | :green_circle: | | | LPXNES | :green_circle: | :green_circle: | | | PSR | :green_circle: | :green_circle: | | | SR | :red_circle: | :green_circle: | | | SA | :red_circle: | :green_circle: | | [Restart Strategy](#restart-strategy) | NONE | :green_circle: | :green_circle: | | | RESTART | :green_circle: | :green_circle: | | | IPOP | :green_circle: | :green_circle: | | | BIPOP | :green_circle: | :green_circle: | | | STOP | :red_circle: | :green_circle: | | [Bound correction](#bound-correction) | NONE | :green_circle: | :green_circle: | | | SATURATE | :green_circle: | :green_circle: | | | MIRROR | :green_circle: | :green_circle: | | | COTN | :green_circle: | :green_circle: | | | TOROIDAL | :green_circle: | :green_circle: | | | UNIFORM_RESAMPLE | :green_circle: | :green_circle: | | | RESAMPLE | :red_circle: | :green_circle: | | [Repelling Restart](#repelling-restart) | Off/On | :red_circle: | :green_circle: | | [Center Placement](#center-placement) | X0 | :red_circle: | :green_circle: | | | ZERO | :red_circle: | :green_circle: | | | UNIFORM | :red_circle: | :green_circle: | | | CENTER | :red_circle: | :green_circle: |

Notes

  • In C++, BaseSampler generates uniform points in [0,1)^d; the actual search-space distribution is controlled by SampleTranformerType (e.g., GAUSSIAN, CAUCHY).
  • Python’s “1/2^λ” recombination weights correspond to C++’s EXPONENTIAL.
  • New C++-only modules: repelling_restart (bool), center_placement (enum), and extended ssa, bound_correction, and sampling options.

Matrix Adaptation

The ModularCMAES can be turned into an implementation of the (fast)-MA-ES algortihm by changing the matrix_adaptation option from COVARIANCE to MATRIX in the Modules object. This is currently only available in the C++ version of the framework. An example of specifying this, using the required MatrixAdaptationType enum:

...
modules.matrix_adaptation = c_maes.options.MatrixAdaptationType.COVARIANCE
# or for MA-ES
modules.matrix_adaptation = c_maes.options.MatrixAdaptationType.MATRIX
# We can also only perform step-size-adaptation
modules.matrix_adaptation = c_maes.options.MatrixAdaptationType.NONE
# Or use the seperable CMA-ES
modules.matrix_adaptation = c_maes.options.MatrixAdaptationType.SEPARABLE
# Other variants:
modules.matrix_adaptation = c_maes.options.MatrixAdaptationType.CHOLESKY
modules.matrix_adaptation = c_maes.options.MatrixAdaptationType.CMSA
modules.matrix_adaptation = c_maes.options.MatrixAdaptationType.COVARIANCE_NO_EIGV
modules.matrix_adaptation = c_maes.options.MatrixAdaptationType.NATURAL_GRADIENT

Active Update

In the standard update of the covariance matrix C in the CMA-ES algorithm, only the most successful mutations are considered. However, the Active Update, introduced by Jastrebski et al., offers an alternative approach. This module adapts the covariance matrix by incorporating the least successful individuals with negative weights in the update process.

For the Python only version, this can be enabled by passing the option active=True:

cma = ModularCMAES(func, dim, active=True)

For the C++ version, this can be done by setting the appropriate value in the Modules object:

...
modules.active = True

Elitism

When this option is selected, (𝜇 + 𝜆)-selection instead of (𝜇, 𝜆)-selection is enabled. This can be usefull to speed up convergence on unimodal problems, but can have a negative impact on population diversity.

For the C++ version, this can be done by setting the appropriate value in the Modules object:

...
modules.elitist = True

For the Python only version, this can be enabled by passing the option elitist=True:

cma = ModularCMAES(func, dim, elitist=True)

Orthogonal Sampling

Orthogonal Sampling was introduced by Wang et al. as an extension of Mirrored Sampling. This method improves sampling by ensuring that the newly sampled points in the population are orthonormalized using a Gram-Schmidt procedure.

For the Python only version, this can be enabled by passing the option orthogonal=True:

cma = ModularCMAES(func, dim, orthogonal=True)

And for C++:

...
modules.orthogonal = True

Sequential Selection

Sequential Selection option offers an alternative approach to selection, originally proposed by Brockhoff et al., which optimizes the use of objective function evaluations by immediately ranking and comparing candidate solutions with the current best solution. Then, whenever more than $\mu$ individuals have been sampled that improve on the current best found solution, no more additional function evaluations are performed.

For the Python only version, this can be enabled by passing the option sequential=True:

cma = ModularCMAES(func, dim, sequential=True)

And for C++:

...
modules.sequential_selection = True

Threshold Convergence

In evolutionary strategies (ES), balancing exploration and exploitation is a critical challenge. The Threshold Convergence option, proposed by Piad et al. [25], provides a method to address this issue. It aims to prolong the exploration phase of evolution by requiring mutation vectors to reach a specific length threshold. This threshold gradually decreases over successive generations to transition into local search.

For the Python only version, this can be enabled by passing the option threshold_convergence=True:

cma = ModularCMAES(func, dim, threshold_convergence=True)

And for C++:

...
modules.threshold_convergence = True

Sample Sigma

A method based on self-adaptation by co-evolution as seen in classical evolution strategies, where for each candidate solution the step size is sampled seperately from a lognormal distribution based on the global step size $\sigma$.

For the Python only version, this can be enabled by passing the option sample_sigma=True:

cma = ModularCMAES(func, dim, sample_sigma=True)

And for C++:

...
modules.sample_sigma = True

Quasi-Gaussian Sampling

Instead of performing the simple random sampling from the multivariate Gaussian, new solutions can alternatively be drawn from quasi-random sequences (a.k.a. low-discrepancy sequences). We implemented two options for this module, the Halton and Sobol sequences.

This can be selected by setting the base_sampler="sobol" or base_sampler="halton" in the Python only version:

cma = ModularCMAES(func, dim, base_sampler="gaussian")
# or 
cma = ModularCMAES(func, dim, base_sampler="sobol")
# or 
cma = ModularCMAES(func, dim, base_sampler="halton")

For C++, the BaseSampler enum should be provided to the sampler member of the Modules object:

...
modules.sampler = c_maes.options.BaseSampler.UNIFORM
# or
modules.sampler = c_maes.options.BaseSampler.SOBOL
# or
modules.sampler = c_maes.options.BaseSampler.HALTON

Here, this works slightly different. The base sampler only defined the method for generating uniform sampling in a $[0,1)^d$ hyperbox. In order to define that a, for example, Gaussian distribution (this is default) should be used when running the algorithm, we need to specify the sample_transformation type:

modules.sample_transformation = c_maes.options.SampleTranformerType.GAUSSIAN
# or 
modules.sample_transformation = c_maes.options.SampleTranformerType.SCALED_UNIFORM
# or 
modules.sample_transformation = c_maes.options.SampleTranformerType.LAPLACE
# or 
modules.sample_transformation = c_maes.options.SampleTranformerType.LOGISTIC
# or 
modules.sample_transformation = c_maes.options.SampleTranformerType.CAUCHY
# or 
modules.sample_transformation = c_maes.options.SampleTranformerType.DOUBLE_WEIBULL

Recombination Weights

We implemented three different variants of the recombination weights used in the update of the strategy parameters, default, equal and $1/2\lambda$.

This can be selected by setting the weights_option="sobol" or weights_option="halton" in the Python only version:

cma = ModularCMAES(func, dim, weights_option="default")
# or 
cma = ModularCMAES(func, dim, weights_option="equal")
# or 
cma = ModularCMAES(func, dim, weights_option="1/2^lambda")

For C++, the RecombinationWeights enum should be provided to the weights member of the Modules object:

...
modules.weights = c_maes.options.RecombinationWeights.DEFAULT
# or
modules.weights = c_maes.options.RecombinationWeights.EQUAL
# or
modules.weights = c_maes.options.RecombinationWeights.EXPONENTIAL

Mirrored Sampling

Mirrored Sampling, introduced by Brockhoff et al., aims to create a more evenly spaced sample of the search space. In this technique, half of the mutation vectors are drawn from the normal distribution, while the other half are the mirror image of the preceding random vectors. When using Pairwise Selection in combination with Mirrored Sampling, only the best point from each mirrored pair is selected for recombination. This approach ensures that the mirrored points do not cancel each other out during recombination. This module has three options, off, on and on + pairwise.

For Python, we can add the option mirrored="mirrored" or mirrored="mirrored pairwise".

cma = ModularCMAES(func, dim, mirrored=None)
# or
cma = ModularCMAES(func, dim, mirrored="mirrored")
# or 
cma = ModularCMAES(func, dim, mirrored="pairwise")

For C++ this can be configured using the c_maes.options.Mirror enum:

...
modules.mirrored = c_maes.options.Mirror.NONE
# or 
modules.mirrored = c_maes.options.Mirror.MIRRORED
# or 
modules.mirrored = c_maes.options.Mirror.PAIRWISE

Step size adaptation

Several methods for performing step size adaptation have been implemented in the framework. For more details on the implemented methods, we refer the interested reader to our 2021 paper.

The availble options for step_size_adaptation for the Python only interface are: {"csa", "tpa", "msr", "xnes", "m-xnes", "lp-xnes", "psr"}, for which one can be selected and pased to the algortihms als active option, for example:

cma = ModularCMAES(func, dim, step_size_adaptation="csa")
# or
cma = ModularCMAES(func, dim, step_size_adaptation="msr")

The same options are available for the C++ version, but should be passed via the StepSizeAdaptation enum, which has the following values available: {CSA, TPA, MSR, XNES, MXNEs, LPXNES, PSR} and can be configured via the ssa option:

...
modules.ssa = c_maes.options.StepSizeAdaptation.CSA
# or 
modules.ssa = c_maes.options.StepSizeAdaptation.MSR

Restart Strategy

Restarting an optimization algorithm, like CMA-ES, can be an effective way to overcome stagnation in the optimization process. The Modular CMA-ES package offers three restart strategies to help in such scenarios. The first restart option just restarts the algorithm. When IPOP is enabled, the algorithm employs a restart strategy that increases the size of the population after every restart. BIPOP on the other hand, not only changes the size of the population after a restart but alternates between larger and smaller population sizes.

For the Python only interface, this option can be configured with 4 values {None, "restart", "IPOP", "BIPOP"}:

cma = ModularCMAES(func, dim, local_restart=None)
# or
cma = ModularCMAES(func, dim, local_restart="IPOP")

For the C++ version these should be passed via the RestartStrategy enum, which has the following values available: {NONE, RESTART, IPOP, BIPOP, STOP} and can be configured via the restart_strategy option:

...
modules.restart_strategy = c_maes.options.RestartStrategy.NONE
# or 
modules.restart_strategy = c_maes.options.RestartStrategy.IPOP

Note that the C++ version has an addtional option here, STOP, which forces the algortihm to stop whenever a restart condition is met (not to be confused with a break condition). The C++ version also offers fine control over when a restart happens. The Parameters object has an criteria member, of which the items member defines a list of Criterion objects, which are triggers for when a restart should happen. This list can be freely changed, and default items can be deleted and modified if desired. For example, cma.p.criteria.items = [], clears this list entirely, and no restarts will happen. Several of the currently defined Criterion object can also be modified, often this can be controlled by setting the tolerance parameter. For example, for the MinSigma criterion, you can set c_maes.restart.MinSigma.tolerance = 1 to ensure a parameter value of sigma below 1 triggers a restart. Note that this is a static varaible, so modifying it in this fashion sets this for all instances of c_maes.restart.MinSigma. Alternatively, it is possible to define a custom Criterion like so:

class MyCriterion(modcma.restart.Criterion):
    def __init__(self):
        super().__init__("MyCriterionName")
    
    def on_reset(self, par: modcma.Parameters):
        """Called when a restart happens (also at the start)"""
    
    def update(self, par: modcma.Parameters):
        """Called after each iteration, needs to modify self.met"""
        self.met = True

# Python needs a reference to this object, 
# so you CANNOT create it in place, i.e. 
# cma.p.criteria.items = [MyCriterion()] 
# will produce an error
c = MyCriterion() 
cma.p.criteria.items = [c]

Bound correction

Several methods for performing bound correction have been implemented in the framework. For more details on the implemented methods, we refer the interested reader to our 2021 paper.

The availble options for bound_correction for the Python only interface are: {None, "saturate", "unif_resample", "COTN", "toroidal", "mirror"}, for which one can be selected and pased to the algortihms als active option, for example:

cma = ModularCMAES(func, dim, bound_correction=None)
# or
cma = ModularCMAES(func, dim, bound_correction="saturate")

The same options are available for the C++ version, but should be passed via the CorrectionMethod enum, which has the following values available {NONE, SATURATE, UNIFORM_RESAMPLE, COTN, TOROIDAL MIRROR} and can be configure via the bound_correction option:

...
modules.bound_correction = c_maes.options.CorrectionMethod.NONE
# or 
modules.bound_correction = c_maes.options.CorrectionMethod.SATURATE

Sample Transformer

Controls the transformation from a base uniform sampler in [0,1)^d to a target search-space distribution (e.g., GAUSSIAN, CAUCHY, LAPLACE, …) in the C++ backend. See the paper. By default, this performs a transform to a standard Gaussian.

Repelling Restart

C++-only boolean module to bias restarts away from previously explored regions (helpful in multimodal settings). See the paper

Center Placement

C++-only enum controlling the initial center of mass of the sampling distribution (X0, ZERO, UNIFORM, CENTER) on restart, iniatiated by a restart_strategy. The options are:

  • X0 sets the intial center to x0 on every restart
  • ZERO set the intial center to the all-zero vector
  • UNIFORM picks a uniform random location inside the search space
  • CENTER sets the center to the precise center of the search space.

Citation

The following BibTex entry can be used for the citation.

@inproceedings{denobel2021,
   author = {de Nobel, Jacob and Vermetten, Diederick and Wang, Hao and Doerr, Carola and B\"{a}ck, Thomas},
   title = {Tuning as a Means of Assessing the Benefits of New Ideas in Interplay with Existing Algorithmic Modules},
   year = {2021},
   isbn = {9781450383516},
   publisher = {Association for Computing Machinery},
   address = {New York, NY, USA},
   url = {https://doi.org/10.1145/3449726.3463167},
   doi = {10.1145/3449726.3463167},
   booktitle = {Proceedings of the Genetic and Evolutionary Computation Conference Companion},
   pages = {1375–1384},
   numpages = {10},
   location = {Lille, France},
   series = {GECCO '21}
}

License

This project is licensed under the MIT License - see the LICENSE file for details.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

modcma-1.2.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

modcma-1.2.0-cp312-cp312-win_amd64.whl (668.8 kB view details)

Uploaded CPython 3.12Windows x86-64

modcma-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

modcma-1.2.0-cp312-cp312-macosx_11_0_arm64.whl (898.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

modcma-1.2.0-cp311-cp311-win_amd64.whl (666.9 kB view details)

Uploaded CPython 3.11Windows x86-64

modcma-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

modcma-1.2.0-cp311-cp311-macosx_11_0_arm64.whl (885.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

modcma-1.2.0-cp310-cp310-win_amd64.whl (666.5 kB view details)

Uploaded CPython 3.10Windows x86-64

modcma-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

modcma-1.2.0-cp310-cp310-macosx_11_0_arm64.whl (883.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

modcma-1.2.0-cp39-cp39-win_amd64.whl (711.0 kB view details)

Uploaded CPython 3.9Windows x86-64

modcma-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

modcma-1.2.0-cp39-cp39-macosx_11_0_arm64.whl (883.8 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

modcma-1.2.0-cp38-cp38-win_amd64.whl (666.2 kB view details)

Uploaded CPython 3.8Windows x86-64

modcma-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

modcma-1.2.0-cp38-cp38-macosx_11_0_arm64.whl (883.0 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

File details

Details for the file modcma-1.2.0.tar.gz.

File metadata

  • Download URL: modcma-1.2.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for modcma-1.2.0.tar.gz
Algorithm Hash digest
SHA256 c2321dca624e11908ee2374ff418f1da0c0df84885734e955e4f49bae3e940f3
MD5 5f4f41b89d2f3edb95a7b1e7c4847b4e
BLAKE2b-256 bbae766d3c4ea570be7c9e1a48f4b8708fc388d05b28f1fd50efcec26d8738cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0.tar.gz:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modcma-1.2.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: modcma-1.2.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 668.8 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for modcma-1.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 547d1d12f7437f15c94771e35694a1819b0483f9f16620226222ade85c36643f
MD5 9b9f929a40ac20e0a8dd14bfca7c356a
BLAKE2b-256 838b385faed213f15c25690063bfbed06fc4e328a7d0628c18f0b0a528b3d629

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0-cp312-cp312-win_amd64.whl:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modcma-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for modcma-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 28205407e909b7e0c070020406b6957238737fb03bb08beabe3aad663d3f1e2a
MD5 77ab3fb1283d12246355d8a4177c7e80
BLAKE2b-256 c6fdb18afbe0ba3add5cfe6b1b163f6c5636986aab2a7829c8bad058503308fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modcma-1.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for modcma-1.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e7f85932318ef4f183eb6ddfd759c3d5dd9f688931356ec8e791b04e6a22996a
MD5 8c495b003bd43fba5ffc1c5099200bcd
BLAKE2b-256 5598686c545b3ddda6bc555466311fd8531ac2fb9fb3262f5ec4aa55950c1493

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modcma-1.2.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: modcma-1.2.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 666.9 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for modcma-1.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3aa6ec72f7b75097de56258ebd592f7bbb6875d383337b4733a0e104ef24c245
MD5 6a80edc86f549cf4c6a9229fb29ab982
BLAKE2b-256 e0457d4cbbf76dbb478695a374b2b0cc12267c70d12999f3011893db1306f0b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0-cp311-cp311-win_amd64.whl:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modcma-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for modcma-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 056ba70539b13e09462b61302741c1cd8ac1d9ad40790425faf6bab28b275e07
MD5 5e3a24eb31d34f5ac4e9f0b368f022c7
BLAKE2b-256 8bc9a6ec6784643d507fdb8970035118a2c3227b3047fc0a6d2ec3f4e4ae0fc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modcma-1.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for modcma-1.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3bf855e29bca2c63b1b116775019f39326e1c515688913a722e10c9c80b6641d
MD5 82ab9c1b908dfb4bd41026f398972233
BLAKE2b-256 112aebd0945c94b4f32dba467418fcf236dc1666a8c9fe177abfd472d94b9fb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modcma-1.2.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: modcma-1.2.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 666.5 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for modcma-1.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5b9660e48d6d9f791f0bd720eef63d9589681217c93155e7e421e18c0e05a8bd
MD5 cbd04f97e62a5512ae9dce7a7d63f13c
BLAKE2b-256 99eeb1986420e5c3f4607b0a9338b181bce3a8d5c902d36b7658ed3b713cc4c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0-cp310-cp310-win_amd64.whl:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modcma-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for modcma-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0ffec91d1fab76a693ff3fb5da38f6f3458fa59fa4ce87815acffd5269db62a9
MD5 c7d62c302ff2d92a81a46fb526edaf14
BLAKE2b-256 18286665a9a4c991efeb6e1754b45b598cbdd0963d533b658e7ed9506eea5223

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modcma-1.2.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for modcma-1.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 95edc69fc4d41bf94cc4956253c8f119d398007ed4f5e743ef6d4c7e20346597
MD5 b850e3277df9c35f4a9b0cc6153c3506
BLAKE2b-256 fd6aadaf06ce34108f99e61afd85a2bb7ad57c8556b13e5d33d05c58667d188c

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modcma-1.2.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: modcma-1.2.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 711.0 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for modcma-1.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c8f5ff0a7d4cfacb72c89d283687b068da658251ec83927a82f7273565295aa6
MD5 e479cec6f8d2b42cb78b560c4d3e8b4b
BLAKE2b-256 5907ea8066c5f7a5527cd5a0446a4a53b3d117b022c44b4f93653631c92c8a15

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0-cp39-cp39-win_amd64.whl:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modcma-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for modcma-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2c480521ae16dbcd934715f09fa54e7ea2567efd1c5c3b3128bc81efa577c8d8
MD5 41de338d8125fbf976c4ee8f312f03e3
BLAKE2b-256 d72c4e0f97b48ba6c74668500eff70d2efce83fcdd3741c9b7ebed2784bf881b

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modcma-1.2.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for modcma-1.2.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4e95ac0ab429cd54c67641bb167753765816c0f6b4d034c5f6720fa23ff80109
MD5 87cd2b628dde26d99569e964762fac0e
BLAKE2b-256 85490ff2b6d22a911bb7480383e2bcf09b783fe4417cffb969567914b08ff2a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modcma-1.2.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: modcma-1.2.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 666.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for modcma-1.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 8b3a4a5c9e0ce6fca32cc0c0f7cf5675ac8d4288c53a759672e9dd881b3fa261
MD5 423b51f66841ebaa0d89e713af9a07ea
BLAKE2b-256 2068146d7891aca13cc663727495aab9a0bce039fbeb9acf6903003d9b14fc10

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0-cp38-cp38-win_amd64.whl:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modcma-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for modcma-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 22adcfdbbc1d2ae884342d22761716052cece06e9540f4816f639cbae6739aea
MD5 cfd0fe051d37e23d2023858eef74a3af
BLAKE2b-256 3d1ef333013920880dcf9e9cfbf66c5e688367eae19cd390d2325234875fd362

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modcma-1.2.0-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for modcma-1.2.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cd918505c6fb371a3369517017b9b669f66c0396829cb650739d3d15c24518af
MD5 cec5d43d258806b30a7861ea4d0732c4
BLAKE2b-256 51d6fdf2bcf18c9c359b2a8fa82d6769ea59ca52d068e536f5bd4ccb4a2ccde7

See more details on using hashes here.

Provenance

The following attestation bundles were made for modcma-1.2.0-cp38-cp38-macosx_11_0_arm64.whl:

Publisher: python-publish.yml on IOHprofiler/ModularCMAES

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page