The CMA-ES Benchmark

Task: control the step size and algorithm components of CMA-ES on BBOB functions
Cost: negative objective value
Number of hyperparameters to control: one float, 10 discrete values with 2-5 options each
State Information: current point, the last 40 objective values, population size, current step size, the deltas between the last 80 objective values, the deltas between the last 40 step sizes
Noise Level: fairly large, depends on target function
Instance space: the BBOB functions with ids, starting point and starting sigma as well as population size

This benchmark uses the ModCMA implementation to control the step size and algorithm components of the CMA-ES algorithm. The goal in the optimization is to find the global function minimum before the cutoff, so the cost is defined as the current negativ objective value.

The BBOB functions provide a varied instance space that is well suited for testing generalization capabilites of DAC methods. Due to this large instance space and very different scales of objective values (and thus cost), the CMA-ES benchmark is one of the more difficult to solve ones in DACBench.

The CMA-ES benchmark was constructed by Shala et al. for the paper `”Learning Step-size Adaptation in CMA-ES” <https://ml.informatik.uni-freiburg.de/wp-content/uploads/papers/20-PPSN-LTO-CMA.pdf>`_ at PPSN 2020 and extended afterwards to include the ModCMA implementation.

CMA ES Benchmark.

class dacbench.benchmarks.cma_benchmark.CMAESBenchmark(config_path: str | None = None, config=None)[source]

Bases: AbstractBenchmark

Benchmark for controlling the step size of CMA-ES on BBOB functions.

get_environment()[source]

Return SGDEnv env with current configuration.

Returns:

SGDEnv

SGD environment

read_instance_set(test=False)[source]

Read path of instances from config into list.

CMA ES Environment.

class dacbench.envs.cma_es.CMAESEnv(config)[source]

Bases: AbstractMADACEnv

The CMA ES environment controlles the step size on BBOB functions.

close()[source]

Closes the environment.

get_default_reward(*_)[source]

The default reward function.

Parameters:

_ (_type_) – Empty parameter, which can be used when overriding

Returns:

The calculated reward

Return type:

float

get_default_state(*_)[source]

Default state function.

Parameters:

_ (_type_) – Empty parameter, which can be used when overriding

Returns:

The current state

Return type:

dict

get_normalized_reward(*_)[source]

Normalize each reward within domain bounds.

Parameters:

_ (_type_) – Empty parameter, which can be used when overriding

Returns:

The calculated reward

Return type:

float

render(mode='human')[source]

Render progress.

reset(seed=None, options=None)[source]

Reset the environment.

step(action)[source]

Make one step of the environment.

class dacbench.envs.cma_es.CMAESInstance(target_function: AbstractFunction, dim: int, fid: int, iid: int, active: bool, elitist: bool, orthogonal: bool, sequential: bool, threshold_convergence: bool, step_size_adaptation: str, mirrored: str, base_sampler: str, weights_option: str, local_restart: str, bound_correction: str)[source]

Bases: object

CMA-ES Instance.