You are on page 1of 12

Expert Systems With Applications 165 (2021) 113853

Contents lists available at ScienceDirect

Expert Systems With Applications


journal homepage: www.elsevier.com/locate/eswa

An improved grammatical evolution approach for generating perturbative


heuristics to solve combinatorial optimization problems
George Mweshi ∗, Nelishia Pillay
Department of Computer Science, University of Pretoria, Pretoria, South Africa

ARTICLE INFO ABSTRACT

Keywords: Search methodologies such as hyper-heuristics have been successfully used to automate the generation of
Hyper-heuristics perturbative heuristics to solve combinatorial optimization problems. However, the domain of automated
Grammatical evolution generation of perturbative heuristics has generally not been well researched and very few works have actually
Examination timetabling
been conducted in the area. In addition, most of the proposed hyper-heuristic methods in the literature
Vehicle routing
simply recombine already existing and human-derived low-level perturbative heuristics (or primitive heuristic
Boolean satisfiability
components) with various move acceptance criteria to generate the new perturbative heuristics instead of
producing the heuristics from scratch. As a result, these methods cannot be applied to problem domains where
the human-derived low-level heuristics are not available. The study presented in this paper addresses this
issue by proposing an improved approach, based on our previous work, that generates good quality reusable
perturbative heuristics from scratch. While this new approach also uses grammatical evolution to generate the
heuristics from a set of basic actions and components of the solution (as in our previous work), the grammar
has been substantially extended and includes new methods for selecting solution components, conditional
constructs, utilizes some information from the solution space as well as extends the syntax of the basic actions
in order to cover a wider range of heuristics. Furthermore, the new approach has been applied to a new problem
domain, i.e. the boolean satisfiability problem, in addition to the examination timetabling and vehicle routing
problems investigated in the earlier work. The experimental results show that the new approach not only
generates better perturbative heuristics than those produced in our earlier work, it also produces results that
are competitive with those obtained by currently existing generation perturbative hyper-heuristics that have
been applied to the benchmark sets in the three domains.

1. Introduction low-level heuristics to produce good solutions. As a result, researchers


have shifted their focus to the development of techniques for designing
Solving combinatorial optimization problems often requires the de- the low-level heuristics themselves. One such technique was proposed
sign of suitable heuristics due to the large and complex solution search in our previous work (Mweshi & Pillay, 2019). In the study, we used
spaces associated with these problems. In most cases, the heuristics are Grammatical Evolution (GE) (Ryan et al., 2018), a grammar based
designed manually by problem domain experts but the design process variant of Genetic Programming (GP) (Koza & Koza, 1992), to evolve
is very challenging and time consuming. To help address these issues, perturbative heuristics from a set of basic actions and solution compo-
researchers have proposed various initiatives with the main aim of nents. The basic actions included simple operators such as swap, move,
automating the heuristic design process. Examples of these initiatives
delete, add and shuffle. The solution components were the components
include search methods such as hyper-heuristics (Chakhlevitch & Cowl-
that made up the solution to the problem. For example, in the examina-
ing, 2008), adaptive memetic algorithms (Ong & Keane, 2004), and
tion timetabling problem, solution components were the examination,
meta learning (Smith-Miles, 2009) to mention but a few. This paper
the period and the room. The route and customer were identified as the
focuses on hyper-heuristic methods.
solution components for the capacitated vehicle routing problem. Our
According to Burke et al. (2010a), the structure and parameter
values of a search method have a major influence on the performance of methodology produced perturbative heuristics that performed better
the method. For example, hyper-heuristic methods, although problem than the human-derived ones for both the capacitated vehicle routing
independent at higher levels, rely on the quality of the problem specific and examination timetabling problems.

∗ Corresponding author.
E-mail addresses: georgemweshi@yahoo.com (G. Mweshi), npillay@cs.up.ac.za (N. Pillay).

https://doi.org/10.1016/j.eswa.2020.113853
Received 18 October 2019; Received in revised form 2 August 2020; Accepted 4 August 2020
Available online 13 August 2020
0957-4174/© 2020 Elsevier Ltd. All rights reserved.
G. Mweshi and N. Pillay Expert Systems With Applications 165 (2021) 113853

The study presented in this paper builds upon the success of the more general algorithms than the problem specific meta-heuristic meth-
previous work. In particular, we extend the GE grammar used in the ods (Stone et al., 2018). Hyper-heuristics do this by exploring the space
previous work by including new mechanisms for selecting solution of heuristics rather than the solution space (Burke et al., 2003). Hyper-
components, conditional constructs, extending the syntax of the basic heuristics introduce a barrier (usually referred to as the domain barrier)
actions, utilizing some information from the solution space (e.g. differ- between a high level comprising a general search algorithm and a low-
ence in solution fitness each time the heuristic is applied, number of level consisting of a set of low-level domain specific heuristics and
times the heuristic has been applied, etc.) and using at least two move other problem domain information. The high level is problem domain
acceptance criteria. The new approach also generates reusable heuris- independent and therefore does not have any knowledge of the problem
tics rather than the disposable heuristics generated in the previous domain apart from a few bits of information that passes through the
work. barrier such as the number of available low-level heuristics. It is the
We consider this new approach to be an improvement on our high level search algorithm that decides which heuristic to apply during
previous methodology and in order to prove this hypothesis, we first problem solving.
apply the approach to the same two problem domains investigated in In general, hyper-heuristics can be categorized into those which se-
our previous work i.e. the vehicle routing problem and the examination lect low-level heuristics to apply during problem solving (i.e. selection
timetabling problem. We further demonstrate the flexibility of the ap- hyper-heuristics) and those which generate new low-level heuristics
proach by applying it to one more problem domain i.e. the satisfiability for solving problems (i.e. generation hyper-heuristics). The low-level
(SAT) problem. The experimental results not only show that the newly heuristics can also be categorized into constructive heuristics (i.e. heuris-
evolved perturbative heuristics perform better than those produced in tics that build a solution from scratch and iteratively add elements to
our previous approach, but they also produce competitive results when it to obtain a feasible solution) and perturbative heuristics (i.e. heuristics
compared with generation perturbative hyper-heuristic approaches that that iteratively modify an existing solution to improve its quality).
have been applied to the benchmark sets from the three problem Consequently, hyper-heuristics are typically classified as selection con-
domains. structive, selection perturbative, generation constructive and genera-
This research can therefore be considered as forming part of the tion perturbative (Pillay & Qu, 2018). The study presented in this
larger initiative which aims to automate the design of machine learning work belongs to the fourth class of hyper-heuristics, namely generation
and search techniques for solving hard computational problems. More perturbative hyper-heuristics. The focus on the automated generation of
specifically, the approach presented in this study can be a very useful perturbative heuristics rather than constructive heuristics is motivated
technique for generating good quality reusable perturbative heuris- by the fact that this domain has been under-researched.
tics for problem domains where no specialized heuristics currently One of the earlier works on generation perturbative hyper-
exist. The main contributions of this paper can be summarized as the hyperistics was the research conducted by Fukunaga (2008) in which
following: GP was used to evolve local search operators for the SAT problem
by combining components of human-derived heuristics such as GSAT,
• it presents a novel search methodology for generating different Novelty and WalkSAT. The evolved operators were shown to be very
types of perturbative heuristics from scratch. The methodology competitive and even outperformed state of the art algorithms.
is simple but flexible enough to be applied to multiple problem A similar study by Bader-El-Den and Poli (2007) used grammar-
domains. based strongly-typed GP to evolve disposable local search 3-SAT heuris-
• it presents a survey of currently existing hyper-heuristic tech- tics for solving SAT problems. The study also used components from
niques for generating perturbative heuristics to solve combinato- human-derived perturbative heuristics and the grammar was used to
rial optimization problems. specify the appropriate combination of the components in order to
evolve heuristics. The evolved heuristics obtained results of the same
The rest of the paper is organized as follows: Section 2 provides a
quality as the best SAT solvers.
brief background on hyper-heuristics and reviews some of the hyper-
Other GP based hyper-heuristics include the work conducted by
heuristic approaches that have been used to generate perturbative
Nguyen et al. (2011). In this study, the authors used GP as a heuristic
heuristics. The improved approach is discussed in Section 3 while
selection method to evolve adaptive mechanisms containing compli-
the experimental setup used to evaluate the approach is presented in
cated combinations of low-level perturbative heuristics. The adaptive
Section 4. A discussion on the performance of the approach is given in
mechanisms included three different conditional branches for improv-
Section 5. The conclusion and future work are presented in Section 6.
ing a randomly generated solution. The hyper-heuristic obtained good
results for the 1-D bin packing, permutation flow shop and MAX_SAT
2. Background and related work problems.
Apart from GP based hyper-heuristics, grammatical evolution based
This section provides a brief discussion on some of the techniques hyper-heuristics have also been successfully used to generate pertur-
that have been used to automate the generation of heuristics with bative heuristics. The next section briefly discusses grammatical evo-
particular focus on hyper-heuristic methods. Later, we review some of lution and some of the works conducted in the domain of generation
the works in the literature that have successfully generated perturbative perturbative hyper-heuristics using the search technique.
heuristics for combinatorial optimization problems. A discussion on
our preferred heuristic search algorithm, grammatical evolution, is also 2.2. Grammatical evolution
provided.
Grammatical evolution (GE) is a grammar based variant of GP that
2.1. Hyper-heuristics is capable of evolving complete programs in an arbitrary language using
a variable-length binary string (O’Neill & Ryan, 2001). The genotype is
Hyper-Heuristics are high level search techniques that have recently mapped to its corresponding phenotype using a grammar represented
emerged as a more effective way of solving combinatorial optimization in Backus Naur Form (BNF). A BNF grammar is a four-tuple ⟨ T, N, T,
problems. Earlier meta-heuristic methods, although very successful at P ⟩ where T represents the terminal set, N is the function set or set of
producing good solutions for certain problems, were shown to produce non-terminals, S is the start symbol and a member of N, P is the set of
poor solutions for other problem domains and even other instances production rules that map the elements of N to T . To be more specific,
of the same problem. Hyper-heuristics were introduced as a way of codons (calculated as a value (between 0 and 255) modulus the number
producing generalized solutions through the use of easier, cheaper and of non terminal production rules) are used to specify the production

