Griewank Function
Mathematical Definition
\[f(\textbf{x}) = f(x_1, ..., x_n) = 1 + \sum_{i=1}^{n} \frac{x_i^{2}}{4000} - \prod_{i=1}^{n}cos(\frac{x_i}{\sqrt{i}})\]Plots
The contour of the function:
Description and Features
- The function is continuous.
- The function is not convex.
- The function can be defined on n-dimensional space.
- The function is unimodal.
Input Domain
The function can be defined on any input domain but it is usually evaluated on $x_i \in [-600, 600]$ for $i = 1, …, n$.
Global Minima
$f(\textbf{x}^{\ast}) = 0$ at $\textbf{x}^{\ast} = (0, …, 0)$
Implementation
Python
For Python, the function is implemented in the benchmarkfcns package, which can be installed from command line with pip install benchmarkfcns
.
MATLAB
An implementation of the Griewank Function with MATLAB is provided below.
The function can be represented in Latex as follows:
Acknowledgement
Prof Ender Özcan kindly contributed to the correctness of this document.
References:
- http://www.sfu.ca/~ssurjano