Employed bees perturb one coordinate, v_ij = x_ij + phi (x_ij - x_kj),
phi ~ U(-1, 1), keeping v when it is no worse; onlookers repeat this for
sources drawn with probability proportional to fit = 1 / (1 + f) (1 + |f| for
f < 0); the most-tried source beyond limit failures is re-drawn (scout).
Draws come from the morie Philox streams in the same order as the Python arm.
Usage
ArtificialBeeColony(
f,
bounds,
limit = NULL,
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.
- limit
Abandonment limit (default n_pop times the dimension).
- n_pop
Population size.
- max_iter
Iterations.
- seed
Philox seed.
Value
list(x, fun, estimate, history, n_fev, method).
References
Karaboga, D. and Basturk, B. (2007). A powerful and efficient
algorithm for numerical function optimization: artificial bee colony (ABC)
algorithm. Journal of Global Optimization 39, 459-471.
Examples
ArtificialBeeColony(function(x) sum(x^2), list(c(-5, 5), c(-5, 5)), max_iter = 50)$fun
#> [1] 2.66419e-15