# Automated Generation of Hybrid Metaheuristics Using Learning-to-Rank
## 3 Preliminaries
### Metaheuristic Algorithms
#### 3.2.2 Harris Hawks Optimization Algorithm  
The Harris Hawks Optimization algorithm [27] imitates Harris-hawk collaboration and chase methods during the hunting phase, and the algorithm strikes a balance between exploration and exploitation. HHO determines the exploration and exploitation via the escape energy \(E\). When \(|E|\geq 1\), the algorithm is in the exploration stage, and when \(|E|<1\), it shifts to the exploitation stage. The equation goes as follows:  
\[E=2E_{0}\bigg{(}1-\frac{t}{T}\bigg{)} \tag{7}\]  
where \(E_{0}\) is the initial energy of the prey, \(t\) is the current iteration number, and \(T\) is the maximum number of iterations. (1) Exploration Phase  
In exploration, search agents conduct random searches for the location of their prey. The mathematical model is expressed as:  
\[X(t+1)= \begin{cases}X_{\text{rand}}(t)-r_{1}|X_{\text{rand}}(t)-2r_{2}X(t)|,&q \geq 0.5\\ (X_{\text{rabbit}}(t)-X_{m}(t))-r_{3}(lb+r_{4}(ub-lb)),&q<0.5\end{cases}  \tag{8}\]  
\[X_{m}(t)=\frac{1}{N}\sum_{i=1}^{N}X_{i}(t) \tag{9}\]  
where \(X(t)\) represents the current position of an individual, \(X_{\text{rand}}(t)\) is the position of a randomly selected individual, and \(X_{\text{rabbit}}(t)\) is the position of the prey. \(r_{1},r_{2},r_{3},r_{4},q\in(0,1)\) are random numbers, while \(ub\) and \(lb\) denote the upper and lower bounds of the search space. \(X_{m}(t)\) represents the mean position of all individuals in the current population. Note that in Equation (8), \"\(||\)\" denotes the absolute value applied element-wise to vectors. The multiplication operator \".\" represents element-wise multiplication between vectors. Assuming an equal chance \(q\) for each perching strategy, individuals either perch based on the positions of other members for \(q<0.5\) or choose random tall trees when \(q\geq 0.5\), as described in Equation (8). (2) Exploitation Phase  
In this phase, the algorithm updates positions using four different strategies based on the escape energy \(E\) and the escape probability \(r\in(0,1)\). Soft besiege: When \(0.5\leq|E|<1\) and \(r\geq 0.5\), the position is updated as follows:  
\[X(t+1)=\Delta X(t)-E|J\cdot X_{\text{rabbit}}(t)-X(t)| \tag{10}\]  
where \(\Delta X(t)=X_{\text{rabbit}}(t)-X(t)\) represents the distance between the individual and the prey, and \(J=2(1-r_{5})\) denotes the random jump strength of the prey, with \(r_{5}\) being a random number in the range \((0,1)\). Similar to the exploration phase, \"\(||\)\" and \".\" in this formula are applied element-wise to vectors. Hard besiege: When \(|E|<0.5\) and \(r\geq 0.5\), the position is updated as follows (parameters are the same as above):  
\[X(t+1)=X_{\text{rabbit}}(t)-E|\Delta X(t)| \tag{11}\]  
The absolute value and multiplication operators here also follow the element-wise rule as defined in the algorithm. Soft besiege with progressive rapid dives: When \(0.5\leq|E|<1\) and \(r<0.5\), the position is updated as follows:  
\[X(t+1)= \begin{cases}Y=X_{\text{rabbit}}(t)-E|J\cdot X_{\text{rabbit}}(t)-X(t)|,& \text{if }F(Y)<F(X(t))\\ Z=Y+S\times LF(x),&\text{if }F(Z)<F(X(t))\end{cases}  \tag{12}\]where \(S\) is a random vector of the same dimension as the problem space, with each component typically drawn uniformly from the range \([0,1]\) and is used to control the perturbation of the Levy step size. The Levy flight function \(LF(x)\) generates a Levy-distributed random vector of the same dimension as the problem, and its components are defined as:  
\[LF(x)=0.01\times\frac{u\times\sigma}{|v|^{1/\beta}},\quad\sigma=\left(\frac{ \Gamma(1+\beta)\times\sin\left(\frac{\pi\beta}{2}\right)}{\Gamma\left(\frac{1 +\beta}{2}\right)\times\beta\times 2^{\frac{\beta-1}{2}}}\right)^{1/\beta} \tag{13}\]  
where \(u\) and \(v\) follow a normal distribution, and \(\beta=1.5\). If neither condition \(F(Y)<F(X(t))\) nor \(F(Z)<F(X(t))\) is satisfied, the current position remains unchanged in that iteration.