Blog articleMethodology & analyticsComputer science

Elephant herding optimisation and beyond: how to choose and benchmark a metaheuristic for your thesis

Elephant herding optimisation is one of many nature-inspired algorithms used in engineering and computer science theses. This article explains how it works, what the critical literature says about metaphor-based metaheuristics, and how to choose and benchmark an optimiser so that your results stand up to examination.

What you will learn

  • Explain the clan updating and separating operators of elephant herding optimisation
  • Explain why no optimisation algorithm is best across all problems
  • Evaluate claims of novelty and performance made for metaphor-based metaheuristics
  • Design a fair benchmark with shifted problems, equal budgets and repeated runs
  • Choose appropriate statistical tests and reporting for algorithm comparisons

What you will unlearn

  • A new nature-inspired algorithm is a contribution in itself.A new metaphor is not a contribution unless the search mechanism is new and shown to perform well under fair tests.
  • If my algorithm wins on standard benchmark functions, it is better.Some algorithms are biased towards the centre of the search space, where many classic test functions have their optimum.
  • One run per problem is enough to compare algorithms.Metaheuristics are stochastic, so comparisons need many independent runs and suitable statistical tests.
  • There must be one best optimiser I can use for everything.No-free-lunch results show that, averaged over all problems, no algorithm outperforms any other.

Skills you will practise

  • Metaheuristic design
  • Benchmark selection
  • Shifted and rotated test problems
  • Evaluation budgets
  • Nonparametric comparison tests
  • Reproducible experiments

Why look critically at a nature-inspired algorithm

Metaheuristics are general search strategies for optimisation problems that are too large, irregular or poorly understood for exact methods. Many are inspired by a natural process: evolution, ant foraging, bird flocking. Elephant herding optimisation (EHO), proposed by Wang, Deb and Coelho in 2015 and set out in a journal article the following year (Wang et al., 2016), models the social structure of elephant herds. By April 2020, a review counted ninety-three related studies (Li et al., 2020).

Doctoral researchers in engineering and computer science often meet algorithms like EHO when they need to tune a model, design a structure or schedule a system. This rebuilt version keeps that introduction but adds what a thesis now needs: a critical view of metaphor-based algorithms, the reasons no optimiser is best for every problem, and a method for choosing and benchmarking one fairly.

How elephant herding optimisation works

EHO draws on two observations about elephant herds. Elephants live in clans of related females led by a matriarch, and young males leave their family group as they mature. The algorithm translates these into two operators (Wang et al., 2016; Li et al., 2020).

Table 1. Elephant herding behaviour and the EHO algorithm (after Wang et al., 2016)
Elephant herding behaviourElement of the algorithm
A herd is made up of several clansThe population of candidate solutions is divided into a fixed number of clans
Each clan is led by a matriarchThe best solution in each clan acts as its matriarch
Clan members follow the matriarchClan updating operator: each solution moves towards its clan's best solution
The matriarch reflects the whole clanThe matriarch is updated from the centre (mean position) of its clan
Adult males leave the family groupSeparating operator: the worst solution in each clan is replaced by a random one

Clan updating operator

For each elephant j in clan ci, the new position is the old position plus a step towards the clan's best solution: xnew = x + α(xbest − x)r, where α in [0, 1] is a scale factor and r in [0, 1] is a random number. The best elephant itself is moved to β times the clan centre, with β in [0, 1] controlling the influence of the centre (Li et al., 2020).

Separating operator

In each generation the worst elephant in each clan is replaced by a new solution generated at random between the lower and upper bounds of the search space. This reintroduces diversity and helps the search escape local optima (Li et al., 2020).

  1. 1Initialise the population and divide it into clans
  2. 2Evaluate fitness and identify each clan's best
  3. 3Clan updating: move members towards the best; move the best towards the clan centre
  4. 4Separating: replace the worst member of each clan at random
  5. 5Re-evaluate and repeat until the evaluation budget is used
Figure 1. The main loop of elephant herding optimisation.
Separating operator in elephant herding optimisation
Figure 2. The separating operator.

Applications and variants

