« Back to top page

The blackbox optimization benchmarking (bbob) test suite

The blackbox optimization benchmarking (bbob) test suite consists of 24 noiseless single-objective test functions including Sphere, Ellipsoidal, Rastrigin, Rosenbrock, etc. This package is a wrapper of the COCO (COmparing Continuous Optimizers) experiments library.

Abstract

The blackbox optimization benchmarking (bbob) test suite comprises 24 noiseless single-objective test functions. BBOB is one of the most widely used test suites to evaluate and compare the performance of blackbox optimization algorithms. Each benchmark function is provided in dimensions [2, 3, 5, 10, 20, 40] with 110 instances.

APIs

class Problem(function_id: int, dimension: int, instance_id: int = 1)

  • function_id: ID of the bbob benchmark function to use. It must be in the range of [1, 24].
  • dimension: Dimension of the benchmark function. It must be in [2, 3, 5, 10, 20, 40].
  • instance_id: ID of the instance of the benchmark function. It must be in the range of [1, 110].

Methods and Properties

  • search_space: Return the search space.
    • Returns: dict[str, optuna.distributions.BaseDistribution]
  • directions: Return the optimization directions.
    • Returns: list[optuna.study.StudyDirection]
  • __call__(trial: optuna.Trial): Evaluate the objective function and return the objective value.
    • Args:
      • trial: Optuna trial object.
    • Returns: float
  • evaluate(params: dict[str, float]): Evaluate the objective function given a dictionary of parameters.
    • Args:
      • params: Decision variable like {"x0": x1_value, "x1": x1_value, ..., "xn": xn_value}. The number of parameters must be equal to dimension.
    • Returns: float

The properties defined by cocoex.Problem are also available such as number_of_objectives.

Installation

Please install the coco-experiment package.

pip install -U coco-experiment

Example

import optuna
import optunahub


bbob = optunahub.load_module("benchmarks/bbob")
sphere2d = bbob.Problem(function_id=1, dimension=2, instance_id=1)

study = optuna.create_study(directions=sphere2d.directions)
study.optimize(sphere2d, n_trials=20)

print(study.best_trial.params, study.best_trial.value)

List of Benchmark Functions

Please refer to the paper for details about each benchmark function.

Category

  1. Separable Functions
  2. Functions with low or moderate conditioning
  3. Functions with high conditioning and unimodal
  4. Multi-modal functions with adequate global structure
  5. Multi-modal functions with weak global structure
CategoryFunction IDFunction Name
11Sphere Function
12Separable Ellipsoidal Function
13Rastrigin Function
14Büche-Rastrigin Function
15Linear Slope
26Attractive Sector Function
27Step Ellipsoidal Function
28Rosenbrock Function, original
29Rosenbrock Function, rotated
310Ellipsoidal Function
311Discus Function
312Bent Cigar Function
313Sharp Ridge Function
314Different Powers Function
415Rastrigin Function
416Weierstrass Function
417Schaffer’s F7 Function
418Schaffer’s F7 Function, moderately ill-conditioned
419Composite Griewank-Rosenbrock Function F8F2
520Schwefel Function
521Gallagher’s Gaussian 101-me Peaks Function
522Gallagher’s Gaussian 21-hi Peaks Function
523Katsuura Function
524Lunacek bi-Rastrigin Function

BBOB Plots

Reference

Finck, S., Hansen, N., Ros, R., & Auger, A. Real-Parameter Black-Box Optimization Benchmarking 2010: Presentation of the Noiseless Functions.

Package
benchmarks/bbob
Author
Optuna team
License
MIT License
Verified Optuna version
  • 4.1.0
Last update
2025-01-21