# Automated Generation of Hybrid Metaheuristics Using Learning-to-Rank
## 4 Methodology
### Feature Extraction and Model Training  
The core of the LTR-MHA lies in extracting key features from each iteration update of the metaheuristic algorithms. Specifically, the target problem is solved individually \begin{table}
\begin{tabular}{l l l} \hline \hline
**Type** & **Feature** & **Description** \\ \hline Algorithm Parameters & \(\vec{A}\) & Core coefficient vector of WOA \\  & \(\vec{C}\) & Core coefficient vector of WOA \\  & \(E\) & Escape energy, core parameter of HHO \\  & \(croRate\) & Crossover rate, core parameter of GA \\  & \(mutRate\) & Mutation rate, core parameter of GA \\ Search-Dependent & _stage_ & Current algorithm stage, calculated as \(t/I_{max}\), where \(t\) is the current iteration and \(I_{max}\) is the maximum iterations \\  & \(Div\) & Population diversity, calculated according to the given formula Equation (15) \\  & _incre_ & Increase in fitness value of the current agent compared to its initial fitness value \\  & \(diff\) & Difference between the current individual and the best fitness value \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Feature variables and definitions. using the selected metaheuristic algorithms (WOA, HHO, and GA). These algorithms optimize solutions through a series of update behaviors, such as shrinking encircling, spiral updating, and random search in the WOA. To systematically represent these diverse update behaviors for the purpose of Learning-to-Rank modeling, each behavior is numerically encoded as a distinct action. Table 2 presents the update behaviors of the three metaheuristic algorithms, along with their corresponding numerical encodings for the convenience of subsequent experiments. Based on the information in Table 2, the action space of the LTR-MHA can be defined as follows:  
\[Actions=\{\text{RS},\text{SE},\text{SU},\text{RM},\text{RT},\text{HB},\text{ SB},\text{SRD},\text{HRD},\text{CRO},\text{MUT},\text{REP}\} \tag{16}\]  
In continuous function optimization problems, the objective of metaheuristic algorithms is to search for the best solution within the continuous space that minimizes the objective function value. Let the algorithms set be \(Alg=\{\text{WOA},\text{HHO},\text{GA}\}\), where the population of algorithm \(alg_{i}\in Alg\) is denoted as \(P=(X_{1},\,X_{2},\,\ldots,\,X_{i},\,\ldots,\,X_{m})\), consisting of \(m\) search agents (individuals). Each search agent \(X_{i}\) represents a candidate solution. A solution \(X_{i}\) in \(D\)-dimensional space is encoded as:  
\[X_{i}=(x_{i1},\,x_{i2},\,\ldots,\,x_{ij},\,\ldots,\,x_{iD}) \tag{17}\]  
where \(D\) represents the dimension, and \(x_{ij}\) denotes the \(j\)-th variable in the solution vector. Each variable \(x_{ij}\) satisfies predefined boundary constraints. By continuously updating the positions of search agents within the population, the algorithm drives the objective function value \(f(X_{i})\) progressively closer to the global optimum. At each iteration of the algorithm, the search agent \(X_{i}\) selects one action from multiple candidate update behaviors to update its position and constructs the corresponding feature vector \(F_{i}\). According to Tables 1 and 2, suppose the update behavior selected by \(X_{i}\) in the current iteration is \(act_{i}\in\text{Actions}\), where the value range of \(act_{i}\) is \([1,12]\). To ensure