2
G. Mweshi and N. Pillay Expert Systems With Applications 165 (2021) 113853

Table 1 solution space, namely the fitness of the previous and current solutions,
Identified Solution components for the three problem domains. the current iteration and the number of iterations performed so far,
Problem domain Solution components is also captured. This information forms part of the conditions for
Examination timetabling problem (ETP) Exam, Period and Room. evolving a heuristic and is also used to break ties between evolved
Capacitated vehicle routing problem (CVRP) Route and Customer
heuristics with the same fitness. We also use two move acceptance
Boolean satisfiability problem (SAT) Clause and variable
criteria i.e. improving only moves (IO) and all moves (AM) to accept
or reject a solution.
The approach presented here is similar to the one presented in our
rule to use at each step when mapping non-terminals to terminals. The previous work. However, the two approaches are not the same. The
mapping is complete when a sequence of terminal symbols is obtained. following are the main differences:
More details on GE can be found in (Ryan et al., 2018).
• Solution Components selection mechanisms : In the previous work,
Burke et al. (2012) applied GE to generate local search heuristics
solution components were randomly selected. We have extended
for solving the 1-D bin packing problem. The heuristics evolved in this
the solution component selection mechanisms to include two new
study produced good results for some problem instances.
properties of solution components. The properties are component
Sabar et al. (2013) used GE with an adaptive memory to generate
cost and component size. We determined that each solution com-
perturbative heuristics for both the vehicle routing and examination
ponent, independent of the problem domain, will have a cost that
timetabling problems. The authors combined human derived low-level
is related to its contribution to the solution objective value. For
heuristics with various move acceptance criteria to evolve new heuris-
example, in the examination timetabling problem, the cost can re-
tics. The evolved heuristics produced solutions that were superior to
fer to the number of soft constraint violations for the component.
the best known solutions at the time for most of the problem instances
With this property, solution components can be selected based on
in the two problem domains.
the lowest and highest cost values. Each solution component will
Stone et al. (2018) also used GE to evolve perturbative heuristics
also have an individual property that we have called size. This
for the traveling salesman and multi-dimensional knapsack problems.
property can be used to sort solution components based on some
The approach was however only applicable to problems that could be
property of the solution components identified in the problem
represented as a graph. The evolved heuristics produced good results
domain. For example, in the capacitated vehicle routing problem
for the two problem domains.
customer size refers to the size of the customer with respect to the
The biggest challenges with the hyper-heuristic methods discussed
quantity of goods that each customer requests.
above are the following:
• Conditional Constructs : We have included if_then_else conditional
• They are mostly tailored to a single problem domain and therefore operators to evolve decision rules in the new approach. We did
the extent to which they generalize to other problem domains not evolve any decision rules in the earlier approach.
cannot be determined. • Information from Solution Space: The new approach has been ex-
• They mostly rely on human derived low-level heuristics or heuris- tended to include more information from the solution space such
tic components which makes it difficult to apply these methods to as the number of times the heuristic has been applied to a
problem domains where the heuristics may not be available. solution, the initial fitness of the solution before the heuristic was
• Some of the methods can only be applied to certain types of applied, the fitness of the solution after applying the heuristic and
problems i.e. problems that can be mapped using a graph rep- the changes in the fitness of the solution each time the heuristic is
resentation. applied. In the previous approach, we only considered the fitness
of the solution after applying the heuristic.
The above mentioned challenges were to a large extent successfully • Extended the Basic Actions Syntax: The syntax for the basic actions
addressed in our previous work (Mweshi & Pillay, 2019). This paper has been made more flexible in an attempt to cover a wider space
extends that methodology by proposing a new extended GE grammar of heuristics.
with the aim of improving the results obtained in the previous work. • Move Acceptance mechanisms : Two move acceptance criteria
The extended approach is discussed in the following section. i.e. Improving only and All moves are used. The earlier approach
used the Improving Only criterion.
3. Overview of the proposed GE approach
• Reusable heuristics : The new approach generates reusable heuris-
tics as compared to the disposable heuristics generated in the
As in our previous work, perturbative heuristics are evolved from
earlier approach.
solution components and basic actions using GE. The solution components
are the parts making up the solution to the problem being addressed. The next section discusses the improved GE approach in detail.
These components are problem domain specific and can be identified
quite easily. For example, in the examination timetabling problem, the 3.1. Improved GE approach
components of the solution are entities such as the examination, the
room and the period. In the vehicle routing and boolean satisfiability The general structure of the new GE approach is presented in Fig. 1
problems, these are entities such as the customer, route, variable and below.
clause. The solution components for the three problem domains are The approach starts with the design of the BNF grammar (see Fig. 2).
shown in Table 1. It then initializes the parameters for the genetic algorithm used in the
The basic actions, on the other hand, represent the operators com- search engine and thereafter generates an initial population of chromo-
monly used to modify an existing solution. In this work, only the simple somes (solutions) by randomly assigning a value between 0 and 255 to
move, swap, shuffle, delete and add (reassign) operators are used. The each chromosome gene. Each chromosome in the population is then
simple operators are briefly described in Table 2. mapped to its corresponding program using the mapper. The quality
To generate a perturbative heuristic, GE selects a solution com- of each program is determined by applying it to an initial solution
ponent using some selection mechanism and this component is then constructed for the problem. The approach subsequently executes for a
combined with a randomly selected basic action. The quality of the predefined number of generations with new offspring generated by ap-
generated perturbative heuristic is determined by iteratively applying plying selection, mutation and crossover operators at every generation.
it to an initial solution and tracking the changes in the objective value The generated offspring are then executed to determine their fitness. If
(fitness) of the solution. At each iteration some information from the they have a better fitness than the worst individuals in the population,

