The Griewank test function is a smooth multidimensional mathematical function used in unconstrained optimization. It is commonly employed to evaluate the performance of global optimization algorithms. The function is defined as:
where x = ( x 1 , … , x n ) ∈ R n {\displaystyle x=(x_{1},\dots ,x_{n})\in \mathbb {R} ^{n}} is a vector of real-valued variables. The nonlinear and nonconvex function is characterized by its unique multimodal structure, featuring multiple local minima and maxima around its single global minimum at x ∗ = 0 {\displaystyle x^{\ast }=0} , where the function has minimal value f ( x ∗ ) = 0 {\displaystyle f(x^{\ast })=0} . The number of stationary points increases as the dimensionality n ∈ N {\displaystyle n\in \mathbb {N} } grows.
For instance, the one-dimensional Griewank function f ( x 1 ) := 1 + ( 1 / 4000 ) ⋅ x 1 2 − cos ( x 1 ) {\displaystyle f(x_{1}):=1+(1/4000)\cdot x_{1}^{2}-\cos(x_{1})} has 6365 critical points in the interval [−10000,10000], where the first derivative vanishes. These points satisfy the equation ∇ f ( x 1 ) = 1 2000 ⋅ x 1 + sin ( x 1 ) = 0 {\displaystyle \nabla f(x_{1})={\tfrac {1}{2000}}\cdot x_{1}+\sin(x_{1})=0} .
The multimodal structure of the Griewank function presents a challenge for many deterministic optimization algorithms, which may become trapped in one of the numerous local minima. This is particularly problematic for gradient-based methods. The Griewank function is commonly used to benchmark global optimization algorithms, such as genetic algorithms or particle swarm optimization. In addition to the original version, there are several variants of the Griewank function specifically designed to test algorithms in high-dimensional optimization scenarios.