The main applications are covered in the 2020 review by Li et al. (2020): predicting the cooling load of residential buildings with an EHO-trained neural network, classifying cells for acute lymphoblastic leukaemia, modelling renewable generation in micro-grids, minimising the weight of truss structures, and tuning controllers for load frequency control.

Most later work modifies the algorithm rather than applying the original. Li et al. (2019) proposed new individual updating strategies for large-scale problems; Ismaeel et al. (2019) proposed enhanced versions to correct weaknesses of basic EHO; and Duan et al. (2023) hybridised EHO with manta ray foraging and Gaussian mutation. The volume of variants is itself a warning sign for a doctoral researcher: if the original needed so many repairs, you should test carefully whether any version suits your problem.

A critical view: weaknesses, centre bias and the metaphor problem

Known weaknesses of basic EHO

The EHO literature itself records limitations. The 2020 review notes that "EHO has a lower level of constrained optimization than similar methods" and that most researchers "have merely focused on the optimization effects of EHO", with little theoretical analysis (Li et al., 2020). Ismaeel et al. (2019) identified a lack of exploitation and proposed enhanced versions "to overcome the problems of fast unjustified convergence toward the origin of the basic EHO".

The second point matters for anyone testing EHO. In the clan updating operator, the best elephant is moved to β times the clan centre. With β between 0 and 1, this multiplies coordinates by a number smaller than one and so pulls the best solutions towards the origin of the coordinate system, whether or not the optimum lies there.

Centre bias and misleading benchmarks

This kind of behaviour interacts badly with common test problems. Kudela (2022) showed that several frequently used benchmark functions have their optimum at the centre of the feasible set, and that seven recently published methods contained a centre-bias operator that let them find such optima with ease. When the problems were shifted, only one of the seven performed consistently better than two long-standing methods, differential evolution and particle swarm optimisation; three performed on par, two performed very badly and the worst was barely better than random search. Kudela did not analyse EHO, but the lesson applies to any algorithm with an operator that pulls towards the origin or centre: test it on shifted problems before trusting its results.

The metaphor problem

EHO is one of a large family of algorithms named after animals or natural phenomena. Researchers in swarm intelligence have argued that many such algorithms are existing methods described in new vocabulary. Camacho Villalón et al. (2019) showed that the intelligent water drops algorithm cannot be considered novel, and Piotrowski et al. (2014) questioned the novelty of black hole optimisation. Tzanetos and Dounias (2021) asked whether nature-inspired algorithms are anything more than variations of known metaheuristics, and a group of researchers in the field published a call for action on metaphor-based metaheuristics (Aranha et al., 2022).

For a thesis, the practical consequence is simple. Describe any algorithm you use in plain optimisation terms (what moves, towards what, with what randomness), compare it with established methods, and do not claim novelty for a new metaphor.

No free lunch: why there is no best optimiser

The no-free-lunch theorems of Wolpert and Macready (1997) show that, averaged over all possible problems, every optimisation algorithm performs equally well. An algorithm that does better on one class of problems must pay for it on another. The theorems do not make comparison pointless, because real problems have structure, but they change the question. You should not ask which algorithm is best, but which algorithm is best suited to the structure of your problem, and show it with evidence.

How to choose an optimiser for your research

  1. Characterise the problem. Continuous, discrete or mixed variables; number of dimensions; constraints; cost of one evaluation; noise; single or multiple objectives.
  2. Check whether an exact or classical method will do. Linear, convex or small problems rarely need a metaheuristic.
  3. Start from established baselines. Differential evolution, particle swarm optimisation, a genetic algorithm or an evolution strategy appropriate to the problem type, ideally in a maintained library.
  4. Add a newer algorithm only with a reason. A specific property of your problem that the algorithm's mechanism addresses, not its popularity or metaphor.
  5. Decide the comparison before running it. Benchmarks, budgets, number of runs and statistical tests, as described in the next section.

Benchmarking fairly

Choose problems that cannot be gamed