3
G. Mweshi and N. Pillay Expert Systems With Applications 165 (2021) 113853

Table 2
Identified basic actions for the three problem domains.
Action Description
Swap This operator randomly swaps a number of solution components if possible. For
example, swapping the rooms or periods of two exams in the examination
timetabling problem. The flip operator commonly used in the Boolean satisfiability
problem domain where a binary variable in the clause is changed from a 0 to a 1
and vice versa, is implemented using this operator.

Move This operator randomly moves a number of solution components to new locations
if possible. For example, moving a customer to a new route in the vehicle routing
problem.

Delete This operator deletes a number of solution components. The delete components are
saved in some list for later reassignment.

Add (Re-Assign) This operator re-assigns the solution components that were earlier deleted using
the delete operator. The solution components are re-assigned either randomly or by
use of constructive heuristics.

Shuffle This operator shuffles the solution components. For example, randomly flipping the
variables in a clause.

3.2. Redesigned BNF grammar

As mentioned in Section 2.2, a BNF grammar is a four tuple consist-


ing of the starting symbol (S), terminals (T), non-terminals (N) and the
production rules (P). A specification of these grammar elements for the
improved approach is given in Table 3.
The production rules specifying how the grammar elements in
Table 3 are combined into perturbative heuristics are shown in the
grammar depicted in Fig. 2. The grammar shown here includes all the
basic actions for the three problem domains. Although some of the
basic actions may not apply to a particular problem domain, the overall
structure of the grammar is the same for all the three domains.
The next sections discuss the grammar elements in more detail.
Fig. 1. The structure of the proposed GE Approach.

3.2.1. Acceptance criteria


The acceptance criteria (⟨𝑎𝑐𝑐𝑒𝑝𝑡⟩) decides whether a solution should
they are added to the population. The pseudocode for the approach is be accepted or not. In this study, only two acceptance criteria i.e. Im-
given in Algorithm 1 proving or equal only (IO) and All Moves (AM) are used. The IO
criterion accepts a generated solution if it is superior to the previous
Algorithm 1: Pseudocode for the proposed GE approach. one. The AM criterion accepts all generated solutions with no regard to
their quality. It is included here so that our approach can also explore
1: Generate an initial population of variable length binary strings
different areas of the search space.
2: Map all the binary strings to their corresponding parse trees
representing the perturbative heuristic (phenotype) using a BNF
3.2.2. Basic actions
grammar
The basic actions represent some of the commonly used opera-
3: Apply each perturbative heuristic in the population to a provided
tions to modify an existing solution. These operations are combined
initial solution to determine its fitness
with the solution components to create a perturbative heuristic or
4: while termination criterion not met do
move operator. In this study, five predefined simple operations namely:
5: Select one or two perturbative heuristics with the highest fitness
swap, move, shuffle, add and delete were used. For the examination
using a selection method
timetabling problem, the operators were implemented in this way.
6: Create new perturbative heuristics for the next generation by
First, the solution for the examination timetabling problem i.e. the
applying genetic operators to the earlier selected heuristics
timetable was implemented as a table with rows and columns. The
7: Apply each new perturbative heuristic to a provided initial
rows represented the periods while the columns represented the rooms.
solution to determine its fitness
This representation was easier to work with and enabled us to combine
8: Replace all the perturbative heuristics in the old population with
certain operations into one. For instance, a heuristic that moved an
the new perturbative heuristics
exam from one period to another also moved the same exam to a
9: end while
another room. Shuffling a room meant randomly moving the exams in
10: return perturbative heuristic with the highest fitness as the best
the room to other periods. For the SAT problem, the swap operation
solution
simulated the commonly used flip action in which the value of the
variable is flipped.

Our GE approach, just like all GE techniques, requires that a suitable 3.2.3. Selection methods for solution components
BNF grammar be developed as the first step in solving a problem. This In this work, we have designed the grammar so that the solution
components can be selected using five methods collectively represented
step is very important as the grammar defines the search space for the
as (⟨𝑐𝑜𝑚𝑝𝑆𝑒𝑙⟩) in the grammar. The five selection methods are the
solution to the problem. The next section presents and discusses the lowestCost, highestCost, smallestSize, largestSize and random methods. The
new BNF grammar that was developed for the new approach. lowestCost method selects the solution components with the lowest cost

4
G. Mweshi and N. Pillay Expert Systems With Applications 165 (2021) 113853

Table 3
Specification of BNF Grammar elements.
Name Symbol Description
Start symbol ⟨𝑠𝑡𝑎𝑟𝑡⟩ The start symbol
Non-terminals ⟨𝑎𝑐𝑐𝑒𝑝𝑡⟩ Move acceptance criteria
⟨ℎ𝑒𝑢𝑟𝑖𝑠𝑡𝑖𝑐⟩ Perturbative heuristic
⟨𝑐𝑜𝑝⟩ Combination operators
⟨𝑐𝑜𝑛𝑑⟩ Conditional operators
⟨𝑟𝑜𝑝⟩ Relational operators
⟨ℎ_𝑣𝑎𝑙𝑢𝑒⟩ Heuristic value (stores information returned from the solution space)
⟨𝑐𝑜𝑚𝑝⟩ Solution component e.g. exam
⟨𝑝𝑟𝑜𝑏⟩ Solution component probability of selection
⟨𝑐𝑜𝑚𝑝𝑆𝑒𝑙⟩ Solution component selection method e.g. route with lowest cost
⟨𝑛⟩ Integer constants
Terminals IO Improving or equal only move acceptance criterion
AM All moves acceptance criterion
c1 First solution component
c2 Second solution component
. .
cn 𝑛th solution component
∪ Union combination operator
→ Random gradient combination operator
≤ Less or equal to
< Less than
> Greater than
≥ Greater or equal to

Fig. 2. Grammar for generating perturbative heuristics.

while the highestCost method selects the solution component with the method has an argument represented by <comp> which specifies the
highest cost. For the SAT problem, cost refers of the variable gain score actual type of the solution component to select (e.g. whether the
while size refers to the age of the variable. A cost value is considered solution component is an exam, room or period in the case of the
low or high if it is less than or greater than the median cost value examination timetabling problem). The type of solution component is
of the particular solution component. If more than one component randomly selected. As an example, lowestCost(exam) means that we
has the same cost value, then the component is selected randomly select the exam with the lowest cost.
from those with the same cost value. The smallestSize and largestSize
methods select solution components with the smallest and largest size
respectively. A component is considered small if its size is smaller 3.2.4. Information from solution space
than the median size for that solution component. Similarly, a large When a heuristic is applied to a solution, some information from the
component is one with a size that is bigger than the median size for solution space is returned. This information consists of numerical values
the solution component. If more than one component has the same for the previous fitness of the solution, current fitness of the solution,
size, then the component is selected randomly from those with the current iteration, total iterations and the differences between the fitness
same size. For example, the size of the solution component exam in of the solutions between the iterations. The information forms part of
the examination timetabling problem refers to the number of students the conditions for evolving heuristics but it may also be very helpful
taking the exam. The median size of the exam solution component will be in breaking ties between two or more evolved heuristics that have
the median value of the sorted list of exams. The random method selects the same fitness. In our work, ties between the evolved heuristics are
solution components randomly. We have also included probabilistic first broken based on the fitness values. If the fitness values are the
branching for selecting the first argument in cases where we need to same, then we consider the number of iterations it took to evolve the
make a decision between choosing a component based on two different heuristics. If the heuristics also took the same number of iterations to
selection methods (e.g. highestCost and smallestSize). Each selection be evolved, then the best heuristic is selected randomly amongst them.

