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).
| Elephant herding behaviour | Element of the algorithm |
|---|---|
| A herd is made up of several clans | The population of candidate solutions is divided into a fixed number of clans |
| Each clan is led by a matriarch | The best solution in each clan acts as its matriarch |
| Clan members follow the matriarch | Clan updating operator: each solution moves towards its clan's best solution |
| The matriarch reflects the whole clan | The matriarch is updated from the centre (mean position) of its clan |
| Adult males leave the family group | Separating 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).
- 1Initialise the population and divide it into clans
- 2Evaluate fitness and identify each clan's best
- 3Clan updating: move members towards the best; move the best towards the clan centre
- 4Separating: replace the worst member of each clan at random
- 5Re-evaluate and repeat until the evaluation budget is used

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
- Characterise the problem. Continuous, discrete or mixed variables; number of dimensions; constraints; cost of one evaluation; noise; single or multiple objectives.
- Check whether an exact or classical method will do. Linear, convex or small problems rarely need a metaheuristic.
- 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.
- 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.
- 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).
- Characterise the problem. Continuous sizing variables, many constraints, and each evaluation needs a finite element analysis, so the budget is a few thousand evaluations.
- 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).
- 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).
- Run the comparison. Thirty independent runs per method on each truss instance, all with the same evaluation budget and tuning effort.
- 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.
- 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
| Item | What to report |
|---|---|
| Algorithm description | Operators in plain optimisation terms, with pseudocode and all parameters |
| Baselines | Which established methods were compared, their sources and versions |
| Benchmarks | Suites and instances used, including shifts or rotations, and any real-problem instances |
| Budget | Number of function evaluations per run, and the tuning budget for every algorithm |
| Runs | Number of independent runs and how seeds were set |
| Results | Median and spread, not only the best run; convergence plots; feasibility rates for constrained problems |
| Statistics | Tests used and their outcomes, with corrections for multiple comparisons (Derrac et al., 2011) |
| Code and data | Repository 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
- EHO divides solutions into clans, moves members towards each clan's best and replaces the worst at random (Wang et al., 2016).
- EHO has many variants and applications, which signals both interest and the weaknesses of the original (Li et al., 2020).
- Basic EHO tends to converge towards the origin, so test it on shifted problems (Ismaeel et al., 2019; Kudela, 2022).
- No optimiser is best for every problem, so justify your choice for your problem's structure (Wolpert & Macready, 1997).
- Fair comparisons need established suites, equal evaluation budgets, many runs and nonparametric tests (Hansen et al., 2016; Derrac et al., 2011).
- Describe algorithms by their mechanism, not their metaphor (Aranha et al., 2022).
