Skip to contents

Teacher phase x + r (x_teacher - T_F mean), T_F in 1, 2; learner phase with a random partner k: x + r (x - x_k) if x is better, else x + r (x_k - x); each proposal is kept when better.

Usage

TeachingLearningOptimizer(f, bounds, 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.

n_pop

Population size.

max_iter

Iterations.

seed

Philox seed.

Value

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

References

Rao, R. V., Savsani, V. J. and Vakharia, D. P. (2011). Teaching-learning-based optimization: a novel method for constrained mechanical design optimization problems. Computer-Aided Design 43, 303-315.

Examples

TeachingLearningOptimizer(function(x) sum(x^2), list(c(-5, 5), c(-5, 5)), max_iter = 50)$fun
#> [1] 5.988506e-21