5
G. Mweshi and N. Pillay Expert Systems With Applications 165 (2021) 113853

Fig. 3. An example of a composite heuristic combining swap and move operators. Fig. 4. An example of a generated decision rule.

3.2.5. Logical and conditional operators


A number of operators are used. These include logical operators
such as the less than, greater than, less or equal to, greater or equal
to. Also included here is the conditional operator if-then-else which
is useful for producing heuristics in the form of decision rules. The
conditional operator has three parameters, the first parameter is always
a boolean, while the second and third parameters share the same object
type. The boolean parameter determines the output of this operator. If
the value is true, then the output is the second parameter, otherwise
the function returns the third parameter.

3.2.6. Combination operators


These are used to combine two or more generated heuristics into a Fig. 5. An example of a generated SAT heuristic.
single structure in order to combine the strengths of different heuristics.
In this work, we have used the union (∪), Random Gradient (→)
and Token-Ring Search(no symbol) operators. Given two perturbative The decision rule shown in Fig. 4 first checks if the current fitness
heuristics P1 and P2, the union operator consecutively applies P1
of the solution is greater than the previous fitness. If it is true, then the
followed by P2 and then calls the acceptance criterion to accept or
heuristic in the second branch is selected otherwise the heuristic in the
reject the solution. The random gradient operator continuously applies
third branch is selected.
P1 until there is no improvement. It then applies P2 starting from last
obtained local optimum solution by P1 until no further improvement in The heuristic in Fig. 5 swaps (flips) the lowest cost variable in the
the quality of the solution is possible. The Token-Ring operator consec- clause if the probability of choosing the lowest cost variable is 25%
utively applies the perturbative heuristics in a composite perturbative otherwise it swaps (flips) a random variable in a random clause. Note
heuristic (i.e. a heuristic composed of more than one perturbative that lowest cost variable in this case refers to the variable with the
heuristic) one after the other until the sequence of perturbative heuris- minimum gain score.
tics in the composite heuristic ends. For example, given a composite Having presented the BNF grammar that was used to convert the
perturbative heuristic (P1P2P3) composed of three perturbative heuris- genotypes (binary strings) to their corresponding phenotypes (pertur-
tics P1, P2 and P3 respectively, the token-ring operator applies P1 only bative heuristics), the next section discusses the other aspects of a GE
once, then moves to P2 which is also applied once and finally moves
approach such as the generation of the initial population, the genotype–
to P3 which is also applied once. However, when moving to the next
phenotype mapping process, the method used to evaluate the fitness of
perturbative heuristic in the sequence ( i.e. the sequence of perturbative
an individual in the population, the method used to select parents for
heuristics in the composite heuristic), the search is restarted from the
local optimum obtained by the previous previous perturbative heuristic. regeneration, the genetic operators used to generate new offspring and
If the search reaches the end of the sequence, it restarts from the first the strategy used to replace the old population.
heuristic in the sequence using the local optimum obtained by the last
heuristic in the previous sequence.
3.3. Initial population generation
3.2.7. Perturbative heuristic
The evolved perturbative heuristic (⟨ℎ𝑒𝑢𝑟𝑖𝑠𝑡𝑖𝑐⟩) or move operator is The initial population of variable length binary strings (genotypes)
composed of a basic action applied to the components of the solution.
was randomly generated. In particular, the Random initialization with
<n> is the number of solution components. This simple approach
valids and no duplicates (RVD) method was used. This method attempts
can be used to generate different types of perturbative heuristics. In
to address some of the problems associated with the famous random
addition, two or more heuristics can be combined to form a composite
(RND) initialization of binary strings (genotypes) such as the generation
heuristic.
Some examples of generated heuristics are shown in Figs. 3–5. of invalid solutions (when the sequence of codons generated does not
The composite perturbative heuristic in Fig. 3 combines two heuris- lead to a mapped expression consisting of only terminal symbols), and
tics into one. The first heuristic swaps the two lowest cost exams while the generation of repeated solutions. In the RVD method, a randomly
the second heuristic moves the three smallest sized exams to other generated variable length genotype string is re-sampled if it does not
locations in the solution. The two heuristics are applied consecutively. map to a sequence of terminals only or if it maps to an expression that
has already been mapped to by another genotype string.

6
G. Mweshi and N. Pillay Expert Systems With Applications 165 (2021) 113853

3.4. Genotype–phenotype mapping Table 4


Specification of the ITC 2007 examination timetabling problem.

All the randomly generated binary strings were first converted to Instance Periods Exams Rooms Students Conflict density

their denary values. The production rules of the grammar defined in 1 54 607 7 7891 0.05
2 40 870 49 12743 0.01
Fig. 2 were then used to map the denary values to their respective
3 36 934 48 16439 0.03
computer programs in the form of parse trees. 4 21 273 1 5045 0.15
5 42 1018 3 9253 0.009
3.5. Fitness evaluation 6 16 242 8 7909 0.06
7 80 1096 15 14676 0.02
8 80 598 8 7718 0.05
Each individual in the population represents a perturbative heuris-
9 25 169 3 655 0.08
tic. The fitness of the individual was evaluated by applying it to an 10 32 214 48 1577 0.05
initial solution constructed either randomly or by using a constructive 11 26 934 40 16439 0.03
heuristic (see Section 4.2). The objective value of the new solution 12 12 78 50 1653 0.18
obtained was used as the fitness for the individual. To make it easier to Conflict Density = number of conflicts / (number of exams).
calculate the fitness of the generated heuristic on both the training and
testing sets (discussed in Section 4.4.1 and Section 4.4.2 respectively),
we mapped the objective value of the solution obtained after the
application of the heuristic to a number between 0 and 1. An objective 4.1.1. Examination timetabling problem
value of 0 meant that the heuristic obtained the worst possible solution The examination timetabling problem is the problem of assigning
while an objective value of 1 meant that the heuristic obtained the examinations to a limited number of timetable periods and rooms such
optimal solution. With such a mapping, that the best possible fitness that all the hard constraints of the problem are satisfied and the number
value of the heuristic was equal to the number of instances the heuristic of soft constraints violated is minimized as much as possible. As in
was applied to. For example, if the heuristic was applied to 4 problem the previous work, we used the ITC 2007 benchmark set1 (shown in
instances, then the fitness value of the heuristic was the sum of the four Table 4). The benchmark set has the following hard constraints:
outcomes from each application on the problem instances. Therefore,
the best possible fitness value in such a case is 4 while 0 is the worst. • A student should not sit for more than one exam at one time.
• The capacity of the room must not be exceeded.
3.6. Selection method • The duration of the examination must not exceed the duration of
the period.
The tournament selection method was used to select parents for • All the period related constraints should be satisfied e.g. assigning
population regeneration. It was selected over the other commonly used two examinations in the same period.
selection method, namely fitness proportionate, because it is simpler to • All the room related constraints should be satisfied e.g. assigning
implement, has a better run time, does not require any fitness scaling only one examination in a particular room .
and it has a low susceptibility to takeover by fitter individuals.
The following are the soft constraints:
3.7. Genetic operators • The number of students taking two consecutive examinations in
a row should be as small as possible.
Two genetic operators, namely crossover and mutation were used • The number of students taking two examinations on the same day
to generate new offspring. In particular, single point crossover and should be as small as possible.
bit mutation were used. The single point crossover operator selects • The examinations should be well spread out.
two parents and randomly swaps a selected portion from the genotype • There should be a minimum number of examinations with mixed
of one parent with another portion from the other parent. In the bit durations in a period.
mutation operator, a random bit in a codon is flipped (i.e. 0 is replaced • The number of large examinations appearing later in the timetable
by 1 and vice versa). must be minimized.
• There should be minimum usage of certain periods.
3.8. Population replacement
• There should be minimum usage of certain rooms.

