Keywords

1 Introduction

Hybrid metaheuristics have proven to be effective at solving combinatorial optimization problems [4, 27]. However, designing hybrid metaheuristics is a very challenging task [4, 27] involving various critical design decisions, including which metaheuristics to combine, how to combine these and which parameter values to use for each metaheuristic. The research presented in this paper aims at investigating the possibility of automating these design decisions.

A genetic algorithm is used to automate these design decisions. The metaheuristics are combined linearly and each chromosome is a sequence of metaheuristics, with each gene containing a character representing a metaheuristic and the relevant parameter values for that metaheuristic. A steady-state genetic algorithm employing tournament selection, crossover and mutation is used to explore the space of metaheuristics and their parameter values. The metaheuristics comprising the chromosomes include iterated local search, tabu search, simulated annealing and a memetic algorithm.

The automatically designed hybrid metaheuristics (adhms) evolved by the meta-genetic algorithm (mga) are evaluated using the symmetric traveling salesman problem (tsp) and their performance is compared to manually designed hybrid approaches. The adhms are found to be very competitive to the manually designed approaches. The adhms are also found to outperform the metaheuristics when they are used separately. The main contributions of this research are:

  • This study has shown a simple, yet effective, approach to the automation of hybrid metaheuristics. This has been illustrated using the symmetric traveling salesman problem, however the approach can be applied to solving any combinatorial optimization problem; see Sect. 7.

  • The research has shown the potential of automating the design of hybrid metaheuristics. The approach performs competitively with carefully crafted, manually designed hybrid heuristics. The approach is also found to have better performance than the standard metaheuristic when applied individually.

The rest of the paper is organized as follows. In Sect. 2, the motivation of the paper is stated. Section 4 describes the proposed meta-genetic algorithm. The experimental setup is specified in Sect. 5. In Sect. 6, the results are presented and discussed. Section 7 provides the conclusion and the future work.

2 Motivation

The best known results in many optimization problems are found by hybrid metaheuristics [27]. The design of hybrid metaheuristics is challenging, requiring expert knowledge in algorithm design, data structures and statistics [4]. The design of metaheuristics involves many hard-to-make design choices such as whether to use a single method or to hybridize a number of methods; which methods/components to include; how to synthesize the hybridization; how to prune the space of all possible design choices; how to configure the hybrid method and/or each of its components. The main aim of this research is to investigate the possibility of automating this design process which will give researchers the time to focus on other aspects, with a long-term goal of providing tools for non-experts to use, hence facilitating multidisciplinary research.

Analogous to the way experts come up with hybrid solvers, in this paper the design phase is separated from the application phase. The design phase involves designing a hybrid metaheuristic for solving a particular optimization problem. In the application phase, the algorithm crafted in the design phase is applied to the optimization problem at hand. The design phase is usually conducted manually by the researcher. In this study we investigate automating this process thereby relieving the researcher from carrying it out manually.

Please note that the aim of this research is not to compete with or improve on the state of the art techniques for solving a particular problem. The main focus is to show how the design process can be automated and to investigate the difference in performance of the automatically designed and manually designed hybrid metaheuristics, with the aim of producing hybrids that perform at least as good as the manually designed hybrids.

3 Related Work

The automation of the design of metaheuristics is tackled from many aspects using different approaches: algorithm selection [25], algorithm portfolios [15], reactive search [2], automatic algorithm configuration [18] and hyper-heuristics [5].

In a narrower sense, prior work includes that of Adriaensen et al. [1] in which a focused ILS is used for automating hyper-heuristics. Kanda et al. [19] use meta-learning to choose, based on the problem features, the most effective metaheuristic. Bhanu and Gopalan [3] use a great deluge hyper-heuristic to control a set of hybrid genetic algorithms. Grobler et al. [16] use a selection hyper-heuristic to manage a number of population-based metaheuristics. Maashi et al. [21] use a choice function hyper-heuristic to intelligently select the most appropriate multi-objective evolutionary algorithm at each point of solving the problem. Pillay [24] uses an evolutionary algorithm hyper-heuristic to evolve sequences of classical artificial intelligent search methods.

To the best of our knowledge, this the first study which uses a multipoint metaheuristic to automatically hybridize and tune single point and population-based metaheuristics. The success of using genetic algorithms for parameter tuning in evolutionary algorithms [13] as well as determining the control flow in evolutionary algorithms [11] motivates the use of the genetic algorithm in this paper. Please note that the subject of this work is to hybridize metaheuristics; not to select the most suitable metaheuristic based on the instance features.

4 Meta-genetic Algorithm for Hybridizing Metaheuristics

The mga is a steady state genetic algorithm evolving a population of metaheuristic hybrids consisting of the standard metaheuristics (smhs); namely, simulated annealing (sa), tabu search (ts), iterated local search (ils) and a memetic algorithm (ma). Along with finding appropriate metaheuristic hybrids, the mga also finds suitable parameter settings for the smhs in an online fashion.

