A widely used multimodal test function characterized by a nearly flat outer region with a large central hole at the origin. It poses a risk for optimization algorithms to be trapped in local minima.

F10(x)

Arguments

x

Numeric vector of input values.

Value

Numeric scalar representing the function value.

Details

Formula: $$f(x) = -20\exp\left(-0.2\sqrt{\frac{1}{n}\sum_{i=1}^{n}x_i^2}\right) - \exp\left(\frac{1}{n}\sum_{i=1}^{n}\cos(2\pi x_i)\right) + 20 + e$$

Global minimum: \(f(0, 0, ..., 0) = 0\)

Characteristics:

  • Type: Multimodal

  • Separable: No

  • Differentiable: Yes

  • Default bounds: \([-32, 32]^n\)

  • Default dimensions: 50

The Ackley function has an exponential term covering its surface with numerous local minima. The function poses a risk of premature convergence for hill-climbing algorithms.

See also

test-functions for an overview of all test functions, get_function_details to retrieve function parameters.

Examples

F10(c(0, 0))  # Returns approximately 0 (global minimum)
#> [1] 4.440892e-16
F10(c(1, 1))  # Returns approximately 3.6
#> [1] 3.625385