The generational population replacement strategy was used. This A timetable is feasible if all the examinations are assigned to a period
strategy basically replaces the old population with a new one generated and room such that there are no hard constraint violations. For this
after applying crossover and mutation operators. problem, the objective value was calculated as the total cost of the soft
constraints violated2 by the feasible timetable.
4. Experimental setup
4.1.2. Capacitated vehicle routing problem
This section describes the setup of the experiments conducted to
This problem involves finding a least cost set of routes for serving a
evaluate the performance of the new GE approach. The problem do-
set of customers while respecting all the hard constraints. Our approach
mains to which the new approach was applied are described in Sec-
was tested on the Golden and Christofides benchmark sets.3 These
tion 4.1. Section 4.2 discusses the initial solution construction process.
benchmark sets have the following hard constraints:
The experiments conducted are described in Section 4.3. The GE al-
gorithm set up as well as the parameters used in the experiments
are presented in Section 4.4 while Section 4.5 describes the computer 1
The benchmark set is available from http://www.cs.qub.ac.uk/itc2007/
hardware specifications on which the simulations were run.
index.htm.
2
A description of the cost associated with each soft constraint vio-
4.1. Problem domains lation is available from http://www.cs.qub.ac.uk/itc2007/examtrack/exam_
track_index_files/examevaluation.htm.
The new GE approach was applied to three different problem do- 3
The benchmark sets are available from http://www.vrp-rep.org/datasets.
mains, i.e. examination timetabling, vehicle routing and SAT problems. html.

7
G. Mweshi and N. Pillay Expert Systems With Applications 165 (2021) 113853

Table 5 Table 7
Christofides dataset. 3-SAT Benchmark sets.
Datasets Vehicles Capacity Customers Max. length Service time Datasets # Variables # Clauses # Instances SAT/UNSAT
1 5 160 51 ∞ 0 uf50 50 218 1000 All SAT/UNSAT
2 10 140 76 ∞ 0 uf75 75 325 100 All SAT/UNSAT
3 8 200 101 ∞ 0 uf100 100 430 1000 All SAT/UNSAT
4 12 200 151 ∞ 0 uf150 150 645 100 All SAT/UNSAT
5 17 200 200 ∞ 0 uf200 200 860 100 All SAT/UNSAT
6 6 160 51 200 10 uf250 250 1065 100 All SAT/UNSAT
7 11 140 76 160 10
8 9 200 101 230 10
9 14 200 151 200 10 Table 8
10 18 200 200 200 10 Control parameter values.
11 7 200 121 ∞ 0 Control parameter Value
12 10 200 101 ∞ 0
13 11 200 121 720 50 Population size 1024
14 11 200 101 1040 90 Initial length of chromosome 60
Maximum number of wraps 5
Crossover rate 0.9
Table 6 Mutation rate 0.01
Golden dataset. Reproduction rate 0.1
Tournament size 7
Datasets Vehicles Capacity Customers Max. length Service time
Number of Generations 50
1 10 550 240 650 0
2 10 700 320 900 0
3 10 900 400 1200 0
4 12 1000 480 1600 0
by the heuristics, (b) the average number of flips that were needed to
5 5 900 200 1800 0
6 8 900 280 1500 0
solve the instances.
7 9 900 360 1300 0
8 11 900 440 1200 0 4.2. Initial solutions
9 14 1000 255 ∞ 0
10 16 1000 323 ∞ 0 The initial solutions for the examination timetabling and capaci-
11 18 1000 399 ∞ 0
tated vehicle routing problems were constructed using the same con-
12 19 1000 482 ∞ 0
13 27 1000 252 ∞ 0 structive heuristics as in our previous work. These heuristics included
14 30 1000 320 ∞ 0 the largest degree (LD), saturation degree(SD) and largest enrollment
15 34 1000 396 ∞ 0 degree (LED) heuristics (Qu et al., 2009). The heuristics were applied
16 38 1000 480 ∞ 0 hierarchically with the SD heuristic applied first. In the case of ties
17 22 200 240 ∞ 0
18 22 200 300 ∞ 0
with the SD, the LD heuristic was applied to resolve them. If there
19 33 200 360 ∞ 0 were further ties with the LD heuristic, the LED heuristic was applied
20 41 200 420 ∞ 0 to resolve them. The Clark Wright savings algorithm (Clarke & Wright,
1964) was used to construct initial solutions for the two vehicle routing
problems. For the SAT problems, the initial solutions were randomly
constructed. This involved assigning random boolean values to the
• The vehicle starts and ends at the depot after making all the variables in the boolean expression.
deliveries. All the solutions produced during the initial population generation
• The total demand for each route must not exceed the vehicle and regeneration were checked for feasibility. If the solution produced
capacity. was not feasible, the heuristic producing the invalid solution was not
• A customer must be visited only once by exactly one vehicle in considered and another heuristic was selected to be applied.
the route.
• The duration of each route must not exceed a global upper bound. 4.3. GE parameters
The specifications for the Christofides and the Golden benchmark
sets are presented in Tables 5 and 6 respectively. In these problems, The values for the control parameters used to run the proposed GE
the objective value was calculated as the total sum of the cost of all the approach were empirically determined by performing trial runs and
routes. The cost of each route was taken to be the sum of the distances carefully adapting the default parameters provided in the ECJ toolkit.
between customers. The adapted values are listed in Table 8.

4.1.3. Boolean satisfiability problem 4.4. Experiments


The satisfiability problem is the problem of determining whether an
assignment of values to variables for a given boolean expression exists The GE approach was implemented as an offline learning technique
such that the expression evaluates to true (Cook, 1971). The expression and therefore the experiments were divided into training and testing
is represented as a conjunction of clauses. Each clause is a disjunction of phases. For the examination timetabling and vehicle routing problems,
variables. The expression is satisfiable if an assignment of values for the 50% of the instances were used for training and the remaining 50%
variables exists, otherwise it is not. Our approach was tested on some for testing. For the 3-SAT problems, the 50 and 150 variable instances
uniform random 3-SAT benchmark sets from the well-known SatLib4 were used for training and the 75, 100, 200, 250 variable instances
library. The specifications for the benchmark sets are shown in Table 7. were used for testing.
We used two performance measures to determine the fitness of the
evolved heuristics. These were: (a) the number of SAT instances solved 4.4.1. Training phase
In the training phase, the system was used to search for high quality
heuristics based on the fitness function described in Section 3.5. The
4
The benchmarks are available from http://www.cs.ubc.ca/~{hoos}/ experiments were repeated 50 times with a new training set generated
SATLIB/benchm.html. for each run. The 5 best heuristics were selected for testing.

8
G. Mweshi and N. Pillay Expert Systems With Applications 165 (2021) 113853

4.4.2. Testing phase Table 9


