The Shekel function or also Shekel's foxholes is a multidimensional, multimodal, continuous, deterministic function commonly used as a test function for testing optimization techniques.
The mathematical form of a function in n {\displaystyle n} dimensions with m {\displaystyle m} maxima is:
f ( x → ) = ∑ i = 1 m ( c i + ∑ j = 1 n ( x j − a j i ) 2 ) − 1 {\displaystyle f({\vec {x}})=\sum _{i=1}^{m}\;\left(c_{i}+\sum \limits _{j=1}^{n}(x_{j}-a_{ji})^{2}\right)^{-1}}
or, similarly,
f ( x 1 , x 2 , . . . , x n − 1 , x n ) = ∑ i = 1 m ( c i + ∑ j = 1 n ( x j − a i j ) 2 ) − 1 {\displaystyle f(x_{1},x_{2},...,x_{n-1},x_{n})=\sum _{i=1}^{m}\;\left(c_{i}+\sum \limits _{j=1}^{n}(x_{j}-a_{ij})^{2}\right)^{-1}}