1 Introduction

A meta-heuristic algorithm (MHA) is a technique that obtains approximate optimality under certain time and occasion constraints, which are favored for their simplicity, efficiency, and low computational cost. The study of MHA began in the 1980s; in 1983, Kirkpatrick et al. proposed the simulated annealing algorithm (SA) [1] by combining the concepts of thermodynamic annealing and the Monte Carlo algorithm. In 1992, the genetic algorithm (GA) [2] based on Darwin’s theory of evolution was proposed by Holland. Then, the particle swarm optimization algorithm (PSO) [3] was proposed by Kennedy et al. in 1995 and the ant colony optimization algorithm (ACO) [4] was designed by Dorigo et al. in 1997. The wide application and extraordinary performance of these technologies make MHA a research hotspot. Subsequently, many MHAs have sprung up like mushrooms. The most widely recognized classifications of MHA are divided into two sorts: single agent based and population based [5]. In research [6], these algorithms can be divided into many categories because of different thinking principles including stochastic, deterministic, iterative based, population based, etc. In the literature [7], all MHA can be classified into three groups depending on the different sources of inspiration: a) swarm intelligence algorithms, b) non-swarm intelligence algorithms, and c) physical and chemical algorithms.

It is well known that in addition to the public parameters, maximum iterations, and population size, many MHA also need to set special parameters. As the adequate setting of special parameters is quite difficult and will greatly affect the searching performance of the algorithm, in this study, we divided all MHA into two categories based on whether these are present: special parameter meta-heuristic algorithms (SPs) and free-special parameter meta-heuristic algorithms (FPs). Main SPs include genetic algorithm (GA), particle swarm optimization algorithm (PSO), ant colony optimization algorithm (ACO), fireworks algorithm (FWA) [8], gravitational search algorithm (GSA) [9], and harmony search algorithm (HS) [10, 11]. Among them, FWA was established by mimicking the process of firework explosions, GSA was designed by applying Newton’s law of universal gravitation, and HS was proposed based on the process of musicians playing chords. In addition, more superior SPs have been proposed in recent years, such as monarch butterfly optimization algorithm (MBO) [12], earthworm optimization algorithm (EOA) [13], elephant herding optimization algorithm (EHO) [14], whale optimization algorithm (WOA) [15], bat algorithm (BA) [16], krill herd algorithm (KH) [17], chemical reaction optimization algorithm (CRO) [18], water wave optimization algorithm (WWO) [19],firefly algorithm (FA) [20], chaotic bat algorithm (CBA) [21], enhanced firefly algorithm (EFA) [22], salp swarm algorithm (SSA) [23], hybrid salp swarm algorithm (HSSA) and hybrid salp swarm algorithm with proportional selection operator (PHSSA) [24], grasshopper optimization algorithm (GOA) [25], hybrid ant lion optimization algorithm (HALO) [26], etc.

The main FPs are: Moth-flame optimization algorithm (MFO) [27], Teaching–learning-based optimization algorithm (TLBO) [28], grey wolf optimization algorithm (GWO) [29] and cuckoo search algorithm (CS) [30]. Among them, MFO was established by modeling behavior that the moths rotate around the artificial light source, TLBO was designed based the situation that a teacher teaches knowledge to learners in a class, GWO was proposed by mimicking the leadership hierarchy and hunting process of grey wolves, CS was proposed based on the obligate brood parasitic behavior and the Levy flight behavior of cuckoo species. Undoubtedly, these algorithms have achieved favorable results in various research fields and real problems. However, according to the No Free Lunch (NFL) theorem [31], no algorithm is suitable for solving all optimization problems, especially in the context of the “artificial intelligence” era where a lot of optimization problems are emerging. Therefore, Heidari et al. developed a new MHA in 2019, called the Harris hawks optimization algorithm (HHO) [32].

HHO is a novel swarm intelligent optimization algorithm with free-special parameters, inspired by the cooperative hunting behavior and chasing styles of Harris hawks. It has been proven that the HHO performs extraordinarily in handling several optimization tasks, which are largely decided by its good balance of exploration and exploitation properties. Another commendable advantage is that multiple strategies are introduced in the construction of HHO to make it more intelligent.

The main inspiration of this paper is as follows. In the field of meta-heuristic algorithm, PSO is a classic and outstanding technology. In the literature [33], a linearly decreasing inertia weight parameter is introduced into the original PSO, which significantly improves the performance of PSO. In the literature [34], an adaptive particle swarm optimization (APSO) is proposed based on automatic control of inertia weight by evolutionary factor and acceleration coefficients. In the paper [35], a fuzzy system is implemented to dynamically adjust the inertia weight to improve the performance of the PSO. In the research [36], a new variant of PSO is proposed based on a nonlinear inertia weight adjustment strategy. The experimental results show that the nonlinear adjustment strategy further enhances the search performance of PSO. In addition, the results of literature [37] show that different adjustment strategies of genetic mutation probability will greatly affect the search performance of a novel global harmony search algorithm (NGHS). Therefore, it is necessary to study the adjustment strategy of key variables in meta-heuristic algorithm.