GE(Current) vs GE(Previous) performance on ITC 2007 ETP benchmark set.
The testing phase executed the five best heuristics found in the
Instance GE(Current) GE(Previous) Improvement (%)
training phase on the test instances. Three sets of experiments were
conducted in order to investigate the following questions: Best Average Best Average Average
1 4901 5785 8795 9452 38.80
• Does the new approach perform better than the previous ap- 2 476 592 965 1485 60.13
proach? 3 9064 10064 9320 11963 15.87
• How does the new approach compare to other existing hyper- 4 16432 17922 17050 19142 6.37
5 3432 4120 4010 5697 27.68
heuristic approaches?
6 26577 27692 27125 29953 7.55
• How does the new approach compare to the best known solu- 7 5434 7080 6535 9750 27.38
tions? 8 7820 9640 9850 13965 30.97
9 1140 1229 1492 1636 24.88
The experiments were repeated 50 times with a new testing set gener- 10 20958 27534 28420 30078 8.46
ated for each run. The results for the best performing heuristic as well 11 39420 46108 45958 48653 5.23
as the average results for the ensemble were captured and are reported 12 6354 7842 7450 9350 16.13

in Section 5. The improvement percentage is calculated using the average values. The best values
The SAT problems were not investigated in our previous work and are shown in bold.

therefore only the last two questions were investigated.


Table 10
GE(Current) vs GE(Previous) performance on CVRP Christofides benchmark set.
4.4.3. Stopping criteria
Instance GE(Current) GE(Previous) Improvement (%)
For the examination timetabling problem (ITC 2007 benchmark
Best Average Best Average Average
sets), we used the benchmark tool (available from the ITC 2007 site)
to determine the computational time required to find a solution using 1 524.61 524.61 525.78 540.30 2,90
2 839.52 839.52 850.62 869.23 3,42
our machine. Although the focus of our work was not to design the best
3 844.72 844.72 864.74 866.2 2,48
algorithm in terms of run times, we nevertheless used the benchmark 4 1044.28 1044.28 1152.63 1154.36 9,54
program. The maximum runtime was fixed at 300 s based on the 5 1318.25 1334.08 1403.85 1403.31 4,93
benchmark program. For the vehicle routing problem, the stopping 6 555.43 555.43 575.54 577.42 3,81
7 913.22 924 1000.41 1000.71 7,67
criteria was 20 consecutive iterations of non-improvement after 30 non-
8 868.35 877.40 1010.58 1011.18 13,23
improving steps. We felt this was enough time to determine that the 9 1172.74 1179.27 1247.35 1248.16 5,52
solution quality will not improve. For the SAT problem, the algorithm 10 1404.30 1414.10 1503.14 1504.17 5,99
was terminated if a solution was found or if a predetermined set 11 1042.87 1043.51 1063.25 1064.03 1,93
number of flips was reached. We set the maximum number of flips to 12 831.29 832.44 870.74 870.98 4,42
13 1556.94 1567.77 1590.02 1590.40 1,42
300 000 (Bader-El-Den & Poli, 2007).
14 869.04 869.90 870.19 870.19 0,03

The improvement percentage is calculated using the average values. The best values
4.5. Technical specifications are shown in bold.

The approach was implemented in Java using the grammatical


Table 11
evolution implementation in the ECJ toolkit. All the experiments were GE(Current) vs GE(Previous) performance on CVRP Golden benchmark set.
run on a computer with an intel core i7 CPU, 2.3 GHz with 8gb RAM Instance GE(Current) GE(Previous) Improvement (%)
and running windows 10 64 bit. Best Average Best Average Average
1 5761.06 5780,56 6840.50 6851,81 15,63
5. Results and discussion 2 8601.05 8644,89 11750.65 11755,68 26,46
3 11307.28 11418,61 15220.02 15280,1 25,27
This section presents and discusses the results obtained after apply- 4 14007.31 14055,89 18010.50 18115,53 22,41
5 6707.84 6752,31 9650.50 9686,72 30,29
ing the new approach to solve the examination timetabling, boolean
6 8700.49 8741,68 11645.30 11829,88 26,11
satisfiability and capacitated vehicle routing problems. A number of 7 10253.17 10301,67 17565.70 17794 42,11
experiments were carried out and each experiment was aimed at testing 8 11754.68 11908,78 15200.10 15463,61 22,99
a hypothesis. The results of the experiments are discussed below. 9 584.3 599,08 610.45 622,64 3,78
Hypothesis H1: The perturbative heuristics evolved in this work 10 740.34 782,08 795.20 798,37 2,04
11 921.22 941,85 950.90 963,16 2,21
produce better solutions than the heuristics in the previous GE ap- 12 1114.13 1145,86 1590.74 1599,2 28,35
proach. 13 858.5 862,16 870.65 879,81 2,01
In these experiments, we compared the results obtained by the 14 1090.19 1196,21 1400.10 1465,99 18,40
heuristics generated in this work to those obtained in our previous 15 1352.17 1399,41 1450.90 1458,95 4,08
16 1641.18 1693,70 2195.45 2204,99 23,19
work. The best and average results for the two approaches are pre-
17 707.28 719,93 750.26 761,78 5,49
sented in Tables 9–11. The GE(Previous) column shows the best 18 1001.66 1018,81 1085.40 1085,95 6,18
and average results obtained by the heuristics evolved in our previ- 19 1369.19 1398,15 1500.50 1593,6 12,26
ous work and the GE(Current) column shows the best and average 20 1822.65 1868,74 1969.40 1987,07 5,95
results obtained by heuristics evolved in this study. The improvement The improvement percentage is calculated using the average values. The best values
percentage shows the average differences in performance between our are shown in bold.
two approaches.
The paired Wilcoxon signed rank test with a 95% confidence level
was used to compare the results obtained by the two approaches. For Hypothesis H2: The results obtained in this study are compet-
all thirty pairs, the p-values were less than 0.01 indicating that there itive with other hyper-heuristic approaches that evolve perturbative
was not sufficient evidence to accept the null hypothesis. We there- heuristics
fore accepted the alternative hypothesis i.e. GE(Current) outperforms This set of experiments compared the results obtained by the per-
GE(Previous). turbative heuristics generated in this work to those obtained by the

9
G. Mweshi and N. Pillay Expert Systems With Applications 165 (2021) 113853

Table 12
GE(Current) vs other HHs performance on ETP benchmark set.
Instance GE(Current) Sabar et al. (2013) Swan et al. (2012) Burke et al. (2010b) Anwar et al. (2013)
1 4901 4362 5875 6235 11823
2 476 380 893 2974 976
3 9064 8991 13352 15832 26770
4 16432 15094 24174 35106 –
5 3432 2912 4734 4873 6772
6 26577 25735 27510 31756 30980
7 5434 4025 5731 11562 11762
8 7820 7452 9507 20994 16286
9 1140 1111 – – –
10 17958 14825 – – –
11 32420 28891 – – –
12 6354 6181 – – –

The comparison is between the best values obtained for each approach. The overall best values are shown in bold. ‘‘–’’ indicates that the values
were not provided or a feasible solution was not obtained.

Table 13
GE(Current) vs other HHs for CVRP (Christofides instances).
Instance GE(Current) Sabar et al. (2013) Garrido and Castro (2009) Meignan et al. (2010)
1 0.00 0.00 0.00 0.00
2 0.51 0.00 0.05 0.62
3 2.25 0.00 0.21 0.42
4 1.54 0.11 0.52 2.05
5 2.08 1.33 2.05 5.07
6 0.00 0.00 0.00 –
7 0.39 0.00 0.09 –
8 0.28 0.00 0.00 –
9 0.81 0.20 0.70 –
10 0.60 0.53 1.24 –
11 0.07 0.00 0.88 0.00
12 1.43 0.00 0.00 –
13 1.03 1.90 1.00 0.00
14 0.31 0.00 0.00 –

The values represent the percentage deviation from the best known results in the literature. The best values obtained are shown in bold. ‘‘–’’
indicates that the values were not provided or a feasible solution was not obtained.