Use established benchmark suites rather than a handful of classic functions. The suites of the IEEE Congress on Evolutionary Computation (CEC) competitions and the COCO platform (Hansen et al., 2016) provide shifted and rotated problems with documented evaluation rules. Even these have limits: a decade of work on the CEC 2005 suite revealed weaknesses in how comparisons were made (García-Martínez et al., 2017), and benchmarking for constrained problems has its own pitfalls (Hellwig & Beyer, 2019). If you use classic functions at all, shift their optima away from the centre (Kudela, 2022). Include instances of your real problem wherever possible.

Give every algorithm the same budget

Measure effort in objective function evaluations, not iterations, because algorithms with different population sizes do very different amounts of work per iteration. Tune every algorithm, including the baselines, with the same tuning budget, or use the defaults recommended by their authors for all of them.

Run enough repetitions and test properly

Metaheuristics are stochastic, so each algorithm must be run many times on each problem with independent seeds. The number of algorithms, problems and runs all affect the conclusions a comparison can support (Veček et al., 2017). Results across problems are rarely normally distributed, so nonparametric tests are the usual choice: the Wilcoxon signed-rank test for two algorithms, and the Friedman test with post hoc procedures for several (Derrac et al., 2011).

Make it reproducible

Archive the code, the configuration of every run, the seeds and the raw results, so that every table and figure can be regenerated (Sandve et al., 2013).

Worked example: testing EHO for a design problem (illustrative)

Illustrative case. A doctoral researcher in structural engineering wants to minimise the weight of a truss subject to stress and displacement constraints, and has read that EHO variants have been used for this (Li et al., 2020).

  1. Characterise the problem. Continuous sizing variables, many constraints, and each evaluation needs a finite element analysis, so the budget is a few thousand evaluations.
  2. Choose baselines. Differential evolution and particle swarm optimisation with a standard constraint-handling method, plus basic EHO and one published variant (Ismaeel et al., 2019).
  3. Check for centre bias. Before the engineering runs, all methods are tested on shifted benchmark functions, to see whether basic EHO's performance falls when the optimum moves away from the origin, as its reported origin bias would predict (Ismaeel et al., 2019; Kudela, 2022).
  4. Run the comparison. Thirty independent runs per method on each truss instance, all with the same evaluation budget and tuning effort.
  5. Test and report. Friedman test with post hoc comparisons (Derrac et al., 2011); median and spread of the best feasible weight; convergence curves; and the share of runs reaching a feasible design.
  6. Interpret honestly. If an established method performs as well, the thesis says so. The contribution may then lie in the problem formulation or the constraint handling rather than in the choice of optimiser.

What to report

Table 2. What to report when comparing metaheuristics
ItemWhat to report
Algorithm descriptionOperators in plain optimisation terms, with pseudocode and all parameters
BaselinesWhich established methods were compared, their sources and versions
BenchmarksSuites and instances used, including shifts or rotations, and any real-problem instances
BudgetNumber of function evaluations per run, and the tuning budget for every algorithm
RunsNumber of independent runs and how seeds were set
ResultsMedian and spread, not only the best run; convergence plots; feasibility rates for constrained problems
StatisticsTests used and their outcomes, with corrections for multiple comparisons (Derrac et al., 2011)
Code and dataRepository link, configurations and raw results (Sandve et al., 2013)

Common mistakes

  • Choosing an algorithm because of its metaphor or recent popularity.
  • Testing only on classic functions with the optimum at the origin.
  • Comparing algorithms with different numbers of function evaluations or different tuning effort.
  • Reporting the best of several runs instead of the distribution of results.
  • Claiming an algorithm is superior in general, contrary to the no-free-lunch results.
  • Omitting established baselines such as differential evolution or particle swarm optimisation.

Key takeaways

Your next step

Want to apply this to your own study?

  1. 1Tell us your topic, data and deadline
  2. 2A statistician reviews your work with you
  3. 3You get a plan and a quote
Software programming

