The Rosenbrock function (also known as Rosenbrock's valley or banana function) is a classic test function with a narrow, curved valley. While often described as unimodal, it is technically multimodal for \(n \geq 4\).
F05(x)Numeric scalar representing the function value.
Formula: $$f(x) = \sum_{i=1}^{n-1} \left[100(x_{i+1} - x_i^2)^2 + (x_i - 1)^2\right]$$
Global minimum: \(f(1, 1, ..., 1) = 0\)
Characteristics:
Type: Unimodal (for n < 4), Multimodal (for n >= 4)
Separable: No
Differentiable: Yes
Convex: No
Default bounds: \([-30, 30]^n\)
Default dimensions: 50
The global minimum lies inside a long, narrow, parabolic-shaped flat valley. Finding the valley is trivial, but converging to the global minimum is difficult.
test-functions for an overview of all test functions,
get_function_details to retrieve function parameters.