4.1 Standard Metaheuristics

Please refers to [14] for the description of the smhs used in this paper. The details that are specific to our implementation are only presented here.

ils: The perturbation of the ils is done by executing random moves for a number of times determined by the perturbation strength. The local search used by the ils is the best improvement local search which makes the best move at each step and stops when there is no further improvement. The acceptance criterion accepts improving moves only.

ts: The ts used in this paper is the best improvement tabu search which makes the best non-tabu move at each iteration. A move is allowed by the aspiration criterion if it is the best move seen so far in the neighborhood and it produces a solution better than the best solution. The tabu list is ruled by: first enters, first leaves. The tabu condition is defined in Sect. 5.2.

sa: The temperature decreases geometrically, i.e. \(T_{k+1} = c \times T_k\) where \(c \in (0,1)\) is the cooling rate. The length of the repetition schedule is equal to the size of the neighborhood. The probability function is defined as:

$$\begin{aligned} \text {Pr}(s, s^\prime , T) = \exp \left( \frac{-100 \times \left[ f(s^\prime ) - f(s)\right] /f(s^\prime )}{T}\right) , \end{aligned}$$

where f(.) denotes the objective function, T denotes the temperature and s is the current solution and \(s^\prime \) is a candidate solution.

ma: The ma is a steady state genetic algorithm combined with local search. At each generation, the maximum preservative crossover operator [22] is used to produce one offspring. Then, the local search is applied to the offspring. The worse individual in the population is replaced by the offspring if the offspring is better. The local search is the first improvement local search which makes the first improving move it finds and stops when there is no further improvement.

4.2 Chromosome Representation and Initial Population Generation

The chromosomes are represented by strings of the form \({\texttt {h}_{1}:\mathtt{s}_{1},\, \mathtt{h}_{2}:\mathtt{s}_{2}},\) \(\ldots \),\({\texttt {,h}_\mathtt{n}:\mathtt{s}_\mathtt{n}}\) where n is the chromosome length and each gene is of the form \({\texttt {h}_\mathtt{i}: \mathtt{s}_\mathtt{i}}\) for i = 1, 2, \(\dots \), n where \({\texttt {h}_\mathtt{i}}\) can be simulated annealing S, tabu search T, iterated local search I, or the memetic algorithm M and \({\texttt {s}_\mathtt{i}}\) is the specification for running \({\texttt {h}_\mathtt{i}}\). For instance, if \({\texttt {h}_\mathtt{i}}\) is the tabu search T, then \({\texttt {s}_\mathtt{i}}\) could be (10, 75) which means running the tabu search for 10 iterations and the length of tabu list is 75. An example of a chromosome is M:(50,100,2),S:(45, 0.5, 0.95) which is interpreted as running the memetic algorithm for 50 generations with a population of size of 100 and a tournament of size 2 followed by running simulated annealing with an initial temperature of 45, a final temperature of 0.5 and a cooling rate of 0.95.

The chromosomes of the initial population are created at random where each gene is created by selecting one of the smhs along with its parameters at random. The parameters are chosen from predetermined ranges. The length of each chromosome is also randomly chosen. The shortest chromosome is of length one and the longest chromosome is bounded by a limit. Duplicates are not allowed in the initial population.

4.3 Fitness Evaluation and Selection

The fitness of each chromosome is calculated by executing the specified smh at each gene using the corresponding specification. Each chromosome is evaluated on one problem instance. All elements of a population are applied to the same initial solution of the same problem instance. The execution of the chromosomes is handled sequentially, i.e. once the execution of a gene ends, the execution of the subsequent gene starts using the output of the preceding gene as an input. The execution of the chromosome is terminated once an optimal solution is found or until the last gene is executed. The fitness of the chromosome is the cost of the best solution found by the chromosome. To facilitate the transition from one gene to the next, the best solution found by the preceding gene is passed to the subsequent gene if it encodes a single point search. When the subsequent gene encodes a population-based method, seventy percent of the initial population is made of randomly created solutions and the rest of the population is comprised of the solutions created by the preceding genes inserted with equal proportions.

Tournament selection is used which involves choosing a few individuals at random from the population which compete based on fitness. The fittest individual is the winner of the tournament. The winner of the tournament is used to create offspring.

4.4 Regeneration

The crossover operator is used to produce the offspring. Two crossover points are chosen independently at random in both parents and the chromosomal substrings are swapped at the crossover points so that two offspring are generated. Then the offspring are mutated at one gene chosen at random. The mutation is done by choosing a smh along with its parameter values at random. The two fittest individuals out of the two parents and the two offspring survive and they are inserted into the next generation.

5 Experimental Setup

5.1 Evaluation of the MGA

