pybop.optimisers._cuckoo#
Classes#
Cuckoo Search (CS) optimisation algorithm, inspired by the brood parasitism |
Module Contents#
- class pybop.optimisers._cuckoo.CuckooSearchImpl(x0, sigma0=0.05, boundaries=None, pa=0.25)[source]#
Bases:
pints.PopulationBasedOptimiserCuckoo Search (CS) optimisation algorithm, inspired by the brood parasitism of some cuckoo species. This algorithm was introduced by Yang and Deb in 2009.
The algorithm uses a population of host nests (solutions), where each cuckoo (new solution) tries to replace a worse nest in the population. The quality or fitness of the nests is determined by the cost function. A fraction of the worst nests is abandoned at each generation, and new ones are built randomly.
The pseudo-code for the Cuckoo Search is as follows:
Initialise population of n host nests
- While (t < max_generations):
Get a cuckoo randomly by Lévy flights
Evaluate its quality/fitness F
Choose a nest among n (say, j) randomly
- If (F > fitness of j):
Replace j with the new solution
Abandon a fraction (pa) of the worst nests and build new ones
Keep the best solutions/nests
Rank the solutions and find the current best
End While
This implementation also uses a decreasing step size for the Lévy flights, calculated as sigma = sigma0 / sqrt(iterations), where sigma0 is the initial step size and iterations is the current iteration number.
Parameters: - pa: Probability of discovering alien eggs/solutions (abandoning rate)
References: - X. -S. Yang and Suash Deb, “Cuckoo Search via Lévy flights,”
2009 World Congress on Nature & Biologically Inspired Computing (NaBIC), Coimbatore, India, 2009, pp. 210-214, https://doi.org/10.1109/NABIC.2009.5393690.
S. Walton, O. Hassan, K. Morgan, M.R. Brown, Modified cuckoo search: A new gradient free optimisation algorithm, Chaos, Solitons & Fractals, Volume 44, Issue 9, 2011, Pages 710-718, ISSN 0960-0779, https://doi.org/10.1016/j.chaos.2011.06.004.
- _suggested_population_size()[source]#
Inherited from Pints:PopulationBasedOptimiser. Returns a suggested population size, based on the dimension of the parameter space.