src.environment.problem.SOO.COCO_BBOB.bbob_numpy¶
Module Contents¶
Classes¶
Introduction¶BBOB-Surrogate investigates the integration of surrogate modeling techniques into MetaBBO , enabling data-driven approximation of expensive objective functions while maintaining optimization fidelity. |
|
Introduction¶Represents a noisy optimization problem, providing methods to evaluate the true and noisy objective values, as well as handle boundary constraints. |
|
Introduction¶Represents a Gaussian noisy optimization problem, where noise is multiplicatively applied to the unbiased function value using a Gaussian distribution. This class is intended to be subclassed, with the attribute |
|
Introduction¶Represents a noisy optimization problem where uniform noise is applied to the true function value.
The noise is controlled by the |
|
Introduction¶Represents a noisy optimization problem where Cauchy-distributed noise is added to the true function value. This class is typically used in benchmarking optimization algorithms under noisy conditions. |
|
Introduction¶Represents the abstract Sphere function for benchmarking optimization algorithms. |
|
Introduction¶Represents the Sphere function (F1) for single-objective optimization problems, inheriting from the |
|
Introduction¶Represents the BBOB Sphere function with moderate Gaussian noise, used as a single-objective optimization problem in benchmarking. |
|
Introduction¶Represents the Sphere function with moderate uniform noise, as defined in the COCO BBOB test suite. Inherits from |
|
Introduction¶Represents the BBOB Sphere function with moderate Cauchy noise, used for single-objective optimization benchmarking. |
|
Introduction¶Represents the noisy Sphere function (BBOB function F107) with Gaussian noise, used for benchmarking optimization algorithms. |
|
Introduction¶Represents the BBOB Sphere function (F108) with uniform noise, used as a single-objective optimization problem in benchmarking. |
|
Introduction¶Represents the Sphere function with additive Cauchy noise, as defined in the BBOB COCO benchmark suite. Inherits from |
|
Introduction¶Represents the Ellipsoidal function (BBOB F2) for single-objective optimization problems, as defined in the COCO BBOB benchmark suite. This class applies a shift, rotation, and oscillation transformation to the input and evaluates the Ellipsoidal function. |
|
Introduction¶Represents the Rastrigin function (BBOB F3) for benchmarking optimization algorithms, with support for shifting, rotation, scaling, and biasing in a numpy-based environment. |
|
Introduction¶Represents the Buche-Rastrigin function (BBOB F4) as a single-objective optimization problem, inheriting from |
|
Introduction¶Represents the BBOB Linear Slope function (F5) for single-objective optimization benchmarking, implemented using NumPy. This class is a specific problem instance used in black-box optimization benchmarking. |
|
Introduction¶Represents the Attractive Sector function (BBOB F6) for single-objective optimization, as part of the COCO BBOB benchmark suite. This class defines the problem’s initialization, string representation, and objective function evaluation using numpy. |
|
Introduction¶Represents an abstract Step Ellipsoidal function for single-objective optimization, as part of the BBOB (Black-Box Optimization Benchmarking) suite. This class applies a step transformation to an ellipsoidal function, incorporating shift, rotation, and scaling, and is used to evaluate optimization algorithms on non-trivial, non-separable landscapes. |
|
F7: Step Ellipsoidal Function¶Represents the F7 benchmark function (Step Ellipsoidal) from the COCO BBOB suite, used for single-objective optimization benchmarking. |
|
Introduction¶Represents the noisy Step Ellipsoidal function (BBOB F113) with Gaussian noise, used as a single-objective optimization problem in benchmarking. |
|
Introduction¶Represents the Step Ellipsoidal function with uniform noise as defined in the COCO BBOB suite, implemented as a single-objective optimization problem. |
|
Introduction¶Represents the Step Ellipsoidal function with Cauchy noise (BBOB function F115) for single-objective optimization benchmarking. |
|
Introduction¶Represents the BBOB Rosenbrock function problem for single-objective optimization, with configurable dimension, shift, rotation, bias, and bounds. This class is used to evaluate the shifted and rotated Rosenbrock function as defined in the BBOB benchmark suite. |
|
Introduction¶Represents the original Rosenbrock function (BBOB F8) as a single-objective optimization problem, inheriting from the |
|
Introduction¶Represents the BBOB F104 test function, which is a Rosenbrock function with moderate Gaussian noise, for single-objective optimization benchmarking. |
|
Introduction¶Represents the Rosenbrock function with moderate uniform noise, as part of the COCO BBOB noisy single-objective optimization problems. |
|
Introduction¶Represents the Rosenbrock function with moderate Cauchy noise as defined in the COCO BBOB suite. |
|
Introduction¶Represents the noisy Rosenbrock function (F110) from the COCO BBOB suite, with Gaussian noise applied to the objective value. |
|
Introduction¶Represents the noisy Rosenbrock function with uniform noise, as part of the COCO BBOB single-objective optimization problems. |
|
Introduction¶Represents the noisy Rosenbrock function (BBOB F112) with Cauchy noise, as defined in the COCO BBOB benchmarking suite. Inherits from |
|
Introduction¶Represents the rotated Rosenbrock function (F9) from the BBOB benchmark suite, implemented for use with numpy arrays. This class applies a linear transformation and shift to the input, and evaluates the rotated Rosenbrock function with an optional bias. |
|
Introduction¶Abstract base class for Ellipsoidal functions in the BBOB (Black-Box Optimization Benchmarking) suite, implemented using NumPy. This class defines the common structure and transformation pipeline for ellipsoidal benchmark problems, including shifting, rotating, oscillating, and conditioning the input vector. |
|
Introduction¶Represents the high-conditioned Ellipsoidal benchmark function (F10) from the COCO BBOB suite. |
|
Introduction¶Represents the noisy ellipsoidal function (F116) from the COCO BBOB benchmark suite, combining an ellipsoidal function with Gaussian noise. |
|
Introduction¶Represents the Ellipsoidal function with uniform noise for single-objective optimization, as part of the COCO BBOB benchmark suite. |
|
Introduction¶Represents the Ellipsoidal function with Cauchy noise as defined in the BBOB COCO benchmark suite. |
|
Introduction¶Represents the BBOB F11 “Discus” benchmark function for single-objective optimization, implemented using NumPy. |
|
Introduction¶Represents the Bent Cigar function (BBOB F12) for single-objective optimization benchmarking, implemented using numpy. Inherits from |
|
Introduction¶Represents the Sharp Ridge function (BBOB F13) for single-objective optimization benchmarking, implemented using NumPy. This class is a part of the COCO BBOB test suite and inherits from |
|
Introduction¶Represents the abstract Different Powers function from the BBOB (Black-Box Optimization Benchmarking) suite, implemented using NumPy. This class defines a shifted and rotated version of the Different Powers test function, commonly used for benchmarking optimization algorithms. |
|
Introduction¶Represents the Different Powers (F14) benchmark function from the COCO BBOB suite, inheriting from |
|
Introduction¶Represents the “Different Powers” function with Gaussian noise for the COCO BBOB single-objective optimization benchmark suite. |
|
Introduction¶Represents the “Different Powers” function with uniform noise for the COCO BBOB single-objective optimization benchmark suite. |
|
Introduction¶Represents the Different Powers function with Cauchy noise, as defined in the COCO BBOB suite. |
|
Introduction¶Represents the BBOB Rastrigin function (F15) problem for single-objective optimization, with configurable dimension, shift, rotation, scaling, and bias. This class implements the Rastrigin function with additional transformations as specified in the BBOB test suite. |
|
Introduction¶Represents the Weierstrass function (BBOB F16) as a single-objective optimization problem in the COCO BBOB suite, implemented using NumPy. This class applies various transformations to the input and computes the Weierstrass function value, including oscillation, rotation, scaling, and penalization. |
|
Introduction¶Abstract base class for Scaffer functions in the BBOB (Black-Box Optimization Benchmarking) suite, implemented using NumPy. This class provides the structure and common transformations for Scaffer-type problems, including conditioning, shifting, rotation, and boundary handling. |
|
Introduction¶Represents the Schaffer’s F17 function from the BBOB COCO benchmark suite, used for single-objective optimization problems. |
|
Introduction¶Represents the Schaffer’s high condition function (F18) from the COCO BBOB benchmark suite, used for single-objective optimization benchmarking. |
|
Introduction¶Represents the Schaffer’s function with Gaussian noise as a single-objective optimization problem,
inheriting from |
|
Introduction¶Represents the Schaffer’s F6 function with uniform noise, as part of the COCO BBOB noisy single-objective optimization problems. |
|
Introduction¶Represents the Schaffer’s function with Cauchy noise as defined in the BBOB COCO benchmark suite. Inherits from |
|
Introduction¶Represents an abstract composite benchmark problem combining Griewank and Rosenbrock functions, used in the COCO BBOB benchmarking suite. This class applies a linear transformation and shift to the input, and computes a composite objective value with boundary handling. |
|
Introduction¶Represents the F19 function, a composite benchmark function combining Griewank and Rosenbrock functions, used in black-box optimization benchmarking (BBOB). |
|
Introduction¶Represents the Composite Griewank-Rosenbrock function with Gaussian noise, as part of the COCO BBOB single-objective optimization problems. |
|
Introduction¶Represents a composite optimization problem combining Griewank and Rosenbrock functions with uniform noise, as part of the COCO BBOB suite. |
|
Introduction¶Represents the Composite Griewank-Rosenbrock function with Cauchy noise, as part of the COCO BBOB noisy single-objective optimization problems. |
|
Introduction¶Represents the Schwefel function (BBOB F20) for benchmarking single-objective optimization algorithms, implemented using NumPy. |
|
Introduction¶Abstract base class for the Gallagher benchmark functions (F21 and F22) from the BBOB (Black-Box Optimization Benchmarking) suite, implemented using NumPy. The Gallagher functions are multimodal optimization problems with a configurable number of peaks (local optima), designed to test the performance of optimization algorithms in complex landscapes. |
|
Introduction¶Represents the Gallagher’s 101 Peaks function (BBOB F21) for single-objective optimization benchmarking. |
|
Introduction¶Represents the Gallagher’s 21 Peaks function (BBOB F22) for single-objective optimization benchmarking. |
|
Introduction¶Represents the noisy Gallagher 101 Peaks function with Gaussian noise, as defined in the COCO BBOB benchmark suite. |
|
Introduction¶Represents the Gallagher 101 Peaks function with uniform noise, as part of the COCO BBOB single-objective optimization benchmark suite. |
|
Introduction¶Represents the Cauchy-noisy variant of the Gallagher 101 Peaks function (BBOB F130) for single-objective optimization benchmarking. |
|
Introduction¶Represents the Katsuura function (BBOB F23) as a single-objective optimization problem for benchmarking. This class is part of the COCO BBOB suite and implements the function using numpy for efficient computation. |
|
Introduction¶Represents the Lunacek bi-Rastrigin function (BBOB F24) as a single-objective optimization problem, implemented using NumPy. This class is designed for benchmarking optimization algorithms and is part of the COCO BBOB test suite. |
Functions¶
Introduction¶Applies a shift and rotation transformation to the input vector(s). |
|
Generates a random orthogonal rotation matrix of the specified dimension using Householder transformations. |
|
Introduction¶Applies an oscillating transformation to the input array, modifying its values based on their sign using logarithmic, exponential, and sinusoidal operations. This transformation is commonly used in benchmarking optimization problems to introduce non-linearity and complexity. |
|
Introduction¶Applies an asymmetric transformation to the decision variable array, typically used in optimization benchmarking to introduce non-symmetry into the problem landscape. |
|
Introduction¶Computes a penalty value for decision variables that exceed a specified upper bound. |
API¶
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_Problem(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.basic_problem.Basic_ProblemIntroduction¶
BBOB-Surrogate investigates the integration of surrogate modeling techniques into MetaBBO , enabling data-driven approximation of expensive objective functions while maintaining optimization fidelity.
Original paper¶
“Surrogate Learning in Meta-Black-Box Optimization: A Preliminary Study.” arXiv preprint arXiv:2503.18060 (2025).
Official Implementation¶
License¶
None
Problem Suite Composition¶
BBOB-Surrogate contains a total of 72 optimization problems, corresponding to three dimensions (2, 5, 10), each dimension contains 24 problems. Each problem consists of a trained KAN or MLP network, which is used to fit 24 black box functions in the COCO-BBOB benchmark. The network here is a surrogate model of the original function.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- get_optimal()[source]¶
Introduction¶
Returns the optimal value or solution associated with the current problem instance.
Returns:¶
Any: The optimal value or solution stored in the
optattribute.
- abstractmethod func(x)[source]¶
Introduction¶
Evaluates the objective function at the given input vector
x.Args:¶
x (numpy.ndarray): Input vector at which the function should be evaluated.
Returns:¶
float: The computed value of the objective function at
x.
Raises:¶
NotImplementedError: This method must be implemented by subclasses.
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.NoisyProblem[source]¶
Introduction¶
Represents a noisy optimization problem, providing methods to evaluate the true and noisy objective values, as well as handle boundary constraints.
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.GaussNoisyProblem[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.NoisyProblemIntroduction¶
Represents a Gaussian noisy optimization problem, where noise is multiplicatively applied to the unbiased function value using a Gaussian distribution. This class is intended to be subclassed, with the attribute
gauss_betadefined in the subclass to control the noise intensity.- noisy(ftrue)[source]¶
Adds Gaussian noise to the true function value(s) to simulate a noisy optimization environment.
Args:¶
ftrue (float or np.ndarray): The true (noise-free) function value(s) to which noise will be added.
Returns:¶
np.ndarray: The noisy function value(s), with Gaussian noise applied multiplicatively to the unbiased value(s). If the unbiased value is less than 1e-8, returns the original value with a small offset.
Notes:¶
The noise is applied as:
fnoisy_unbiased = ftrue_unbiased * exp(gauss_beta * N(0,1)), whereN(0,1)is standard normal noise.The function ensures that very small unbiased values (less than 1e-8) are not perturbed by noise.
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.UniformNoisyProblem[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.NoisyProblemIntroduction¶
Represents a noisy optimization problem where uniform noise is applied to the true function value. The noise is controlled by the
uniform_alphaanduniform_betaattributes, which must be defined in subclasses.- noisy(ftrue)[source]¶
Introduction¶
Applies a specific noise model to the true function value(s)
ftrue, simulating noisy objective function evaluations as used in the BBOB (Black-Box Optimization Benchmarking) testbed.Args:¶
ftrue (float or np.ndarray): The true (unbiased) function value(s) to which noise should be applied.
Built-in Attribute:¶
self.optimum (float): The bias (optimum value) of the function.
self.uniform_beta (float): Parameter controlling the strength of the uniform noise.
self.uniform_alpha (float): Parameter controlling the scaling of the noise.
self.dim (int): Dimensionality of the problem.
Returns:¶
np.ndarray: The noisy function value(s), with noise applied according to the BBOB noise model. For values of
ftrueclose to the optimum, the original value is returned.
Notes:¶
For
ftruevalues very close to the optimum (within 1e-8), no noise is added.The noise model is multiplicative and depends on the distance from the optimum and random uniform variables.
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.CauchyNoisyProblem[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.NoisyProblemIntroduction¶
Represents a noisy optimization problem where Cauchy-distributed noise is added to the true function value. This class is typically used in benchmarking optimization algorithms under noisy conditions.
- noisy(ftrue)[source]¶
Introduction¶
Adds Cauchy noise to the true function value(s) to simulate a noisy optimization problem.
Args:¶
ftrue (float or np.ndarray): The true (noise-free) function value(s) to which noise will be added.
Returns:¶
np.ndarray: The noisy function value(s), with Cauchy noise applied, except for values close to the optimum.
Notes:¶
The noise is only added to values sufficiently far from the optimum (i.e., where
ftrue_unbiased >= 1e-8).For values very close to the optimum, the original value is returned to avoid numerical issues.
The noise is generated using a Cauchy-like distribution, controlled by
self.cauchy_alphaandself.cauchy_p.
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Sphere(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the abstract Sphere function for benchmarking optimization algorithms.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input.
rotate (np.ndarray): Rotation matrix applied to the input.
bias (float): Bias added to the function value.
lb (float or np.ndarray): Lower bound(s) for the input variables.
ub (float or np.ndarray): Upper bound(s) for the input variables.
Methods:¶
func(x): Evaluates the shifted, rotated, and biased Sphere function on input
xwith boundary handling.
Returns:¶
float or np.ndarray: The evaluated Sphere function value(s) for the given input(s).
Raises:¶
None explicitly, but may raise exceptions from underlying numpy operations or if input shapes are incompatible.
Initialization
Initializes the object with the given parameters for dimension, shift, rotation, bias, and bounds.
Args:¶
dim (int): The dimensionality of the problem.
shift (np.ndarray): The shift vector applied to the input.
rotate (np.ndarray): The rotation matrix applied to the input.
bias (float): The bias value added to the objective function.
lb (float or np.ndarray): The lower bound(s) for the input variables.
ub (float or np.ndarray): The upper bound(s) for the input variables.
Raises:¶
ValueError: If the dimensions of shift or rotate do not match
dim.
- func(x)[source]¶
Evaluates the objective function for a given input vector
xin the context of a shifted and rotated BBOB benchmark problem.Args:¶
x (np.ndarray): Input solution vector(s) of shape (…, D), where D is the problem dimension.
Returns:¶
np.ndarray: The computed objective value(s) after applying shift, rotation, boundary handling, and bias.
Side Effects:¶
Increments the function evaluation counter
self.FESby the number of evaluated solutions.
Notes:¶
The function applies a shift and rotation transformation to
xusingsr_func.The result is the sum of squares of the transformed vector, plus a bias and boundary handling penalty.
- src.environment.problem.SOO.COCO_BBOB.bbob_numpy.sr_func(x, Os, Mr)[source]¶
Introduction¶
Applies a shift and rotation transformation to the input vector(s).
Args:¶
x (np.ndarray): Input array of shape (n_samples, n_features), representing the data points to be transformed.
Os (np.ndarray): Shift vector of shape (n_features,), used to shift the input.
Mr (np.ndarray): Rotation matrix of shape (n_features, n_features), used to rotate the shifted input.
Returns:¶
np.ndarray: The shifted and rotated input array of shape (n_samples, n_features).
Raises:¶
ValueError: If the shapes of
x,Os, orMrare incompatible for the operations.
- src.environment.problem.SOO.COCO_BBOB.bbob_numpy.rotate_gen(dim)[source]¶
Generates a random orthogonal rotation matrix of the specified dimension using Householder transformations.
Args:¶
dim (int): The dimension of the rotation matrix to generate.
Returns:¶
np.ndarray: A (dim, dim) orthogonal rotation matrix with determinant 1.
Notes:¶
The function uses Householder transformations to construct the rotation matrix.
The resulting matrix is suitable for use in optimization benchmarks such as COCO/BBOB.
- src.environment.problem.SOO.COCO_BBOB.bbob_numpy.osc_transform(x)[source]¶
Introduction¶
Applies an oscillating transformation to the input array, modifying its values based on their sign using logarithmic, exponential, and sinusoidal operations. This transformation is commonly used in benchmarking optimization problems to introduce non-linearity and complexity.
Args:¶
x (np.ndarray): Input array. If representing objective values, should be 1-D with shape [NP] for single-objective or 2-D with shape [NP, number_of_objectives] for multi-objective problems. If representing decision values, should be 2-D with shape [NP, dim].
Returns:¶
np.ndarray: Transformed array with the same shape as the input.
Notes:¶
Positive and negative values in
xare transformed differently.The transformation is element-wise and preserves the shape of the input.
- src.environment.problem.SOO.COCO_BBOB.bbob_numpy.asy_transform(x, beta)[source]¶
Introduction¶
Applies an asymmetric transformation to the decision variable array, typically used in optimization benchmarking to introduce non-symmetry into the problem landscape.
Args:¶
x (np.ndarray): Decision values with shape [NP, dim], where NP is the number of points and dim is the dimensionality.
beta (float): Asymmetry factor controlling the degree of transformation.
Returns:¶
np.ndarray: Transformed array with the same shape as
x, after applying the asymmetric transformation.
Notes:¶
The transformation is only applied to positive elements of
x.The transformation uses a position-dependent exponent based on
betaand the variable index.
- src.environment.problem.SOO.COCO_BBOB.bbob_numpy.pen_func(x, ub)[source]¶
Introduction¶
Computes a penalty value for decision variables that exceed a specified upper bound.
Args:¶
x (np.ndarray): Decision values with shape [NP, dim].
ub (float): The upper bound for each decision variable.
Returns:¶
np.ndarray: Penalty values for each solution in shape [NP].
Details:¶
For each element in
x, if its absolute value exceedsub, the squared excess is added to the penalty. The penalties are summed across the last axis for each solution.
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F1(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy._SphereIntroduction¶
Represents the Sphere function (F1) for single-objective optimization problems, inheriting from the
_Sphereclass..Initialization
Initializes the object with the given parameters for dimension, shift, rotation, bias, and bounds.
Args:¶
dim (int): The dimensionality of the problem.
shift (np.ndarray): The shift vector applied to the input.
rotate (np.ndarray): The rotation matrix applied to the input.
bias (float): The bias value added to the objective function.
lb (float or np.ndarray): The lower bound(s) for the input variables.
ub (float or np.ndarray): The upper bound(s) for the input variables.
Raises:¶
ValueError: If the dimensions of shift or rotate do not match
dim.
- boundaryHandling(x)[source]¶
Introduction¶
Handles boundary constraints for the input vector
xin the optimization problem.Args:¶
x (numpy.ndarray): The input vector to be checked or adjusted for boundary constraints.
Returns:¶
float: A penalty value or adjustment result based on the boundary handling logic.
Raises:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F101(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.GaussNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._SphereIntroduction¶
Represents the BBOB Sphere function with moderate Gaussian noise, used as a single-objective optimization problem in benchmarking.
Inherits From:¶
GaussNoisyProblem: Adds Gaussian noise to the objective function.
_Sphere: Implements the noiseless Sphere function.
Class Attributes:¶
gauss_beta (float): Standard deviation of the Gaussian noise applied to the function (default: 0.01).
Methods:¶
str(): Returns a string identifier for the problem instance (“Sphere_moderate_gauss”).
Usage:¶
Instantiate this class to create a noisy Sphere optimization problem for benchmarking algorithms.
Initialization
Initializes the object with the given parameters for dimension, shift, rotation, bias, and bounds.
Args:¶
dim (int): The dimensionality of the problem.
shift (np.ndarray): The shift vector applied to the input.
rotate (np.ndarray): The rotation matrix applied to the input.
bias (float): The bias value added to the objective function.
lb (float or np.ndarray): The lower bound(s) for the input variables.
ub (float or np.ndarray): The upper bound(s) for the input variables.
Raises:¶
ValueError: If the dimensions of shift or rotate do not match
dim.
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F102(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.UniformNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._SphereIntroduction¶
Represents the Sphere function with moderate uniform noise, as defined in the COCO BBOB test suite. Inherits from
UniformNoisyProblemand_Sphereto provide a noisy optimization problem for benchmarking.Class Attributes:¶
uniform_alpha (float): The alpha parameter controlling the level of uniform noise (default: 0.01).
uniform_beta (float): The beta parameter controlling the level of uniform noise (default: 0.01).
Methods:¶
str(): Returns a string representation of the problem (“Sphere_moderate_uniform”).
Inheritance:¶
UniformNoisyProblem: Base class for problems with uniform noise.
_Sphere: Base class implementing the Sphere function.
Initialization
Initializes the object with the given parameters for dimension, shift, rotation, bias, and bounds.
Args:¶
dim (int): The dimensionality of the problem.
shift (np.ndarray): The shift vector applied to the input.
rotate (np.ndarray): The rotation matrix applied to the input.
bias (float): The bias value added to the objective function.
lb (float or np.ndarray): The lower bound(s) for the input variables.
ub (float or np.ndarray): The upper bound(s) for the input variables.
Raises:¶
ValueError: If the dimensions of shift or rotate do not match
dim.
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F103(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.CauchyNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._SphereIntroduction¶
Represents the BBOB Sphere function with moderate Cauchy noise, used for single-objective optimization benchmarking.
Inheritance:¶
Inherits from
CauchyNoisyProblemand_Sphere.
Class Attributes:¶
cauchy_alpha (float): Scale parameter for the Cauchy noise (default: 0.01).
cauchy_p (float): Probability of applying Cauchy noise (default: 0.05).
Methods:¶
str(): Returns a string representation of the problem (“Sphere_moderate_cauchy”).
Usage:¶
Instantiate this class to create a noisy Sphere optimization problem for benchmarking algorithms.
Initialization
Initializes the object with the given parameters for dimension, shift, rotation, bias, and bounds.
Args:¶
dim (int): The dimensionality of the problem.
shift (np.ndarray): The shift vector applied to the input.
rotate (np.ndarray): The rotation matrix applied to the input.
bias (float): The bias value added to the objective function.
lb (float or np.ndarray): The lower bound(s) for the input variables.
ub (float or np.ndarray): The upper bound(s) for the input variables.
Raises:¶
ValueError: If the dimensions of shift or rotate do not match
dim.
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F107(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.GaussNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._SphereIntroduction¶
Represents the noisy Sphere function (BBOB function F107) with Gaussian noise, used for benchmarking optimization algorithms.
Inherits From:¶
GaussNoisyProblem: Adds Gaussian noise to the objective function.
_Sphere: Implements the Sphere function.
Class Attributes:¶
gauss_beta (float): The standard deviation of the Gaussian noise applied to the function (default is 1.0).
Methods:¶
str(): Returns the string representation ‘Sphere_gauss’.
Usage:¶
Typically used as part of a suite of single-objective optimization problems for algorithm benchmarking.
Initialization
Initializes the object with the given parameters for dimension, shift, rotation, bias, and bounds.
Args:¶
dim (int): The dimensionality of the problem.
shift (np.ndarray): The shift vector applied to the input.
rotate (np.ndarray): The rotation matrix applied to the input.
bias (float): The bias value added to the objective function.
lb (float or np.ndarray): The lower bound(s) for the input variables.
ub (float or np.ndarray): The upper bound(s) for the input variables.
Raises:¶
ValueError: If the dimensions of shift or rotate do not match
dim.
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F108(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.UniformNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._SphereIntroduction¶
Represents the BBOB Sphere function (F108) with uniform noise, used as a single-objective optimization problem in benchmarking.
Inherits From:¶
UniformNoisyProblem: Adds uniform noise to the objective function.
_Sphere: Implements the standard Sphere function.
Class Attributes:¶
uniform_alpha (float): The alpha parameter for the uniform noise distribution (default: 1.0).
uniform_beta (float): The beta parameter for the uniform noise distribution (default: 1.0).
Methods:¶
str(): Returns the string representation ‘Sphere_uniform’.
Usage:¶
Typically used in benchmarking optimization algorithms with noisy objective functions.
Initialization
Initializes the object with the given parameters for dimension, shift, rotation, bias, and bounds.
Args:¶
dim (int): The dimensionality of the problem.
shift (np.ndarray): The shift vector applied to the input.
rotate (np.ndarray): The rotation matrix applied to the input.
bias (float): The bias value added to the objective function.
lb (float or np.ndarray): The lower bound(s) for the input variables.
ub (float or np.ndarray): The upper bound(s) for the input variables.
Raises:¶
ValueError: If the dimensions of shift or rotate do not match
dim.
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F109(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.CauchyNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._SphereIntroduction¶
Represents the Sphere function with additive Cauchy noise, as defined in the BBOB COCO benchmark suite. Inherits from
CauchyNoisyProblemand_Sphere, applying Cauchy-distributed noise to the standard Sphere problem.Class Attributes:¶
cauchy_alpha (float): Scale parameter for the Cauchy noise distribution (default: 1.0).
cauchy_p (float): Probability of applying Cauchy noise to the function evaluation (default: 0.2).
Methods:¶
str(): Returns the string identifier for this problem variant (“Sphere_cauchy”).
Inheritance:¶
CauchyNoisyProblem: Base class for problems with Cauchy noise.
_Sphere: Base class for the Sphere benchmark function.
Initialization
Initializes the object with the given parameters for dimension, shift, rotation, bias, and bounds.
Args:¶
dim (int): The dimensionality of the problem.
shift (np.ndarray): The shift vector applied to the input.
rotate (np.ndarray): The rotation matrix applied to the input.
bias (float): The bias value added to the objective function.
lb (float or np.ndarray): The lower bound(s) for the input variables.
ub (float or np.ndarray): The upper bound(s) for the input variables.
Raises:¶
ValueError: If the dimensions of shift or rotate do not match
dim.
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F2(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the Ellipsoidal function (BBOB F2) for single-objective optimization problems, as defined in the COCO BBOB benchmark suite. This class applies a shift, rotation, and oscillation transformation to the input and evaluates the Ellipsoidal function.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input.
rotate (np.ndarray): Rotation matrix applied to the input.
bias (float): Bias added to the function value.
lb (float or np.ndarray): Lower bound(s) for the input variables.
ub (float or np.ndarray): Upper bound(s) for the input variables.
Methods:¶
str(): Returns the name of the function (“Ellipsoidal”).
func(x): Evaluates the Ellipsoidal function on the input
x.
Returns (func):¶
float or np.ndarray: The computed value(s) of the Ellipsoidal function for the given input(s).
Raises:¶
ValueError: If input dimensions do not match the problem’s dimensionality.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F3(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the Rastrigin function (BBOB F3) for benchmarking optimization algorithms, with support for shifting, rotation, scaling, and biasing in a numpy-based environment.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input.
rotate (np.ndarray): Rotation matrix applied to the input.
bias (float): Bias added to the function value.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Methods:¶
str(): Returns the name of the function (“Rastrigin”).
func(x): Evaluates the Rastrigin function on the input
xwith transformations.
Returns (func):¶
np.ndarray: The computed Rastrigin function values for the input(s)
x.
Attributes:¶
scales (np.ndarray): Scaling factors for each dimension.
FES (int): Function evaluation count (incremented on each call to
func).
Raises:¶
ValueError: If input dimensions do not match the problem’s dimensionality.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F4(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the Buche-Rastrigin function (BBOB F4) as a single-objective optimization problem, inheriting from
BBOB_Numpy_Problem. This class applies specific transformations and scaling to the input vector and computes the function value according to the BBOB benchmark definition.Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input.
rotate (np.ndarray): Rotation matrix applied to the input.
bias (float): Bias added to the function value.
lb (float or np.ndarray): Lower bound(s) for the input variables.
ub (float or np.ndarray): Upper bound(s) for the input variables.
Attributes:¶
scales (np.ndarray): Scaling factors applied to the input vector.
Methods:¶
str(): Returns the name of the function (“Buche_Rastrigin”).
func(x): Evaluates the Buche-Rastrigin function on the input
x.
Returns:¶
func(x): Returns the computed function value(s) as a float or np.ndarray.
Raises:¶
None explicitly, but may raise exceptions from underlying numpy operations if input shapes are invalid.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F5(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the BBOB Linear Slope function (F5) for single-objective optimization benchmarking, implemented using NumPy. This class is a specific problem instance used in black-box optimization benchmarking.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector for the problem, used to displace the optimum.
rotate (np.ndarray): Rotation matrix (not used in this function, but kept for interface consistency).
bias (float): Bias added to the function value.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
FES (int): Function evaluation count, incremented with each call to
func.shift (np.ndarray): The shifted optimum location, adjusted to avoid zeros.
ub (float or np.ndarray): Upper bound(s) of the search space.
bias (float): Bias added to the function value.
dim (int): Dimensionality of the problem.
Methods:¶
str(): Returns the name of the function (“Linear_Slope”).
func(x): Evaluates the Linear Slope function at the given input(s)
x.
Returns:¶
func(x): Returns the function value(s) as a float or np.ndarray, depending on the input shape.
Raises:¶
None explicitly, but may raise exceptions if input shapes are incompatible or if NumPy operations fail.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F6(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the Attractive Sector function (BBOB F6) for single-objective optimization, as part of the COCO BBOB benchmark suite. This class defines the problem’s initialization, string representation, and objective function evaluation using numpy.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector for the problem.
rotate (np.ndarray): Rotation matrix for the problem.
bias (float): Bias added to the objective function value.
lb (float or np.ndarray): Lower bound(s) for the decision variables.
ub (float or np.ndarray): Upper bound(s) for the decision variables.
Raises:¶
None explicitly, but may raise exceptions if input shapes are incompatible or if required dependencies are missing.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Step_Ellipsoidal(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents an abstract Step Ellipsoidal function for single-objective optimization, as part of the BBOB (Black-Box Optimization Benchmarking) suite. This class applies a step transformation to an ellipsoidal function, incorporating shift, rotation, and scaling, and is used to evaluate optimization algorithms on non-trivial, non-separable landscapes.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input.
rotate (np.ndarray): Rotation matrix applied to the input.
bias (float): Constant bias added to the function value.
lb (float or np.ndarray): Lower bound(s) for the input variables.
ub (float or np.ndarray): Upper bound(s) for the input variables.
Built-in Attribute:¶
Q_rotate (np.ndarray): Additional rotation matrix generated for the step transformation.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F7(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Step_EllipsoidalF7: Step Ellipsoidal Function¶
Represents the F7 benchmark function (Step Ellipsoidal) from the COCO BBOB suite, used for single-objective optimization benchmarking.
Args¶
x (numpy.ndarray): Input vector to be evaluated by the boundary handling method.
Returns¶
boundaryHandling(x): float The penalized value of the input vector
xif it exceeds the upper bound.str(): str The name of the function, ‘Step_Ellipsoidal’.
Inherits¶
_Step_Ellipsoidal: Base class implementing the core functionality of the step ellipsoidal function.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F113(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.GaussNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Step_EllipsoidalIntroduction¶
Represents the noisy Step Ellipsoidal function (BBOB F113) with Gaussian noise, used as a single-objective optimization problem in benchmarking.
Inherits From:¶
GaussNoisyProblem: Adds Gaussian noise to the objective function.
_Step_Ellipsoidal: Implements the step ellipsoidal function logic.
Class Attributes:¶
gauss_beta (float): The standard deviation parameter for the Gaussian noise (default is 1.0).
Methods:¶
str(): Returns a string identifier for the problem (“Step_Ellipsoidal_gauss”).
Usage:¶
Instantiate this class to create a noisy step ellipsoidal optimization problem for benchmarking algorithms.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F114(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.UniformNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Step_EllipsoidalIntroduction¶
Represents the Step Ellipsoidal function with uniform noise as defined in the COCO BBOB suite, implemented as a single-objective optimization problem.
Inherits From:¶
UniformNoisyProblem: Adds uniform noise to the objective function.
_Step_Ellipsoidal: Provides the step ellipsoidal function definition.
Class Attributes:¶
uniform_alpha (float): Scaling factor for the uniform noise (default: 1.0).
uniform_beta (float): Scaling factor for the uniform noise (default: 1.0).
Methods:¶
str(): Returns the string identifier for the problem (“Step_Ellipsoidal_uniform”).
Usage:¶
Instantiate this class to create a noisy step ellipsoidal optimization problem for benchmarking algorithms.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F115(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.CauchyNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Step_EllipsoidalIntroduction¶
Represents the Step Ellipsoidal function with Cauchy noise (BBOB function F115) for single-objective optimization benchmarking.
Inherits From:¶
CauchyNoisyProblem: Adds Cauchy-distributed noise to the objective function.
_Step_Ellipsoidal: Implements the step ellipsoidal function structure.
Class Attributes:¶
cauchy_alpha (float): Scale parameter for the Cauchy noise (default: 1.0).
cauchy_p (float): Probability of applying Cauchy noise (default: 0.2).
Methods:¶
str(): Returns the string identifier ‘Step_Ellipsoidal_cauchy’.
Usage:¶
Instantiate this class to create a noisy step ellipsoidal optimization problem for benchmarking algorithms.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Rosenbrock(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the BBOB Rosenbrock function problem for single-objective optimization, with configurable dimension, shift, rotation, bias, and bounds. This class is used to evaluate the shifted and rotated Rosenbrock function as defined in the BBOB benchmark suite.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input.
rotate (np.ndarray): Rotation matrix (overwritten as identity).
bias (float): Bias added to the function value.
lb (float or np.ndarray): Lower bound(s) for the input variables.
ub (float or np.ndarray): Upper bound(s) for the input variables.
Built-in Attribute:¶
FES (int): Function evaluation count, incremented on each call to
func.dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias term.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
Methods:¶
func(x): Evaluates the shifted and rotated Rosenbrock function on input
x.
Returns (for func):¶
np.ndarray: The computed Rosenbrock function values for each input in
x.
Raises:¶
ValueError: If input
xdoes not have the correct shape or type.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F8(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy._RosenbrockIntroduction¶
Represents the original Rosenbrock function (BBOB F8) as a single-objective optimization problem, inheriting from the
_Rosenbrockbase class.Methods¶
boundaryHandling(x): Handles boundary constraints for the input vector
x. For this implementation, always returns 0.str(): Returns the string representation of the function.
Args:¶
x (numpy.ndarray): Input vector for the boundary handling method.
Returns:¶
float: For
boundaryHandling, always returns 0.str: For
__str__, returns ‘Rosenbrock_original’.
Notes:¶
This class is typically used within the COCO BBOB benchmarking framework for optimization algorithms.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F104(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.GaussNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._RosenbrockIntroduction¶
Represents the BBOB F104 test function, which is a Rosenbrock function with moderate Gaussian noise, for single-objective optimization benchmarking.
Inherits From:¶
GaussNoisyProblem: Base class for problems with Gaussian noise.
_Rosenbrock: Implements the Rosenbrock function.
Class Attributes:¶
gauss_beta (float): The standard deviation of the Gaussian noise added to the function, set to 0.01.
Methods:¶
str(): Returns a string representation of the problem, ‘Rosenbrock_moderate_gauss’.
Usage:¶
This class is intended for benchmarking optimization algorithms on noisy variants of the Rosenbrock function as defined in the COCO BBOB suite.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F105(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.UniformNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._RosenbrockIntroduction¶
Represents the Rosenbrock function with moderate uniform noise, as part of the COCO BBOB noisy single-objective optimization problems.
Inherits From:¶
UniformNoisyProblem: Adds uniform noise to the objective function.
_Rosenbrock: Implements the Rosenbrock benchmark function.
Class Attributes:¶
uniform_alpha (float): The alpha parameter controlling the noise level (default: 0.01).
uniform_beta (float): The beta parameter controlling the noise level (default: 0.01).
Methods:¶
str(): Returns a string representation of the problem (“Rosenbrock_moderate_uniform”).
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F106(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.CauchyNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._RosenbrockIntroduction¶
Represents the Rosenbrock function with moderate Cauchy noise as defined in the COCO BBOB suite.
Inheritance:¶
Inherits from
CauchyNoisyProblemand_Rosenbrock.
Class Attributes:¶
cauchy_alpha (float): Scale parameter for the Cauchy noise (default: 0.01).
cauchy_p (float): Probability of applying Cauchy noise (default: 0.05).
Methods:¶
str(): Returns a string representation of the problem (“Rosenbrock_moderate_cauchy”).
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F110(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.GaussNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._RosenbrockIntroduction¶
Represents the noisy Rosenbrock function (F110) from the COCO BBOB suite, with Gaussian noise applied to the objective value.
Inherits From:¶
GaussNoisyProblem: Adds Gaussian noise to the objective function.
_Rosenbrock: Implements the Rosenbrock function.
Class Attributes:¶
gauss_beta (float): The standard deviation parameter for the Gaussian noise (default is 1.0).
Methods:¶
str(): Returns the string identifier ‘Rosenbrock_gauss’ for this problem instance.
Usage:¶
Instantiate this class to create a noisy Rosenbrock optimization problem for benchmarking optimization algorithms.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F111(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.UniformNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._RosenbrockIntroduction¶
Represents the noisy Rosenbrock function with uniform noise, as part of the COCO BBOB single-objective optimization problems.
Attributes:¶
uniform_alpha (float): The alpha parameter for the uniform noise distribution (default: 1.0).
uniform_beta (float): The beta parameter for the uniform noise distribution (default: 1.0).
Inheritance:¶
Inherits from
UniformNoisyProblemand_Rosenbrock, combining uniform noise handling and the Rosenbrock function definition.
Methods:¶
str(): Returns a string representation of the problem (“Rosenbrock_uniform”).
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F112(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.CauchyNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._RosenbrockIntroduction¶
Represents the noisy Rosenbrock function (BBOB F112) with Cauchy noise, as defined in the COCO BBOB benchmarking suite. Inherits from
CauchyNoisyProblemand_Rosenbrockto provide the problem definition and noise characteristics.Class Attributes:¶
cauchy_alpha (float): Scale parameter for the Cauchy noise distribution (default: 1.0).
cauchy_p (float): Probability of applying Cauchy noise (default: 0.2).
Methods:¶
str(): Returns the string identifier for the problem (“Rosenbrock_cauchy”).
Inheritance:¶
CauchyNoisyProblem: Base class for problems with Cauchy-distributed noise.
_Rosenbrock: Base class implementing the Rosenbrock function.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F9(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the rotated Rosenbrock function (F9) from the BBOB benchmark suite, implemented for use with numpy arrays. This class applies a linear transformation and shift to the input, and evaluates the rotated Rosenbrock function with an optional bias.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input.
rotate (np.ndarray): Rotation matrix applied to the input.
bias (float): Bias added to the function value.
lb (float or np.ndarray): Lower bound(s) for the input variables.
ub (float or np.ndarray): Upper bound(s) for the input variables.
Built-in Attribute:¶
linearTF (np.ndarray): The linear transformation matrix used for rotation and scaling.
FES (int): Function evaluation count (inherited from BBOB_Numpy_Problem).
Returns:¶
float or np.ndarray: The evaluated rotated Rosenbrock function value(s) for the given input(s), with bias added.
Raises:¶
ValueError: If input dimensions do not match the problem’s dimensionality.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Ellipsoidal(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Abstract base class for Ellipsoidal functions in the BBOB (Black-Box Optimization Benchmarking) suite, implemented using NumPy. This class defines the common structure and transformation pipeline for ellipsoidal benchmark problems, including shifting, rotating, oscillating, and conditioning the input vector.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input.
rotate (np.ndarray): Rotation matrix applied to the input.
bias (float): Bias added to the final function value.
lb (float or np.ndarray): Lower bound(s) for the input variables.
ub (float or np.ndarray): Upper bound(s) for the input variables.
Attributes:¶
condition (float or np.ndarray): Conditioning parameter(s) for the ellipsoidal function.
FES (int): Function evaluation count, incremented with each call to
func.
Methods:¶
func(x): Evaluates the ellipsoidal function on input
xafter applying shift, rotation, oscillation, and conditioning transformations.
Returns:¶
float or np.ndarray: The computed function value(s) after all transformations and boundary handling.
Notes:¶
This is an abstract class and is intended to be subclassed with specific conditioning parameters.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F10(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy._EllipsoidalIntroduction¶
Represents the high-conditioned Ellipsoidal benchmark function (F10) from the COCO BBOB suite.
Attributes:¶
condition (float): The conditioning parameter for the ellipsoidal function, set to 1e6.
Methods:¶
boundaryHandling(x): Handles boundary constraints for the input vector
x. For this function, always returns 0.str(): Returns a string representation of the function.
Inheritance:¶
Inherits from
_Ellipsoidal, which provides the core implementation of the ellipsoidal function.Usage:¶
Typically used as a test function for single-objective optimization algorithms to evaluate performance on ill-conditioned problems.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F116(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.GaussNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._EllipsoidalIntroduction¶
Represents the noisy ellipsoidal function (F116) from the COCO BBOB benchmark suite, combining an ellipsoidal function with Gaussian noise.
Attributes:¶
condition (float): Conditioning parameter for the ellipsoidal function, controlling the axis scaling.
gauss_beta (float): Standard deviation of the Gaussian noise applied to the function.
Inheritance:¶
Inherits from
GaussNoisyProblemfor noise handling.Inherits from
_Ellipsoidalfor the ellipsoidal function structure.
Methods:¶
str(): Returns the string identifier for this problem.
Usage:¶
Typically used in benchmarking optimization algorithms under noisy conditions.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F117(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.UniformNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._EllipsoidalIntroduction¶
Represents the Ellipsoidal function with uniform noise for single-objective optimization, as part of the COCO BBOB benchmark suite.
Inherits From:¶
UniformNoisyProblem: Adds uniform noise to the objective function.
_Ellipsoidal: Provides the base implementation of the Ellipsoidal function.
Class Attributes:¶
condition (float): The conditioning parameter of the Ellipsoidal function (default: 1e4).
uniform_alpha (float): Alpha parameter for the uniform noise (default: 1.0).
uniform_beta (float): Beta parameter for the uniform noise (default: 1.0).
Methods:¶
str(): Returns the string representation ‘Ellipsoidal_uniform’.
Usage:¶
Instantiate this class to create an Ellipsoidal function with uniform noise for benchmarking optimization algorithms.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F118(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.CauchyNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._EllipsoidalIntroduction¶
Represents the Ellipsoidal function with Cauchy noise as defined in the BBOB COCO benchmark suite.
Attributes:¶
condition (float): The conditioning of the ellipsoidal function (default: 1e4).
cauchy_alpha (float): The scale parameter for the Cauchy noise (default: 1.0).
cauchy_p (float): The probability of applying Cauchy noise (default: 0.2).
Inheritance:¶
Inherits from
CauchyNoisyProblemand_Ellipsoidal, combining the ellipsoidal problem structure with Cauchy-distributed noise.Methods:¶
str(): Returns the string identifier for the problem (“Ellipsoidal_cauchy”).
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F11(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the BBOB F11 “Discus” benchmark function for single-objective optimization, implemented using NumPy.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector for the input transformation.
rotate (np.ndarray): Rotation matrix for the input transformation.
bias (float): Bias added to the final function value.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F12(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the Bent Cigar function (BBOB F12) for single-objective optimization benchmarking, implemented using numpy. Inherits from
BBOB_Numpy_Problemand applies a sequence of transformations to the input vector before evaluating the Bent Cigar function.Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector for the input transformation.
rotate (np.ndarray): Rotation matrix for the input transformation.
bias (float): Bias added to the final function value.
lb (float or np.ndarray): Lower bound(s) for the input domain.
ub (float or np.ndarray): Upper bound(s) for the input domain.
Built-in Attribute:¶
beta (float): Parameter for the asymmetric transformation, default is 0.5.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F13(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the Sharp Ridge function (BBOB F13) for single-objective optimization benchmarking, implemented using NumPy. This class is a part of the COCO BBOB test suite and inherits from
BBOB_Numpy_Problem.Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input.
rotate (np.ndarray): Rotation matrix applied to the input.
bias (float): Bias added to the function value.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Dif_powers(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the abstract Different Powers function from the BBOB (Black-Box Optimization Benchmarking) suite, implemented using NumPy. This class defines a shifted and rotated version of the Different Powers test function, commonly used for benchmarking optimization algorithms.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input.
rotate (np.ndarray): Rotation matrix applied to the input.
bias (float): Bias added to the function value.
lb (float or np.ndarray): Lower bound(s) for the input variables.
ub (float or np.ndarray): Upper bound(s) for the input variables.
Methods:¶
func(x): Evaluates the Different Powers function at the given input
x.
Returns (for func):¶
float: The computed value of the Different Powers function at
x, including bias and boundary handling.
Raises:¶
ValueError: If input dimensions do not match the problem’s dimensionality.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F14(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Dif_powersIntroduction¶
Represents the Different Powers (F14) benchmark function from the COCO BBOB suite, inheriting from
_Dif_powers.Methods¶
boundaryHandling(x): Handles boundary constraints for the input vector
x.str(): Returns the string representation of the function.
Args:¶
x (numpy.ndarray): Input vector for the boundary handling method.
Returns:¶
boundaryHandling: Always returns 0.0, indicating no boundary penalty.
str: Returns the name ‘Different_Powers’.
Notes:¶
This class is typically used in single-objective optimization benchmarking scenarios.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F119(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.GaussNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Dif_powersIntroduction¶
Represents the “Different Powers” function with Gaussian noise for the COCO BBOB single-objective optimization benchmark suite.
Inherits From:¶
GaussNoisyProblem: Adds Gaussian noise to the objective function.
_Dif_powers: Implements the “Different Powers” test function.
Class Attributes:¶
gauss_beta (float): The standard deviation parameter for the Gaussian noise (default: 1.0).
Methods:¶
str(): Returns the string identifier ‘Different_Powers_gauss’ for this problem instance.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F120(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.UniformNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Dif_powersIntroduction¶
Represents the “Different Powers” function with uniform noise for the COCO BBOB single-objective optimization benchmark suite.
Inherits From:¶
UniformNoisyProblem: Adds uniform noise to the problem.
_Dif_powers: Implements the “Different Powers” test function.
Attributes:¶
uniform_alpha (float): Alpha parameter for the uniform noise distribution (default: 1.0).
uniform_beta (float): Beta parameter for the uniform noise distribution (default: 1.0).
Methods:¶
str(): Returns the string identifier ‘Different_Powers_uniform’ for this problem instance.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F121(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.CauchyNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Dif_powersIntroduction¶
Represents the Different Powers function with Cauchy noise, as defined in the COCO BBOB suite.
Inheritance:¶
Inherits from
CauchyNoisyProblemand_Dif_powers.
Class Attributes:¶
cauchy_alpha (float): The scale parameter for the Cauchy noise distribution (default: 1.0).
cauchy_p (float): The probability of applying Cauchy noise (default: 0.2).
Methods:¶
str(): Returns a string representation of the problem (“Different_Powers_cauchy”).
Usage:¶
Typically used as a single-objective optimization problem with Cauchy noise for benchmarking optimization algorithms.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F15(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the BBOB Rastrigin function (F15) problem for single-objective optimization, with configurable dimension, shift, rotation, scaling, and bias. This class implements the Rastrigin function with additional transformations as specified in the BBOB test suite.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input.
rotate (np.ndarray): Rotation matrix applied to the input.
bias (float): Bias added to the function value.
lb (float or np.ndarray): Lower bound(s) for the input variables.
ub (float or np.ndarray): Upper bound(s) for the input variables.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F16(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the Weierstrass function (BBOB F16) as a single-objective optimization problem in the COCO BBOB suite, implemented using NumPy. This class applies various transformations to the input and computes the Weierstrass function value, including oscillation, rotation, scaling, and penalization.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input.
rotate (np.ndarray): Rotation matrix applied to the input.
bias (float): Bias added to the final function value.
lb (float or np.ndarray): Lower bound(s) for the input variables.
ub (float or np.ndarray): Upper bound(s) for the input variables.
Built-in Attributes:¶
linearTF (np.ndarray): Linear transformation matrix combining rotation and scaling.
aK (np.ndarray): Coefficient array for the Weierstrass function.
bK (np.ndarray): Frequency array for the Weierstrass function.
f0 (float): Reference value for normalization.
FES (int): Function evaluation count (inherited from base class).
Methods:¶
str(): Returns the name of the function (“Weierstrass”).
func(x): Evaluates the transformed Weierstrass function on input
x.
Returns:¶
func(x): Returns a NumPy array of function values for the input batch
x.
Raises:¶
ValueError: If input dimensions do not match the problem definition.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Scaffer(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Abstract base class for Scaffer functions in the BBOB (Black-Box Optimization Benchmarking) suite, implemented using NumPy. This class provides the structure and common transformations for Scaffer-type problems, including conditioning, shifting, rotation, and boundary handling.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input.
rotate (np.ndarray): Rotation matrix applied to the input.
bias (float): Bias term added to the objective value.
lb (float or np.ndarray): Lower bound(s) for the input variables.
ub (float or np.ndarray): Upper bound(s) for the input variables.
Attributes:¶
condition (float or None): Conditioning parameter, must be defined in subclasses.
linearTF (np.ndarray): Linear transformation matrix combining conditioning and rotation.
FES (int): Function evaluation count, incremented on each call to
func.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F17(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy._ScafferIntroduction¶
Represents the Schaffer’s F17 function from the BBOB COCO benchmark suite, used for single-objective optimization problems.
Attributes:¶
condition (float): Conditioning parameter for the function, default is 10.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F18(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy._ScafferIntroduction¶
Represents the Schaffer’s high condition function (F18) from the COCO BBOB benchmark suite, used for single-objective optimization benchmarking.
Attributes:¶
condition (float): Conditioning factor for the function, set to 1000.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F122(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.GaussNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._ScafferIntroduction¶
Represents the Schaffer’s function with Gaussian noise as a single-objective optimization problem, inheriting from
GaussNoisyProblemand_Scaffer. This class is part of the COCO BBOB benchmark suite.Class Attributes:¶
condition (float): Conditioning parameter for the problem, set to 10.
gauss_beta (float): Standard deviation parameter for the Gaussian noise, set to 1.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F123(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.UniformNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._ScafferIntroduction¶
Represents the Schaffer’s F6 function with uniform noise, as part of the COCO BBOB noisy single-objective optimization problems.
Methods:¶
str(): Returns the string representation ‘Schaffers_uniform’.
Usage:¶
Typically used as a benchmark function for evaluating optimization algorithms under uniform noise conditions.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F124(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.CauchyNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._ScafferIntroduction¶
Represents the Schaffer’s function with Cauchy noise as defined in the BBOB COCO benchmark suite. Inherits from
CauchyNoisyProblemand_Scafferto provide a noisy single-objective optimization problem.Class Attributes:¶
condition (float): Conditioning parameter for the problem (default: 10.0).
cauchy_alpha (float): Scale parameter for the Cauchy noise (default: 1.0).
cauchy_p (float): Probability of applying Cauchy noise (default: 0.2).
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Composite_Grie_rosen(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents an abstract composite benchmark problem combining Griewank and Rosenbrock functions, used in the COCO BBOB benchmarking suite. This class applies a linear transformation and shift to the input, and computes a composite objective value with boundary handling.
Attributes:¶
factor (float or None): Scaling factor for the composite function.
linearTF (np.ndarray): Linear transformation matrix derived from rotation and scaling.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F19(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Composite_Grie_rosenIntroduction¶
Represents the F19 function, a composite benchmark function combining Griewank and Rosenbrock functions, used in black-box optimization benchmarking (BBOB).
Attributes:¶
factor (float): Scaling factor applied to the function, set to 10.0.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F125(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.GaussNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Composite_Grie_rosenIntroduction¶
Represents the Composite Griewank-Rosenbrock function with Gaussian noise, as part of the COCO BBOB single-objective optimization problems.
Inheritance:¶
Inherits from
GaussNoisyProblemand_Composite_Grie_rosen.
Class Attributes:¶
factor (float): Scaling factor for the function. Default is 1.0.
gauss_beta (float): Standard deviation parameter for the Gaussian noise. Default is 1.0.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F126(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.UniformNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Composite_Grie_rosenIntroduction¶
Represents a composite optimization problem combining Griewank and Rosenbrock functions with uniform noise, as part of the COCO BBOB suite.
Inherits:¶
UniformNoisyProblem: Adds uniform noise to the objective function.
_Composite_Grie_rosen: Composite function combining Griewank and Rosenbrock landscapes.
Class Attributes:¶
factor (float): Scaling factor for the objective function (default: 1.0).
uniform_alpha (float): Alpha parameter for the uniform noise (default: 1.0).
uniform_beta (float): Beta parameter for the uniform noise (default: 1.0).
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F127(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.CauchyNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Composite_Grie_rosenIntroduction¶
Represents the Composite Griewank-Rosenbrock function with Cauchy noise, as part of the COCO BBOB noisy single-objective optimization problems.
Attributes:¶
factor (float): Scaling factor for the function output.
cauchy_alpha (float): Alpha parameter for the Cauchy noise.
cauchy_p (float): Probability parameter for applying Cauchy noise.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F20(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the Schwefel function (BBOB F20) for benchmarking single-objective optimization algorithms, implemented using NumPy.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector for the problem (overwritten in constructor).
rotate (np.ndarray): Rotation matrix for the problem.
bias (float): Bias added to the function value.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy._Gallagher(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Abstract base class for the Gallagher benchmark functions (F21 and F22) from the BBOB (Black-Box Optimization Benchmarking) suite, implemented using NumPy. The Gallagher functions are multimodal optimization problems with a configurable number of peaks (local optima), designed to test the performance of optimization algorithms in complex landscapes.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector for the global optimum.
rotate (np.ndarray): Rotation matrix applied to the input.
bias (float): Bias added to the function value.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
n_peaks (int): Number of peaks (local optima) in the function. Must be set to 21 (F22) or 101 (F21) in subclasses.
y (np.ndarray): Locations of the global and local optima, shape [n_peaks, dim].
C (np.ndarray): Scaling matrices for each peak, shape [n_peaks, dim].
w (np.ndarray): Weights for each peak, shape [n_peaks].
FES (int): Function evaluation count (inherited from BBOB_Numpy_Problem).
Returns:¶
float or np.ndarray: The evaluated function value(s) for the given input(s).
Raises:¶
ValueError: If
n_peaksis not set to a supported value (21 or 101).
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F21(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy._GallagherIntroduction¶
Represents the Gallagher’s 101 Peaks function (BBOB F21) for single-objective optimization benchmarking.
Attributes:¶
n_peaks (int): Number of peaks in the Gallagher function (fixed at 101).
Notes:¶
This class is typically used within the COCO BBOB benchmarking suite for evaluating optimization algorithms on multimodal landscapes.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F22(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy._GallagherIntroduction¶
Represents the Gallagher’s 21 Peaks function (BBOB F22) for single-objective optimization benchmarking.
Attributes:¶
n_peaks (int): Number of peaks in the Gallagher function (fixed at 21).
Notes:¶
This class inherits from
_Gallagherand is intended for use within the COCO BBOB benchmarking suite.Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F128(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.GaussNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._GallagherIntroduction¶
Represents the noisy Gallagher 101 Peaks function with Gaussian noise, as defined in the COCO BBOB benchmark suite.
Inheritance:¶
Inherits from
GaussNoisyProblemand_Gallagher.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F129(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.UniformNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._GallagherIntroduction¶
Represents the Gallagher 101 Peaks function with uniform noise, as part of the COCO BBOB single-objective optimization benchmark suite.
Inherits From:¶
UniformNoisyProblem: Adds uniform noise to the objective function.
_Gallagher: Provides the base implementation for Gallagher’s multimodal functions.
Attributes:¶
n_peaks (int): Number of peaks in the Gallagher function (default: 101).
uniform_alpha (float): Alpha parameter for the uniform noise (default: 1.0).
uniform_beta (float): Beta parameter for the uniform noise (default: 1.0).
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F130(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.CauchyNoisyProblem,src.environment.problem.SOO.COCO_BBOB.bbob_numpy._GallagherIntroduction¶
Represents the Cauchy-noisy variant of the Gallagher 101 Peaks function (BBOB F130) for single-objective optimization benchmarking.
Attributes:¶
n_peaks (int): Number of peaks in the Gallagher function (default: 101).
cauchy_alpha (float): Scale parameter for the Cauchy noise (default: 1.0).
cauchy_p (float): Probability of applying Cauchy noise (default: 0.2).
Inheritance:¶
Inherits from:
CauchyNoisyProblem: Adds Cauchy noise to the objective function.
_Gallagher: Implements the Gallagher 101 Peaks landscape.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F23(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the Katsuura function (BBOB F23) as a single-objective optimization problem for benchmarking. This class is part of the COCO BBOB suite and implements the function using numpy for efficient computation.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input.
rotate (np.ndarray): Rotation matrix applied to the input.
bias (float): Bias added to the function value.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None
- class src.environment.problem.SOO.COCO_BBOB.bbob_numpy.F24(dim, shift, rotate, bias, lb, ub)[source]¶
Bases:
src.environment.problem.SOO.COCO_BBOB.bbob_numpy.BBOB_Numpy_ProblemIntroduction¶
Represents the Lunacek bi-Rastrigin function (BBOB F24) as a single-objective optimization problem, implemented using NumPy. This class is designed for benchmarking optimization algorithms and is part of the COCO BBOB test suite.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector for the problem landscape.
rotate (np.ndarray): Rotation matrix for the problem landscape.
bias (float): Constant bias added to the function value.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Methods:¶
str(): Returns the name of the function (“Lunacek_bi_Rastrigin”).
func(x): Evaluates the Lunacek bi-Rastrigin function at the given input(s)
x.
Returns:¶
func(x): Returns the computed function value(s) as a float or np.ndarray, depending on the input shape.
Raises:¶
ValueError: If input dimensions do not match the problem’s dimensionality.
Initialization
Introduction¶
Initializes the problem instance with given parameters such as dimensionality, shift, rotation, bias, and bounds.
Args:¶
dim (int): Dimensionality of the problem.
shift (np.ndarray): Shift vector applied to the input space.
rotate (np.ndarray): Rotation matrix applied to the input space.
bias (float): Bias value added to the function output.
lb (float or np.ndarray): Lower bound(s) of the search space.
ub (float or np.ndarray): Upper bound(s) of the search space.
Built-in Attribute:¶
dim (int): Problem dimensionality.
shift (np.ndarray): Shift vector.
rotate (np.ndarray): Rotation matrix.
bias (float): Bias value.
lb (float or np.ndarray): Lower bound(s).
ub (float or np.ndarray): Upper bound(s).
FES (int): Function evaluation count, initialized to 0.
opt (np.ndarray): Optimal solution, set to the shift vector.
optimum (float): Function value at the optimal solution.
Returns:¶
None