Skip to contents

Each nest proposes x_i + step L (x_i - x*) with a Mantegna Levy vector L (beta = 3/2) and replaces nest i when better; then each coordinate is, with probability pa, moved by r (x_p1 - x_p2) for two random nests, kept when better.

Usage

CuckooSearch(
  f,
  bounds,
  pa = 0.25,
  step = 0.01,
  n_pop = 20,
  max_iter = 200,
  seed = 0
)

Arguments

f

Objective to minimise.

bounds

List of c(low, high) pairs or a two-column matrix.

pa

Abandoned fraction.

step

Levy step scale.

n_pop

Population size.

max_iter

Iterations.

seed

Philox seed.

Value

list(x, fun, estimate, history, n_fev, method).

References

Yang, X.-S. and Deb, S. (2009). Cuckoo search via Levy flights. World Congress on Nature and Biologically Inspired Computing (NaBIC 2009), 210-214.

Examples

CuckooSearch(function(x) sum(x^2), list(c(-5, 5), c(-5, 5)), max_iter = 50)$fun
#> [1] 0.00144273