Rastrigin function
In mathematical optimization, the Rastrigin function is a non-convex function used as a performance test problem for optimization algorithms. It is a typical example of non-linear multimodal function. It was first proposed in 1974 by Rastrigin as a 2-dimensional function and has been generalized by Rudolph. The generalized version was popularized by Hoffmeister & Bäck and Mühlenbein et al. Finding the minimum of this function is a fairly difficult problem due to its large search space and its large number of local minima.
On an -dimensional domain it is defined by:
where and. There are many extrema:
- The global minimum is at where.
- The maximum function value for is located at :
| Number of dimensions | Maximum value at |
| 1 | 40.35329019 |
| 2 | 80.70658039 |
| 3 | 121.0598706 |
| 4 | 161.4131608 |
| 5 | 201.7664509 |
| 6 | 242.1197412 |
| 7 | 282.4730314 |
| 8 | 322.8263216 |
| 9 | 363.1796117 |
Here are all the values at 0.5 interval listed for the 2D Rastrigin function with :
The abundance of local minima underlines the necessity of a global optimization algorithm when needing to find the global minimum. Local optimization algorithms are likely to get stuck in a local minimum.