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 by Rastrigin  as a 2-dimensional function and has been generalized by 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:
where and . It has a global minimum at where .
- Rastrigin, L. A. "Systems of extremal control." Mir, Moscow (1974).
- H. Mühlenbein, D. Schomisch and J. Born. "The Parallel Genetic Algorithm as Function Optimizer ". Parallel Computing, 17, pages 619–632, 1991.