The symmetric tsp is used to evaluate the performance of the proposed mga. The tsp has been used extensively to benchmark newly proposed methods due to its rich complexity and wide applications.

The proposed mga is an automated approach for designing metaheuristic hybrids and thus it is compared to recently proposed manually designed hybrid systems; namely, the method of Wu et al. [28] (gcga), the method of Créput and Koukam [7] (msom), the method of Chen and Chien [6] (gsaacpso) and the two methods of Lin et al. [20] (ahsats-dcm and ahsats-2opt).

The problem set consists of 30 problem instances chosen from tsplib.Footnote 1 The number of cities in these instances ranges from 51 to 724. It is worth noting that although instances of these sizes can be solved up to optimality using exact techniques, they are still challenging for recent hybrid metaheuristics and approximate hybrid methods; see for instance [9, 23, 26]. Furthermore, the aim of the proposed study is not to develop a specialized large-scale tsp solver.Footnote 2

5.2 TSP Specific Details

The solutions are tours represented as permutations of integers where each city is identified by a unique number from 0 to \(n-1\) assuming there are n cities. The initial solutions are created uniformly at random using the algorithm of Durstenfeld [12]. The length of tours is calculated as specified in the tsplib. The 2-opt operator [8] is used to facilitate the transition from one solution to a neighboring solution during the search. The perturbation of the ils described in Sect. 4.1 is done by executing random 2-opt moves determined by the perturbation strength. The tabu condition of the ts described in Sect. 4.1 is based on the 2-opt moves. A 2-opt move is declared tabu if both cities involved in the 2-opt move are in the tabu list.

5.3 Parameter Settings

The parameter values of the smhs are chosen by the mga from specific ranges. The ranges are chosen to be wide enough to give the mga the flexibility of determining the appropriate values for each parameter. The ranges of the parameters for each smh are documented online.Footnote 3

5.4 Experiments

There are three experiments conducted.

Experiment I: The main aim of Experiment I is to compare the automated design with the manual design. The automatically designed hybrid metaheuristics evolved by the mga are compared to the manually designed approaches mentioned in Sect. 5.1 in terms of the best and the average performance. Please note that there is a clear separation between the design phase and the application phase; thus, unlike the hyper-heuristic studies [5], the mga replaces the human designer and thus it is not directly compared with the published methods; rather, the performance of the hybrid metaheuristics that are designed by the mga is compared with the performance of the manually designed hybrid methods. The Friedman test is used to detect whether there are significant differences in the performance of the adhms and the other methods. Then, the Wilcoxon signed ranks test is used to perform the pairwise comparisons involving the adhms and the manually designed approaches. The Holm procedure is used to control the family-wise error associated with multiple comparisons.

Experiment II: The aim of Experiment II is to compare the performance of the hybrid solvers to the individual metaheuristics, i.e. the ts, ils, sa and ma. Each metaheuristic is tuned automatically offline using Iterated Race for Automatic Algorithm Configuration (irace).Footnote 4 The details of the offline parameter tuning can be found online.Footnote 5 The performance of the evolved hybrid metaheuristics is compared to each of the metaheuristics individually applied to solve the problem instance. The Friedman test and the Holm procedure are used.

Experiment III: This experiment is an initial investigation of the reusability of the adhms. A set of 22 instances is used. The instances are divided into “hidden” and “seen” instances. The hidden instances are grouped into two classes: ClassA comprised of 10 instances with sizes less than 300 cities and ClassB comprised of 10 instances with sizes larger than 300 cities. For each class, one “seen” instance is used by the mga to evolve a hybrid solver. Then, that hybrid solver is used to solve all the hidden instances belonging to the corresponding class. The best and average objective value over 30 runs are used to evaluate the performance of the hybrid solvers on the hidden instances.

5.5 Implementation Platform

The simulations are run on a cluster consisting of Intel 5th generation CPUs (2.6 GHz). The cluster is interconnected with FDR 56 GHz InfiniBand. The OS is CentOS 7.0. The programming language is the OpenJDK Java version 1.7.0-111.

6 Results and Discussion

6.1 Experiment I

In Experiment I, the performance of the adhms is compared to that of the manually designed approaches. The best and the mean performance of the adhms over 30 independent runs are shown in Table 1. For each method shown in the table, the first column gives the percentage deviation of the best solutions from the best known solutions where the percentage deviation (denoted by \(\varDelta \)) of a solution S from the best known solution \(S^*\) is defined as

$$\begin{aligned} \varDelta = 100 \times \frac{S - S^*}{S^*}. \end{aligned}$$
(1)
Table 1. Comparison of the performance of the adhms with previously published work. BKS stands for the best known solution.

