# A Methodology to Determine the Subset of Heuristics for Hyperheuristics through Metalearning for Solving Graph Coloring and Capacitated Vehicle Routing Problems

Authors: Lucero Ortiz-Aguilar; Martín Carpio; Alfonso Rojas-Domínguez; Manuel Ornelas-Rodriguez; H. J. Puga-Soberanes; Jorge A. Soria-Alcaraz
Journal: Complexity
 (2021)

---

## Abstract

In this work, we focus on the problem of selecting low-level heuristics in a hyperheuristic approach with offline learning, for the solution of instances of different problem domains. The objective is to improve the performance of the offline hyperheuristic approach, identifying equivalence classes in a set of instances of different problems and selecting the best performing heuristics in each of them. A methodology is proposed as the first step of a set of instances of all problems, and the generic characteristics of each instance and the performance of the heuristics in each one of them are considered to define the vectors of characteristics and make a grouping of classes. Metalearning with statistical tests is used to select the heuristics for each class. Finally, we used the Naive Bayes to test the set instances with k-fold cross-validation, and we compared all results statistically with the best-known values. In this research, the methodology was tested by applying it to the problems of capacitated vehicle routing (CVRP) and graph coloring (GCP). The experimental results show that the proposed methodology can improve the performance of the offline hyperheuristic approach, correctly identifying the classes of instances and applying the appropriate heuristics in each case. This is based on the statistical comparison of the results obtained with those of the state of the art of each instance.


---

## Body

## 1. Introduction

In Computer Science, a heuristic is a technique designed to solve a problem when classical methods fail to find an exact solution or when they are too slow. Currently, there is great interest from the scientific community in offering ad hoc heuristic solutions for real-world optimization problems. To achieve this, it is necessary to have a priori knowledge of the problem and, often, computationally efficient solutions are produced in a reasonable time. However, the no free lunch theorem mentions [1] that no methodology or algorithm can solve all problems; that is, ad hoc heuristics are usually not generalizable, and they do not always work well when applied to other problems even when they share some similar characteristics. This fact has led research efforts towards the development of general-purpose search methodologies known as hyperheuristics, whose main characteristic is that they are independent of the problem domain.Hyperheuristics can be classified according to their learning methods, such as no learning, online learning [2], and offline learning [3]. In the context of combinatorial optimization, hyperheuristics are defined as “heuristics to choose heuristics” [4], or as “an automated methodology for selecting or generation heuristics to solve computational search problems,” [4]. According to Pillay in [2], the generality of a hyperheuristic can be seen from three levels: a generalization on instances of problems, generalization for a particular problem, and a generalization focused on different types of problems, the latter being high level. Some variations of hyperheuristics depend on the type of learning used (e.g., with online learning [2] and offline learning [3]) or the nature of the heuristics.One of the main problems in hyperheuristics is to propose methodologies that allow generating and/or selecting the minimum set of heuristics that perform well for the problem at hand and this heuristic set is usually selected by expert researchers in the field [2]. In order to automatically select the best heuristic that performs best for the problem, an approach called metalearning was proposed [5, 6] and its use in hyperheuristics can be found in Amaya et al. [7]. Likewise, the different meanings used and taxonomy for each interaction between metalearning and optimization were studied by Song et al. [8].As there is no methodology or algorithm that can solve all problems, our objective is to base ourselves on information about the problem and the performance of the algorithms to provide this knowledge to hyperheuristics. Metalearning generates metaknowledge, and we use this to select better heuristics for solving problems. With this approach, we pretend to propose methodologies that are like the intelligence of humans. Humans could learn from problems, their characteristics, their variables, and their restrictions, and after elaborating an analysis or discernment, the “human expert” proposes the best tool and solves the problem.In this paper, we propose a methodology to determine a subset of heuristics for hyperheuristics through metalearning and partition for solving different problems (described below) without ad hoc adjustments by providing information about the problem and the performance of the heuristics to the hyperheuristic. It is well known that the correct characterization is the key to selecting the best heuristic [6]. Consequently, this affects the hyperheuristic design, and that is why in our approach we decided to use offline learning. Metalearning consists of two basic parts, the metafeatures and the metalearner; the first are generated from the information of the problem and the solution algorithms, while the second uses a grouping technique. Our methodology extends beyond the classic metalearner approach, and we apply nonparametric statistical tests to determine which heuristics will provide the same performance if the full set of heuristics is applied.In order to test our proposal, we used two different well-known problem domains: capacitated vehicle routing problem and graph coloring problem. The capacitated vehicle routing problem (CVRP) has different restrictions such as minimizing distance, time, capacity, and delivery. This problem aims to find the subtour ofn cities, without repeating two cities on the same tour or different tours. In the CVRP state of the art, there exist different variants that consider this basic definition and extra restrictions. On the other hand, the graph coloring problem consists of labeling each vertex of a given graph with k-colors and it is a well-known problem, which has been solved by exact methods, heuristics, metaheuristics, and hyperheuristics. Although each problem can be solved by ad hoc heuristics, to date, there is no general methodology capable of solving all variants of both problems. The use of partitions for constraint satisfaction problems, such as university timetabling and VRP, has had good results [9, 10]. Although there are taxonomies of the said problems, characterizing and classifying the instances under a hyperheuristic context with metalearning with a statistical test is an approach that has not been explored in the literature.Finally, it is worth mentioning that to do a better design or choice of hyperheuristics and predict which is the best algorithm according to the classification of the previous instance, we propose to use metalearning with statistical analysis of the heuristics, which will allow improving these points. Our proposal also provides information that allows us to understand the performance of heuristics and hyperheuristics in the problem of interest.The remaining content of this article contains a description of related work in Section2, which covers a review on heuristics, hyperheuristics, and metalearning. Problem definitions and theories related to heuristics are reported in Section 3. Sections 4 and 5 present the proposed methodology. The found results and findings including performance comparison are described in Section 6. Finally, concluding remarks are presented in Section 7.


## 2. Related Work

In this section, we will give a view of the heuristic and hyperheuristic algorithms. Moreover, we will define some basic concepts of metalearning. Finally, we will give a discussion of the pros and cons of the presented methods.


### 2.1. Heuristics

We made an extensive review of different heuristics applied to CVRP and GCP. We selected a total of 11 heuristics that, after a previous experimental analysis, those heuristics apply to both problems and we list them below.K-flip or K-opt heuristic was proposed by Lin and Kernighan in [11] for the travel salesman problem (TSP). This heuristic was based on the general interchange transformation, i.e., a city must change its position with another city on the same tour. Besides, this heuristic is one of the most popular for TSP [12]; it has been applied in other problems such as planar graphs, unconstrained binary quadratic programming, and the study of its complexity in SAT and MAX-SAT. The two-point perturbation is a case of k-flip, and we give a detailed description and algorithm of these heuristics in the following sections.Thek-swap heuristic is similar and frequently confused with k-flip. The K-swap heuristic improves its performance as a perturbation move when it uses two or three movements [13].The move to less conflict heuristic, also known as minimizing conflicts, was proposed by Minton et al. [14]. The minimizing conflict heuristic has been applied to different areas in Computer Science such as hyperheuristics, graph coloring problems, pickup-and-delivery problems, and scheduling problems. The move to less conflict heuristic is a variant of the first fit, and the only difference is that the first one takes a random variable and changes its value for another that generates the least cost.Thefirst-fit heuristic was proved by Baker [15] for the bin-packing problem. On the other hand, in recent decades, this heuristic was applied to best-known problems such as bin packing, virtual machine relocation problem, and cutting stock. A remarkable variety of heuristics is worst fit which was studied by Baker [15] and Csirik [16], in particular, its application to bin-packing problem.Soria-Alcaraz et al. [17] proposed three heuristics for university course timetabling best single perturbation (BSP), static-dynamic perturbation (SDP), and double dynamic perturbation as part of the pool low-level heuristics for hyperheuristic. Moreover, these heuristics were applied to the VRP in later research [18].


### 2.2. Hyperheuristics

We focused on offline learning hyperheuristics selection with perturbation heuristics, whose aim is to gather knowledge in the form of rules or programs, from training set instances. Usually, the offline selection hyperheuristics belong to machine learning methods, which are trained to create a tuned methodology for a problem domain [3]. Yates and Keedwell [19] demonstrated that subsequences of heuristics were found in the offline learning database that is effective for some problem domains. They used the Elman network to compute sequences of heuristics which were evaluated on unseen HyFlex example problems, and the results obtained are capable of intradomain learning and generalization with 99% confidence.One of the crucial issues in hyperheuristics design is the quality and size of the heuristic pool [20]. Soria-Alcaraz et al. [20] proposed a methodology using nonparametric statistics and fitness landscape measurements for hyperheuristics design. This methodology was tested on course timetabling and vehicle routing problems; their hyperheuristic proposal had a compact heuristic pool and competed with some traditional methods in course timetabling. In the course timetabling problem, they obtained five best-known solutions of 24 PATAT instances [21]. Finally, a recent report by Amaya et al. [7] documented a model for creating selection hyperheuristics with constructive heuristics. The effectiveness of the model proposed by Amaya depends on the delta’s values used, which is useful with higher deltas.


### 2.3. Metalearning

The importance of metalearning, machine learning, and optimization has been studied by Song et al. [8]. The metalearning aim may concern accumulating and adapting experiences on the performance of multiple applications of a learning system. The metalearning field is also known as “learning to learn” [22] and it brings systems that can help by searching patterns across different tasks to control the process of exploiting cumulative expertise. The metalearning concept has been present in the field of heuristics and metaheuristics for TSP [23], the quadratic assignment problem, and hyperheuristics.On the other hand, Gutierrez-Rodríguez et al. [23] used VRP with time windows and proposed a methodology based on metalearning to select the best metaheuristic for each instance. Besides, their proposal shared and exploited an offline scheme for the instant solutions of academies and industry. Their main contributions were to propose a set of features for characterizing VRPTW instances and design a classification process that predicts the most suitable metaheuristic for each instance. Nevertheless, they assumed that the solutions of the set instances could be stored, shared, and exploited in an offline scheme for predicting good solvers for new unseen instances.The aim of this paper is not to present a survey on heuristics or hyperheuristics; our proposal is slightly different. Our proposal considers some vital aspects of the research, including the ones from Yates and Keedwell [19]. We took the offline hyperheuristic approach from Soria-Alcaraz et al. [20] and the statistical approach to selecting a pool heuristic from Kanda et al. [5]. The offline hyperheuristic approach is an effective and popular method in the machine learning area [8]. On the other hand, the statistical approach to selecting a pool heuristic is a useful and reliable method because it takes statistical information from the input data.


## 2.1. Heuristics

We made an extensive review of different heuristics applied to CVRP and GCP. We selected a total of 11 heuristics that, after a previous experimental analysis, those heuristics apply to both problems and we list them below.K-flip or K-opt heuristic was proposed by Lin and Kernighan in [11] for the travel salesman problem (TSP). This heuristic was based on the general interchange transformation, i.e., a city must change its position with another city on the same tour. Besides, this heuristic is one of the most popular for TSP [12]; it has been applied in other problems such as planar graphs, unconstrained binary quadratic programming, and the study of its complexity in SAT and MAX-SAT. The two-point perturbation is a case of k-flip, and we give a detailed description and algorithm of these heuristics in the following sections.Thek-swap heuristic is similar and frequently confused with k-flip. The K-swap heuristic improves its performance as a perturbation move when it uses two or three movements [13].The move to less conflict heuristic, also known as minimizing conflicts, was proposed by Minton et al. [14]. The minimizing conflict heuristic has been applied to different areas in Computer Science such as hyperheuristics, graph coloring problems, pickup-and-delivery problems, and scheduling problems. The move to less conflict heuristic is a variant of the first fit, and the only difference is that the first one takes a random variable and changes its value for another that generates the least cost.Thefirst-fit heuristic was proved by Baker [15] for the bin-packing problem. On the other hand, in recent decades, this heuristic was applied to best-known problems such as bin packing, virtual machine relocation problem, and cutting stock. A remarkable variety of heuristics is worst fit which was studied by Baker [15] and Csirik [16], in particular, its application to bin-packing problem.Soria-Alcaraz et al. [17] proposed three heuristics for university course timetabling best single perturbation (BSP), static-dynamic perturbation (SDP), and double dynamic perturbation as part of the pool low-level heuristics for hyperheuristic. Moreover, these heuristics were applied to the VRP in later research [18].


## 2.2. Hyperheuristics

We focused on offline learning hyperheuristics selection with perturbation heuristics, whose aim is to gather knowledge in the form of rules or programs, from training set instances. Usually, the offline selection hyperheuristics belong to machine learning methods, which are trained to create a tuned methodology for a problem domain [3]. Yates and Keedwell [19] demonstrated that subsequences of heuristics were found in the offline learning database that is effective for some problem domains. They used the Elman network to compute sequences of heuristics which were evaluated on unseen HyFlex example problems, and the results obtained are capable of intradomain learning and generalization with 99% confidence.One of the crucial issues in hyperheuristics design is the quality and size of the heuristic pool [20]. Soria-Alcaraz et al. [20] proposed a methodology using nonparametric statistics and fitness landscape measurements for hyperheuristics design. This methodology was tested on course timetabling and vehicle routing problems; their hyperheuristic proposal had a compact heuristic pool and competed with some traditional methods in course timetabling. In the course timetabling problem, they obtained five best-known solutions of 24 PATAT instances [21]. Finally, a recent report by Amaya et al. [7] documented a model for creating selection hyperheuristics with constructive heuristics. The effectiveness of the model proposed by Amaya depends on the delta’s values used, which is useful with higher deltas.


## 2.3. Metalearning

The importance of metalearning, machine learning, and optimization has been studied by Song et al. [8]. The metalearning aim may concern accumulating and adapting experiences on the performance of multiple applications of a learning system. The metalearning field is also known as “learning to learn” [22] and it brings systems that can help by searching patterns across different tasks to control the process of exploiting cumulative expertise. The metalearning concept has been present in the field of heuristics and metaheuristics for TSP [23], the quadratic assignment problem, and hyperheuristics.On the other hand, Gutierrez-Rodríguez et al. [23] used VRP with time windows and proposed a methodology based on metalearning to select the best metaheuristic for each instance. Besides, their proposal shared and exploited an offline scheme for the instant solutions of academies and industry. Their main contributions were to propose a set of features for characterizing VRPTW instances and design a classification process that predicts the most suitable metaheuristic for each instance. Nevertheless, they assumed that the solutions of the set instances could be stored, shared, and exploited in an offline scheme for predicting good solvers for new unseen instances.The aim of this paper is not to present a survey on heuristics or hyperheuristics; our proposal is slightly different. Our proposal considers some vital aspects of the research, including the ones from Yates and Keedwell [19]. We took the offline hyperheuristic approach from Soria-Alcaraz et al. [20] and the statistical approach to selecting a pool heuristic from Kanda et al. [5]. The offline hyperheuristic approach is an effective and popular method in the machine learning area [8]. On the other hand, the statistical approach to selecting a pool heuristic is a useful and reliable method because it takes statistical information from the input data.


## 3. Combinatorial Problems

Our methodology is a general approach to competitive performance across several classes of problems. Thus, we used two problem domains: graph coloring and vehicle routing problems. In the following sections, we will review the formal definition of each of these problems as well as their benchmark instances.


### 3.1. Graph Coloring Problem

The graph coloring problem demonstration as an NP-hard problem was proposed by Karp [24]. According to [25], a formal vertex-coloring problem of a graph G=V,E is a function c:V⟶ℕ, in which any two incident vertices u,v∈V are assigned different colors, that is, u,v∈E⇒cu≠cv, and E is a finite set of unordered pairs of vertices named edges, where the function c is the coloring function and a graph G for which there exists a vertex-coloring which requires k colors is called k-colorable. The coloring function induces a partition of the graph G into independent subsets V1,V2,…,Vk, where Vi∩Vj=∅ and V1∪V2∪…∪Vk=V. The benchmark instances can be found in http://mat.gsia.cmu.edu/COLOR/instances.htmlmat.gsia.cmu.edu. The above lets the partitioning methodology work on the input design and it is possible to avoid the ad hoc modifications to the heuristics since it will only pass a different objective function that adequately evaluates the instances of this problem.


### 3.2. Capacitated Vehicle Routing Problem

The capacitated vehicle routing problem (CVRP) is a variant of VRP [26]. In this problem, we have an undirected graph G, m vehicles, Q capacity, and a set of cities C=c0,c1,…,cn. Formally, the city c0 is the depot and each vehicle must visit these cities starting from the depot and coming back to this. Alba and Dorronsoro [27] define a distance or travel time matrix D=di,j between cities ci and cj. Each city ci has a demand of things qi. We denote it as a route R=r⟶0,r⟶1,…,r⟶m, and r⟶i is a permutation of the cities, starting and finishing at the depot c0. For each route, r⟶i∩r⟶j=c0 with i≠j. The cost of a problem solution is the sum of the costs of each route of R as(1)FR=∑i=1mCostr⟶i,(2)Costr⟶i=∑j=0kdj,j+1,where k is the total of vehicles. This problem aims to determine for each vehicle the lowest cost (see equations (1) and (2)) tour or distance or travel time, considering the max capacity. Nota bene the hard constraints are the capacity of each vehicle and two vehicles cannot visit the same city. The CVRP has several constraints and a specific formal definition of this problem. These two characteristics let us apply our methodology with a design cities partition, where each vehicle is related to one part. As heuristics work with solutions that are already complete and respect important restrictions such as capacity, if any movement violates or exceeds this capacity, that solution is penalized in the objective function.


## 3.1. Graph Coloring Problem

The graph coloring problem demonstration as an NP-hard problem was proposed by Karp [24]. According to [25], a formal vertex-coloring problem of a graph G=V,E is a function c:V⟶ℕ, in which any two incident vertices u,v∈V are assigned different colors, that is, u,v∈E⇒cu≠cv, and E is a finite set of unordered pairs of vertices named edges, where the function c is the coloring function and a graph G for which there exists a vertex-coloring which requires k colors is called k-colorable. The coloring function induces a partition of the graph G into independent subsets V1,V2,…,Vk, where Vi∩Vj=∅ and V1∪V2∪…∪Vk=V. The benchmark instances can be found in http://mat.gsia.cmu.edu/COLOR/instances.htmlmat.gsia.cmu.edu. The above lets the partitioning methodology work on the input design and it is possible to avoid the ad hoc modifications to the heuristics since it will only pass a different objective function that adequately evaluates the instances of this problem.


## 3.2. Capacitated Vehicle Routing Problem

The capacitated vehicle routing problem (CVRP) is a variant of VRP [26]. In this problem, we have an undirected graph G, m vehicles, Q capacity, and a set of cities C=c0,c1,…,cn. Formally, the city c0 is the depot and each vehicle must visit these cities starting from the depot and coming back to this. Alba and Dorronsoro [27] define a distance or travel time matrix D=di,j between cities ci and cj. Each city ci has a demand of things qi. We denote it as a route R=r⟶0,r⟶1,…,r⟶m, and r⟶i is a permutation of the cities, starting and finishing at the depot c0. For each route, r⟶i∩r⟶j=c0 with i≠j. The cost of a problem solution is the sum of the costs of each route of R as(1)FR=∑i=1mCostr⟶i,(2)Costr⟶i=∑j=0kdj,j+1,where k is the total of vehicles. This problem aims to determine for each vehicle the lowest cost (see equations (1) and (2)) tour or distance or travel time, considering the max capacity. Nota bene the hard constraints are the capacity of each vehicle and two vehicles cannot visit the same city. The CVRP has several constraints and a specific formal definition of this problem. These two characteristics let us apply our methodology with a design cities partition, where each vehicle is related to one part. As heuristics work with solutions that are already complete and respect important restrictions such as capacity, if any movement violates or exceeds this capacity, that solution is penalized in the objective function.


## 4. Methodology

For our methodology, it is important to know since the constraint modeling phase of the problem can be solved by partitions. The API-Carpio methodology and the methodology proposed by Soria-Alcaraz et al. [28] let us transform the instances of the problem with their restrictions, into inputs to apply the proposed methodology. The MMA matrix that is generated by applying the API-Carpio methodology lets us visualize the hard restrictions of the problem and evaluate the costs of visiting cities or nodes. For the soft constraints of the problem, the methodology proposed by Soria-Alcaraz et al. [28] is to be considered in the list of restrictions.In this section, we describe the methodology to model the input data problem information used for the experimentation for two combinatorial problems based on the API-Carpio methodology. We integrated the API-Carpio methodology [29] and the methodology of the design proposed by Soria-Alcaraz et al. [28].


### 4.1. API-Carpio Methodology

This methodology is used to solve the university course timetabling problem and it considers three factors: students, teachers, and institutions (infrastructure). The methodology uses several structures for the equations previously described. One of the most important structures of this work is MMA. This matrix is constructed with information on the cities or nodes. For graph coloring, we use the information of the adjacency matrix, while for CVRP it is considered the cost matrix. Table1 shows an example of an MMA matrix. The algorithm to construct this matrix is given in [29].Table 1
MMA matrix.
City/nodeN1N2…Nn−1NnN11099…97137N299101…8096………………Nn−19780…3510Nn13796…1068


### 4.2. Methodology of Design

This methodology was extended from the proposal by Carpio [29] and their formal definition was proposed by Soria-Alcaraz et al. [28]. The methodology of design by Soria allows us to consider the objectives of course timetabling and to satisfy the different restrictions, by converting these to lists of time and space restrictions it is seeking to minimize student conflict.To use this methodology, two structures are used to consider restrictions and variables: MMA matrix and LPH. The LPH has information about the possible restrictions that can be assigned to each node or city. An example of this list can be found in Table2. The list shows in each row the number part, i.e., the node N2 can be assigned in parts 1, 2, 4, 5, 7, or 8, but not in 6. The algorithm for generating artificial instances of LPH can be found in Ortiz-Aguilar [30].Table 2
LPH list.
Node or cityRestrictionsN112345678N21234578………………………Nn−112345678Nn12345678N1...Nn represents the node or cities.


## 4.1. API-Carpio Methodology

This methodology is used to solve the university course timetabling problem and it considers three factors: students, teachers, and institutions (infrastructure). The methodology uses several structures for the equations previously described. One of the most important structures of this work is MMA. This matrix is constructed with information on the cities or nodes. For graph coloring, we use the information of the adjacency matrix, while for CVRP it is considered the cost matrix. Table1 shows an example of an MMA matrix. The algorithm to construct this matrix is given in [29].Table 1
MMA matrix.
City/nodeN1N2…Nn−1NnN11099…97137N299101…8096………………Nn−19780…3510Nn13796…1068


## 4.2. Methodology of Design

This methodology was extended from the proposal by Carpio [29] and their formal definition was proposed by Soria-Alcaraz et al. [28]. The methodology of design by Soria allows us to consider the objectives of course timetabling and to satisfy the different restrictions, by converting these to lists of time and space restrictions it is seeking to minimize student conflict.To use this methodology, two structures are used to consider restrictions and variables: MMA matrix and LPH. The LPH has information about the possible restrictions that can be assigned to each node or city. An example of this list can be found in Table2. The list shows in each row the number part, i.e., the node N2 can be assigned in parts 1, 2, 4, 5, 7, or 8, but not in 6. The algorithm for generating artificial instances of LPH can be found in Ortiz-Aguilar [30].Table 2
LPH list.
Node or cityRestrictionsN112345678N21234578………………………Nn−112345678Nn12345678N1...Nn represents the node or cities.


## 5. Metalearning for Selecting a Subset of Heuristics for Hyperheuristics

According to Brazdil et al. [22], the approach of metalearning (ML) is to help the selection of an algorithm for a set of instances with metadata. According to Alpaydin [31], the metalearning aim is to find the best classifier for a set of data and to find the best classifier for the characterization when the data are considered. In our proposal, the data are associated with the problem instances of different problems, and the classifier is associated with the set of heuristics. Our objective is to be able to select the best set of heuristics for a hyperheuristic in a set of instances. In Figure 1, we show a diagram of the metalearning processes to obtain metaknowledge for the selection of heuristics (diagram modified from Brazdil and Giraud-Carrier [32] to our methodology).Figure 1
Metalearning to obtain metaknowledge for heuristic selection.In this work, we use metalearning to select a set of heuristics for hyperheuristics in a dataset. We named the set of characterized instances of the two problem domains as the “metacharacteristics” and the model that maps each instance to the corresponding group of heuristics for hyperheuristics the “metalearner.” In this case, the metalearner selected is theK-means algorithm. The methodology proposed in this article consists of 5 steps in the metalearning stage:(i)
Step 1: obtain the set of instances to be worked on. In this case, we have as a criterion to select those instances that are susceptible to being resolved by partitions.(ii)
Step 2: evaluation and extraction of characteristics of the instances. In this step, the characteristics of the heuristics and the instances are generated. Heuristics that apply to both problems are selected, this task becomes simple with the use of the partitioning methodology, and this is because it allows working always with generic inputs where the variables and restrictions are modeled. Later, heuristics work with these generic inputs and solutions that only have a fitness function corresponding to their problem (where the objectives are evaluated).(iii)
Step 3: generation of metacharacteristics. Based on the characteristics of each problem and the performance of the heuristics applied to all instances, we generate vectors of characteristics that will be our metadata.(iv)
Step 4: metalearning and the recommended model of heuristics. In the state of the art, research is limited to applying only a clustering technique for the recommendation of the algorithm model. We propose to incorporate a statistical analysis together with the clustering algorithm to improve the design of the basic subset of heuristics.


### 5.1. Problem Definition of Metalearning for Heuristic Selection

Consider a problemPi that belongs to the problem set (GCP). Let Hi=hi,1,hi,2,⋯,hi,ni be a subset of low-level heuristics, which are used in the state of the art, to solve the problem Pi. We denote as RSHia random selection of heuristics Hi, to be applied in the solution of Pi, where RSHi=Hi, with RSHi to a reduced set of heuristics, that is, RSHi⊆Hi.LetV0=λ, where λ represents an empty string. We defined recursively Vn+1=whi,m|w∈Vn;hi,m∈Hi where n≥0 and m∈1,2,3,⋯,ni. Then Vn represents the set of all strings of length n∈ℤ+=0,1,2,3,⋯, formed from the symbols in Hi. So Kleene’s closure from Hi is [33](3)Hi∗=∪n∈Z+Vn=V0∪V1∪V2∪V3∪⋯.WhenV0 is omitted at the junction, we get the Kleene Plus closure Hi+:(4)Hi+=∪n∈ℕVn=V1∪V2∪V3∪⋯.In other words,Hi+ is the collection of all possible nonempty strings of finite length generated from the symbols in Hi.LetHH be a heuristic selection hyperheuristic with offline training, where the training considers the set Hi. After training, the HH provides a methodology MHi∈Hi+, with the best order of application of low-level heuristics, which we will denote by BMHi∈Hi+, in the solution of the problem Pi, which improves the performance of the application of a RSHi, where BOSHi≥Hi [17].We take two problemsPi and Pj that belong to the problem set (GCP) that comply with level 3 of generality proposed by Pillay [2] and are susceptible to being solved by partitions. Let Hi=hi,1,hi,2,⋯,hi,ni and Hj=hj,1,hj,2,⋯,hj,nj be subsets of low-level heuristics, which are used in the state of art, to solve the problems Pi and Pj, and UH = Hi∪Hj. We denote as RSUH a random selection of the heuristics UH, to be applied in the solution of Pi and Pj, where RSUH=UH, with RSUH to a reduced set of heuristics, that is, RSUH⊆UH.Heuristic selection hyperheuristic is denoted asHH, with offline training, where the training considers the UH set. After training, the HH provides a methodology MUH∈UH+, with the best order of application of low-level heuristics, which we will denote by BMUH∈UH+ in solving the problems PiandPj which improve the performance of the application of a simple RSUH, where BMUH≥UH+.Our objective is to propose a methodology that provides theHH, with a reduced subset RSUH⊆UH for its training, such that the HH provides a methodology MRSUH∈RSUH+, with the best order of application of the reduced set of heuristics RSUH, which we will denote by BMRSUH∈RSUH+, in solving the problems Pi and Pj respectively, which equal the performance than with the application of the methodology MUH∈UH+ where BMRSUH≥RSUH.To solve the problem, the independent application of each of the heuristics ofHi and Hj was proposed, measuring their performance in solving the problems Pi and Pj. Apply statistical tests to contrast the performance of the independent heuristics and thereby discriminate from each set Hi and Hj those heuristics that obtained the lowest performance.Next, we will focus on describing the stage of extracting characteristics from heuristics and instances. Our methodology improves the metalearning stage (step 4) with the application of nonparametric statistical tests to determine which heuristics are the ones that will provide the same performance if the full set of heuristics will be applied. This means that, if there are heuristics that are redundant, it is possible to leave them out and consider only those that enhance the speed of the search for solutions to the problem. The metalearning process proposed in this work to select the pool of heuristics includes the following steps:(1)
The problems will be the source of information for the basic features.(2)
Given a set of instances denoted asI, for each of the instances Ii apply a number k of times the heuristic Hj. The results will be the inner features. For the CVRP, a greedy heuristic is used, which will allow us to build feasible solutions to the problem. For graph coloring, we will initialize with a random construction heuristic. The next step is to apply the heuristics. It is possible after this step that the instances can be solved to the best solution due to their complexity. This means that it is possible to avoid executing a complete and expensive computation process when solving problems with the application of a simple heuristic.(3)
With the information obtained from points 1 and 2, feature vectors will be formed that will be our metadata.(4)
For a better treatment of the metadata from the previous step, the following steps are carried out:(a)
The patterns that will be used in the k-means will be scaled with the following formula [34]:(5)xscaled=x−xminxmax−xmin,wherex∈ℝ are the values of the original variables (features).(b)
Generate the pattern based on theinner and basic features per instance. The basic features will be the problem information and the inner features will be the fitness obtained by the heuristics applied k times to the problem.(5)
Pass the feature vectors to the clustering algorithm to form classes. According to Brazdil and Giraud-Carrier [32], the k-means is a simple learning method, which we apply to carry out the grouping of instances in classes. To determine which are the number of classes to form, we use Sturges rule, since, with data that are the potency of 2, it is approximated in a good way. Determine the subclasses with Sturges rule [35] with(6)c=1+logTlog2,whereT is the total amount of data.As the distance metric for the K-means, we use the Mahalanobis distance; this distance has properties such as being invariant to scale by nonsingular linear transformations. An in-depth study of different metrics [36, 37] will be a specific job to investigate whether it can improve the performance of the proposed methodology.(6)
Label each pattern according to the group number in which each pattern (instance) was classified.(7)
Apply again the three statistical tests to the results of heuristics per problem, according to the formulas in [38]. The test ranks 1 to the best performing heuristic, 2 to the second-best, and n to the worst-performing heuristic. From these tests, we will take the range of the heuristics and the range will now be considered as inner features. With this information and the class label, they will now form patterns.(8)
Determine a cutoff point for each class based on the range, and in this case, it will be the average of the minimum and maximum range. Choose those heuristics that pass the cutoff criterion to be part of the minimum set.(9)
The output will be the minimum set of heuristics per class.This process is shown in a specific way in Figure2. The two important aspects of metalearning in our work are heuristics and metacharacteristics, which are low-level heuristics and metafeatures.Figure 2
Metalearning process for the heuristics set selection.


### 5.2. Low-Level Heuristics

An important part of the hyperheuristic approach is the selection of the heuristic set. This article proposes to extract information from heuristics and problems to generate the metafeatures [32]. This lets us improve the design and testing of the hyperheuristic algorithm. The goal in this stage is to generate metafeatures in which the heuristics can have a better performance individually for all problem instances. This improves the next part in which the hyperheuristic must choose the sequence application for each heuristic and it uses a minimal pool of heuristics which is a fundamental part of it [2]. For all instances, it will be applied k times for each heuristic. The heuristics were applied to the two problems and their respective instances were as follows:(1)
K-Flip/Simple Random Perturbation (SRP) (H1). The heuristic changes the value of one or more variables (in some cases k) to another feasible value. The GCP aim is to change the color of a certain node to another [39]. Finally, for CVRP, the movement implies changing a city to another specific vehicle [12].(2)
K-Swap/Kempe Chain Neighborhood/S-Chain Neighborhood (H2). It must be selected two or more varieties and then interchange their values among them when possible; otherwise, the change is not made. We exchange the color between nodes previously selected by GCP. This heuristic is using in works related to TSP or CVRP, also called k-interchange [40, 41].(3)
Best Single Perturbation (BSP) (H3). This heuristic chooses a variable according to the list of hard restrictions (LPH) and changes its value. This exchange produces a better cost or in the worst case, the same cost [17]. Next time this heuristic is going to apply, the next variable will be chosen according to the next position of the last variable which was modified. The next node which must change color will be selected according to the last variable chosen for the graph coloring problem. The CVRP must be changing the city of the vehicle to another vehicle.(4)
Static-Dynamic Perturbation (SDP) (H4). It is also known as statically dynamic perturbation (SDP). It is based on the variable selection with a probability distribution of the frequency in the last k iterations. This heuristic chooses a variable and changes its value randomly [17]. The variables with fewer changes will have a higher probability to be selected. Applied to GCP, it would be a node with fewer color changes, and for the CVRP, the city has moved a few times to another vehicle.(5)
Two Points Perturbation (2pp) (H5). It is also known as k-opt, and it is a particular case of the K-swap with a value of k=2.(6)
Double Dynamic Perturbation (DDP) (H6). This heuristic is based on the SDP, this receives a solution, and it modifies the value of a variable concerning a probability distribution. The difference is that a copy of the initial solution is kept and, in the end, the best of the two solutions is returned [17].(7)
Move to Less Conflict (MLC) (H7). This selects a random variable, and it assigns to a part of the value which generates the least cost [18]. In GCP, the color changes according to another which improves the fitness, and in CVRP, the city is moved to another vehicle where the total distance of the route is minimized.(8)
Min-Conflicts (H8). The heuristic selects a random variable, and it assigns to a part which generates the cheapest cost [18]. In GCP, the heuristic must change color from the selected node to another, which improves the result. For CVRP, the selected city with a lower cost in which it must minimize the total distance of the route.(9)
First-Fit (H9). It changes the value of a variable to another, which is the least repeated in other variables [18], i.e., in CVRP, the heuristic will take a city and it will change it to the vehicle that has fewer cities in its route. For the GCP, it will select a node and it will assign the color that is least repeated.(10)
Worse Fit (H10). It assigns the most repeated value if possible, without violating the hard constraints on a randomly selected variable [42]. For GCP and CVRP, we assign a node or city to the most repeated timeslot, color, or vehicle.(11)
Burke–Abdullah (BA) (H11). This heuristic was proposed by Abdullah et al. [43], in which it chooses a variable applying Fail-First or Brelaz Heuristic [44] and its value changes according to the one that has obtained better performance by applying the following algorithms: minimum conflict, random selection, sequential selection, and least constrained.


### 5.3. Metafeatures

The description and generation of characteristics permit differentiation into at least two groups of instances within the same problem class. We used the terms of basic feature andinterfeature based on the proposal conducted by Gutierrez-Rodríguez et al. [23]. As basic features, these are given by the problem, e.g., the number of nodes, colors, vehicles, and so on, depending on each problem information. For both classes of problems, the number of different basicfeatures is summarized in Table 3.Table 3
Basic features for CVRP and graph coloring.
ProblemMin partitionMax partitionVariablesEdgesVRPVehiclesVehiclesCitiesCities connectionsGraph coloringLower boundUpper boundNodesEdgesThe fitness performance values of all heuristics are the inner feature key. Finally, the pattern per instance isbasic feature + inner feature. The final pattern is shown in Table 4. For example, instance 1 has a pattern (3, 3, 8, 50, 3, 2, 1, 4), and the number of interfeature is according to the pool heuristics (eight features for the given example).Table 4
Characteristics for instances.
InstanceLower boundUpper boundNodesEdgesH0H1H2H313385032142510636431.51.5338258031244101050802431


## 5.1. Problem Definition of Metalearning for Heuristic Selection

Consider a problemPi that belongs to the problem set (GCP). Let Hi=hi,1,hi,2,⋯,hi,ni be a subset of low-level heuristics, which are used in the state of the art, to solve the problem Pi. We denote as RSHia random selection of heuristics Hi, to be applied in the solution of Pi, where RSHi=Hi, with RSHi to a reduced set of heuristics, that is, RSHi⊆Hi.LetV0=λ, where λ represents an empty string. We defined recursively Vn+1=whi,m|w∈Vn;hi,m∈Hi where n≥0 and m∈1,2,3,⋯,ni. Then Vn represents the set of all strings of length n∈ℤ+=0,1,2,3,⋯, formed from the symbols in Hi. So Kleene’s closure from Hi is [33](3)Hi∗=∪n∈Z+Vn=V0∪V1∪V2∪V3∪⋯.WhenV0 is omitted at the junction, we get the Kleene Plus closure Hi+:(4)Hi+=∪n∈ℕVn=V1∪V2∪V3∪⋯.In other words,Hi+ is the collection of all possible nonempty strings of finite length generated from the symbols in Hi.LetHH be a heuristic selection hyperheuristic with offline training, where the training considers the set Hi. After training, the HH provides a methodology MHi∈Hi+, with the best order of application of low-level heuristics, which we will denote by BMHi∈Hi+, in the solution of the problem Pi, which improves the performance of the application of a RSHi, where BOSHi≥Hi [17].We take two problemsPi and Pj that belong to the problem set (GCP) that comply with level 3 of generality proposed by Pillay [2] and are susceptible to being solved by partitions. Let Hi=hi,1,hi,2,⋯,hi,ni and Hj=hj,1,hj,2,⋯,hj,nj be subsets of low-level heuristics, which are used in the state of art, to solve the problems Pi and Pj, and UH = Hi∪Hj. We denote as RSUH a random selection of the heuristics UH, to be applied in the solution of Pi and Pj, where RSUH=UH, with RSUH to a reduced set of heuristics, that is, RSUH⊆UH.Heuristic selection hyperheuristic is denoted asHH, with offline training, where the training considers the UH set. After training, the HH provides a methodology MUH∈UH+, with the best order of application of low-level heuristics, which we will denote by BMUH∈UH+ in solving the problems PiandPj which improve the performance of the application of a simple RSUH, where BMUH≥UH+.Our objective is to propose a methodology that provides theHH, with a reduced subset RSUH⊆UH for its training, such that the HH provides a methodology MRSUH∈RSUH+, with the best order of application of the reduced set of heuristics RSUH, which we will denote by BMRSUH∈RSUH+, in solving the problems Pi and Pj respectively, which equal the performance than with the application of the methodology MUH∈UH+ where BMRSUH≥RSUH.To solve the problem, the independent application of each of the heuristics ofHi and Hj was proposed, measuring their performance in solving the problems Pi and Pj. Apply statistical tests to contrast the performance of the independent heuristics and thereby discriminate from each set Hi and Hj those heuristics that obtained the lowest performance.Next, we will focus on describing the stage of extracting characteristics from heuristics and instances. Our methodology improves the metalearning stage (step 4) with the application of nonparametric statistical tests to determine which heuristics are the ones that will provide the same performance if the full set of heuristics will be applied. This means that, if there are heuristics that are redundant, it is possible to leave them out and consider only those that enhance the speed of the search for solutions to the problem. The metalearning process proposed in this work to select the pool of heuristics includes the following steps:(1)
The problems will be the source of information for the basic features.(2)
Given a set of instances denoted asI, for each of the instances Ii apply a number k of times the heuristic Hj. The results will be the inner features. For the CVRP, a greedy heuristic is used, which will allow us to build feasible solutions to the problem. For graph coloring, we will initialize with a random construction heuristic. The next step is to apply the heuristics. It is possible after this step that the instances can be solved to the best solution due to their complexity. This means that it is possible to avoid executing a complete and expensive computation process when solving problems with the application of a simple heuristic.(3)
With the information obtained from points 1 and 2, feature vectors will be formed that will be our metadata.(4)
For a better treatment of the metadata from the previous step, the following steps are carried out:(a)
The patterns that will be used in the k-means will be scaled with the following formula [34]:(5)xscaled=x−xminxmax−xmin,wherex∈ℝ are the values of the original variables (features).(b)
Generate the pattern based on theinner and basic features per instance. The basic features will be the problem information and the inner features will be the fitness obtained by the heuristics applied k times to the problem.(5)
Pass the feature vectors to the clustering algorithm to form classes. According to Brazdil and Giraud-Carrier [32], the k-means is a simple learning method, which we apply to carry out the grouping of instances in classes. To determine which are the number of classes to form, we use Sturges rule, since, with data that are the potency of 2, it is approximated in a good way. Determine the subclasses with Sturges rule [35] with(6)c=1+logTlog2,whereT is the total amount of data.As the distance metric for the K-means, we use the Mahalanobis distance; this distance has properties such as being invariant to scale by nonsingular linear transformations. An in-depth study of different metrics [36, 37] will be a specific job to investigate whether it can improve the performance of the proposed methodology.(6)
Label each pattern according to the group number in which each pattern (instance) was classified.(7)
Apply again the three statistical tests to the results of heuristics per problem, according to the formulas in [38]. The test ranks 1 to the best performing heuristic, 2 to the second-best, and n to the worst-performing heuristic. From these tests, we will take the range of the heuristics and the range will now be considered as inner features. With this information and the class label, they will now form patterns.(8)
Determine a cutoff point for each class based on the range, and in this case, it will be the average of the minimum and maximum range. Choose those heuristics that pass the cutoff criterion to be part of the minimum set.(9)
The output will be the minimum set of heuristics per class.This process is shown in a specific way in Figure2. The two important aspects of metalearning in our work are heuristics and metacharacteristics, which are low-level heuristics and metafeatures.Figure 2
Metalearning process for the heuristics set selection.


## 5.2. Low-Level Heuristics

An important part of the hyperheuristic approach is the selection of the heuristic set. This article proposes to extract information from heuristics and problems to generate the metafeatures [32]. This lets us improve the design and testing of the hyperheuristic algorithm. The goal in this stage is to generate metafeatures in which the heuristics can have a better performance individually for all problem instances. This improves the next part in which the hyperheuristic must choose the sequence application for each heuristic and it uses a minimal pool of heuristics which is a fundamental part of it [2]. For all instances, it will be applied k times for each heuristic. The heuristics were applied to the two problems and their respective instances were as follows:(1)
K-Flip/Simple Random Perturbation (SRP) (H1). The heuristic changes the value of one or more variables (in some cases k) to another feasible value. The GCP aim is to change the color of a certain node to another [39]. Finally, for CVRP, the movement implies changing a city to another specific vehicle [12].(2)
K-Swap/Kempe Chain Neighborhood/S-Chain Neighborhood (H2). It must be selected two or more varieties and then interchange their values among them when possible; otherwise, the change is not made. We exchange the color between nodes previously selected by GCP. This heuristic is using in works related to TSP or CVRP, also called k-interchange [40, 41].(3)
Best Single Perturbation (BSP) (H3). This heuristic chooses a variable according to the list of hard restrictions (LPH) and changes its value. This exchange produces a better cost or in the worst case, the same cost [17]. Next time this heuristic is going to apply, the next variable will be chosen according to the next position of the last variable which was modified. The next node which must change color will be selected according to the last variable chosen for the graph coloring problem. The CVRP must be changing the city of the vehicle to another vehicle.(4)
Static-Dynamic Perturbation (SDP) (H4). It is also known as statically dynamic perturbation (SDP). It is based on the variable selection with a probability distribution of the frequency in the last k iterations. This heuristic chooses a variable and changes its value randomly [17]. The variables with fewer changes will have a higher probability to be selected. Applied to GCP, it would be a node with fewer color changes, and for the CVRP, the city has moved a few times to another vehicle.(5)
Two Points Perturbation (2pp) (H5). It is also known as k-opt, and it is a particular case of the K-swap with a value of k=2.(6)
Double Dynamic Perturbation (DDP) (H6). This heuristic is based on the SDP, this receives a solution, and it modifies the value of a variable concerning a probability distribution. The difference is that a copy of the initial solution is kept and, in the end, the best of the two solutions is returned [17].(7)
Move to Less Conflict (MLC) (H7). This selects a random variable, and it assigns to a part of the value which generates the least cost [18]. In GCP, the color changes according to another which improves the fitness, and in CVRP, the city is moved to another vehicle where the total distance of the route is minimized.(8)
Min-Conflicts (H8). The heuristic selects a random variable, and it assigns to a part which generates the cheapest cost [18]. In GCP, the heuristic must change color from the selected node to another, which improves the result. For CVRP, the selected city with a lower cost in which it must minimize the total distance of the route.(9)
First-Fit (H9). It changes the value of a variable to another, which is the least repeated in other variables [18], i.e., in CVRP, the heuristic will take a city and it will change it to the vehicle that has fewer cities in its route. For the GCP, it will select a node and it will assign the color that is least repeated.(10)
Worse Fit (H10). It assigns the most repeated value if possible, without violating the hard constraints on a randomly selected variable [42]. For GCP and CVRP, we assign a node or city to the most repeated timeslot, color, or vehicle.(11)
Burke–Abdullah (BA) (H11). This heuristic was proposed by Abdullah et al. [43], in which it chooses a variable applying Fail-First or Brelaz Heuristic [44] and its value changes according to the one that has obtained better performance by applying the following algorithms: minimum conflict, random selection, sequential selection, and least constrained.


## 5.3. Metafeatures

The description and generation of characteristics permit differentiation into at least two groups of instances within the same problem class. We used the terms of basic feature andinterfeature based on the proposal conducted by Gutierrez-Rodríguez et al. [23]. As basic features, these are given by the problem, e.g., the number of nodes, colors, vehicles, and so on, depending on each problem information. For both classes of problems, the number of different basicfeatures is summarized in Table 3.Table 3
Basic features for CVRP and graph coloring.
ProblemMin partitionMax partitionVariablesEdgesVRPVehiclesVehiclesCitiesCities connectionsGraph coloringLower boundUpper boundNodesEdgesThe fitness performance values of all heuristics are the inner feature key. Finally, the pattern per instance isbasic feature + inner feature. The final pattern is shown in Table 4. For example, instance 1 has a pattern (3, 3, 8, 50, 3, 2, 1, 4), and the number of interfeature is according to the pool heuristics (eight features for the given example).Table 4
Characteristics for instances.
InstanceLower boundUpper boundNodesEdgesH0H1H2H313385032142510636431.51.5338258031244101050802431


## 6. Methodology for Determining a Subset of Heuristics

In this section, we propose a new approach for selecting and determining a subset of heuristics to solve GCP and CVRP instances. We describe our methodology in the next steps and the graphical representation of our methodology is shown in Figure3.(1)
Variables and Problem Restrictions Identification. First, the variables and restrictions of the problem are identified according to the problem aims or objectives. To model the GCP, the values in the MMA matrix represent the weights of the edges of nodes. If there is a zero in a certain position x,y in the matrix, this represents no connection between those nodes. For graph coloring, each node is colored considering that the adjacent nodes do not have the same color. CVRP is aligned with our methodology due to its aim seeking to get subroutes in which the tour cost (subgroup) must be the minimum or the cheapest.(2)
Problem’s Restriction Modeling. In both problems, we must design a partition of nodes or cities. First, it is necessary to model the restrictions for each variable in an LPH, e.g., a node cannot be colored by a specific color or a restricted city for a tour. Then, it must design the MMA which represents the edge or connection weight between nodes or cities. In GCP, the adjacency matrix corresponds to MMA, and in CVRP, the MMA matrix will be the matrix that has the distances of the node to node. For GC, our LPH is constructed based on the number of colors in which the nodes can be labeled. In case the problem restricts colors to five, the list will be like the one shown in Table 2. Similarly, this list will be built for the CVRP, where the number of vehicles is the number of parts that should be represented on the list (see Table 2). For the problems used in this work, it was not necessary to elaborate additional structures for soft restrictions. Besides, for an extensive review and how to model additional restrictions, the research proposed by Ortiz [10] details all possible cases and different features.(3)
Apply the metalearning process described in Section5.1(4)
Separate the patterns (step 6) into training and test sets to proceed to the classification phase. It is important to consider at least one pattern of each class in the test set.(5)
Use the classifier on the training set to make necessary adjustments to it. After describing and getting all pattern characteristics per instance, the next step is training and testing all instances by a classifier. For our approach, we prefer to use a simple classifier as Bayesian because our objective was not to compare the performance between classification algorithms or to design ad hoc classifiers for our research. The NBC simplifies learning by assuming per class that all features are independent [45]. In our methodology, we assume that each heuristic performance is independent because we applied each heuristic to independent experiments. In the previous stage, each experiment must be run with only one heuristic, and thus, we did not apply two or more heuristics at a time. Finally, all features in the created dataset instances were normalized before applying the classifier.(6)
Finally, the set of test instances will use the classifier to assign a “class” and solve it with its corresponding set of heuristics.Figure 3
Methodology to determine the subset of heuristics for hyperheuristics.


