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 n -dimensional domain it is defined by: : f(\mathbf{x}) = A n + \sum_{i=1}^n \left[x_i^2 - A\cos(2 \pi x_i)\right] where A=10 and x_i\in[-5.12,5.12] . There are many extrema: * The global minimum is at \mathbf{x} = \mathbf{0} where f(\mathbf{x})=0 . * The maximum function value for x_i\in[-5.12,5.12] is located at \mathbf{x} = (\pm4.52299366..., ..., \pm4.52299366...) : Here are all the values at 0.5 interval listed for the 2D Rastrigin function with x_i\in[-5.12,5.12] : 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.
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 n -dimensional domain it is defined by: f(\mathbf{x}) = A n + \sum_{i=1}^n \left[x_i^2 - A\cos(2 \pi x_i)\right] where A=10 and x_i\in[-5.12,5.12] . There are many extrema: The global minimum is at \mathbf{x} = \mathbf{0} where f(\mathbf{x})=0 . The maximum function value for x_i\in[-5.12,5.12] is located at \mathbf{x} = (\pm4.52299366..., ..., \pm4.52299366...) : Here are all the values at 0.5 interval listed for the 2D Rastrigin function with x_i\in[-5.12,5.12] : 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. ==Notes==
References
No reference rows published for this article.
Cite this article
MLA
"Rastrigin function." encyclopegia.org, 2025, https://encyclopegia.org/wiki/rastrigin-function. Accessed 24 November 2026.
Chicago
"Rastrigin function." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/rastrigin-function.
APA
encyclopegia.org. (2025). Rastrigin function. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/rastrigin-function
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON