# HyperDE: An Adaptive Hyper-Heuristic for Global Optimization
## 6 Results  
The proposed adaptive hyper-heuristic methods are compared with 10 relatively new, state-of-the-art heuristics and well-established algorithms (including the basic heuristics that we employ: DE, BES, SSA), over a set of n_problems = 12 difficult problems, more exactly on the benchmarks provided by the CEC 2022 competition: ([[https://github.com/P-N-Suganthan/2022-SO-BO/blob/main/CEC2022%20](https://github.com/P-N-Suganthan/2022-SO-BO/blob/main/CEC2022%20) TR.pdf]([https://github.com/P-N-Suganthan/2022-SO-BO/blob/main/CEC2022%20](https://github.com/P-N-Suganthan/2022-SO-BO/blob/main/CEC2022%20) TR.pdf), accessed on 18 September 2023). We have implemented our method in Python. The algorithms used for comparison, listed in Table 1 (to be later explained), have been taken from the MEALPY library ([PERSON] et al., 2019) implementation in Python. Our programs can be found at [[https://github.com/mening120](https://github.com/mening120)]([https://github.com/mening120](https://github.com/mening120)) 01/HyperHeuristic, accessed on 18 September 2023). Our HyperDE hyper-heuristic is parameterized as follows: the number of hyper-iterations is \(G=40\), the evaluation window size is n_window \(=5\) iterations, the hyper-population has size \(|HP|=10\) (the number of DE instances, or agents), where each agent has n_quota \(=20\) (the size of the solution population). In order for the comparison to be valid, the HyperDE hyper-heuristic along with the other methods should explore the same number of solutions. We note that HyperDE performs \(G\cdot\)n_window \(=200\) DE iterations and computes a population of \(|HP|\cdot\)n_quota \(=200\) solutions per iteration, resulting in a total of \(200\cdot 200\) = 40,000 evaluated solutions. Therefore, the other methods will have as parameters: the number of iterations to be executed \(iterations=200\), and the size of population \(pop\_size=200\); hence, the same volume of the solution space is explored at the end of execution. The other hyper-parameters specific to each method are set with default values, as recommended by the literature. Each heuristic is evaluated by computing the relative error as described in Algorithm 6. The global minimum being known, the relative distance between the obtained result and the optimum is calculated. For each problem, the heuristic in this case is evaluated n_tests = 60 times as described, averaging the relative error obtained in each evaluation. Finally, the average relative error obtained on each problem is aggregated again, obtaining the final relative error that reflects the overall performance of that algorithm (smaller is better). ```
overall_error_sum \(\gets 0\) for each problem in n_problems do  error_sum \(\gets 0\) for each test in n_tests do  best_solution \(\leftarrow\) heuristic(pop_size \(=200,iterations=200\)) if\(global\_best\
eq 0\)then  relative_error \(\leftarrow\) (best_solution \(-\)global_best)/\(|global\_best|\) else  relative_error \(\leftarrow\) (best_solution \(-\)global_best) endif  error_sum \(\gets\) error_sum \(+\)relative_error endfor  overall_error_sum \(\gets\) overall_error_sum \(+\) error_sum/n_tests endfor  final_error \(\leftarrow\) overall_error_sum/n_problems
```  
**Algorithm 6** Evaluation, relative error  
As can be seen from Table 1, HyperDE has the minimal error on the selected suite of problems. We note also that HyperBES and HyperSSA perform better than their basic heuristics, BES and SSA. Additionally, the Friedman ranking is computed, more precisely, the average rank over all the problems. The median was determined over the n_tests \(=60\) tests, for each problem and method. If, for a particular problem, the difference between the medians for two methods does not exceed \(1\times 10^{-7}\), then the two methods have the same rank, which is the average of the corresponding ranks. The results are given in Table 2 and show that HyperDE is the best from the entire suite of methods, at a significant distance from SHADE. Unlike in the error evaluation, SHADE is better then LSHADE.