### 6.1. Designing and Testing the Hyperheuristic Offline Learning withK-Folds

To choose the minimal set of heuristics and design the hyperheuristic for each class in more detail, our methodology considered the hyperheuristics with offline training as it has demonstrated good results for constraint satisfaction problems in terms of generality solution [3]. A random constructive heuristic was used to generate solutions to our problem of GCP, and for CVRP, a greedy algorithm was used. A selection hyperheuristic algorithm has three components: the pool of operators (low-level heuristics), a high-level search strategy, and a control mechanism to select the operator, which will be applied at each search step.


#### 6.1.1. High-Level Search Strategy

The iterated local search algorithm was used as a high-level search strategy. This metaheuristic was proposed by Lourenço et al. [46] and it is constructing a sequence of solutions generated by an embedded heuristic. The generated solutions could be better if they were only constructed randomly. The essence of this algorithm is to intensify an initial solution, exploring neighboring solutions to it. The algorithm is shown in Algorithm 1, which was taken from El-Ghazali [47]. In the field of hyperheuristics with offline learning, it refers to the fact that the high-level search strategy searches for a methodology (a sequence of heuristics) that solves a set of instances and then applies it to a given set of instances, in contrast to online learning, which refers to the construction of a given sequence of heuristics as the instances are presented.Algorithm 1:High-level iterated local search (ILS).
(1)
s0 = GenerateInitialSolution(2)
s∗ = ImprovementStage(s0)(3)
while !StopCondition() do(4)
s' = SimpleRandomPerturbation(s∗)(5)
s∗' = ImprovementStage(s')(6)
iff(s∗') < f(s∗)then(7)
s∗ = s∗'(8)
end if(9)
end while(10)
return s∗


#### 6.1.2. Selection Operator

In the perturbation phase (step 4 in Algorithm2), it is necessary to choose a variable following a probability distribution based on the frequency of variable selection in the last k iterations. This simple heuristic allows us to modify the methodology solution. We used the same hyperheuristic framework, and according to each class, we gave a different pool of low-level heuristics. For example, if for class 1 the best heuristics were H1, H8, H10, and H5, these were our pool for the hyperheuristic. With a similar procedure, the design was done for each class. After this process, we trained each hyperheuristic on their respective classes for the next stage.Algorithm 2:Improvement stage.
(1)
ls ← IncumbentSolution(2)
while!LocalStopCriteria()do(3)
hi = Perturbate()(4)
ls∗ = apply(hi, ls)(5)
iff(ls∗) < f(ls)then(6)
ls = ls∗'(7)
end if(8)
end while(9)
returnls


## 6.1. Designing and Testing the Hyperheuristic Offline Learning withK-Folds

To choose the minimal set of heuristics and design the hyperheuristic for each class in more detail, our methodology considered the hyperheuristics with offline training as it has demonstrated good results for constraint satisfaction problems in terms of generality solution [3]. A random constructive heuristic was used to generate solutions to our problem of GCP, and for CVRP, a greedy algorithm was used. A selection hyperheuristic algorithm has three components: the pool of operators (low-level heuristics), a high-level search strategy, and a control mechanism to select the operator, which will be applied at each search step.


### 6.1.1. High-Level Search Strategy

The iterated local search algorithm was used as a high-level search strategy. This metaheuristic was proposed by Lourenço et al. [46] and it is constructing a sequence of solutions generated by an embedded heuristic. The generated solutions could be better if they were only constructed randomly. The essence of this algorithm is to intensify an initial solution, exploring neighboring solutions to it. The algorithm is shown in Algorithm 1, which was taken from El-Ghazali [47]. In the field of hyperheuristics with offline learning, it refers to the fact that the high-level search strategy searches for a methodology (a sequence of heuristics) that solves a set of instances and then applies it to a given set of instances, in contrast to online learning, which refers to the construction of a given sequence of heuristics as the instances are presented.Algorithm 1:High-level iterated local search (ILS).
(1)
s0 = GenerateInitialSolution(2)
s∗ = ImprovementStage(s0)(3)
while !StopCondition() do(4)
s' = SimpleRandomPerturbation(s∗)(5)
s∗' = ImprovementStage(s')(6)
iff(s∗') < f(s∗)then(7)
s∗ = s∗'(8)
end if(9)
end while(10)
return s∗


### 6.1.2. Selection Operator

In the perturbation phase (step 4 in Algorithm2), it is necessary to choose a variable following a probability distribution based on the frequency of variable selection in the last k iterations. This simple heuristic allows us to modify the methodology solution. We used the same hyperheuristic framework, and according to each class, we gave a different pool of low-level heuristics. For example, if for class 1 the best heuristics were H1, H8, H10, and H5, these were our pool for the hyperheuristic. With a similar procedure, the design was done for each class. After this process, we trained each hyperheuristic on their respective classes for the next stage.Algorithm 2:Improvement stage.
(1)
ls ← IncumbentSolution(2)
while!LocalStopCriteria()do(3)
hi = Perturbate()(4)
ls∗ = apply(hi, ls)(5)
iff(ls∗) < f(ls)then(6)
ls = ls∗'(7)
end if(8)
end while(9)
returnls


## 6.1.1. High-Level Search Strategy

The iterated local search algorithm was used as a high-level search strategy. This metaheuristic was proposed by Lourenço et al. [46] and it is constructing a sequence of solutions generated by an embedded heuristic. The generated solutions could be better if they were only constructed randomly. The essence of this algorithm is to intensify an initial solution, exploring neighboring solutions to it. The algorithm is shown in Algorithm 1, which was taken from El-Ghazali [47]. In the field of hyperheuristics with offline learning, it refers to the fact that the high-level search strategy searches for a methodology (a sequence of heuristics) that solves a set of instances and then applies it to a given set of instances, in contrast to online learning, which refers to the construction of a given sequence of heuristics as the instances are presented.Algorithm 1:High-level iterated local search (ILS).
(1)
s0 = GenerateInitialSolution(2)
s∗ = ImprovementStage(s0)(3)
while !StopCondition() do(4)
s' = SimpleRandomPerturbation(s∗)(5)
s∗' = ImprovementStage(s')(6)
iff(s∗') < f(s∗)then(7)
s∗ = s∗'(8)
end if(9)
end while(10)
return s∗


## 6.1.2. Selection Operator

In the perturbation phase (step 4 in Algorithm2), it is necessary to choose a variable following a probability distribution based on the frequency of variable selection in the last k iterations. This simple heuristic allows us to modify the methodology solution. We used the same hyperheuristic framework, and according to each class, we gave a different pool of low-level heuristics. For example, if for class 1 the best heuristics were H1, H8, H10, and H5, these were our pool for the hyperheuristic. With a similar procedure, the design was done for each class. After this process, we trained each hyperheuristic on their respective classes for the next stage.Algorithm 2:Improvement stage.
(1)
ls ← IncumbentSolution(2)
while!LocalStopCriteria()do(3)
hi = Perturbate()(4)
ls∗ = apply(hi, ls)(5)
iff(ls∗) < f(ls)then(6)
ls = ls∗'(7)
end if(8)
end while(9)
returnls


## 7. Experimental Results

This section describes our experiments in detail for graph coloring and CVRP benchmarks used in this paper. We give the configuration for the implementation of the iterated local search hyperheuristic. Finally, we described the statistical tests that we used to compare our results with the experimental methodology.Our approach was implemented in JAVA language with JDK 1.8 using the IDE NetBeans IDE 8.2. The experiments were executed on a computer with processor Intel i7-7700U, 2.6 GHz, 16 GB DDR3 RAM, and operating system Windows 10 Home. The tests presented in this work were executed in a common notebook, with a single processor; it is showing the effectiveness of the exposed methodology.For each heuristic, a limit of 100,000 function calls was given in each test run for all instances. We applied the Shapiro–Wilks test to check if the data results were normal or not, hence choosing a better representative (average or medium). If the data behavior is according to a normal distribution, the average was taken as representative and otherwise the median.


### 7.1. Heuristics Results for Graph Coloring and CVRP

#### 7.1.1. Graph Coloring

We used the benchmark proposed for the second DIMACS challenge on graph coloring [48] and this is tested with 41 runs. In Tables 5 and 6, we show our results. We denote the best results with a bold face, and only the myciel2 instance was solved with the application of the individual heuristics in their optimum.Table 5
Heuristics results for graph coloring instances.
#NameNodesColorsH1H2H3H4H5H6H7H8H9H10H1111-Insertions_4673121811151066611325287522-Insertions_3373474542415411102932-Insertions_41493334116323214815829454715543-Insertions_35635944533244994054-Insertions_379214191613116166132522716anna1381017171417165945133530687asH_3 31GPIA6623997685968210677248916415610828asH_6 08GPIA1216314971448729154113702003112010831513148520669asH_9 58GPIA191632618255319002621246231611999203926162624320610david8710161814161649481535375811DSJC1000.110001918471801610183717812565101994217891821263412DSJC1000.5100082243225138382425237931301126123023272327323413DSJC1000.91000214185620738281850182423541204106223751768241414DSJC125.1125448593648541619737566617315DSJC125.512515113156721141242751336825011229816DSJC125.912542125173771241312101327220811222117DSJC250.52502535041514634936865827815733932668118DSJC250.92507031138815231531947723415348729448519DSJC500.1500116296461976345981085532279623614111420DSJC500.55004792710072909119051381471368859853141221DSJC500.950012277192732675976310444873821051731112922DSJR500.150011124130331251193341284612912734323DSJR500.1c5008412571439203126212591566116247515391210158924DSJR500.550012137642520137236961929921162735266225fpsol2.i.149664141183821391222631699125526226726fpsol2.i.24512952815951523372815220421534827fpsol2.i.34252951825551543642725421123236828games1201208162411171782341023238829homer56112232222242316513924534417630huck7410131312131346381227244731inithx.i.186453789581808042332011526426344432inithx.i.264530551006256595254598535032453133inithx.i.362130591086556635104627833833153934jean809131213141247311327264635le450_15a4501429229310329129158041013729228959736le450_15b4501428929710629028558942712530028862437le450_15c450147167623587137131187887424734707117938le450_15d450147237513717187331163799418728725119739le450_25a45024160162501581533722296316416239540le450_25b45024156161511641603771885815615640441le450_25c4502440741715040039373651018039639478042le450_25d4502440042215040040373646117939739479143le450_5a45047807724847557381195966551753771120944le450_5b450476976849875973811928865657647691280Table 6
Heuristics results for graph coloring instances.
#NameNodesColorsH1H2H3H4H5H6H7H8H9H10H1145le450_5c4504145914769091422139420241692108314281464207346le450_5d4504146414428431449138519811712106014311436200447miles100012841525849514913375491297013748miles15001287381107828281149947912310016949miles2501287141415151373371624287550miles50012819262425252487482481439051miles75012830384138383710264371015311952mugg100_110035124655519512125753mugg100_2510035124664925412145554mugg88_1883510455431959105055mugg88_258835104564620511116156mulsol.i.119748606860605714276591318015357mulsol.i.2188304956485047172118481439518658mulsol.i.3184305056484947177117481609917659mulsol.i.4185304953504948165119481429419260mulsol.i.51863050624850501711144810710019161myciel31134643310641041262myciel423459655241251592763myciel54758138985332820175664myciel6956182412191913510513375114365myciel7191784961885783473032310713632866qg.order309002955454415255452591222322753353195367qg.order401600391174110562711601078162637855811311128167168qg.order60360059307629072425307928973692831223430703008373869queen10_101001041583738351556537607116370queen11_1112110577654575020910153878221671queen12_121441251745254492249348817423372queen13_1316912701076774682811126910811729973queen14_14196155883545653288117539310131774queen15_1522515751117181743701387412411236875queen16_1625616851088390804071597912511743876queen5_5254173816171545251725235077queen6_6366192717171849281647275578queen7_7496295127303390423036398779queen8_12961129523032251386028484813880queen8_864832562531331004527804210481queen9_981931483330271245534495812982school138513997100862610099871423133069110761037144083school1_nsh3521372374244573572011001048490734781113584will199GPIA701343841843845343017621542442547555178885zeroin.i.121148627262616014780601268915986zeroin.i.2211294255414141165113451638916987zeroin.i.32062940554340391791114016291164We applied a nonparametric test to verify that there are differences between the performance of each heuristic. Table7 shows the ranges obtained in the three statistical tests for graph coloring instances. The three omnibus tests indicated there are significant differences between the heuristics. The heuristics which obtained the highest ranks in the three tests were H6 and H11, i.e., these have the worst performance. H3 and H8 were the best results for the problems, and this is because in all omnibus tests those heuristics obtained the lowest ranks (see Table 7 marked in bold). The time of each run is reported in Table 8 in.Table 7
Statistic test results for graph coloring instances for Friedman (F), Friedman Aligned (FA), and Quade (Q).
Statisticsp valueH1H2H3H4H5H6H7H8H9H10H11F255.7204.646.402.184.683.3310.017.522.487.406.4710.89FA77.860374.88461.35209.30370.94340.22820.66575.50212.84568.01505.86829.45Q99.0405.276.491.915.243.689.996.842.447.116.1310.90Table 8
Time for one run of each heuristic in seconds for graph coloring instances.
InstanceH1H2H3H4H5H6H7H8H9H10H111-Insertions_41514181514111361514132-Insertions_31414171414111271414132-Insertions_41616171716121471616143-Insertions_31414171414111261414134-Insertions_3151418151411157151513anna16151516151295161614asH_3 31GPIA5844314644436127464745asH_6 08GPIA2011728117817515815693160161134asH_9 58GPIA488321140370354371317203371371275david15141415141195151514DSJC1000.16762256463732430636831DSJC1000.55153215559481723595921DSJC1000.94955215361481624736522DSJC125.1151517161512126151514DSJC125.515151516151294151514DSJC125.915151316151284161613DSJC250.518181419181496191915DSJC250.918181419181485201914DSJC500.13027173028241511292920DSJC500.5262615282722109292915DSJC500.925261527282299333115DSJR500.13027172928251511292920DSJR500.1c26261528282299313015DSJR500.525261527282299333115fpsol2.i.12726152927241310303315fpsol2.i.2252515262521109262716fpsol2.i.3242515252420108252615games120151515161512105151514homer3230183334271712323424huck14141515141195141414inithx.i.15249225652511924547124inithx.i.23334173533301513363718inithx.i.33234173432291412353617jean14151515141195151414le450_15a252616272522129272817le450_15b252716272522129272817le450_15c252716272522129262817le450_15d252716272522129272817le450_25a242515262521109272716le450_25b242515262521109272715le450_25c252615262521109272716le450_25d252515272521109272716le450_5a2631202826232512273222le450_5b2631202826232412273222le450_5c2529202725222412272822le450_5d2529202725222412262822miles1000151513161512841161613miles1500151615161512841151613miles250151615161512105151613miles500151514161512841161514miles75015151316151284161613mugg100_1151517151511137151513mugg100_25151517151511137151513mugg88_1151517151511136151513mugg88_25151517151511137151513mulsol.i.117181418171385181814mulsol.i.216181417161385171714mulsol.i.316181417161385171714mulsol.i.416181417161385171714mulsol.i.516181417161385171714myciel3141417141410126141413myciel4141416141410116141413myciel5141416141410115141413myciel6141515151511115151514myciel7161716171713116171714qg.order305053215451492023545726qg.order4014915146157152187447115916753qg.order6010161016184983108798319153210991113226queen10_1015151515151195151514queen11_1115151515151295161614queen12_1216151416151295161614queen13_1316161517161295161614queen14_1417171518171395171715queen15_1518181519181496181815queen16_1618191419191596191915queen5_5141418141410126141414queen6_6141416141410105141414queen7_7141416141411115141414queen8_1215151415141195151514queen8_8141416151411105141414queen9_9141414151411105151514school1232416242319128242517school1_nsh212216222118117222316will199GPIA4751355967516832545246zeroin.i.117181418171485181814zeroin.i.217181518171495181814zeroin.i.317181518171395181814


#### 7.1.2. Capacitated Vehicle Routing Problem (CVRP)

Three sets of the state of the art were used and tested on 41 runs:(1)
Augerat et al. (SET A), 9 instances, proposed in [49](2)
Christofides, Mingozzi, and Toth (CMT), 14 instances, proposed in [50](3)
Golden, Wasil, Kelly, and Chao (GWKC), 20 instances, proposed in [51](4)
Uchoa et al., 9 instances, proposed in [52]In Table9, we show the fitness values for the instances and the lowest city cost tour is indicated in bold, where n is the number of nodes, Q is the capacity of each vehicle, and k is the number of vehicles (colors in the case of graph coloring). The time of each run is reported in Table 10.Table 9
Results for CVRP-capacitated instances.
InstanceCitiesVehiclesOPH1H2H3H4H5H6H7H8H9H10H1188CMT1505524.611583116115691568111711411664157616641664166489CMT27510835.262353159123512349172818982577254725772577257790CMT31008826.141904182119392017169917433293224932933293329391CMT4150121028.422578267425202519234724625096311550965096509692CMT5199171291.293159446964903144300831556742670767426692674293CMT6506555.4310271160156910289419331664157316641571166494CMT77511909.681492161623511465135714072577251725772531257795CMT81009865.951743189017991906159816363293220332933195329396CMT9150141162.552308276824892325218522565096297150964918509697CMT10199181395.854607460728522852279128706742670767426513674298CMT1112071042.122077207723722372204621102608244926082608260899CMT1210010819.5616921692173317331472152823062144228723002306100CMT13120111541.1420402040204120411827190626082476260825772608101CMT1410011866.3717171717160916091444151723062171230622702306102GWKC124095623.479497915586079261735085651331210546133121331213312103GWKC2320108404.611457116631151611339912320109032096116801207872073521080104GWKC3400911036.21919721734241612007017167187932611722304261172611726117105GWKC448010135902704630204323822664327133265043873231793388923889238892106GWKC520056460.981422415677130091420712800134351955815763213782137821378107GWKC628078412.91540721043149251570114022145392669917688266992669926699108GWKC7360810102.72590923841259092590924611257182590925909259092590925909109GWKC84401011635.32150023969208172048318560186773150626204315063150631506110GWKC925514579.7111029892323126495491625812319258125812581111GWKC1032316735.6613441312347612771222122935893451358935893589112GWKC1139917912.0317511919475816401572148550404478503950395040113GWKC12483191101.522951979673824622192236354166520675067506750114GWKC1325226857.1920101301206220311475161521172078215821512158115GWKC14320291080.5523511637263723222221238927482665274527442748116GWKC15396331337.8732622062332232072793302533663308336633643366117GWKC16480361611.5639782596410738203492378341984092421742124217118GWKC1724022707.7617541518216317291611166923762165237623762376119GWKC1830027995.1321302165344321502073215534433443344334253443120GWKC19360331365.632382808454030243226357547134466471347134713121GWKC20420381817.5935193746619035113189332761865992619160846191122A-n32-k532578415381476143114741265125522301662222922292230123A-n45-k64561733.3617331733173317331273115617331733173317331733124A-n55-k9559107316601413145316421439132823761901237623762376125A-n61-k9619103425001814233824641731183825922517259225922592126A-n62-k8628128817721724203917921551161531942219319431943194127A-n63-k9639131424801879245223961813183526772564267726772677128A-n64-k9659140119351893216919481744171526132203261326132613129A-n65-k9659117426091940260025461820189229492808294929492949130A-n69-k9699115921491803208019791626168732202477322032203220131X-n148-k4614846434487182654940750627166568924711797762378715791167911679116132X-n153-k2215322212203670039843527413615534116343377180156820717997179371801133X-n157-k1315713168763636424507363643636427917292103636436364363643636436364134X-n162-k1116211141383923237225363813816232918340597997360657799697996379973135X-n367-k173671722814712098532697502724826864870027154244112919154244154244154244136X-n393-k38393393826014143274629152513143398130939148728158058155203158058158058158058137X-n401-k294012966187140100106590163158141582141056145043197323163230197323197323197323138X-n411-k19411191971867963796428103467090630386617317326988152173269173269173269139X-n420-k13042013010798182376132745207213183053203757200726217483216871217483217483217483Table 10
Time for one run of each heuristic in seconds for CVRP-capacitated instances.
H1H2H3H4H5H6H7H8H9H10H11A-n32-k5771277574779A-n45-k6771277563779A-n55-k9771177553779A-n61-k9771177553779A-n62-k8771187563779A-n63-k9771177553779A-n63-k10771177553779A-n64-k9771177553779A-n65-k9771177553779A-n69-k9771187553879CMT1771277574779CMT2771177553889CMT3771187563889CMT4881188663999CMT588109865310109CMT6771277563779CMT7771187552879CMT8771187563889CMT9881088652999CMT1088109865210109CMT11771187663889CMT12771277573779CMT13771277563779CMT14771277574779X-n420-k13011111611119118111113X-n411-k1911111611119118111113X-n401-k2911111611119107111113GWKC1881198663999GWKC28811108663101010GWKC39911119784121213GWKC41010131210883121211GWKC5881398694989GWKC68812986739910GWKC7991199773101010GWKC89911119773121210GWKC9881198653101010GWKC109911109763121110GWKC119911119763131310GWKC121010111210863151511GWKC138811109752121210GWKC149911109753141410GWKC15101011119753161610GWKC161010111210853191810GWKC17881098652111110GWKC189910109752131310GWKC199911119753161510GWKC201010111210853181811X-n148-k4611111611119118111113X-n153-k2211111611119117111113X-n157-k1311111611119107111113X-n162-k1111111511119107111113X-n367-k1711111511119107111113X-n393-k3811111511119107111113We applied the same procedure to the statistical tests of Friedman (FT), Alienated Friedman (AFT), and Quade (Qt) to distinguish the behavior of the heuristics set. We establishedα=0.05 and h0 as there are no differences between the performance of the heuristics and established ha as there are differences between the performance of the heuristics. Table 11 shows the ranks obtained in the three statistical tests.Table 11
Statistic test results for capacitated vehicle routing problem instances for Friedman (F), Friedman Aligned (FA), and Quade (Q).
Statisticsp valueH1H2H3H4H5H6H7H8H9H10H11F420.8404.498.799.693.535.594.161.602.469.326.929.45FA47.30170.82441.25443.96143.53280.22169.32127.19147.94441.70342.00443.57Q79.9704.298.879.723.685.593.961.672.579.266.919.47In this case, the heuristicH5 has the lowest rank for the tests and H6has the second-lowest rank for QT and FT.


### 7.2. Selection of Features and Classes by Statistical Tests

According to the steps mentioned in Section5.1, we must determine first the number of clusters or classes to split all our test instances. In this case, T=139 and c=8.We considered 8 classes and usedk-means clusters and we expected uniformly distributed instances in the clusters. The k-means algorithm was applied with a maximum number of Iterations=500, initially random starting points. To consider the uniform distribution of classes into clusters, we used the Manhattan distance obtained after the experimental work, with the best results.Table12 contains the class details, number of instances per cluster/class, number of GCP (3rd column), or CVRP (4th column) per class, min and max nodes, and min and max number of colors nodes. In this experimentation, clusters 1, 5, 6, and 7 have only GCP instances, clusters 3, 4, and 8 have CVRP instances, and only cluster 2 has both problem domains.Table 12
Summary cluster/classes withk−means algorithm.
Cluster# of instances%GCCVRPMin nodesMax nodesMin colors/vehiclesMax colors/vehicles11812.918011149362107.282420360032143117.9011148480546453.6053674201713051913.71906425673063122.3310125900111227117.911035270131483424.503432483533


### 7.3. Training and Test Classifiers for the Instance’s Classes

After the heuristic pool design phase for the hyperheuristics, we split our dataset into training and test. The training dataset was created by 125 instances with 15 features (basic + inner) and the unseen instances were made by 15 instances. The results of the classification with Naive Bayes are reported in Table13.Table 13
Classification value results.
Correctly classified11491.20%Incorrectly classified118.80%TP rate0.912FP rate0.022Precision0.918Recall0.912Table14 contains the confusion matrix of the process classification. We observed that, for some classes like 3, 4, 7, and 8, the patterns were classified correctly. The rest of the classes have some patterns classified incorrectly, but, e.g., for the 3 patterns of class 1 classified into 5 and 6, we used the same pool of low-level heuristics and this does not represent an issue for the next step.Table 14
Confusion matrix, TP rate (TPR), FP rate (FPR), and precision (P) for each class.
Class12345678TPRFPRP11300021000.813012070000020.77801300100000010140004000010150000125000.7060.0190.85760000027100.9640.0620.818700000010010.0090.909800000003110.0210.939


### 7.4. Designing and Testing the Hyperheuristic Offline Learning withK-Folds

In the next step, the statistical tests were applied to heuristics and will form the characteristics of our instances, graph coloring, and CVRP per class. In this phase, we choose according to the rankings the heuristics which havex<minrank+maxrank/2. If, for example, the Aligned Friedman has a min rank =776.5 and max rank =3604.5, the limit value for considering a heuristic must be 2190.5. Because heuristic 11 has the worst performance for both datasets, we did not consider this heuristic for this experimentation phase.Table15 shows the ranks and the heuristic fitness for each class, e.g., class 1 for QT, and AFT has the same heuristics H5, H6, H4, H1, H2, and H3, while FT does not consider H3. We only consider H5, H6, H4, H1, H2, and H3 as a minimum set.Table 15
Heuristics ranks per classes, Friedman (Fr), Aligned Friedman (A-Fr), and Quade (Qu).
Class 1Class 2∗FrH3H8H5H1H4H2H3H8H7H5H2H101.501.693.784.034.086.692.833.445.76.25∗A-FrH3H8H1H5H4H2H3H8H7H5H2H46276381089109111021760.5293320335428508540∗QuH3H8H5H4H1H2H3H8H7H5H2H101.551.593.774.044.156.812.242.732.984.185.516.39Class 3Class 4∗FrH5H6H2H4H1H3H5H2H1H4H6H31.642.184.274.274.825.182.42.62.83.63.66∗A-FrH5H6H4H2H1H3H2H1H5H4H6H32422834034184195683374787991128∗QuH5H6H2H4H1H3H2H1H5H4H6H31.712.264.204.524.885.382.072.672.673.673.936Class 5Class 6∗FrH8H3H5H1H4H2H3H8H5H4H1H101.451.553.534.374.686.031.321.694.354.925.055.92∗A-FrH8H3H5H1H4H2H3H8H5H4H1H26466511144.511971225.52010.513061345411242114227.505058∗QuH8H3H5H1H4H2H3H8H5H4H1H21.471.533.674.444.695.781.481.533.904.554.606.47Class 7Class 8∗FrH3H8H5H4H1H9H5H6H2H4H1H31.322.453.455.325.865.911.472.383.444.214.595.46∗A-FrH3H8H5H4H1H9H5H6H2H4H1H3108.50171477.50578.50637.50642232826912989384740706169.50∗QuH3H8H5H4H9H1H5H6H2H4H1H31.122.173.655.095.745.821.502.283.274.464.705.43The selected heuristics for each class can be summarized into five groups:(1)
H3, H8, H5, H4, and H1(2)
H3, H8, H7, H5, and H2(3)
H5, H6, H2, H4, H1, and H3(4)
H2, H1, H5, H4, and H6(5)
H3, H8, H5, and H4Therefore, we design 5 algorithms for these 8 classes. This means the hyperheuristic with the high-level search strategy was the same, but the heuristics pool set was different according to these 5 subset heuristics. We trained and tested the hyperheuristic on short-length pools. We left 10% of instances as unseen for the hyperheuristics and the results are shown in Table16.Table 16
Hyperheuristics results for graph coloring and CVRP.
#CMedianDEAverageOpt#CMedianDEAverageOpt#CMedianDEAverageOpt413243305104121077222841623114393033451051291971602124901131412934958101573773261856231441355350520112619387321183620145131073515321440304374071606744141182840465577372744740216867245313863695222536104572943981,14745413553705373356104672933901,156455136537153242551283734017165813611303372552557912847320413548362142547353558641512381,8212611,5241,733631567575560801011612481,1475171,5981,073641624196805151525812581,3664682,0821,0347614784815182129912681,4107672,0521,288771881261666033994212781,5824372,1451,3147811611236186127822557012881,5104551,9751,401825733651,17632062472857154712981,4335832,2711,174921,0115102,190321628520662812213081,4207472,1201,1591125415351,43519226215996118889092911,3395251327714781,542214246181973181219782,4691,8974,6221,396232153441962842567543133649881,7073422,1741,04211722,1797763,3431,612266427798299981,1164261,60582012122,8581,5204,5281,81827640801002910081,5484182,0511,541672318330897392961435351210181,1174201,5648666827536892,522593166886131539081,4417872,10582610339,4294,58713,9678,40532645130142309182,0491,3133,0991,028104313,2115,61719,24011,03633646136145309282,6191,8424,7021,291106311,3764,02514,7626,46135685104239149388153421,165555107312,5666,11817,6968,41336685108238149481,1885721,800910108313,2214,90523,10710,1033963768126249581,4367272,024866109314,3907,05521,41111,63540635691242410286,0233,0218,8745,624131350,6349,12668,65643,4484261271373322411181,0561,1722,201736132330,32317,17347,02521,2204764315534111281,3401,6712,996912133322,1755,42032,88316,8764867415867311381,7442,2874,0381,102134328,76921,92245,67814,1385665017624811481,1384221,658857135465,09859,475160,61722,8145764028593011581,4475222,1541,081136467,18429,544127,82738,2605863726573011681,8115742,7371,338137497,07434,915149,75066,1876064027583011881,3004621,8107081394125,87527,756192,09310,7986661311934172911981,6238372,58799510510615108565317654812082,3701,0323,5191,366155454895158663428552911088238031,60358028581414887633265329The best results are highlighted in bold.The hyperheuristic configuration was 10 iterations for local search and 100,000 function calls. For some GCP instances, we got the optimum number of colors (denoted in bold in Table16). Besides, for the instances A-n45-k6, A-n55-k9, A-n62-k8, A-n64-k9, CMT13, GWKC1, GWKC2, GWKC3, and X-n148-k46, we get values near to the optimal with a maximum of 20% of the distance.


### 7.5. Classification of the Test Instances and Application of the Hyperheuristic to the Corresponding Instance

Finally, for the 14 unseen instances, we used the Naive Bayes classifier, and it determines the class for these instances. Later, we applied the hyperheuristic with the corresponding pool heuristics according to the previous design and we obtained the results shown in Tables17 and 18.Table 17
Confusion matrix, TP rate (TPR), FP rate (FPR), and precision (P) for each test instance.
Class12345678TPRFPRP12000000010120100000010130010000010140001000010150000020000—60000030010.1820.6700000010101800000003101Table 18
Fitness results of test instances (hyperheuristic).
InstanceClassFitnessInstanceClassFitnessanna13DSJC250.5627mugg100_113le450_25c626DSJC1000.5283mulsol.i.4630GWKC4314255.68school1713X-n411-k19420005.37A-n32-k58876.19queen15_15529CMT28911.37queen8_12521CMT981258.57Table17 shows the confusion matrix, TP rate, FP rate, and precision of the classification test. In these results, two patterns that belong to class five were classified incorrectly, but this does not affect the hyperheuristic solution because this class shares the same heuristics with class 6.


### 7.6. Statistical Comparison of Results

Finally, to compare if there are differences between the results applying the methodology and without applying the methodology, an experiment was carried out where the hyperheuristics were executed 33 times with the entire set of heuristics and 100,000 function calls. The results are shown in Table19.Table 19
Results of hyperheuristic with the complete set heuristics and without methodology (HHPC), cluster (C), and T which are the training set instances.
InstancecHHPCInstancecHHPCInstancecHHPCInstancecHHPC1-Insertions_4134X-n367-k174155287le450_15b6242CMT12823452-Insertions_3111X-n393-k384158696le450_25a6137CMT13827692-Insertions_4160X-n401-k294198461le450_25b6140CMT14823613-Insertions_3114X-n420-k1304218854le450_25d6341CMT3833354-Insertions_3128david527miles1000672CMT485185DSJC125.1170DSJC125.55138miles1500697CMT586785mugg100_25115games120531mulsol.i.1674CMT681671mugg88_1120huck522mulsol.i.2687CMT782582mugg88_25114jean520mulsol.i.3674CMT883355myciel316miles250524mulsol.i.5670GWKC1813602myciel419miles500541qg.order306351GWKC1083630myciel5126miles750551zeroin.i.1678GWKC1185057myciel6148myciel75117zeroin.i.2670GWKC1286775queen5_5126queen10_10582zeroin.i.3678GWKC1382191queen6_6129queen11_115108asH_3 31GPIA7433GWKC1482793queen7_7142queen12_125105DSJC500.17477GWKC1583413asH_6 08GPIA2746queen13_135141le450_15c7618GWKC1782398asH_9 58GPIA21157queen14_145143le450_15d7643GWKC1883467DSJC1000.121090queen16_165184le450_5a7632GWKC1984756DSJC1000.921625queen8_8550le450_5b7699GWKC982604DSJR500.1c2930queen9_9569le450_5c7861A-n32-k5T2235GWKC1624264DSJC125.96119le450_5d7792annaT27GWKC2026248DSJC250.96255school1_nsh7671CMT2T2611qg.order402623DSJC500.56656will199GPIA7898CMT9T5145qg.order6022098DSJC500.96611A-n45-k681856DSJC1000.5T1765GWKC2321504DSJR500.16100A-n55-k982474DSJC250.5T336GWKC3326716DSJR500.56314A-n61-k982681GWKC4T39592GWKC5321807fpsol2.i.16137A-n62-k883200le450_25cT321GWKC6327213fpsol2.i.26136A-n63-k982774mugg100_1T17GWKC7326506fpsol2.i.36131A-n64-k982709mulsol.i.4T104GWKC8332073homer650A-n65-k982977queen15_15T164X-n148-k46380822inithx.i.16190A-n69-k983258queen8_12T52X-n153-k22372255inithx.i.26188CMT181709school1T850X-n157-k13337747inithx.i.36178CMT1086763X-n411-k19T174414X-n162-k11380314le450_15a6251CMT1182624First, the statistical distributions followed by each set of results by class were analyzed, that is, the Shapiro–Wilks test [53] was applied to determine if the results of the methodology, hyperheuristic without methodology (HHPC), and the optimal state of the art followed a normal distribution. The test was applied with a ∝ = 0.05. The results of the test are shown in Table 20, and the data shown in Tables 16, 18, and 19 were taken for the tests. It should be noted that the results of the methodology only for clusters 4 and 5 were normal, the results of the optimal state of the art only for only cluster 4 were normal, and the results of HHPC for clusters 1, 4, 5, and 7 were normal.Table 20
Normality test results of the methodology, state of the art, and hyperheuristics with complete pool.
ClusterMethodologyState of the artHHPC12.26E − 052.69E −041.13E −0120.03091.57E −047.52E −0330.014381.80E −034.28E −0340.35517.91E −013.29E −0150.054661.05E −039.61E −0261.20E −056.53E −052.25E −0570.02553.32E −037.31E −0184.95E −082.40E −094.59E −07Student’t-tests for methodology and state of the art were applied. For the state of the art, methodology, and HHPC, we established ∝ = 0.05 as a level of significance. The null and alternative hypotheses for methodology and HHPC are as follows:(i)
h0: there are no differences between the performance of hyperheuristic with the methodology and without the methodology(ii)
ha: there are differences between the performance of hyperheuristics with the methodology and without the methodologyFor methodology and state of the art,(i)
h0: there are no differences between the performance of hyperheuristics and the optimal state of the art(ii)
ha: there are differences between the performance of hyperheuristicsThe statistical results of the tests are shown in Table21. With these values, we can observe the following:(i)
Methodology and HHPC. It can be inferred that the results of the methodology are significantly different from those of hyperheuristics with the whole set of heuristics. This means that the methodology improved performance and allowed limiting the set of heuristics for each of the clusters.(ii)
Methodology and State of the Art. It can be inferred that no statistical evidence was found that the results of the methodology differ from the optimal ones of the state of the art, except in clusters 5 and 7. This is because it is where there are more atypical data or that they were badly classified which opens an area of opportunity for the refinement of the methodology.Table 21
Results of the Studentt-tests for methodology and Edo. Art and methodology and HHPC.
ClusterMethodology and Edo. ArtpvalueMethodology and HHPCpvalue10.16415.12E-0520.14890.149630.32110.0258640.028140.00438950.006010.000238860.011440.000970974.43E-076.65E-0680.062352.52E-05


## 7.1. Heuristics Results for Graph Coloring and CVRP

### 7.1.1. Graph Coloring

We used the benchmark proposed for the second DIMACS challenge on graph coloring [48] and this is tested with 41 runs. In Tables 5 and 6, we show our results. We denote the best results with a bold face, and only the myciel2 instance was solved with the application of the individual heuristics in their optimum.Table 5
Heuristics results for graph coloring instances.
#NameNodesColorsH1H2H3H4H5H6H7H8H9H10H1111-Insertions_4673121811151066611325287522-Insertions_3373474542415411102932-Insertions_41493334116323214815829454715543-Insertions_35635944533244994054-Insertions_379214191613116166132522716anna1381017171417165945133530687asH_3 31GPIA6623997685968210677248916415610828asH_6 08GPIA1216314971448729154113702003112010831513148520669asH_9 58GPIA191632618255319002621246231611999203926162624320610david8710161814161649481535375811DSJC1000.110001918471801610183717812565101994217891821263412DSJC1000.5100082243225138382425237931301126123023272327323413DSJC1000.91000214185620738281850182423541204106223751768241414DSJC125.1125448593648541619737566617315DSJC125.512515113156721141242751336825011229816DSJC125.912542125173771241312101327220811222117DSJC250.52502535041514634936865827815733932668118DSJC250.92507031138815231531947723415348729448519DSJC500.1500116296461976345981085532279623614111420DSJC500.55004792710072909119051381471368859853141221DSJC500.950012277192732675976310444873821051731112922DSJR500.150011124130331251193341284612912734323DSJR500.1c5008412571439203126212591566116247515391210158924DSJR500.550012137642520137236961929921162735266225fpsol2.i.149664141183821391222631699125526226726fpsol2.i.24512952815951523372815220421534827fpsol2.i.34252951825551543642725421123236828games1201208162411171782341023238829homer56112232222242316513924534417630huck7410131312131346381227244731inithx.i.186453789581808042332011526426344432inithx.i.264530551006256595254598535032453133inithx.i.362130591086556635104627833833153934jean809131213141247311327264635le450_15a4501429229310329129158041013729228959736le450_15b4501428929710629028558942712530028862437le450_15c450147167623587137131187887424734707117938le450_15d450147237513717187331163799418728725119739le450_25a45024160162501581533722296316416239540le450_25b45024156161511641603771885815615640441le450_25c4502440741715040039373651018039639478042le450_25d4502440042215040040373646117939739479143le450_5a45047807724847557381195966551753771120944le450_5b450476976849875973811928865657647691280Table 6
Heuristics results for graph coloring instances.
#NameNodesColorsH1H2H3H4H5H6H7H8H9H10H1145le450_5c4504145914769091422139420241692108314281464207346le450_5d4504146414428431449138519811712106014311436200447miles100012841525849514913375491297013748miles15001287381107828281149947912310016949miles2501287141415151373371624287550miles50012819262425252487482481439051miles75012830384138383710264371015311952mugg100_110035124655519512125753mugg100_2510035124664925412145554mugg88_1883510455431959105055mugg88_258835104564620511116156mulsol.i.119748606860605714276591318015357mulsol.i.2188304956485047172118481439518658mulsol.i.3184305056484947177117481609917659mulsol.i.4185304953504948165119481429419260mulsol.i.51863050624850501711144810710019161myciel31134643310641041262myciel423459655241251592763myciel54758138985332820175664myciel6956182412191913510513375114365myciel7191784961885783473032310713632866qg.order309002955454415255452591222322753353195367qg.order401600391174110562711601078162637855811311128167168qg.order60360059307629072425307928973692831223430703008373869queen10_101001041583738351556537607116370queen11_1112110577654575020910153878221671queen12_121441251745254492249348817423372queen13_1316912701076774682811126910811729973queen14_14196155883545653288117539310131774queen15_1522515751117181743701387412411236875queen16_1625616851088390804071597912511743876queen5_5254173816171545251725235077queen6_6366192717171849281647275578queen7_7496295127303390423036398779queen8_12961129523032251386028484813880queen8_864832562531331004527804210481queen9_981931483330271245534495812982school138513997100862610099871423133069110761037144083school1_nsh3521372374244573572011001048490734781113584will199GPIA701343841843845343017621542442547555178885zeroin.i.121148627262616014780601268915986zeroin.i.2211294255414141165113451638916987zeroin.i.32062940554340391791114016291164We applied a nonparametric test to verify that there are differences between the performance of each heuristic. Table7 shows the ranges obtained in the three statistical tests for graph coloring instances. The three omnibus tests indicated there are significant differences between the heuristics. The heuristics which obtained the highest ranks in the three tests were H6 and H11, i.e., these have the worst performance. H3 and H8 were the best results for the problems, and this is because in all omnibus tests those heuristics obtained the lowest ranks (see Table 7 marked in bold). The time of each run is reported in Table 8 in.Table 7
Statistic test results for graph coloring instances for Friedman (F), Friedman Aligned (FA), and Quade (Q).
Statisticsp valueH1H2H3H4H5H6H7H8H9H10H11F255.7204.646.402.184.683.3310.017.522.487.406.4710.89FA77.860374.88461.35209.30370.94340.22820.66575.50212.84568.01505.86829.45Q99.0405.276.491.915.243.689.996.842.447.116.1310.90Table 8
Time for one run of each heuristic in seconds for graph coloring instances.
InstanceH1H2H3H4H5H6H7H8H9H10H111-Insertions_41514181514111361514132-Insertions_31414171414111271414132-Insertions_41616171716121471616143-Insertions_31414171414111261414134-Insertions_3151418151411157151513anna16151516151295161614asH_3 31GPIA5844314644436127464745asH_6 08GPIA2011728117817515815693160161134asH_9 58GPIA488321140370354371317203371371275david15141415141195151514DSJC1000.16762256463732430636831DSJC1000.55153215559481723595921DSJC1000.94955215361481624736522DSJC125.1151517161512126151514DSJC125.515151516151294151514DSJC125.915151316151284161613DSJC250.518181419181496191915DSJC250.918181419181485201914DSJC500.13027173028241511292920DSJC500.5262615282722109292915DSJC500.925261527282299333115DSJR500.13027172928251511292920DSJR500.1c26261528282299313015DSJR500.525261527282299333115fpsol2.i.12726152927241310303315fpsol2.i.2252515262521109262716fpsol2.i.3242515252420108252615games120151515161512105151514homer3230183334271712323424huck14141515141195141414inithx.i.15249225652511924547124inithx.i.23334173533301513363718inithx.i.33234173432291412353617jean14151515141195151414le450_15a252616272522129272817le450_15b252716272522129272817le450_15c252716272522129262817le450_15d252716272522129272817le450_25a242515262521109272716le450_25b242515262521109272715le450_25c252615262521109272716le450_25d252515272521109272716le450_5a2631202826232512273222le450_5b2631202826232412273222le450_5c2529202725222412272822le450_5d2529202725222412262822miles1000151513161512841161613miles1500151615161512841151613miles250151615161512105151613miles500151514161512841161514miles75015151316151284161613mugg100_1151517151511137151513mugg100_25151517151511137151513mugg88_1151517151511136151513mugg88_25151517151511137151513mulsol.i.117181418171385181814mulsol.i.216181417161385171714mulsol.i.316181417161385171714mulsol.i.416181417161385171714mulsol.i.516181417161385171714myciel3141417141410126141413myciel4141416141410116141413myciel5141416141410115141413myciel6141515151511115151514myciel7161716171713116171714qg.order305053215451492023545726qg.order4014915146157152187447115916753qg.order6010161016184983108798319153210991113226queen10_1015151515151195151514queen11_1115151515151295161614queen12_1216151416151295161614queen13_1316161517161295161614queen14_1417171518171395171715queen15_1518181519181496181815queen16_1618191419191596191915queen5_5141418141410126141414queen6_6141416141410105141414queen7_7141416141411115141414queen8_1215151415141195151514queen8_8141416151411105141414queen9_9141414151411105151514school1232416242319128242517school1_nsh212216222118117222316will199GPIA4751355967516832545246zeroin.i.117181418171485181814zeroin.i.217181518171495181814zeroin.i.317181518171395181814


### 7.1.2. Capacitated Vehicle Routing Problem (CVRP)

Three sets of the state of the art were used and tested on 41 runs:(1)
Augerat et al. (SET A), 9 instances, proposed in [49](2)
Christofides, Mingozzi, and Toth (CMT), 14 instances, proposed in [50](3)
Golden, Wasil, Kelly, and Chao (GWKC), 20 instances, proposed in [51](4)
Uchoa et al., 9 instances, proposed in [52]In Table9, we show the fitness values for the instances and the lowest city cost tour is indicated in bold, where n is the number of nodes, Q is the capacity of each vehicle, and k is the number of vehicles (colors in the case of graph coloring). The time of each run is reported in Table 10.Table 9
Results for CVRP-capacitated instances.
InstanceCitiesVehiclesOPH1H2H3H4H5H6H7H8H9H10H1188CMT1505524.611583116115691568111711411664157616641664166489CMT27510835.262353159123512349172818982577254725772577257790CMT31008826.141904182119392017169917433293224932933293329391CMT4150121028.422578267425202519234724625096311550965096509692CMT5199171291.293159446964903144300831556742670767426692674293CMT6506555.4310271160156910289419331664157316641571166494CMT77511909.681492161623511465135714072577251725772531257795CMT81009865.951743189017991906159816363293220332933195329396CMT9150141162.552308276824892325218522565096297150964918509697CMT10199181395.854607460728522852279128706742670767426513674298CMT1112071042.122077207723722372204621102608244926082608260899CMT1210010819.5616921692173317331472152823062144228723002306100CMT13120111541.1420402040204120411827190626082476260825772608101CMT1410011866.3717171717160916091444151723062171230622702306102GWKC124095623.479497915586079261735085651331210546133121331213312103GWKC2320108404.611457116631151611339912320109032096116801207872073521080104GWKC3400911036.21919721734241612007017167187932611722304261172611726117105GWKC448010135902704630204323822664327133265043873231793388923889238892106GWKC520056460.981422415677130091420712800134351955815763213782137821378107GWKC628078412.91540721043149251570114022145392669917688266992669926699108GWKC7360810102.72590923841259092590924611257182590925909259092590925909109GWKC84401011635.32150023969208172048318560186773150626204315063150631506110GWKC925514579.7111029892323126495491625812319258125812581111GWKC1032316735.6613441312347612771222122935893451358935893589112GWKC1139917912.0317511919475816401572148550404478503950395040113GWKC12483191101.522951979673824622192236354166520675067506750114GWKC1325226857.1920101301206220311475161521172078215821512158115GWKC14320291080.5523511637263723222221238927482665274527442748116GWKC15396331337.8732622062332232072793302533663308336633643366117GWKC16480361611.5639782596410738203492378341984092421742124217118GWKC1724022707.7617541518216317291611166923762165237623762376119GWKC1830027995.1321302165344321502073215534433443344334253443120GWKC19360331365.632382808454030243226357547134466471347134713121GWKC20420381817.5935193746619035113189332761865992619160846191122A-n32-k532578415381476143114741265125522301662222922292230123A-n45-k64561733.3617331733173317331273115617331733173317331733124A-n55-k9559107316601413145316421439132823761901237623762376125A-n61-k9619103425001814233824641731183825922517259225922592126A-n62-k8628128817721724203917921551161531942219319431943194127A-n63-k9639131424801879245223961813183526772564267726772677128A-n64-k9659140119351893216919481744171526132203261326132613129A-n65-k9659117426091940260025461820189229492808294929492949130A-n69-k9699115921491803208019791626168732202477322032203220131X-n148-k4614846434487182654940750627166568924711797762378715791167911679116132X-n153-k2215322212203670039843527413615534116343377180156820717997179371801133X-n157-k1315713168763636424507363643636427917292103636436364363643636436364134X-n162-k1116211141383923237225363813816232918340597997360657799697996379973135X-n367-k173671722814712098532697502724826864870027154244112919154244154244154244136X-n393-k38393393826014143274629152513143398130939148728158058155203158058158058158058137X-n401-k294012966187140100106590163158141582141056145043197323163230197323197323197323138X-n411-k19411191971867963796428103467090630386617317326988152173269173269173269139X-n420-k13042013010798182376132745207213183053203757200726217483216871217483217483217483Table 10
Time for one run of each heuristic in seconds for CVRP-capacitated instances.
H1H2H3H4H5H6H7H8H9H10H11A-n32-k5771277574779A-n45-k6771277563779A-n55-k9771177553779A-n61-k9771177553779A-n62-k8771187563779A-n63-k9771177553779A-n63-k10771177553779A-n64-k9771177553779A-n65-k9771177553779A-n69-k9771187553879CMT1771277574779CMT2771177553889CMT3771187563889CMT4881188663999CMT588109865310109CMT6771277563779CMT7771187552879CMT8771187563889CMT9881088652999CMT1088109865210109CMT11771187663889CMT12771277573779CMT13771277563779CMT14771277574779X-n420-k13011111611119118111113X-n411-k1911111611119118111113X-n401-k2911111611119107111113GWKC1881198663999GWKC28811108663101010GWKC39911119784121213GWKC41010131210883121211GWKC5881398694989GWKC68812986739910GWKC7991199773101010GWKC89911119773121210GWKC9881198653101010GWKC109911109763121110GWKC119911119763131310GWKC121010111210863151511GWKC138811109752121210GWKC149911109753141410GWKC15101011119753161610GWKC161010111210853191810GWKC17881098652111110GWKC189910109752131310GWKC199911119753161510GWKC201010111210853181811X-n148-k4611111611119118111113X-n153-k2211111611119117111113X-n157-k1311111611119107111113X-n162-k1111111511119107111113X-n367-k1711111511119107111113X-n393-k3811111511119107111113We applied the same procedure to the statistical tests of Friedman (FT), Alienated Friedman (AFT), and Quade (Qt) to distinguish the behavior of the heuristics set. We establishedα=0.05 and h0 as there are no differences between the performance of the heuristics and established ha as there are differences between the performance of the heuristics. Table 11 shows the ranks obtained in the three statistical tests.Table 11
Statistic test results for capacitated vehicle routing problem instances for Friedman (F), Friedman Aligned (FA), and Quade (Q).
Statisticsp valueH1H2H3H4H5H6H7H8H9H10H11F420.8404.498.799.693.535.594.161.602.469.326.929.45FA47.30170.82441.25443.96143.53280.22169.32127.19147.94441.70342.00443.57Q79.9704.298.879.723.685.593.961.672.579.266.919.47In this case, the heuristicH5 has the lowest rank for the tests and H6has the second-lowest rank for QT and FT.


## 7.1.1. Graph Coloring

We used the benchmark proposed for the second DIMACS challenge on graph coloring [48] and this is tested with 41 runs. In Tables 5 and 6, we show our results. We denote the best results with a bold face, and only the myciel2 instance was solved with the application of the individual heuristics in their optimum.Table 5
Heuristics results for graph coloring instances.
#NameNodesColorsH1H2H3H4H5H6H7H8H9H10H1111-Insertions_4673121811151066611325287522-Insertions_3373474542415411102932-Insertions_41493334116323214815829454715543-Insertions_35635944533244994054-Insertions_379214191613116166132522716anna1381017171417165945133530687asH_3 31GPIA6623997685968210677248916415610828asH_6 08GPIA1216314971448729154113702003112010831513148520669asH_9 58GPIA191632618255319002621246231611999203926162624320610david8710161814161649481535375811DSJC1000.110001918471801610183717812565101994217891821263412DSJC1000.5100082243225138382425237931301126123023272327323413DSJC1000.91000214185620738281850182423541204106223751768241414DSJC125.1125448593648541619737566617315DSJC125.512515113156721141242751336825011229816DSJC125.912542125173771241312101327220811222117DSJC250.52502535041514634936865827815733932668118DSJC250.92507031138815231531947723415348729448519DSJC500.1500116296461976345981085532279623614111420DSJC500.55004792710072909119051381471368859853141221DSJC500.950012277192732675976310444873821051731112922DSJR500.150011124130331251193341284612912734323DSJR500.1c5008412571439203126212591566116247515391210158924DSJR500.550012137642520137236961929921162735266225fpsol2.i.149664141183821391222631699125526226726fpsol2.i.24512952815951523372815220421534827fpsol2.i.34252951825551543642725421123236828games1201208162411171782341023238829homer56112232222242316513924534417630huck7410131312131346381227244731inithx.i.186453789581808042332011526426344432inithx.i.264530551006256595254598535032453133inithx.i.362130591086556635104627833833153934jean809131213141247311327264635le450_15a4501429229310329129158041013729228959736le450_15b4501428929710629028558942712530028862437le450_15c450147167623587137131187887424734707117938le450_15d450147237513717187331163799418728725119739le450_25a45024160162501581533722296316416239540le450_25b45024156161511641603771885815615640441le450_25c4502440741715040039373651018039639478042le450_25d4502440042215040040373646117939739479143le450_5a45047807724847557381195966551753771120944le450_5b450476976849875973811928865657647691280Table 6
Heuristics results for graph coloring instances.
#NameNodesColorsH1H2H3H4H5H6H7H8H9H10H1145le450_5c4504145914769091422139420241692108314281464207346le450_5d4504146414428431449138519811712106014311436200447miles100012841525849514913375491297013748miles15001287381107828281149947912310016949miles2501287141415151373371624287550miles50012819262425252487482481439051miles75012830384138383710264371015311952mugg100_110035124655519512125753mugg100_2510035124664925412145554mugg88_1883510455431959105055mugg88_258835104564620511116156mulsol.i.119748606860605714276591318015357mulsol.i.2188304956485047172118481439518658mulsol.i.3184305056484947177117481609917659mulsol.i.4185304953504948165119481429419260mulsol.i.51863050624850501711144810710019161myciel31134643310641041262myciel423459655241251592763myciel54758138985332820175664myciel6956182412191913510513375114365myciel7191784961885783473032310713632866qg.order309002955454415255452591222322753353195367qg.order401600391174110562711601078162637855811311128167168qg.order60360059307629072425307928973692831223430703008373869queen10_101001041583738351556537607116370queen11_1112110577654575020910153878221671queen12_121441251745254492249348817423372queen13_1316912701076774682811126910811729973queen14_14196155883545653288117539310131774queen15_1522515751117181743701387412411236875queen16_1625616851088390804071597912511743876queen5_5254173816171545251725235077queen6_6366192717171849281647275578queen7_7496295127303390423036398779queen8_12961129523032251386028484813880queen8_864832562531331004527804210481queen9_981931483330271245534495812982school138513997100862610099871423133069110761037144083school1_nsh3521372374244573572011001048490734781113584will199GPIA701343841843845343017621542442547555178885zeroin.i.121148627262616014780601268915986zeroin.i.2211294255414141165113451638916987zeroin.i.32062940554340391791114016291164We applied a nonparametric test to verify that there are differences between the performance of each heuristic. Table7 shows the ranges obtained in the three statistical tests for graph coloring instances. The three omnibus tests indicated there are significant differences between the heuristics. The heuristics which obtained the highest ranks in the three tests were H6 and H11, i.e., these have the worst performance. H3 and H8 were the best results for the problems, and this is because in all omnibus tests those heuristics obtained the lowest ranks (see Table 7 marked in bold). The time of each run is reported in Table 8 in.Table 7
Statistic test results for graph coloring instances for Friedman (F), Friedman Aligned (FA), and Quade (Q).
Statisticsp valueH1H2H3H4H5H6H7H8H9H10H11F255.7204.646.402.184.683.3310.017.522.487.406.4710.89FA77.860374.88461.35209.30370.94340.22820.66575.50212.84568.01505.86829.45Q99.0405.276.491.915.243.689.996.842.447.116.1310.90Table 8
Time for one run of each heuristic in seconds for graph coloring instances.
InstanceH1H2H3H4H5H6H7H8H9H10H111-Insertions_41514181514111361514132-Insertions_31414171414111271414132-Insertions_41616171716121471616143-Insertions_31414171414111261414134-Insertions_3151418151411157151513anna16151516151295161614asH_3 31GPIA5844314644436127464745asH_6 08GPIA2011728117817515815693160161134asH_9 58GPIA488321140370354371317203371371275david15141415141195151514DSJC1000.16762256463732430636831DSJC1000.55153215559481723595921DSJC1000.94955215361481624736522DSJC125.1151517161512126151514DSJC125.515151516151294151514DSJC125.915151316151284161613DSJC250.518181419181496191915DSJC250.918181419181485201914DSJC500.13027173028241511292920DSJC500.5262615282722109292915DSJC500.925261527282299333115DSJR500.13027172928251511292920DSJR500.1c26261528282299313015DSJR500.525261527282299333115fpsol2.i.12726152927241310303315fpsol2.i.2252515262521109262716fpsol2.i.3242515252420108252615games120151515161512105151514homer3230183334271712323424huck14141515141195141414inithx.i.15249225652511924547124inithx.i.23334173533301513363718inithx.i.33234173432291412353617jean14151515141195151414le450_15a252616272522129272817le450_15b252716272522129272817le450_15c252716272522129262817le450_15d252716272522129272817le450_25a242515262521109272716le450_25b242515262521109272715le450_25c252615262521109272716le450_25d252515272521109272716le450_5a2631202826232512273222le450_5b2631202826232412273222le450_5c2529202725222412272822le450_5d2529202725222412262822miles1000151513161512841161613miles1500151615161512841151613miles250151615161512105151613miles500151514161512841161514miles75015151316151284161613mugg100_1151517151511137151513mugg100_25151517151511137151513mugg88_1151517151511136151513mugg88_25151517151511137151513mulsol.i.117181418171385181814mulsol.i.216181417161385171714mulsol.i.316181417161385171714mulsol.i.416181417161385171714mulsol.i.516181417161385171714myciel3141417141410126141413myciel4141416141410116141413myciel5141416141410115141413myciel6141515151511115151514myciel7161716171713116171714qg.order305053215451492023545726qg.order4014915146157152187447115916753qg.order6010161016184983108798319153210991113226queen10_1015151515151195151514queen11_1115151515151295161614queen12_1216151416151295161614queen13_1316161517161295161614queen14_1417171518171395171715queen15_1518181519181496181815queen16_1618191419191596191915queen5_5141418141410126141414queen6_6141416141410105141414queen7_7141416141411115141414queen8_1215151415141195151514queen8_8141416151411105141414queen9_9141414151411105151514school1232416242319128242517school1_nsh212216222118117222316will199GPIA4751355967516832545246zeroin.i.117181418171485181814zeroin.i.217181518171495181814zeroin.i.317181518171395181814


## 7.1.2. Capacitated Vehicle Routing Problem (CVRP)

Three sets of the state of the art were used and tested on 41 runs:(1)
Augerat et al. (SET A), 9 instances, proposed in [49](2)
Christofides, Mingozzi, and Toth (CMT), 14 instances, proposed in [50](3)
Golden, Wasil, Kelly, and Chao (GWKC), 20 instances, proposed in [51](4)
Uchoa et al., 9 instances, proposed in [52]In Table9, we show the fitness values for the instances and the lowest city cost tour is indicated in bold, where n is the number of nodes, Q is the capacity of each vehicle, and k is the number of vehicles (colors in the case of graph coloring). The time of each run is reported in Table 10.Table 9
Results for CVRP-capacitated instances.
InstanceCitiesVehiclesOPH1H2H3H4H5H6H7H8H9H10H1188CMT1505524.611583116115691568111711411664157616641664166489CMT27510835.262353159123512349172818982577254725772577257790CMT31008826.141904182119392017169917433293224932933293329391CMT4150121028.422578267425202519234724625096311550965096509692CMT5199171291.293159446964903144300831556742670767426692674293CMT6506555.4310271160156910289419331664157316641571166494CMT77511909.681492161623511465135714072577251725772531257795CMT81009865.951743189017991906159816363293220332933195329396CMT9150141162.552308276824892325218522565096297150964918509697CMT10199181395.854607460728522852279128706742670767426513674298CMT1112071042.122077207723722372204621102608244926082608260899CMT1210010819.5616921692173317331472152823062144228723002306100CMT13120111541.1420402040204120411827190626082476260825772608101CMT1410011866.3717171717160916091444151723062171230622702306102GWKC124095623.479497915586079261735085651331210546133121331213312103GWKC2320108404.611457116631151611339912320109032096116801207872073521080104GWKC3400911036.21919721734241612007017167187932611722304261172611726117105GWKC448010135902704630204323822664327133265043873231793388923889238892106GWKC520056460.981422415677130091420712800134351955815763213782137821378107GWKC628078412.91540721043149251570114022145392669917688266992669926699108GWKC7360810102.72590923841259092590924611257182590925909259092590925909109GWKC84401011635.32150023969208172048318560186773150626204315063150631506110GWKC925514579.7111029892323126495491625812319258125812581111GWKC1032316735.6613441312347612771222122935893451358935893589112GWKC1139917912.0317511919475816401572148550404478503950395040113GWKC12483191101.522951979673824622192236354166520675067506750114GWKC1325226857.1920101301206220311475161521172078215821512158115GWKC14320291080.5523511637263723222221238927482665274527442748116GWKC15396331337.8732622062332232072793302533663308336633643366117GWKC16480361611.5639782596410738203492378341984092421742124217118GWKC1724022707.7617541518216317291611166923762165237623762376119GWKC1830027995.1321302165344321502073215534433443344334253443120GWKC19360331365.632382808454030243226357547134466471347134713121GWKC20420381817.5935193746619035113189332761865992619160846191122A-n32-k532578415381476143114741265125522301662222922292230123A-n45-k64561733.3617331733173317331273115617331733173317331733124A-n55-k9559107316601413145316421439132823761901237623762376125A-n61-k9619103425001814233824641731183825922517259225922592126A-n62-k8628128817721724203917921551161531942219319431943194127A-n63-k9639131424801879245223961813183526772564267726772677128A-n64-k9659140119351893216919481744171526132203261326132613129A-n65-k9659117426091940260025461820189229492808294929492949130A-n69-k9699115921491803208019791626168732202477322032203220131X-n148-k4614846434487182654940750627166568924711797762378715791167911679116132X-n153-k2215322212203670039843527413615534116343377180156820717997179371801133X-n157-k1315713168763636424507363643636427917292103636436364363643636436364134X-n162-k1116211141383923237225363813816232918340597997360657799697996379973135X-n367-k173671722814712098532697502724826864870027154244112919154244154244154244136X-n393-k38393393826014143274629152513143398130939148728158058155203158058158058158058137X-n401-k294012966187140100106590163158141582141056145043197323163230197323197323197323138X-n411-k19411191971867963796428103467090630386617317326988152173269173269173269139X-n420-k13042013010798182376132745207213183053203757200726217483216871217483217483217483Table 10
Time for one run of each heuristic in seconds for CVRP-capacitated instances.
H1H2H3H4H5H6H7H8H9H10H11A-n32-k5771277574779A-n45-k6771277563779A-n55-k9771177553779A-n61-k9771177553779A-n62-k8771187563779A-n63-k9771177553779A-n63-k10771177553779A-n64-k9771177553779A-n65-k9771177553779A-n69-k9771187553879CMT1771277574779CMT2771177553889CMT3771187563889CMT4881188663999CMT588109865310109CMT6771277563779CMT7771187552879CMT8771187563889CMT9881088652999CMT1088109865210109CMT11771187663889CMT12771277573779CMT13771277563779CMT14771277574779X-n420-k13011111611119118111113X-n411-k1911111611119118111113X-n401-k2911111611119107111113GWKC1881198663999GWKC28811108663101010GWKC39911119784121213GWKC41010131210883121211GWKC5881398694989GWKC68812986739910GWKC7991199773101010GWKC89911119773121210GWKC9881198653101010GWKC109911109763121110GWKC119911119763131310GWKC121010111210863151511GWKC138811109752121210GWKC149911109753141410GWKC15101011119753161610GWKC161010111210853191810GWKC17881098652111110GWKC189910109752131310GWKC199911119753161510GWKC201010111210853181811X-n148-k4611111611119118111113X-n153-k2211111611119117111113X-n157-k1311111611119107111113X-n162-k1111111511119107111113X-n367-k1711111511119107111113X-n393-k3811111511119107111113We applied the same procedure to the statistical tests of Friedman (FT), Alienated Friedman (AFT), and Quade (Qt) to distinguish the behavior of the heuristics set. We establishedα=0.05 and h0 as there are no differences between the performance of the heuristics and established ha as there are differences between the performance of the heuristics. Table 11 shows the ranks obtained in the three statistical tests.Table 11
Statistic test results for capacitated vehicle routing problem instances for Friedman (F), Friedman Aligned (FA), and Quade (Q).
Statisticsp valueH1H2H3H4H5H6H7H8H9H10H11F420.8404.498.799.693.535.594.161.602.469.326.929.45FA47.30170.82441.25443.96143.53280.22169.32127.19147.94441.70342.00443.57Q79.9704.298.879.723.685.593.961.672.579.266.919.47In this case, the heuristicH5 has the lowest rank for the tests and H6has the second-lowest rank for QT and FT.


## 7.2. Selection of Features and Classes by Statistical Tests

According to the steps mentioned in Section5.1, we must determine first the number of clusters or classes to split all our test instances. In this case, T=139 and c=8.We considered 8 classes and usedk-means clusters and we expected uniformly distributed instances in the clusters. The k-means algorithm was applied with a maximum number of Iterations=500, initially random starting points. To consider the uniform distribution of classes into clusters, we used the Manhattan distance obtained after the experimental work, with the best results.Table12 contains the class details, number of instances per cluster/class, number of GCP (3rd column), or CVRP (4th column) per class, min and max nodes, and min and max number of colors nodes. In this experimentation, clusters 1, 5, 6, and 7 have only GCP instances, clusters 3, 4, and 8 have CVRP instances, and only cluster 2 has both problem domains.Table 12
Summary cluster/classes withk−means algorithm.
Cluster# of instances%GCCVRPMin nodesMax nodesMin colors/vehiclesMax colors/vehicles11812.918011149362107.282420360032143117.9011148480546453.6053674201713051913.71906425673063122.3310125900111227117.911035270131483424.503432483533


## 7.3. Training and Test Classifiers for the Instance’s Classes

After the heuristic pool design phase for the hyperheuristics, we split our dataset into training and test. The training dataset was created by 125 instances with 15 features (basic + inner) and the unseen instances were made by 15 instances. The results of the classification with Naive Bayes are reported in Table13.Table 13
Classification value results.
Correctly classified11491.20%Incorrectly classified118.80%TP rate0.912FP rate0.022Precision0.918Recall0.912Table14 contains the confusion matrix of the process classification. We observed that, for some classes like 3, 4, 7, and 8, the patterns were classified correctly. The rest of the classes have some patterns classified incorrectly, but, e.g., for the 3 patterns of class 1 classified into 5 and 6, we used the same pool of low-level heuristics and this does not represent an issue for the next step.Table 14
Confusion matrix, TP rate (TPR), FP rate (FPR), and precision (P) for each class.
Class12345678TPRFPRP11300021000.813012070000020.77801300100000010140004000010150000125000.7060.0190.85760000027100.9640.0620.818700000010010.0090.909800000003110.0210.939


## 7.4. Designing and Testing the Hyperheuristic Offline Learning withK-Folds

In the next step, the statistical tests were applied to heuristics and will form the characteristics of our instances, graph coloring, and CVRP per class. In this phase, we choose according to the rankings the heuristics which havex<minrank+maxrank/2. If, for example, the Aligned Friedman has a min rank =776.5 and max rank =3604.5, the limit value for considering a heuristic must be 2190.5. Because heuristic 11 has the worst performance for both datasets, we did not consider this heuristic for this experimentation phase.Table15 shows the ranks and the heuristic fitness for each class, e.g., class 1 for QT, and AFT has the same heuristics H5, H6, H4, H1, H2, and H3, while FT does not consider H3. We only consider H5, H6, H4, H1, H2, and H3 as a minimum set.Table 15
Heuristics ranks per classes, Friedman (Fr), Aligned Friedman (A-Fr), and Quade (Qu).
Class 1Class 2∗FrH3H8H5H1H4H2H3H8H7H5H2H101.501.693.784.034.086.692.833.445.76.25∗A-FrH3H8H1H5H4H2H3H8H7H5H2H46276381089109111021760.5293320335428508540∗QuH3H8H5H4H1H2H3H8H7H5H2H101.551.593.774.044.156.812.242.732.984.185.516.39Class 3Class 4∗FrH5H6H2H4H1H3H5H2H1H4H6H31.642.184.274.274.825.182.42.62.83.63.66∗A-FrH5H6H4H2H1H3H2H1H5H4H6H32422834034184195683374787991128∗QuH5H6H2H4H1H3H2H1H5H4H6H31.712.264.204.524.885.382.072.672.673.673.936Class 5Class 6∗FrH8H3H5H1H4H2H3H8H5H4H1H101.451.553.534.374.686.031.321.694.354.925.055.92∗A-FrH8H3H5H1H4H2H3H8H5H4H1H26466511144.511971225.52010.513061345411242114227.505058∗QuH8H3H5H1H4H2H3H8H5H4H1H21.471.533.674.444.695.781.481.533.904.554.606.47Class 7Class 8∗FrH3H8H5H4H1H9H5H6H2H4H1H31.322.453.455.325.865.911.472.383.444.214.595.46∗A-FrH3H8H5H4H1H9H5H6H2H4H1H3108.50171477.50578.50637.50642232826912989384740706169.50∗QuH3H8H5H4H9H1H5H6H2H4H1H31.122.173.655.095.745.821.502.283.274.464.705.43The selected heuristics for each class can be summarized into five groups:(1)
H3, H8, H5, H4, and H1(2)
H3, H8, H7, H5, and H2(3)
H5, H6, H2, H4, H1, and H3(4)
H2, H1, H5, H4, and H6(5)
H3, H8, H5, and H4Therefore, we design 5 algorithms for these 8 classes. This means the hyperheuristic with the high-level search strategy was the same, but the heuristics pool set was different according to these 5 subset heuristics. We trained and tested the hyperheuristic on short-length pools. We left 10% of instances as unseen for the hyperheuristics and the results are shown in Table16.Table 16
Hyperheuristics results for graph coloring and CVRP.
#CMedianDEAverageOpt#CMedianDEAverageOpt#CMedianDEAverageOpt413243305104121077222841623114393033451051291971602124901131412934958101573773261856231441355350520112619387321183620145131073515321440304374071606744141182840465577372744740216867245313863695222536104572943981,14745413553705373356104672933901,156455136537153242551283734017165813611303372552557912847320413548362142547353558641512381,8212611,5241,733631567575560801011612481,1475171,5981,073641624196805151525812581,3664682,0821,0347614784815182129912681,4107672,0521,288771881261666033994212781,5824372,1451,3147811611236186127822557012881,5104551,9751,401825733651,17632062472857154712981,4335832,2711,174921,0115102,190321628520662812213081,4207472,1201,1591125415351,43519226215996118889092911,3395251327714781,542214246181973181219782,4691,8974,6221,396232153441962842567543133649881,7073422,1741,04211722,1797763,3431,612266427798299981,1164261,60582012122,8581,5204,5281,81827640801002910081,5484182,0511,541672318330897392961435351210181,1174201,5648666827536892,522593166886131539081,4417872,10582610339,4294,58713,9678,40532645130142309182,0491,3133,0991,028104313,2115,61719,24011,03633646136145309282,6191,8424,7021,291106311,3764,02514,7626,46135685104239149388153421,165555107312,5666,11817,6968,41336685108238149481,1885721,800910108313,2214,90523,10710,1033963768126249581,4367272,024866109314,3907,05521,41111,63540635691242410286,0233,0218,8745,624131350,6349,12668,65643,4484261271373322411181,0561,1722,201736132330,32317,17347,02521,2204764315534111281,3401,6712,996912133322,1755,42032,88316,8764867415867311381,7442,2874,0381,102134328,76921,92245,67814,1385665017624811481,1384221,658857135465,09859,475160,61722,8145764028593011581,4475222,1541,081136467,18429,544127,82738,2605863726573011681,8115742,7371,338137497,07434,915149,75066,1876064027583011881,3004621,8107081394125,87527,756192,09310,7986661311934172911981,6238372,58799510510615108565317654812082,3701,0323,5191,366155454895158663428552911088238031,60358028581414887633265329The best results are highlighted in bold.The hyperheuristic configuration was 10 iterations for local search and 100,000 function calls. For some GCP instances, we got the optimum number of colors (denoted in bold in Table16). Besides, for the instances A-n45-k6, A-n55-k9, A-n62-k8, A-n64-k9, CMT13, GWKC1, GWKC2, GWKC3, and X-n148-k46, we get values near to the optimal with a maximum of 20% of the distance.


## 7.5. Classification of the Test Instances and Application of the Hyperheuristic to the Corresponding Instance

Finally, for the 14 unseen instances, we used the Naive Bayes classifier, and it determines the class for these instances. Later, we applied the hyperheuristic with the corresponding pool heuristics according to the previous design and we obtained the results shown in Tables17 and 18.Table 17
Confusion matrix, TP rate (TPR), FP rate (FPR), and precision (P) for each test instance.
Class12345678TPRFPRP12000000010120100000010130010000010140001000010150000020000—60000030010.1820.6700000010101800000003101Table 18
Fitness results of test instances (hyperheuristic).
InstanceClassFitnessInstanceClassFitnessanna13DSJC250.5627mugg100_113le450_25c626DSJC1000.5283mulsol.i.4630GWKC4314255.68school1713X-n411-k19420005.37A-n32-k58876.19queen15_15529CMT28911.37queen8_12521CMT981258.57Table17 shows the confusion matrix, TP rate, FP rate, and precision of the classification test. In these results, two patterns that belong to class five were classified incorrectly, but this does not affect the hyperheuristic solution because this class shares the same heuristics with class 6.


## 7.6. Statistical Comparison of Results

Finally, to compare if there are differences between the results applying the methodology and without applying the methodology, an experiment was carried out where the hyperheuristics were executed 33 times with the entire set of heuristics and 100,000 function calls. The results are shown in Table19.Table 19
Results of hyperheuristic with the complete set heuristics and without methodology (HHPC), cluster (C), and T which are the training set instances.
InstancecHHPCInstancecHHPCInstancecHHPCInstancecHHPC1-Insertions_4134X-n367-k174155287le450_15b6242CMT12823452-Insertions_3111X-n393-k384158696le450_25a6137CMT13827692-Insertions_4160X-n401-k294198461le450_25b6140CMT14823613-Insertions_3114X-n420-k1304218854le450_25d6341CMT3833354-Insertions_3128david527miles1000672CMT485185DSJC125.1170DSJC125.55138miles1500697CMT586785mugg100_25115games120531mulsol.i.1674CMT681671mugg88_1120huck522mulsol.i.2687CMT782582mugg88_25114jean520mulsol.i.3674CMT883355myciel316miles250524mulsol.i.5670GWKC1813602myciel419miles500541qg.order306351GWKC1083630myciel5126miles750551zeroin.i.1678GWKC1185057myciel6148myciel75117zeroin.i.2670GWKC1286775queen5_5126queen10_10582zeroin.i.3678GWKC1382191queen6_6129queen11_115108asH_3 31GPIA7433GWKC1482793queen7_7142queen12_125105DSJC500.17477GWKC1583413asH_6 08GPIA2746queen13_135141le450_15c7618GWKC1782398asH_9 58GPIA21157queen14_145143le450_15d7643GWKC1883467DSJC1000.121090queen16_165184le450_5a7632GWKC1984756DSJC1000.921625queen8_8550le450_5b7699GWKC982604DSJR500.1c2930queen9_9569le450_5c7861A-n32-k5T2235GWKC1624264DSJC125.96119le450_5d7792annaT27GWKC2026248DSJC250.96255school1_nsh7671CMT2T2611qg.order402623DSJC500.56656will199GPIA7898CMT9T5145qg.order6022098DSJC500.96611A-n45-k681856DSJC1000.5T1765GWKC2321504DSJR500.16100A-n55-k982474DSJC250.5T336GWKC3326716DSJR500.56314A-n61-k982681GWKC4T39592GWKC5321807fpsol2.i.16137A-n62-k883200le450_25cT321GWKC6327213fpsol2.i.26136A-n63-k982774mugg100_1T17GWKC7326506fpsol2.i.36131A-n64-k982709mulsol.i.4T104GWKC8332073homer650A-n65-k982977queen15_15T164X-n148-k46380822inithx.i.16190A-n69-k983258queen8_12T52X-n153-k22372255inithx.i.26188CMT181709school1T850X-n157-k13337747inithx.i.36178CMT1086763X-n411-k19T174414X-n162-k11380314le450_15a6251CMT1182624First, the statistical distributions followed by each set of results by class were analyzed, that is, the Shapiro–Wilks test [53] was applied to determine if the results of the methodology, hyperheuristic without methodology (HHPC), and the optimal state of the art followed a normal distribution. The test was applied with a ∝ = 0.05. The results of the test are shown in Table 20, and the data shown in Tables 16, 18, and 19 were taken for the tests. It should be noted that the results of the methodology only for clusters 4 and 5 were normal, the results of the optimal state of the art only for only cluster 4 were normal, and the results of HHPC for clusters 1, 4, 5, and 7 were normal.Table 20
Normality test results of the methodology, state of the art, and hyperheuristics with complete pool.
ClusterMethodologyState of the artHHPC12.26E − 052.69E −041.13E −0120.03091.57E −047.52E −0330.014381.80E −034.28E −0340.35517.91E −013.29E −0150.054661.05E −039.61E −0261.20E −056.53E −052.25E −0570.02553.32E −037.31E −0184.95E −082.40E −094.59E −07Student’t-tests for methodology and state of the art were applied. For the state of the art, methodology, and HHPC, we established ∝ = 0.05 as a level of significance. The null and alternative hypotheses for methodology and HHPC are as follows:(i)
h0: there are no differences between the performance of hyperheuristic with the methodology and without the methodology(ii)
ha: there are differences between the performance of hyperheuristics with the methodology and without the methodologyFor methodology and state of the art,(i)
h0: there are no differences between the performance of hyperheuristics and the optimal state of the art(ii)
ha: there are differences between the performance of hyperheuristicsThe statistical results of the tests are shown in Table21. With these values, we can observe the following:(i)
Methodology and HHPC. It can be inferred that the results of the methodology are significantly different from those of hyperheuristics with the whole set of heuristics. This means that the methodology improved performance and allowed limiting the set of heuristics for each of the clusters.(ii)
Methodology and State of the Art. It can be inferred that no statistical evidence was found that the results of the methodology differ from the optimal ones of the state of the art, except in clusters 5 and 7. This is because it is where there are more atypical data or that they were badly classified which opens an area of opportunity for the refinement of the methodology.Table 21
Results of the Studentt-tests for methodology and Edo. Art and methodology and HHPC.
ClusterMethodology and Edo. ArtpvalueMethodology and HHPCpvalue10.16415.12E-0520.14890.149630.32110.0258640.028140.00438950.006010.000238860.011440.000970974.43E-076.65E-0680.062352.52E-05


## 8. Conclusion

In this work, a methodology is proposed to select low-level heuristics for a hyperheuristic approach to offline learning oriented to the solution of instances of different constraint satisfaction problems. The proposal was applied to two different problems well known and studied in the state of the art, which were the coloring of graphs and the vehicle routing problem with a specific capacity, GCP and CVRP, respectively.The methodology is focused on optimizing the number of heuristics that can be applied to different constraint satisfaction problems in a hyperheuristic approach. Information on the performance of an original set of heuristics for the instances of the problem is obtained from the different problems. The performance information is used to generate characteristic vectors for each instance, which is used to generate equivalence classes of instances of the problem. The grouping in classes allows to identify the heuristics that apply to each class and from that information, a reduction of the number of heuristics necessary to obtain good solutions in the instance of each class is made and to reduce the total number of heuristics that can be applied in the hyperheuristic approach to solving the problems involved.In the application to the GCP and CVRP, the information on the performance of the heuristics was obtained through a metalearning process, and this information was used to obtain the basic and internal characteristics of the instances. The instances were grouped into 5 classes using the k-means algorithm with the Mahalanobis metric. For each class, the sets of heuristics that could be applied to all their instances were identified, and through a process of hierarchization and cutoff criteria, the number of heuristics per class was reduced.For training and testing, the Naive Bayes classifier and information on the characteristics of the instances were used. The experimental results show that the hyperheuristic in each class could efficiently solve each instance, and the classifier was able to predict the class for each problem instance.The identification and reduction of heuristics to find the solution of complex problems is an optimization strategy that can do the search for solutions to problems of satisfaction of restrictions efficiently. The methodology presented allows generating a framework with a level of generality that can be trained to solve different problems of satisfaction of constraints simultaneously under the hyperheuristic approach. Once trained, it can allow finding good solutions to different problems with a common base of heuristics for instances of problems grouped by the efficiency of the solution heuristics.Finally, the methodology makes it possible to improve the search for solutions to sets of problems by exploring the diversification of some of its components such as classification algorithms, metrics, heuristics, and selection criteria, which may be different for sets of different problems. A study of these possibilities is proposed as future work.



---

*Source: 6660572-2021-04-26.xml*