Learn R Programming

soobench (version 1.9.18)

generate_ackley_function: Ackley test function generator

Description

Generator for the Ackley test function. The Ackley function is defined as $$ f(x) = -20 \exp \left( -0.2 \sqrt{\frac{1}{n} \sum_{i=1}^n \left(x_i^2\right)} \right) - \exp \left( \frac{1}{n}\sum_{i=1}^n \cos\left(2 \pi x_i \right) \right) + 20 + \exp(1)$$

Usage

generate_ackley_function(dimensions)

Arguments

dimensions

[integer(1)] Size of parameter space.

Value

A soo_function.

References

D. H. Ackley. A connectionist machine for genetic hillclimbing. Kluwer Academic Publishers, Boston, 1987

Examples

Run this code
# NOT RUN {
f <- generate_ackley_function(2)
plot(f, rank=TRUE)

# }

Run the code above in your browser using DataLab