Table 14
GE(Current) vs other HHs for CVRP (Golden instances).
Instance GE(Current) Sabar et al. (2013) Pisinger and Ropke (2007)
1 5760.12 5626.81 5650,91
2 8601.32 8446.19 8469,32
3 11445.74 11081.60 11047,01
4 14052.30 13658.84 13635,31
5 6742.52 6460.98 6466,68
6 8765.85 8462.10 8416,13
7 10321.08 10202.24 10181,75
8 11823.40 11690.82 11713,62
9 585.14 583.39 585,14
10 741.56 740.91 748,89
11 923.86 919.80 922,7
12 1116.64 1111.43 1119,06
13 859.11 857.19 864,68
14 1095.32 1083.59 1095,4
15 1356.65 1350.17 1359,94
16 1677.12 1631.91 1639,11
17 710.54 707.76 708,9
18 1001.16 1003.43 1002,42
19 1370.40 1368.12 1374,24
20 1838.20 1820.09 1830,8

The comparison is between the best values obtained for each approach. The overall best values are shown in bold.

perturbative heuristics generated by other hyper-heuristic methods in Table 15


Acronyms of the hyper-heuristic methods compared for the SAT problem.
the literature. Here, we note that since there has not been much
Symbols References
work done in the area of generation perturbative hyper-heuristics, the
results shown here include those obtained by selection perturbative HH1 Bader-El-Den and Poli (2007)
HH2 Fukunaga (2008)
hyper-heuristics. Selection perturbative hyper-heuristics simply select
the most appropriate perturbative heuristic, from those available to the
hyper-heuristic, to apply at each point of improvement to an existing
initial solution to a problem (Pillay & Qu, 2018). percentage of successful runs where a solution is found within the
For the SAT problem, the success rate (SR) and the average num- specified maximum number of flips.
ber of flips (AF) are used as performance measures. The SR is the The results for these experiments are given in Tables 12–14 and 16

10
G. Mweshi and N. Pillay Expert Systems With Applications 165 (2021) 113853

Table 16
GE(Current) vs other HHs performance on 3-SAT benchmark sets.
uf75 uf100 uf200 uf250
SR AF SR AF SR AF SR AF
GE(Current) 100 2450 96.27 1568 94.04 14230 96.19 25410
HH1 95 26571 92 54,257 – – – –
HH2 – – 100 1455 98.24 19298 98.57 27148

The comparison is between the best values obtained for each approach. The overall best values are shown in bold. ‘‘–’’
indicates that the values were not provided or a feasible solution was not obtained. SR = success rate (%),AF = average
number of flips to solution.

Table 17 Table 19
GE(Current) vs best known results for ETP (ITC 2007 instances). GE(Current) vs best known results for CVRP (Golden instances).
Instance GE(Current) Best known 𝛥 (%) Instance GE(Current) Best known 𝛥 (%)
1 4901 4362 12.35 1 5760.12 5626.81 2.36
2 476 380 25.26 2 8601.32 8431.66 2.01
3 9064 8991 0.81 3 11445.7 11036.22 3.71
4 16432 15094 8.86 4 14052.3 13592.88 3.37
5 3432 2912 17.85 5 6742.52 6460.98 4.35
6 26577 25735 3.27 6 8765.85 8404.26 4.30
7 5434 4025 35.00 7 10321.1 10156.58 1.62
8 7820 7452 4.93 8 11823.4 11663.55 1.37
9 1141 1089 4.77 9 585.14 580.42 0.81
10 17958 14825 21.13 10 741.56 738.49 0.41
11 32420 28891 12.21 11 923.86 914.72 0.99
12 6354 5464 16.29 12 1116.64 1106.76 0.89
13 859.11 857.19 0.22
The comparison is between our current best results and the best known results for each
14 1095.32 1080.55 1.36
instance in the literature. The better results are shown in bold.
15 1356.65 1342.53 1.05
16 1677.12 1620.85 3.47
Table 18 17 710.54 666.84 6.55
GE(Current) vs best known results for CVRP (Christofides instances). 18 1001.16 973.60 2.83
Instance GE(Current) Best known 𝛥 (%) 19 1370.4 1338.74 2.36
20 1838.2 1820 0.99
1 524.61 524.61 0.00
2 839.52 835.26 0.51 The comparison is between our current best results and the best known results for each
3 844.72 826.14 2.24 instance in the literature. The better results are shown in bold.
4 1044.28 1028.42 1.54
5 1318.25 1291.29 2.08
6 555.43 555.43 0.00
7 913.22 909.68 0.39 heuristics produced different results when applied to the testing in-
8 868.35 865.94 0.28 stances. The results for HH2 presented here are those obtained by the
9 1172.74 1162.55 0.81 best perturbative heuristic evolved by the approach.
10 1404.3 1395.85 0.60
11 1042.87 1042.11 0.07 Hypothesis H3: The results obtained in this study are competitive
12 831.29 819.56 1.43 with the best known results
13 1556.94 1541.14 1.03
In this experiment, we compare the performance of the heuristics
14 869.04 866.37 0.31
generated in this work with the best known results for the benchmark
The comparison is between our current best results and the best known results for each
instance in the literature. The better results are shown in bold.
sets in the literature.
We have to mention here that although we do not expect hyper-
heuristic methods (such as ours) to produce better results than spe-
From the results presented in Tables 12–14, we can see that GE- cialized meta-heuristics, we nevertheless compare our results to the
HH by Sabar et al. (2013) produces the best results overall for both best known results for the benchmark sets in order to have a general
the examination timetabling and vehicle routing problem domains. Our indication of how well our approach performs. We therefore report
approach is not far off and it is also quite competitive when compared on the percentage deviation of our results from the best known value
to the other approaches. In fact, our best results are better than those found in the literature using the Eq. (1) below. The equation was taken
obtained by other generation perturbative hyper-heuristics apart from from Sabar et al. (2013).
GE-HH. We feel that GE-HH performs better due to its robust use 𝑏𝑒𝑠𝑡𝐺𝐸 − 𝑏𝑒𝑠𝑡∗
𝛥(%) = % (1)
of a wide variety of optimization techniques such as different move 𝑏𝑒𝑠𝑡∗
acceptance criteria as well as the online learning approach vis a vis an where best𝐺𝐸 is the best result obtained by our GE and best* is the best
adaptive memory. known value found in the literature. The results for the benchmark sets
In addition to the examination and vehicle routing problems, the are shown in Tables 17–20.
proposed GE approach was applied to the Boolean satisfiability (SAT) Although our approach does not produce the best results here, we
problem. Table 15 shows the hyper-heuristics that were considered in can see that it is generally not very far off. This performance can
the experiment while Table 16 shows the performance comparison of be attributed to the generality of the approach and the fact that the
the approaches on the SAT benchmark sets. evolved perturbative heuristics are applied as is (i.e. with no optimiza-
From Table 16, it can be seen that although GE(Current) performs tion techniques), unlike in the other methods. The results nevertheless
better than HH1 , it is outperformed by HH2 hyper-heuristics. This show that the approach is quite competitive and has the potential to
performance by GE(Current) can be attributed to the fact that HH2 produce even better results when used with optimization techniques as
evolved more than one perturbative heuristic and each of the evolved is traditionally done with perturbative heuristics.

11
G. Mweshi and N. Pillay Expert Systems With Applications 165 (2021) 113853

Table 20
Best known results vs GE(Current) for the 3-SAT benchmark sets.
uf75 uf100 uf200 uf250
SR AF SR AF SR AF SR AF
Best Known 100 26571 100 1455 98.24 19298 98.57 27148
GE(Current) 100 30450 96.27 1568 94.04 14230 96.19 25410
𝛥 0.00 – 3.73 – 4.2 – 2.38

