Implementation of n-dimensional Ackley function, with a=20a=20, b=0.2b=0.2 and c=2c=2 (see definition below).
ackley_func(x)
The value of the function.
numeric or complex vector.
On an n-dimensional domain it is defined by
f(x) = -a(-b 1n_i=1^n x_i^2 ) -(1n_i=1^n (cx_i) ) + a + (1),-aexp(-bsqrt(1/nsum_1^n (x_i^2)) -exp(1/nsum_1^n ((c*x_i)) + a + exp(1), and is usually evaluated on x_i [ -32.768, 32.768 ]x_i in [-32.768, 32.768], for all i=1,...,ni=1,...,n. The function has one global minimum at f(x)=0f(x)=0 for x_i=0x_i=0 for all i=1,...,ni=1,...,n.
Ackley1987EmiR