A multimodal test function with many local minima. The global minimum is geometrically distant from the next best local minima, making this function deceptive and challenging for optimization algorithms.

F08(x)

Arguments

x

Numeric vector of input values.

Value

Numeric scalar representing the function value.

Details

Formula: $$f(x) = -\sum_{i=1}^{n} x_i \sin(\sqrt{|x_i|})$$

Global minimum: \(f(420.9687, ..., 420.9687) \approx -418.9829 \times n\)

Characteristics:

  • Type: Multimodal

  • Separable: Yes

  • Differentiable: Yes (except at x_i = 0)

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

  • Default dimensions: 50

The Schwefel function is deceptive in that the global minimum is geometrically distant from the next best local minima. This tests an algorithm's ability to escape local optima and explore widely.

See also

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

Examples

F08(c(420.9687, 420.9687))  # Returns approximately -837.97 (near global minimum)
#> [1] -837.9658
F08(c(0, 0))                # Returns 0
#> [1] 0