Skip to content

Griewank

Iannick Gagnon edited this page May 22, 2025 · 7 revisions

Description [view source]

The Griewank function is commonly used to test optimization algorithms. It has many regularly distributed local minima and is defined mathematically as:

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

where $d$ is the dimensionality (Griewank.ndim) of the input vector $\vec{x}$.

Visualization

Here is a link to an interactive Desmos version: https://www.desmos.com/3d/nkaboyl8cv

Griewank().visualize()

Griewank().visualize(plot_bounds=[(-5, 5), (-5, 5)])

Features

  1. Multimodality: The function has many local minima, making it difficult for optimization algorithms to find the global minimum.
  2. Global minimum: The global minimum is $f(\vec{x} = <0,\cdots,0>) = 0$.
  3. Search space: The function is typically evaluated on the domain $-32.768 \leq x_i \leq 32.768$.

Discussion

The Griewank function is particularly useful for evaluating the exploration and exploitation properties of optimization algorithms due to its ruggedness. It has regularly spaced local minima that provide a consistent challenge, yet does exhibit learnable patterns.

Sources

The Griewank function was introduced by Andreas Griewank in his 1981 paper titled Generalized Descent for Global Optimization. The article is available here : https://link.springer.com/article/10.1007/BF00933356.

Clone this wiki locally