The second column gives the mean performance. The third column gives the runtime measured in seconds. From Table 1, the adhms find the best known solutions for 22 instances out of 30. The adhms perform better in terms of both the best and mean performance compared to gcga, msom, gsaacpso; perform slightly better than ahsats-2opt in terms of the best performance and slightly worse in terms of the mean performance; perform equally with the ahsats-dcm in terms of the best performance and slightly worse in terms of the mean performance.

The statistical analysis is used to detect whether the differences in the performance of the adhms and the other published methods are significant. The Friedman test is used. The average rankings computed by the Friedman test are ahsats-cdm: 1.53, ahsats-2opt: 2.22, adhms: 2.25, gsaacpso: 4.06, msom: 5.44 and gcga: 5.5. High ranks correspond to poor performance. The Friedman statistic is 69.26 and the p-value is 4.86E\(^{-11}\) which strongly suggests there is at least two methods with significantly different performance [10]. The Holm procedure is used to control the family-wise error associated with multiple comparisons. The p-values, the adjusted p-values and the adjusted significance levels computed by the Holm procedure are documented online.Footnote 6 The pairwise compariosns reveal that the adhms achieve statistically significant improvement over gcga, msom, gsaacpso. However, the difference in the performance of the adhms and (ahsats-2opt and ahsats-dcm) is not statistically significant.

Table 2. The percentage deviation of the mean solutions from the optimal solutions.

6.2 Experiment II

The second experiment evaluates the performance of the adhms in comparison with the individual smh tuned using the irace package. For each problem instance, the smh is run for the same amount of time required for the execution of the adhms. The results are averaged over 30 independent runs. The percentage deviations of the mean performance of the smhs and the adhms from the best known solutions are shown in Table 2 which demonstrates the superior performance of the adhms. The Friedman test is used to detect whether performance of the adhms and the smhs is significantly different. The average rankings of the methods are adhms: 1.11, ils: 2.08, ma: 2.80, sa: 4.26 and ts: 4.75. Which indicates that the adhms are the best. The Friedman statistic is 112.35 and the p-value is 7.18E\(^{-11}\) which indicates the differences are significant. The unadjusted p-values are computed from the Friedman rankings. The Holm procedure is used. The results of the statistical analysis is documented online.Footnote 7 All the pairwise comparisons are found to be significant which indicates that the adhms outperform each of the smhs when used individually.

6.3 Experiment III

The third experiment tests the reusability of the evolved hybrid solvers by evaluating the performance of hybrid solvers evolved for seen instances on hidden instances. The hidden instances are divided into two classes (ClassA & ClassB) as mentioned in Sect. 5.4. For each class, a training instance is chosen and a hybrid solver is evolved for it. Then, the performance of the hybrid solver is tested on the hidden instances belonging to that class. The best and the mean performance over 30 runs are used to verify the quality of the “trained” solvers on the hidden instances. The results are shown in Table 3 in which \(\varDelta ^*\) and \(\varDelta \) represent the percentage deviations from the best known solutions of the best and mean solutions respectively. In the table, ch130 and rd400 are the training instances.

Table 3. The percentage deviation from the best known solutions of the best and the mean performance of the hybrid solvers applied to the hidden instances.

From Table 3, the “trained” adhm finds the best known solution for 9 instances out of 10 for ClassA. For ClassB, the deviation of best solution found by the trained solver is less than \(2\%\). The fourth column (QL) is the quality loss which is the difference between the mean performance of the trained adhms and the actual adhms evolved for each of the hidden instances. A negative difference indicates that the trained adhms perform better. In general, the quality loss is less than \(1\%\) which implies that the trained adhms are reusable since there is not much deterioration in their performance. It is worth noting that by combining Tables 1 and 3 that the trained adhms perform better than gcga, msom and gsaacpso and perform slightly worse than ahsats-dcm and ahsats-2opt. In particular, the difference in the mean performance of the trained adhms and the ahsats-dcm (the best performer) is less than \(1\%\) for ClassA and less than \(2\%\) for ClassB (except for rat575). This demonstrates that the trained adhms are competitive to the manually crafted hybrid metaheuristics.

7 Conclusion and Future Work

The research presented in this paper is an initial attempt to ascertain the feasibility of automating the design of hybrid metaheuristics. The paper illustrates how a meta-genetic algorithm can be used to hybridize metaheuristics and dynamically tune the parameters of the individual metaheuristics. The study has revealed the potential of automating the design of metaheuristics. The evolved hybrids were found to perform competitively with manually designed hybrids and perform better than the metaheuristics applied individually. The evolved hybrid solvers were also found to be reusable. The meta-genetic algorithm is readily applicable to other domains. Technically, only three aspects need to be changed in order to apply the meta-genetic algorithm to a new problem domain: the representation of the solution; the problem-specific heuristic (the move operator) and the objective function.

Given the success in this initial study, future research will be conducted to extend this work further. In this study, the metaheuristics were combined linearly. In future work, other mechanisms for combining the metaheuristics will be investigated on different problem domains.