In HHO, the escaping energy (E) is an important variable to control the exploration and exploitation process of HHO, and it uses a linear decreasing update strategy. However, the main weakness of this strategy is that the value of E cannot be larger than 1 in the second half of the iteration, which means that the global search ability of the algorithm is lost in this stage. For some optimization problems, this situation may lead to premature convergence, slow convergence speed and fall into local optimum. In addition, for some optimization tasks, the solution accuracy of the original HHO still needs to be improved. Therefore, in this study, sufficient research has been conducted for E to speed up the convergence, improve the accuracy of the solution, and enhance the local optimal avoidance. We provide six different updating strategies of E with iteration. The experimental results on twenty benchmark functions show that strategy 6 (i.e. the exponential decreasing strategy) is the best strategy. Therefore, a modified Harris hawks optimization algorithm called MHHO based on strategy 6 is proposed. Subsequently, in order to verify the searching performance of MHHO, it is compared with several advanced optimization technologies such as PSO, GA, HS, MFO, TLBO and conventional HHO. The results show that MHHO is superior to other algorithms in solution accuracy, local optimal avoidance and convergence speed. Moreover, MHHO is used to solve two famous engineering problems. Compared with the results of other optimization techniques, MHHO also has better searching performance in solving constrained optimization problems.

The goal of this paper is threefold. Firstly, according to whether there are special parameters, all MHA can be divided into two categories: SPs and FPs. The classification method is first proposed in this paper. Secondly, a new optimization called MHHO is proposed. We design six different update strategies for E in HHO. The most obvious difference between strategy 6 and other strategies is that its final E value does not decay to 0. This is more consistent with the actual situation of Harris hawks hunting. Thirdly, comparative experiments between MHHO and other advanced optimizers are carried out. We compare and analyze the differences between different algorithms by the numerical results, statistical test of numerical results and convergence curves.

The rest of this manuscript is organized as follows: Sect. 2 describes conventional HHO technology; Sect. 3 represents the MHHO optimizer; and Sect. 4 lists the experimental results and related analysis. Finally, the summary and some associated revelations are presented in Sect. 5.

2 Hho

Harris hawks are mainly distributed in some parts of the United States, such as New Mexico and Arizona. Related research has concluded the Harris hawk to be as true a cooperative hunter as the raptor [38]. When Harris Hawks find prey, they show different chasing behaviors depending on the situation and the way the prey escapes. They are one of the best predators in nature hunting with high accuracy and rarely missing their prey. Inspired by Harris hawk’s foraging behavior, a novel population-based, gradient-free meta-heuristic algorithm (known as HHO) was proposed by Heidari et al. in 2019 [32]. HHO can be divided into two stages: “Seeking prey” and “Hunting prey” according to the different strategies at different stages that are taken by the hawks. The specific implementation details of HHO are as follows.

2.1 Seeking Prey

In this stage, Harris hawk will search for quarry in a search space. This stage is equivalent to the exploration process of the HHO algorithm. Two location update strategies are deployed at the “seeking prey” phase to simulate the waiting, monitoring, observation, and reconnaissance action of the Harris hawks before the prey appears. The two strategies implemented are as equally as possible and can be represented as:

