A multimodal test function with many regularly distributed local minima. The complexity increases with the number of dimensions.

F11(x)

Arguments

x

Numeric vector of input values.

Value

Numeric scalar representing the function value.

Details

Formula: $$f(x) = \frac{1}{4000}\sum_{i=1}^{n}x_i^2 - \prod_{i=1}^{n}\cos\left(\frac{x_i}{\sqrt{i}}\right) + 1$$

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

Characteristics:

  • Type: Multimodal

  • Separable: No

  • Differentiable: Yes

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

  • Default dimensions: 50

The Griewank function has a product term that introduces interdependence among the variables. As dimension increases, the function becomes more difficult to optimize.

See also

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

Examples

F11(c(0, 0))  # Returns 0 (global minimum)
#> [1] 0
F11(c(1, 1))  # Returns approximately 0.007
#> [1] 0.5897381