References

  1. Aranha, C., Camacho Villalón, C. L., Campelo, F., Dorigo, M., Ruiz, R., Sevaux, M., Sörensen, K., & Stützle, T. (2022). Metaphor-based metaheuristics, a call for action: The elephant in the room. Swarm Intelligence, 16, 1–6. https://doi.org/10.1007/s11721-021-00202-9
  2. Camacho Villalón, C. L., Dorigo, M., & Stützle, T. (2019). The intelligent water drops algorithm: Why it cannot be considered a novel algorithm. Swarm Intelligence, 13, 173–192. https://doi.org/10.1007/s11721-019-00165-y
  3. Derrac, J., García, S., Molina, D., & Herrera, F. (2011). A practical tutorial on the use of nonparametric statistical tests as a methodology for comparing evolutionary and swarm intelligence algorithms. Swarm and Evolutionary Computation, 1(1), 3–18. https://doi.org/10.1016/j.swevo.2011.02.002
  4. Duan, Y., Liu, C., Li, S., Guo, X., & Yang, C. (2023). Manta ray foraging and Gaussian mutation-based elephant herding optimization for global optimization. Engineering with Computers, 39, 1085–1125. https://doi.org/10.1007/s00366-021-01494-5
  5. García-Martínez, C., Gutiérrez, P. D., Molina, D., Lozano, M., & Herrera, F. (2017). Since CEC 2005 competition on real-parameter optimisation: A decade of research, progress and comparative analysis's weakness. Soft Computing, 21, 5573–5583. https://doi.org/10.1007/s00500-016-2471-9
  6. Hansen, N., Auger, A., Mersmann, O., Tušar, T., & Brockhoff, D. (2016). COCO: A platform for comparing continuous optimizers in a black-box setting (arXiv:1603.08785). arXiv. https://arxiv.org/abs/1603.08785
  7. Hellwig, M., & Beyer, H.-G. (2019). Benchmarking evolutionary algorithms for single objective real-valued constrained optimization: A critical review. Swarm and Evolutionary Computation, 44, 927–944. https://doi.org/10.1016/j.swevo.2018.10.002
  8. Ismaeel, A. A. K., Elshaarawy, I. A., Houssein, E. H., Ismail, F. H., & Hassanien, A. E. (2019). Enhanced elephant herding optimization for global optimization. IEEE Access, 7, 34738–34752. https://ieeexplore.ieee.org/document/8666124
  9. Kudela, J. (2022). A critical problem in benchmarking and analysis of evolutionary computation methods. Nature Machine Intelligence, 4, 1238–1245. https://doi.org/10.1038/s42256-022-00579-0
  10. Li, J., Guo, L., Li, Y., & Liu, C. (2019). Enhancing elephant herding optimization with novel individual updating strategies for large-scale optimization problems. Mathematics, 7(5), 395. https://doi.org/10.3390/math7050395
  11. Li, J., Lei, H., Alavi, A. H., & Wang, G.-G. (2020). Elephant herding optimization: Variants, hybrids, and applications. Mathematics, 8(9), 1415. https://doi.org/10.3390/math8091415
  12. Piotrowski, A. P., Napiorkowski, J. J., & Rowinski, P. M. (2014). How novel is the "novel" black hole optimization approach? Information Sciences, 267, 191–200. https://doi.org/10.1016/j.ins.2014.01.026
  13. Sandve, G. K., Nekrutenko, A., Taylor, J., & Hovig, E. (2013). Ten simple rules for reproducible computational research. PLoS Computational Biology, 9(10), e1003285. https://doi.org/10.1371/journal.pcbi.1003285
  14. Tzanetos, A., & Dounias, G. (2021). Nature inspired optimization algorithms or simply variations of metaheuristics? Artificial Intelligence Review, 54, 1841–1862. https://doi.org/10.1007/s10462-020-09893-8
  15. Veček, N., Črepinšek, M., & Mernik, M. (2017). On the influence of the number of algorithms, problems, and independent runs in the comparison of evolutionary algorithms. Applied Soft Computing, 54, 23–45. https://doi.org/10.1016/j.asoc.2017.01.011
  16. Wang, G.-G., Deb, S., Gao, X.-Z., & Coelho, L. D. S. (2016). A new metaheuristic optimisation algorithm motivated by elephant herding behaviour. International Journal of Bio-Inspired Computation, 8(6), 394–409. https://doi.org/10.1504/IJBIC.2016.081335
  17. Wolpert, D. H., & Macready, W. G. (1997). No free lunch theorems for optimization. IEEE Transactions on Evolutionary Computation, 1(1), 67–82. https://doi.org/10.1109/4235.585893