The comparison is between the best values obtained by our approach and the best known results for the benchmark sets.
The overall best values are shown in bold. ‘‘–’’ indicates that the values were not provided or a feasible solution was not
obtained. SR = success rate (%), AF = average number of flips to solution. 𝛥 = difference between best know result and our
GE results.

6. Conclusion and future work Burke, E. K., Hyde, M., Kendall, G., Ochoa, G., Özcan, E., & Woodward, J. R. (2010).
A classification of hyper-heuristic approaches. In Handbook of metaheuristics (pp.
449–468). Springer, http://dx.doi.org/10.1007/978-1-4419-1665-5_15.
The paper presented an improved approach for automatically gener-
Burke, E., Kendall, G., Newall, J., Hart, E., Ross, P., & Schulenburg, S. (2003).
ating perturbative heuristics from scratch based on the novel approach Hyper-heuristics: An emerging direction in modern search technology. In Handbook
proposed in our previous work. As in our previous work, the per- of metaheuristics (pp. 457–474). Springer, http://dx.doi.org/10.1007/0-306-48056-
turbative heuristics were generated from a set of basic actions and 5_16.
components of the solution using grammatical evolution. This simple Burke, E. K., Qu, R., & Soghier, A. (2010). Adaptive selection of heuristics for improving
constructed exam timetables. In Proc. PATAT (pp. 136–151).
approach was extended in this study by redesigning the GE grammar Chakhlevitch, K., & Cowling, P. (2008). Hyperheuristics: recent developments. In
used in the prior work. The new grammar includes new solution Adaptive and multilevel metaheuristics (pp. 3–29). Springer, http://dx.doi.org/10.
component selection methods, extends the syntax of the basic actions, 1007/978-3-540-79438-7_1.
includes new move acceptance criteria and utilizes information from Clarke, G., & Wright, J. W. (1964). Scheduling of vehicles from a central depot to a
number of delivery points. Operations Research, 12(4), 568–581.
the solution space. In addition, reusable heuristics are generated rather
Cook, S. A. (1971). The complexity of theorem-proving procedures. In Proceedings of
than the disposable ones generated in the earlier work. Our simple the third annual ACM symposium on theory of computing (pp. 151–158). ACM.
approach is also flexible and can be applied to other problem domains Fukunaga, A. S. (2008). Automated discovery of local search heuristics for satisfiability
by simply specifying the solution components for the problem. testing. Evolutionary Computation, 16(1), 31–61. http://dx.doi.org/10.1162/evco.
The experimental results obtained in this study show a significant 2008.16.1.31.
Garrido, P., & Castro, C. (2009). Stable solving of cvrps using hyperheuristics. In
improvement in the quality of the evolved heuristics when compared Proceedings of the 11th annual conference on genetic and evolutionary computation
to the heuristics evolved in the previous study. Furthermore, when (pp. 255–262). ACM, http://dx.doi.org/10.1145/1569901.1569938.
compared to other generation perturbative hyper-heuristic methods, Koza, J. R., & Koza, J. R. (1992). Genetic programming: on the programming of computers
our approach produced better results except for the GE-HH by Sabar by means of natural selection (Vol. 1). MIT Press.
Meignan, D., Koukam, A., & Créput, J.-C. (2010). Coalition-based metaheuristic: a
et al. The good performance by GE-HH can be attributed to its use
self-adaptive metaheuristic using reinforcement learning and mimetism. Journal of
of various optimization techniques (i.e. move acceptance techniques) Heuristics, 16(6), 859–879. http://dx.doi.org/10.1007/s10732-009-9121-7.
as well as the online learning approach. When compared to the best Mweshi, G., & Pillay, N. (2019). A grammatical evolution approach for the auto-
known results, our results were not very far off and this demonstrates mated generation of perturbative heuristics. In 2019 IEEE congress on evolutionary
that despite being a simple approach, we were able to produce good computation (pp. 2642–2648). IEEE.
Nguyen, S., Zhang, M., & Johnston, M. (2011). A genetic programming based hyper-
quality perturbative heuristics that produced good quality solutions.
heuristic approach for combinatorial optimisation. In Proceedings of the 13th annual
Future work will examine the application of the approach to more conference on genetic and evolutionary computation (pp. 1299–1306). ACM.
problem domains and incorporating more optimization techniques dur- O’Neill, M., & Ryan, C. (2001). Grammatical evolution. IEEE Transactions on Evolutionary
ing problem solving. Computation, 5(4), 349–358. http://dx.doi.org/10.1109/4235.942529.
Ong, Y. S., & Keane, A. J. (2004). Meta-lamarckian learning in memetic algorithms.
IEEE Transactions on Evolutionary Computation, 8(2), 99–110. http://dx.doi.org/10.
CRediT authorship contribution statement 1109/TEVC.2003.819944.
Pillay, N., & Qu, R. (2018). Hyper-heuristics: Theory and applications. Springer, http:
George Mweshi: Software, Validation, Formal analysis, Investiga- //dx.doi.org/10.1007/978-3-319-96514-7.
tion, Data curation, Writing - original draft, Visualization. Nelishia Pil- Pisinger, D., & Ropke, S. (2007). A general heuristic for vehicle routing problems.
Computers & Operations Research, 34(8), 2403–2435. http://dx.doi.org/10.1016/j.
lay: Conceptualization, Methodology, Validation, Resources, Writing -
cor.2005.09.012.
review & editing. Qu, R., Burke, E. K., McCollum, B., Merlot, L. T., & Lee, S. Y. (2009). A survey of search
methodologies and automated system development for examination timetabling.
Declaration of competing interest Journal of Scheduling, 12(1), 55–89. http://dx.doi.org/10.1007/s10951-008-0077-5.
Ryan, C., O’Neill, M., & Collins, J. (2018). Handbook of grammatical evolution.
Springer, http://dx.doi.org/10.1007/978-3-319-78717-6.
The authors declare that they have no known competing finan- Sabar, N. R., Ayob, M., Kendall, G., & Qu, R. (2013). Grammatical evolution hyper-
cial interests or personal relationships that could have appeared to heuristic for combinatorial optimization problems. IEEE Transactions on Evolutionary
influence the work reported in this paper. Computation, 17(6), 840–861. http://dx.doi.org/10.1109/TEVC.2013.2281527.
Smith-Miles, K. A. (2009). Cross-disciplinary perspectives on meta-learning for al-
gorithm selection. ACM Computing Surveys, 41(1), 6. http://dx.doi.org/10.1145/
References
1456650.1456656.
Stone, C., Hart, E., & Paechter, B. (2018). On the synthesis of perturbative heuristics for
Anwar, K., Khader, A. T., Al-Betar, M. A., & Awadallah, M. A. (2013). Harmony search- multiple combinatorial optimisation domains. In International conference on parallel
based hyper-heuristic for examination timetabling. In 2013 IEEE 9th international problem solving from nature (pp. 170–182). Springer.
colloquium on signal processing and its applications (pp. 176–181). IEEE, http://dx. Swan, J., Ozcan, E., & Kendall, G. (2012). Co-evolving add and delete heuristics. In
doi.org/10.1109/CSPA.2013.6530037. Proceedings of the ninth international conference on the practice and theory of automated
Bader-El-Den, M., & Poli, R. (2007). Generating SAT local-search heuristics using a GP timetabling (pp. 395–399).
hyper-heuristic framework. In International conference on artificial evolution (evolution
artificielle) (pp. 37–49). Springer, http://dx.doi.org/10.1007/978-3-540-79305-2_4.
Burke, E. K., Hyde, M. R., & Kendall, G. (2012). Grammatical evolution of local
search heuristics. IEEE Transactions on Evolutionary Computation, 16(3), 406–417.
http://dx.doi.org/10.1109/TEVC.2011.2160401.

12

You might also like