## Griewank

The Griewank function has many widespread local minima, which are regularly distributed. The complexity is shown in the zoomed-in plots. 

**Definition**

\begin{align}
\begin{split}
f(x) & = & \; \sum_{n=1}^n \; \frac{x_i^2}{4000} - \prod_{n=1}^n \cos \Bigg( \frac{x_i}{\sqrt{i}} \Bigg) + 1 \\[4mm]
&&-600 \leq x_i \leq 600 \quad i=1 \ldots,n \\[4mm]
\end{split}
\end{align}

**Optimum**

$$f(x^*) = 0 \; \text{at} \; x^* = (0,\ldots,0) $$

**Contour**


```python
import numpy as np
from pymoo.factory import get_problem, get_visualization

problem = get_problem("griewank", n_var=1)
plot = get_visualization("fitness-landscape", problem, _type="surface", n_samples=1000)
plot.do()
plot.apply(lambda ax: ax.set_xlim(-200,200))
plot.apply(lambda ax: ax.set_ylim(-1,13))
plot.show()
```


```python

```

387c7b1edab97e5d6ccbde7310258778be637db1
ipynb
Jupyter Notebook
doc/source/problems/single/griewank.ipynb
gabicavalcante/pymoo
1711ce3a96e5ef622d0116d6c7ea4d26cbe2c846
Apache-2.0
2018-05-22T17:38:02.000Z
2022-02-28T03:34:33.000Z
doc/source/problems/single/griewank.ipynb
gabicavalcante/pymoo
1711ce3a96e5ef622d0116d6c7ea4d26cbe2c846
Apache-2.0
2022-01-03T19:36:36.000Z
2022-03-30T03:57:58.000Z
doc/source/problems/single/griewank.ipynb
gabicavalcante/pymoo
1711ce3a96e5ef622d0116d6c7ea4d26cbe2c846
Apache-2.0
2021-11-22T08:01:47.000Z
2022-03-11T08:53:58.000Z
Qwen/Qwen-72B
1. YES
2. YES