How to cite this article

Choose your referencing style, then copy. Check your university's or journal's guide for local variations.

PhD Research Lab Academy. (2019, November 19). Elephant herding optimisation and beyond: how to choose and benchmark a metaheuristic for your thesis. PhD Research Lab. https://www.phdassistance.com/engineering-technology/dissertation-algorithm-development-tips-for-developing-elephant-herding-optimization-eho-where-and-how-it-is-able-to-solve-complicated-optimization-problems/

PhD Research Lab Academy. “Elephant Herding Optimisation and Beyond: How to Choose and Benchmark a Metaheuristic for Your Thesis.” PhD Research Lab, 19 Nov. 2019, www.phdassistance.com/engineering-technology/dissertation-algorithm-development-tips-for-developing-elephant-herding-optimization-eho-where-and-how-it-is-able-to-solve-complicated-optimization-problems. Accessed [access date].

PhD Research Lab Academy (2019) Elephant herding optimisation and beyond: how to choose and benchmark a metaheuristic for your thesis. PhD Research Lab. Available at: https://www.phdassistance.com/engineering-technology/dissertation-algorithm-development-tips-for-developing-elephant-herding-optimization-eho-where-and-how-it-is-able-to-solve-complicated-optimization-problems/ (Accessed: [access date]).

PhD Research Lab Academy. “Elephant Herding Optimisation and Beyond: How to Choose and Benchmark a Metaheuristic for Your Thesis.” PhD Research Lab. November 19, 2019. https://www.phdassistance.com/engineering-technology/dissertation-algorithm-development-tips-for-developing-elephant-herding-optimization-eho-where-and-how-it-is-able-to-solve-complicated-optimization-problems.

PhD Research Lab Academy, ‘Elephant Herding Optimisation and Beyond: How to Choose and Benchmark a Metaheuristic for Your Thesis’ (PhD Research Lab, 19 November 2019) <https://www.phdassistance.com/engineering-technology/dissertation-algorithm-development-tips-for-developing-elephant-herding-optimization-eho-where-and-how-it-is-able-to-solve-complicated-optimization-problems> accessed [access date].

PhD Research Lab Academy. Elephant herding optimisation and beyond: how to choose and benchmark a metaheuristic for your thesis [Internet]. PhD Research Lab; 2019 Nov 19 [cited [access date]]. Available from: https://www.phdassistance.com/engineering-technology/dissertation-algorithm-development-tips-for-developing-elephant-herding-optimization-eho-where-and-how-it-is-able-to-solve-complicated-optimization-problems/

PhD Research Lab Academy, “Elephant herding optimisation and beyond: how to choose and benchmark a metaheuristic for your thesis,” PhD Research Lab, Nov. 19, 2019. [Online]. Available: https://www.phdassistance.com/engineering-technology/dissertation-algorithm-development-tips-for-developing-elephant-herding-optimization-eho-where-and-how-it-is-able-to-solve-complicated-optimization-problems. [Accessed: [access date]].

@online{dissertation_algorithm_development_tips_for_developing_elephant_herding_optimization_eho_where_and_how_it_is_able_to_solve_complicated_optimization_problems_2019,
  author = {{PhD Research Lab Academy}},
  title = {{Elephant herding optimisation and beyond: how to choose and benchmark a metaheuristic for your thesis}},
  organization = {PhD Research Lab},
  date = {2019-11-19},
  url = {https://www.phdassistance.com/engineering-technology/dissertation-algorithm-development-tips-for-developing-elephant-herding-optimization-eho-where-and-how-it-is-able-to-solve-complicated-optimization-problems},
  urldate = {[access date]}
}

This article is for learning. Use it to understand the method and cite the original sources above in your own work; do not copy or submit it as your own.

Elephant herding optimisation and beyondNeed help applying it to your study?
Software programming