ackley: Ackley function

Description Usage Arguments Details Value Examples

View source: R/Ackley.R

Description

This function is a classic benchmark function for testing optimization algorithms.

Usage

1
ackley(x)

Arguments

x

vector for calculating the Ackley function value.

Details

Function has many local minima and represents a threat for almost any optimization algorithm. The recommended values for the parameters are used, with a=20, b=0.2 and c=2*pi. Usually x_i is set between [-32,32] for each i, but can also be restricted to a smaller domain.

Value

If x is a vector, returns the Ackley function value corrisponding to this vector. If is a matrix, returns the value of the function applied on each row vector.

Examples

1
2
3
##INPUT:
xx = runif(3)
g <- ackley(xx)

FilippoPic/DEoptimPIC documentation built on Feb. 14, 2022, 5:12 a.m.