$$ X\left( {t + 1} \right) = \left\{ {\begin{array}{*{20}l} {X_{\text{rand}} \left( t \right) - r_{1} \left| {X_{\text{rand}} \left( t \right) - 2r_{2} X\left( t \right)} \right|} \hfill & {q \ge 0.5} \hfill \\ {\left( {X_{\text{rabbit}} \left( t \right) - X_{m} \left( t \right)} \right) - r_{3} \left( {LB + r_{4} \left( {UB - LB} \right)} \right)} \hfill & {q < 0.5} \hfill \\ \end{array} } \right. $$
(1)

where \( t \) is the current iteration number, \( \varvec{X}\left( t \right)\varvec{ } \) is the current position of hawks, \( \varvec{X}\left( {t + 1} \right) \) represents the position vector of hawks at the next iteration. \( X_{\text{rand}} \left( t \right) \) is any individual in the hawks during the iteration, \( \varvec{X}_{\varvec{m}} \left( t \right) \) is the average position vector of all members in the present population, \( X_{\text{rabbit}} \left( t \right) \) denotes the position of the prey, which is assumed to be the position of the hawks with the best fitness value in each iteration. LB and UB are the upper and lower bounds of the decision variable for a specific problem, respectively. \( r_{1} ,r_{2} ,r_{3} {\text{and}} r_{4} \) are the uniform distribution between 0 and 1.

2.2 Transitional Phase

As time goes by, the possibility of prey appearing increases. Therefore, the hawks need to change from searching for rabbit to capturing it. The HHO algorithm needs to be designed to transition from exploration to exploitation. Therefore, a new concept E was introduced, which refers to the rabbit’s escape energy. E has a decreasing trend before termination condition met, it is updated using the following Eq. (3).

$$ E_{1} = 1 - \frac{t}{T} $$
(2)
$$ E = 2E_{0} \times E_{1} $$
(3)

where \( E_{0} \) refers to the initial energy of the prey in each iteration, which is an even distribution between -1 and 1; \( T \) is the maximum number of iterations. In the HHO algorithm, if \( \left| E \right| \ge 1 \), the Harris hawk will adopt a global search strategy to seek prey. Conversely, if |E| > 1, the local search strategy will be applied to hunt prey.

2.3 Hunting Prey

In the process of the algorithm exploitation, the hawks will chase and eventually kill the rabbit. Real scenes are very complicated and unpredictable. Therefore, according to the different escape modes of prey and the corresponding chasing behaviors of the Harris hawk, four strategies are introduced to imitate the actual situation as much as possible. In the process, \( r \) conforms to a uniform distribution between 0 and 1, which is used to indicate the likelihood of a rabbit successfully escaping before a surprise pounce. In the HHO, if \( r \ge 05 \), it indicates that the prey failed to escape; if \( r < 0.5 \), it means the prey will escape successfully. In addition, the energy E is an indicator of the siege style that will be selected by the predator. In HHO, if \( \left| E \right| \ge 0.5 \), the soft besiege will be employed; if \( \left| E \right| < 0.5 \), the hard besiege will be executed. The details of all four strategies are as follows.

2.3.1 Soft Besiege

When \( r \ge 0.5 \) and \( \left| E \right| \ge 0.5 \), the“soft besiege” takes effect. At this time, the rabbit still has relatively high energy to escape, and the Harris hawk will exhaust the rabbit and implement a surprise pounce by encircling it. The above process can be clearly explained using the following formula:

$$ \Delta \varvec{X}\left( t \right) = \varvec{X}_{\text{rabbit}} \left( t \right) - \varvec{X}\left( t \right) $$
(4)
$$ \varvec{X}\left( {t + 1} \right) = \varvec{X}\left( t \right) - E\left| {J\varvec{X}_{\text{rabbit}} \left( t \right) - \varvec{X}\left( t \right)} \right| $$
(5)

where \( J = 2\left( {1 - r_{5} } \right) \) refers to the jumping strength of the rabbit and \( r_{5} \) is a uniform distribution in the range of (0,1).

2.3.2 Hard Besiege

When \( r \ge 0.5 \) and \( \left| E \right| < 0.5 \), the “Hard besiege” mechanism is activated due to the lower escape energy of the rabbit. At this time, it can be considered that the prey is exhausted. The mathematical model can be described as follow:

$$ \varvec{X}\left( {t + 1} \right) = \varvec{X}_{{\varvec{rabbit}}} \left( t \right) - E\left| {\Delta \varvec{X}\left( t \right)} \right| $$
(6)

2.3.3 Soft Besiege With Progressive Rapid Dives

When \( r < 0.5 \) and \( \left| E \right| \ge 0.5 \), the rabbit has enough energy to successfully get rid of the hawk’s tracking. The prey in this situation is easy to escape, so a “Soft besiege with progressive rapid dives” strategy is deployed. First, the hawk will predict where they will arrive next using Eq. (7).

$$ \varvec{Y} = \varvec{X}_{{\varvec{rabbit}}} \left( t \right) - E\left| {J\varvec{X}_{{\varvec{rabbit}}} \left( t \right) - \varvec{X}\left( t \right)} \right| $$
(7)

Then, if \( \varvec{Y} \) is a more competitive position, the hawk will take this kind of dive. Otherwise, the concept of the levy flight will be used for this subsection.

Various studies have shown that flight patterns of many animals are in line with this levy flight (LF) [39, 40]. Similarly, the LF has been increasingly introduced by meta-heuristic algorithms to improve the performance of the algorithm. Related studies have also confirmed that the LF is the best choice for predators in environments with many uncertainties [41]. Yang et al. proposed a cuckoo search algorithm by combining the obligate brood parasitic behavior of some cuckoo species and the levy flight activity of some birds [42]. In the literature [43], a new particle swarm optimization algorithm combined with levy flight is built to improve the performance of the original PSO. Heidari et al. proposed an efficient modified grey wolf optimizer based on levy flight and greedy selection strategies [44]. In the HHO, LF is used to mimic the fast, abrupt, irregular movement of hawks during hunting. The position update formula with LF is as follows:

$$ \varvec{Z} = \varvec{Y} + \varvec{S} \times LF\left( d \right) $$
(8)

where \( \varvec{S} \) is a random list of size \( 1 \times d \) and \( d \) is the number of decision variables. LF is the levy flight function, which can be expressed by mathematical Eq. (9).

$$ LF\left( x \right) = 0.01 \times \frac{u \times \sigma }{{\left| v \right|^{{\frac{1}{\beta }}} }} , \quad \sigma = \left( {\frac{{\varGamma \left( {1 + \beta } \right) \times \sin \left( {\frac{\pi \beta }{2}} \right)}}{{\varGamma \left( {\frac{1 + \beta }{2}} \right) \times \beta \times 2^{{\left( {\frac{\beta - 1}{2}} \right)}} }}} \right)^{{\frac{1}{\beta }}} $$
(9)

where \( u \) and \( v \) are random values between 0 and 1, \( \beta \) is a constant with a value equal to 1.5. \( \varGamma \) represents gamma distribution.

In summary, at this stage, the Harris hawk location update strategy can be defined by the following rules:

$$ \varvec{X}\left( {t + 1} \right) = \left\{ {\begin{array}{*{20}l} Y \hfill & {{\text{if}}\; f\left( \varvec{Y} \right) < f\left( {X\left( t \right)} \right)} \hfill \\ Z \hfill & {{\text{if}}\; f\left( \varvec{Z} \right) < f\left( {X\left( t \right)} \right)} \hfill \\ \end{array} } \right. $$
(10)

where \( f \) is the fitness value function for the given example of minimizing the problem.

2.3.4 Hard Besiege with Progressive Rapid Dives

When \( r < 0.5 \) and \( \left| E \right| < 0.5 \), the last strategy called “Hard besiege with progressive rapid dives” is implemented. As the rabbit is exhausted at this time, hawks can capture and kill it almost without difficulty. To ensure that nothing is lost, the hawks will try to reduce the average distance between them and the prey, that is, narrow the encirclement. The above behavior can be modeled by Eq. (11).

$$ \varvec{X}\left( {t + 1} \right) = \left\{ {\begin{array}{*{20}l} Y \hfill & {{\text{if}}\; f\left( \varvec{Y} \right) < f\left( {X\left( t \right)} \right)} \hfill \\ Z \hfill & {{\text{if}}\; f\left( \varvec{Z} \right) < f\left( {X\left( t \right)} \right)} \hfill \\ \end{array} } \right. $$
(11)

Where

$$ \varvec{Y} = \varvec{X}_{{\varvec{rabbit}}} \left( t \right) - E\left| {J\varvec{X}_{{\varvec{rabbit}}} \left( t \right) - \varvec{X}_{\varvec{m}} \left( t \right)} \right| $$
(12)
$$ \varvec{Z} = \varvec{Y} + \varvec{S} \times LF\left( d \right) $$
(13)

3 Mhho

3.1 Description of MHHO

In past work [32], it has been proven that HHO outperforms several state-of-the-art technologies and that it applies to most optimization issues. However, to promote the searching performance of the HHO to achieve faster convergence speed, better solution accuracy and robustness, a novel modified Harris hawks Optimization (MHHO) is proposed in this section. In HHO, the E of prey is an extremely significant concept as it plays a vital role in the searching ability of the HHO. It is not difficult to determine that changes in E can make a significant difference in the experimental results. Therefore, a new E updating strategy is deployed to MHHO to promote the exploration and exploitation capabilities of the HHO. The detailed modifications are as follows.

In general, two optimization strategies are implemented in all meta-heuristic algorithms: exploration and exploitation. Exploration refers to a global search in the search space; exploitation refers to searching for the optimal solution locally. Obviously, exploration and exploitation are contradictory. The way to balance them is the most challenging problem. In the Harris hawks optimization algorithm, E is used to simulate the weaker physical strength of the rabbit during the escape, calculated by Eq. (3) for each Harris hawk per iteration. From an algorithmic perspective, \( E \) is a bridge between exploration and exploitation. If \( \left| E \right| \ge 1 \), the Harris hawk will adopt a global search strategy to seek prey. Conversely, if \( \left| E \right| > 1 \), the local search strategy will be applied to hunt the prey. Furthermore, if \( \left| E \right| < 0.5 \), “Hard besiege” strategies “Hard besiege” strategies will be implemented; if \( 1 \ge \left| E \right| \ge 0.5 \), “Soft besiege” schemes will be selected by the hawks. In Heming et al.’s work [45], the shortcomings of the original \( E \) update strategy have been pointed out. When the number of iterations reaches half of the maximum number of iterations, \( \left| E \right| \) can never be greater than 1. This fact means that for some multi-peak, high-dimensional complex problems, the population is likely to fall into local optima.

In the present work, the updating strategy of E was still expressed by Eq. (20), but for \( E_{1} \), 6 different updating strategies are proposed. The strategy 1 represents a straight linear decreasing strategy while Eq. (14) is a linear function. It should be noted that the strategy 1 is applied to the conventional HHO algorithm. The strategy 2 and the strategy 3 are power-based non-linear decreasing strategies. Among them, Eq. (15) represents a power function that bends downward while Eq. (16) represents a power function that bends upward. The strategy 4 is a convex-concave sin strategy, and Eq. (17) is a translation sine function. The strategy 5 is a concave-convex sine strategy, and Eq. (18) is still a translation sine function. The last strategy 6 is an exponential decreasing strategy, therefore, Eq. (19) is an exponential function. The differences among the renewal modes of \( 30 \) in these six strategies are shown intuitively in Fig. 1 below. The change of E with iterations in all 6 strategies is exhibited in Fig. 2.

Fig. 1
figure 1

Different updating strategies of E1

Fig. 2
figure 2

Change of E under 6 strategies during two runs and 500 iterations

According to Fig. 1, only the final value of \( E_{1} \) under the strategy 6 is not zero. In the strategy 6, we assume that even at the end of the iteration, the prey should have energy to escape, which can enhance the performance of the algorithm. More information is displayed in Fig. 2. In the second half of the iteration, | E | will never be greater than one in the strategies 1, 2, and 4. However, in the first half of the iteration, the strategy 4 is highly exploratory, the strategy 1 follows, and the strategy 2 is the last.

$$ E_{1} = 1 - \frac{t}{T} $$
(14)
$$ E_{1} = \left( {1 - \frac{t}{T}} \right)^{2} $$
(15)
$$ E_{1} = \left( {1 - \frac{t}{T}} \right)^{{\frac{1}{2}}} $$
(16)
$$ E_{1} = \frac{1}{2}\sin \left( {2\pi \times \frac{t}{T}} \right) + \left( {1 - \frac{t}{T}} \right) $$
(17)
$$ E_{1} = \frac{1}{2}\sin \left( {\pi + 2\pi \times \frac{t}{T}} \right) + \left( {1 - \frac{t}{T}} \right) $$
(18)
$$ E_{1} = e^{{ - \frac{t}{T}}} $$
(19)
$$ E = 2E_{0} \times E_{1} $$
(20)

where \( E_{0} \) is a random number inside the interval (-1,1);\( sin \) and \( cos \) represent the sine function and the cosine function, respectively. The number of iterations is indicated by \( t \) and \( T \) is the maximum number of iterations. e is the base number of the exponential function, and the value is about 2.71828.

The improvement of this study has little impact on the runtime of the algorithm because it does not involve the main computational process. The main time complexity of MHHO and HHO depends on three processes: random initialization, fitness evaluation, and hawk updating. Therefore, they can be expressed as follows:

$$ \begin{aligned} {\text{O}}\left( {\text{MHHO}} \right) & = {\text{O}}\left( {\text{random initialization}} \right) + {\text{O}}\left( {\text{fitness evaluation}} \right) \\ & \quad + \;{\text{O}}\left( {\text{hawk updating}} \right) \\ & = {\text{O}}\left( N \right) + {\text{O}}\left( {T \times N} \right) + {\text{O}}\left( {T \times N \times Dimension} \right) \\ & = {\text{O}}\left( {N \times \left( {1 + T \times \left( {1 + Dimension} \right)} \right)} \right) \\ & = {\text{O}}\left( {\text{HHO}} \right) \\ \end{aligned} $$

where \( N \) is the population size, \( T \) is the total number of iterations and Dimension is the number of decision variables.

3.2 Schematic Diagram of HHO and MHHO

In this subsection, the general pseudocode of HHO and MHHO is presented in Algorithm 1. The sixth line in Algorithm 1 shows the modifications made in this paper. A simple schematic diagram based on the description of Algorithm 1 is shown in Fig. 3.

figure a
Fig. 3
figure 3

The flow chart of HHO and MHHO

4 Experiment and Analysis

In this section, a series of experiments are carried out. In Experiment 1, the experimental results of 6 different \( E \) update strategies are compared. The best strategy is chosen to deploy MHHO. Subsequently, experiments are conducted on a series of functions to assess the performance of the proposed MHHO. All experimental results are recorded and compared with several state-of-the-art competitors, mainly with the Conventional HHO algorithm in Experiment 2. In addition, two constrained engineering problems are used to further verify the search performance of MHHO.

In Experiment 2, several well-established optimizers were selected such as GA, PSO, TLBO, HS, MFO, and HHO. In the present work, the total number of iterations in all algorithms was set to 500 except for HS; the number of search agents in the population is consistently set to 30. As for HS, it is known in the literature [10] that the population size of 5-7 is the best choice. Too many search agents may reduce the searching performance of HS, so the population size is preset to 7. To ensure the same number of function evaluations, 15,000 is the maximum number of rounds provided to it. Detailed parameter settings are listed in Table 1.

Table 1 The parameter settings

As shown in Table 1, GA, PSO, and HS require pre-set special parameters, while the remaining four only need common parameters to be set. For PSO, \( v_{\hbox{max} } \) denotes the maximum moving speed of the particle. The terms \( w_{1} \) and \( w_{2 } \) are the initial weight and the final weight, which are set to 0.9, 0.4 respectively. The terms \( c_{1} ,c_{2 } \) represent the cognitive and social parameters, respectively; theoretically, both are set to 1.2. For GA, roulette wheel chromosome replication strategies, uniform crossover strategy, and random selection mutation are used to perform experiments. The term \( p_{\text{crossover}} \) involves the probability of chromosome mating and \( p_{\text{mutation}} \) represents the probability of chromosomal mutation. For HS, HMCR, PAR, and BW refer to the harmony memory considering rate, pitch adjusting rate, and bandwidth respectively.

All experiments are implemented under Python 3.7 on a Windows 2010 operating system with Intel(R) CPU 3550 M @2.30 GHz and 4.00 GB RAM.

4.1 Test Functions

In our experiments, twenty benchmark functions are used, including seven unimodal functions (f1-f7), six multimodal functions (f8-f13) and seven fixed-dimension benchmark functions (f14-f20). These benchmark functions are a good reflection of the searching performance of the optimization algorithm. Among them, unimodal functions can be used to test the convergence speed and solution accuracy of the algorithm due to its relatively simple features. In other words, they symbolize the algorithm exploration property. In contrast, the multimodal function can be applied to detect the local optimal avoidance ability of the algorithm. Therefore, we can regard them as indicators of the meta-algorithm’s exploration ability. The mathematical description of the functions is shown in the following Table 2. In Table 2, “Class” represents the classification of test functions, where “U” represents the unimodal benchmark functions, “M” represents multimodal benchmark functions, and “F” represents fixed-dimension benchmark functions. Three dimensional plot of partial benchmark functions are shown in Fig. 4.

Table 2 The benchmark functions
Fig. 4
figure 4

Three dimensional plot of partial benchmark functions. a Function F1; b Function F5; c Function F7; d Function F8; e Function F9; f Function F10

4.2 Experiment 1

In this subsection, we compare the 6 different energy-updating methods designed in Sect. 3. A series of benchmark functions (F1-F20) were selected for the experiment. The test results of the low-dimensional (30 dimensions) and high-dimensional (200 dimensions) functions (F1-F13) are shown in Tables 3 and 4. The test results of the fixed-dimension benchmark functions (F14-f20) are shown in Table 5. Boldface in the tables represents the optimal results. In Table 3, the results show that the strategy 6 (3.02E−124) has a better searching performance for function F1. As such, quantitative results provide sufficient information.

Table 3 The comparison of six improvement strategies on benchmark functions (F1–F13) with 30 dimensions
Table 4 The comparison of six improvement strategies on benchmark functions (F1-F13) with 200 dimensions
Table 5 The comparison of six improvement strategies on benchmark functions (F14-20)

Seen from Tables 3 and 4, the strategy 6 is better than other competitors in all dimensions for functions F1, F2, F3 and F4. For function F5, the strategy 4 is the best performer. The strategies 4 and 5 are the most desirable choices for function F6. For function F7, the results of the strategies 3 and 6 are more competitive. For function F8, the strategy 4 defeated the other opponents. The strategy 5 gains a slight advantage for function F10. The strategies 4 and 5 achieved more favorable results for function F12. The strategy 3, the strategy 4 and the strategy 6 outperform the others for function F13. As for functions F9 and F11, the global optimal solution is obtained for all 6 strategies.

Seen from Table 5, the strategy 2 obtains the best results due to the smallest standard deviation (STD) for functions F14. For function F15, the strategy 4 outperforms other competitors. For functions F16 and F17, the results of the strategies 6 are more competitive. For functions F18, the strategy 1 is the most desirable choice. For functions F19 and F20, the strategy 5 obtains the best numerical results because the mean is closer to the theoretical optimal value.

The above results indicate that the different strategies are suitable for solving different problems, which is consistent with the meta-heuristic algorithm’s No Free Lunch (NFL) theorem. However, there are some advantages and disadvantages to these six strategies. For a quantitative comparison, we scored the performance of each strategy on each benchmark function. The scoring rules are as follows: in addition to function F9 and function F11, each function was scored. The numerical results ranked the first record with 6 points (the highest score) and the last record with 1 point (the lowest score). The final total score is recorded in Table 6. In Table 6, we can see that the strategy 1 used in the original HHO ranks second and the scores of the strategy 1, the strategy 3 and the strategy 4 are very close. The No. 1 strategy 6 scored significantly better than other E update methods. Therefore, strategy 6 should be deployed for MHHO as our best option.

Table 6 The scores and ranking

4.3 Experiment 2

In this subsection, other prestigious optimizers are selected for comparison with the MHHO algorithm. The experimental results prove that MHHO is a powerful optimization technique. Subsequently, the convergence curve gives a more evident description. MHHO balances the exploration and exploitation processes very well and greatly enhances the performance of HHO.

Considering the robustness of the results, all experiments in the selected four dimensions (including 10-dimensional, 50-dimensional, 100-dimensional, and 300-dimensional) were run independently 30 times. The best, worst, mean and variance of the 30 independent runs were recorded and compared as criteria for algorithm performance. All low-dimensional and high-dimensional benchmark functions (F1-F13) numerical results are presented in detail in Tables 7, 8, 9 and 10. The numerical results of the fixed-dimension benchmark functions (F14-f20) are shown in Table 11. Boldface in the tables indicates the best results.

Table 7 The numerical results of 10-dimensional benchmark functions (F1-f13) on all algorithms
Table 8 The numerical results of 50-dimensional benchmark functions (F1-f13) on all algorithms
Table 9 The numerical results of 100-dimensional benchmark functions (F1-f13) on all algorithms
Table 10 The numerical results of 300-dimensional benchmark functions (F1-f13) on all algorithms
Table 11 The numerical results of fixed-dimension benchmark functions (F14-F20) on all algorithms

It is observed from the results that the MHHO presents outstanding performance on most benchmark functions. MHHO has achieved an overwhelming victory over other competitors on all four selected dimensions for functions F1, F2, F4, and F5. For function F6, when the dimension is 10, MFO is the most successful competitor (2.25E−08). However, in the remaining three dimensions (50, 100, and 300 dimensions), the numerical results of MHHO (7.58E−05, 1.21E−04 and 2.17E−04, respectively) are better than those of other optimizers for function F6. Whether low or high dimensional, TLBO demonstrates the best performance over other technologies for function F7, followed by MHHO. In Tables 7 and 8, the results of MHHO (1.70E−111 and 4.82E−110) are better than other algorithms for function F3. When the dimensions take 100 and 300, TLBO outperformed other optimizers for F3. Nevertheless, MHHO is still better than the original HHO.

For function F8, MHHO (7.32E−02, 1.32E−02, 2.45E−01 and 5.53E−01, respectively) has the best performance in all 10, 50, 100, and 300 dimensions. According to the four tables, there are three optimizers (MHHO, HHO, and TLBO) on the functions F9 and F11 that reach the theoretical optimal value (0). For function F10, MHHO and HHO show competitive results compared with other selected methods. From Table 7, we know that GA (-7.57E−01) is the best technique for function F12 when the dimension is equal to 10 and TLBO (2.66E−01) performed best when the dimension is equal to 50. HHO performs better in the remaining two dimensions for F12, followed by MHHO. For function F13, MHHO (1.96E−06, 4.75E−05, 1.61E−05 and 2.37E−05, respectively) still achieves the most prominent performance in all dimensions. All in all, the performance of the MHHO proposed in this paper has achieved quite competitive results compared to other algorithms. MHHO is considerably better than the original HHO on all benchmark functions except for F12.

Seen from Table 11, MHHO finds the global optimal solution on all functions (F14-F20). For functions F14, HS and TLBO obtained the best results due to the smallest standard deviation (STD). For function F15, HHO appears to be the most competitive, followed by MHHO. For functions F16, the results of MFO are more competitive. For functions F17, GA is the most desirable choice, followed by MHHO. For functions F18 and F19, TLBO performed better than the others. For functions F20, HS achieves better search performance than other optimization techniques, followed by MHHO.

In addition, to further explore the significant difference in the searching performance of the MHHO and other comparison algorithms, the two-tailed t test as shown in Tables 12, 13, 14, 15 and 16 is implemented based on all numerical results. In Tables 12, 13, 14, 15 and 16, results with statistical significance (i.e. p-values less than 0.05) are bold. The “NaN” means ‘‘Not a Number’’ returned by the test and it means that the results of the comparison algorithms are almost the same. The p-values show that MHHO is significantly better than PSO, GA, HS, MFO and TLBO in most test functions, and better than HHO in some test functions. Although MHHO is not better than HHO in some problems under 5% significant test results, this is because the accuracy of HHO solution is already quite high. The following convergence curve will further demonstrate the advantages of MHHO. Here, we take the statistical test results of Table 3 for instance. In Table 15, MHHO Significantly better than GA and HS for functions F1-F13 and TLBO in functions F2, F4, F5, F6, F7, F8, F10, F12 and F13. Compared with PSO and MFO, MHHO also has significant advantages, except for F2 (P-value = 3.21E−01 and 3.21E−01, respectively). MHHO achieves significant advantages in functions F7 (2.20E−03) and F12 (2.85E−02), compared with HHO. Combined with all the statistical test results, MHHO outperforms other comparison algorithms for most functions.

Table 12 Comparisons of P-values of the T-test with 5% significance between MHHO and other technologies for F1–F13 with 10 dimensions
Table 13 Comparisons of P-values of the T-test with 5% significance between MHHO and other technologies for F1–F13 with 50 dimensions
Table 14 Comparisons of P-values of the T-test with 5% significance between MHHO and other technologies for F1–F13 with 100 dimensions
Table 15 Comparisons of P-values of the T-test with 5% significance between MHHO and other technologies for F1–F13 with 300 dimensions
Table 16 Comparisons of P-values of the T-test with 5% significance between MHHO and other technology for F14–F20

The convergence curves of all 13 functions (F1-F13) on all 6 algorithms are shown in Figs. 5 and 6. The MHHO algorithm has performed very well on most functions, and its convergence speed is far better than other competitors and the basic HHO. In addition, TLBO has achieved a high speed in solving many functions, but its accuracy is much weaker than that of HHO and MHHO. From the convergence curves of functions F5, F6, F8, and F13, it could be seen that TLBO is ineffective in solving complex problems and is likely to fall into local optimum. It could be seen that the newly proposed MHHO is far superior to the original HHO on some functions, as it achieves a particularly high solution accuracy and solution speed. These curves further illustrate the effectiveness of our proposed MHHO algorithm.

Fig. 5
figure 5

Typical convergence graph of six different algorithms for functions 1 to 13 (D = 100). a Function F1; b Function F2; c Function F3; d Function F4; e Function F5; f Function F6; g Function F7

Fig. 6
figure 6

Typical convergence graph of six different algorithms for functions 8 to 13 (D = 100). a Function F8; b Function F9; c Function F10; d Function F11; e Function F12; f Function F13

4.4 Engineering Benchmark Optimization Sets

In this subsection, two well-known benchmark engineering optimization problems are used to further verify the searching performance of the proposed MHHO. What’s more, we compare the differences between the HHO and other optimization techniques proposed in previous works in solving constrained optimization problems. In all cases, the MHHO and the HHO are applied based on 30 search agents and 500 iterations.

4.4.1 Tension/Compression Spring Design Problem

The tension/compression spring problem is a classical engineering optimization problem with four constraints, in which the objective is get the minimization of the weight of a spring with three structural variables: wire diameter (d), mean coil diameter (D), and the number of active coils (N). In the process of solving, four constraints about shear stress, surge frequency, and minimum deflection must be satisfied. This problem is shown in Fig. 7 and can be described mathematically as follows:

$$ \begin{aligned} & {\text{Consider}}\quad \varvec{x} = \left[ {x_{1} ,x_{2} ,x_{3} } \right] = \left[ {d,D,N} \right], \\ & {\text{Minimize}}\quad f\left( \varvec{x} \right) = \left( {x_{3} + 2} \right)x_{2} x_{1}^{2} , \\ & {\text{Subject to}} \\ & g_{1} \left( x \right) = 1 - \frac{{x_{2}^{3} x_{3} }}{{71785x_{1}^{4} }} \le 0, \\ & g_{2} \left( x \right) = \frac{{4x_{2}^{2} - x_{1} x_{2} }}{{12566\left( {x_{2} x_{1}^{3} - x_{1}^{4} } \right)}} + \frac{1}{{5108x_{1}^{2} }} - 1 \le 0, \\ & g_{3} \left( x \right) = 1 - \frac{{140.45x_{1} }}{{x_{2}^{2} x_{3} }} \le 0 , \\ & g_{4} \left( x \right) = \frac{{x_{1} + x_{2} }}{1.5} - 1 \le 0, \\ \end{aligned} $$
Fig. 7
figure 7

Tension/compression spring design problem

Structural variables range

$$ 0.05 \le x_{1} \le 2.00,0.25 \le x_{2} \le 1.30,2.00 \le x_{3} \le 15.00 $$

The results of HHO are compared with those of several state-of-the-art technologies from previous literature, such as PSO [46], GA [47], HS [10], MFO [27], GSA [15], WOA [15], BA [48], RO [49], ES [50], MPM [51], CEPSO [52], CEDE [53] and the conventional HHO. Table 17 shows the detailed results of the numerical comparison. Seen from Table 17, the results show that the optimal weight obtained by MHHO (0.01266619) is better than other comparative algorithms, which proves the superiority and effectiveness of HHO in solving these types of engineering problems.

Table 17 Comparison of results for tension/compression spring design problem

4.4.2 Welded Beam Design Problem

The welded beam design problem is a well-known mechanical engineering problem, in which the objective is to minimize the fabrication cost of a welded beam with four design variables: thickness of weld (h), length of attached part of bar (l), height of the bar (t), and thickness of the bar (b). In this case, there are seven constraints about shear stress (τ) and bending stress in the beam (θ), buckling load on the bar (Pc), end deflection of the beam (δ) [15]. The schematic plot of welded beam is shown in Fig. 8. The mathematical formulation of this test is as follows:

Fig. 8
figure 8

Welded beam design problem

$$ \begin{aligned} & {\text{Consider}}\quad \varvec{x} = \left[ {x_{1} ,x_{2} ,x_{3} ,x_{4} } \right] = \left[ {h,l,t,b} \right], \\ & {\text{Minimize}}\quad f\left( \varvec{x} \right) = 1.10471{\text{x}}_{1}^{2} x_{2} + 0.04811x_{3} x_{4} \left( {14.0 + x_{2} } \right), \\ \end{aligned} $$

Subject to

$$ \begin{aligned} g_{1} \left( x \right) & = \tau \left( x \right) - \tau_{\hbox{max} } \le 0, \\ g_{2} \left( x \right) & = \sigma \left( x \right) - \sigma_{\hbox{max} } \le 0, \\ g_{3} \left( x \right) & = \delta \left( x \right) - \delta_{\hbox{max} } \le 0 , \\ g_{4} \left( x \right) & = x_{1} - x_{4} \le 0, \\ g_{5} \left( x \right) & = P - P_{c} \left( x \right) \le 0, \\ g_{6} \left( x \right) & = 0.125 - x_{1} \le 0, \\ g_{7} \left( x \right) & = 1.10471x_{1}^{2} + 0.04811x_{3} x_{4} \left( {14.0 + x_{2} } \right) - 5.0 \le 0 \\ \end{aligned} $$

Design variables range

$$ \begin{aligned} 0.1 & \le x_{1} \le 2,0.1 \le x_{2} \le 10, \\ 0.1 & \le x_{3} \le 10,0.1 \le x_{4} \le 2, \\ \end{aligned} $$

where

$$ \begin{aligned} \tau \left( x \right) & = \sqrt {\left( {\tau^{\prime}} \right)^{2} + 2\tau^{\prime}\tau^{\prime\prime}\left( {\frac{{x_{2} }}{2R}} \right) + \left( {\tau^{\prime\prime}} \right)^{2} } , \\ \tau^{\prime} & = \frac{P}{{\sqrt 2 x_{1} x_{2} }}, \tau^{\prime\prime} = \frac{MR}{J}, M = P\left( {L + \frac{{x_{2} }}{2}} \right), \\ J & = 2\left\{ {\sqrt 2 x_{1} x_{2} \left[ {\frac{{x_{2}^{2} }}{4} + \left( {\frac{{x_{1} + x_{3} }}{2}} \right)^{2} } \right]} \right\}, \\ \sigma \left( x \right) & = \frac{6PL}{{x_{3}^{2} x_{4} }} , \delta \left( x \right) = \frac{{6PL^{3} }}{{Ex_{3}^{3} x_{4} }}, \\ P_{c} \left( x \right) & = \frac{{4.013E\sqrt {\frac{{x_{3}^{2} x_{4}^{6} }}{36}} }}{{L^{2} }}\left( {1 - \frac{{x_{3} }}{2L}\sqrt {\frac{E}{4G}} } \right), \\ P & = 6000lb, L = 14 in., \delta_{\hbox{max} } = 0.25 in. ,E = 30 \times 10^{6} psi, \\ G & = 12 \times 10^{6} psi, \tau_{\hbox{max} } = 13600 psi,\sigma_{\hbox{max} } = 30000 psi. \\ \end{aligned} $$

This problem is solved with TLBO, HHO and MHHO and the optimal results are compared to those of PSO [46], GA [47], GA2 [54], ABC [55], HS [10], GSA [15], WOA [15], GWO [29], BA [48], RO [49], ES [50], RAGSDELL [56], DAVID [56], APPROX [56], RANDOM [56] and SIMPLEX [56]. Table 18 shows the optimal design variables and corresponding minimum cost obtained by each algorithm.

Table 18 Comparison of results for Welded beam design problem

The results of Table 18 show that MHHO provides a very competitive minimum fabrication cost (1.724564883) compared with other optimization techniques. In addition, the numerical results of ABC, GWO and TLBO are 1.724852000, 1.726240000 and 1.724852309 respectively, which are very close to those of MHHO.

5 Conclusions and Future Works

In this study, a novel MHHO algorithm based on a modification for the HHO algorithm is proposed. In HHO, the E of prey is an extremely important link, which is key to controlling the process of exploration and exploitation. Therefore, we designed 6 different update strategies for E. A series of benchmark functions were used to evaluate the performance of 6 strategies. In Experiment 1, two dimensions (30 dimension and 200 dimension) were selected for comparative experiments. The results revealed that strategy 1, deployed in the original HHO, did not perform well. Subsequently, the scores and ranking results revealed that strategy 6 is far superior to the other competitors. The energy updating method in strategy 6 improves the accuracy, convergence speed, and local optimal avoidance of the algorithm. It should be noted that the most obvious difference between strategy 6 and other strategies is that the value of E will not eventually decrease to 0 under strategy 6. This may be more realistic because Harris hawks are highly efficient hunters in nature. In this situation, they often hunt successfully before the prey is exhausted. In addition, in the second half of the iteration, strategy 6 is more likely to implement a “Soft besiege with progressive rapid dives” strategy than others. We found that the proportion of “Soft besiege with progressive rapid dives” should be higher than that of “Hard besiege with progressive rapid dives”, because the former provides enough search neighborhoods to accelerate convergence and local optimal avoidance. Therefore, strategy 6 should be used as the best choice for subsequent experiments. Furthermore, we compared it with several of the most popular meta-heuristic algorithms in experiment 2. Considering the numerical results, p-values of t test and convergence curve, it can be concluded that MHHO shows extraordinary performance compared to other rivals. In particularly, it outperformed HHO because of its well-balanced exploration and exploitation capabilities. Therefore, MHHO with the latest update style of E is a powerful optimization technique.

Moreover, to further illustrate the search performance of the proposed MHHO, we apply it to two well-known engineering optimization problems. The comparison of the results between MHHO and other optimization techniques reveals its remarkable performance in solving constrained optimization problems.

In future works, our MHHO will be applied to real life and multi-target issues. Additionally, a binary version of MHHO will be implemented. Moreover, a future research direction that could be further explored is the jumping strength (J) of prey.