Abstract
One of the drawbacks of glowworm swarm optimisation (GSO) is its premature convergence, which leaves it often ineffective for solving complex practical problems. This paper proposes a new hybrid metaheuristic algorithm, that is, moth-flame glowworm swarm optimisation (MFGSO). The main idea of the hybrid algorithm is to combine the exploration ability in moth-flame optimisation (MFO) with the exploitation ability in GSO. Performance evaluations are conducted on benchmarking test functions in comparison with the basic GSO and other metaheuristic algorithms. The results show that MFGSO outperforms the basic GSO and other metaheuristic algorithms on most test functions in terms of local optima avoidance and convergence speed.
Keywords
Introduction
Metaheuristic algorithms generally fall into two categories, namely (i) individual-based metaheuristics (IBM), which modify and improve a single candidate solution, e.g., simulated annealing (SA) [17], and (ii) population-based metaheuristics (PBM), which improve multiple candidate solutions and use population characteristics to guide the search, e.g., ant colony optimisation (ACO) [9], particle swarm optimisation (PSO) [16] and genetic algorithm (GA) [13]. Based on process strategies, PBM can be further classified into (i) PBM with reproductive strategies, which reproduce new solutions or generations, e.g., GA and (ii) PBM with non-reproductive strategies, e.g., biogeography-based optimisation (BBO) [30, 3].
In solving real-world problems, metaheuristics algorithms often trap in local minima, which could prevent an algorithm from moving toward the global solution. Recently, it has been shown that hybrid metaheuristic algorithms have the potential to overcome these challenges.
Glowworm swarm optimisation (GSO) algorithm was introduced by Krishnan and Ghose in 2006 [18]. It is inspired by the social behaviour of glowworm that a swarm of glowworms move through problem space and communicate with each other in order to determine a search direction. GSO algorithm is a population-based algorithm. As control is not centralised at a single point, thus it is more scalable. It has been successfully applied to solve many optimisation problems such as multimodal optimisation problems [18], clustering [14, 6], resources scheduling [2, 4] and optimising weights and biases of multilayer percepptron (MLP) [5] However, GSO algorithm has some limitations that it is often unable to explore the space quickly and effectively.
On the other hand, moth-flame optimisation (MFO) was introduced by Mirjalili in 2015 [21] as a population-based metaheuristic algorithm. MFO algorithm has the ability to find competitive results compared with other metaheuristic algorithms such as GA and PSO. MFO’s strengths are in two folds. Firstly, the exploration of MFO algorithm is strong, resulting in effective avoidance of local optima. Secondly, the exploitation is simple and effective in finding the near optimal solution when solving real problems [21].
There are two important mechanisms of metaheuristics algorithms, exploration and exploitation. Exploration refers to the process of searching new solution regions in the problem space, while exploitation refers to the process of searching in the neighbourhood of the so far found solutions. The primary principle of a metaheuristic algorithm is to efficiently balance the exploration and exploitation so as to find the global optimum quickly and efficiently. Hybridising metaheuristic algorithms is one way to balance the exploration and exploitation abilities. The aim of hybrid metaheuristic algorithms is to improve the convergence speed and to avoid local optima. Hybrid algorithms can be devised by combining one metaheuristic with another, e.g., chaos theory, levy flights strategy or genetic operators such as crossover and mutation.
In this paper we will propose a new hybrid metaheuristic algorithm, called moth-flame glowworm swarm optimisation (MFGSO), to improve the performance of the basic GSO. The fundamental idea of our proposed hybrid algorithm is that to update glowworm position according to the best position explored in MFO algorithm.
The remainder of this paper is arranged as follows. Section 2 presents literature review on existing hybrid metaheuristic algorithms. Section 3 presents our proposed hybrid algorithm MFGSO. Performance evaluations are conducted in section 4. Finally, Section 5 draws conclusion and sets out the future work.
Literature review
There are several hybridisation methods for metaheuristic algorithms. Generally, algorithms may be hybridised in exploration phase, in exploitation phase, or to tune parameters of another algorithm.
Hybrid metaheuristic algorithms
There are a number of hybrid metaheuristic algorithms. In this paper, we focus on hybridisation of metaheuristic algorithms for improving exploration or exploitation of an algorithm. Summary of existing hybrid metaheuristic algorithms is tabulated in Table 1.
Harmony search has proved efficiency when using with different algorithms. A harmony search hybrid with firefly algorithm (FF) is proposed in [12], in which harmony search is used for the exploration and FF for the exploitation. Harmony search serving as a mutation operator during the process of the bat updating with the aim of speeding up convergence in [35]. The harmony search operator is added to the cuckoo updating in [34] so as to speed up convergence of cuckoo search algorithm and in [36] to improve the BBO algorithm.
Moreover, basic population-based incremental learning (PBIL) can exploit the solution quickly while it explores space poorly. Hence, a hybrid algorithm by integrating krill updating operator and probability updating operator together with krill herd method is proposed to solve optimisation problems in [33].
PSO has good ability for exploitation. PSO is widely combined with other algorithms in order to improve the performance of algorithms. In [15], GA and PSO are combined to solve global optimisation of multimodal functions. The hybrid algorithm creates individuals in a new generation by crossover and mutation operations from GA and mechanisms of PSO. Another PSO hybrid with GA is proposed in [19, 10]. In [10], PSO is incorporated with mutation operator from GA to solve the stagnation problem and to prevent the particles from being trapped in local minima. PSO hybrid with differential evolution (DE) was proposed in [25], which is based on two populations. One population is enhanced by PSO and the other population is evolved by DE. The interplay between the two populations influences the balance between exploration and exploitation and can reduce the chance of being trapped in local sub-optima. PSO is combined with gravitational search algorithm (GSA) in [22], the ability of exploitation in PSO is combined with the ability of exploration in GSA to improve the convergence speed and avoid local optima. In addition, a binary version of this hybrid algorithm is also proposed in [24] to solve optimisation problems which have binary parameters. In [42], a new hybrid algorithm combined artificial fish swarm (AFS) algorithm and PSO. This algorithm has the advantages of both AFS and PSO. Exploring the problem space is with AFS while searching exact solution with PSO. Recently, PSO is combined with MFO in [7]. PSO is used for exploitation and MFO for exploration. Position and velocity of particle are updated based on moth and flame position in each iteration.
Hill-climbing is added to GA for solving global optimisation problems in [28]. In [8], a hybrid optimisation algorithms of ACO and GA is proposed. GA is used for exploring the search space while ACO for exploitation.
In [1], a hybrid evolutionary FF is proposed. It combines the basic FF with the evolutionary operations of DE method to improve the searching accuracy and information sharing among the fireflies.
Summary of existing hybrid metaheuristic algorithms
Summary of existing hybrid metaheuristic algorithms
In basic GSO algorithm, the swarm is divided into sub-swarms in a dynamic manner and the movement of glowworms is dependent only on local information in each iteration. However, later in the search process, it is easy to fall into local optima, and difficult to jump out even on repeated iterations, which causes slow convergence, low precision and poor performance in high-dimensional problems. In order to address this issue, a number of hybrid GSO algorithms are proposed. Summary of existing hybrid GSO algorithms is tabulated in Table 2.
Summary of existing hybrid GSO algorithms
Summary of existing hybrid GSO algorithms
PSO is combined with GSO in [29] to balance the diversity and convergence. In hybrid ensemble PSO-GSO algorithm (HEPGO), the PSO or GSO is called depending on a selection probability. And in the early stage, in order to ensure the convergence, PSO is called frequently. And after evolution finished, the whole swarm is combined using ensemble learning. The hybrid algorithm outperforms many versions of PSO.
In the movement phase of basic GSO, each glowworm selects probabilistically a neighbour that glow brighter and moves a step that a fix size step multiplied by the distance between the neighbours. To improve the procedure of the movement in GSO, the movement formula in the basic GSO was replaced with formulas from other algorithms in [38]. The new movement formulas, inspired by artificial bee colony (ABC) and PSO algorithms, are proposed. It’s showed that the proposed algorithm with PSO movement formula can find better solutions compared to basic GSO, proposed algorithm with ABC movement formula and other algorithms. However, the proposed algorithm only use a part from ABC and PSO which is the movement formula. In addition, the algorithm calls each formula when needed.
However, some researches aimed to overcome the local optimal trappings of GSO by adding local search. In [20], a hybrid algorithm of GSO and AFS, called GSO-FS, is proposed to overcome the local optimal trappings of GSO. In this algorithm, GSO implements local search and then AFS algorithm carries out exact solution and captures the global optimisation. It was demonstrated that the performance of GSO-FS algorithm is better than the basic GSO and AFS algorithms.
Yang and Zhou [40] proposed a hybrid artificial GSO (AGSO) algorithm for solving a system of non-linear equations in which the Hooke-Jeeves pattern search works as a local search operator. The AGSO algorithm showed high convergence and accuracy.
GSO with chaotic local search (CLS-GSO) is proposed in [43]. In CLS-GSO, chaos method as a local search operator is embedded into GSO, that is to say, during the course of each iteration, GSO implements the global search, then chaos method implements the local search. Simulation results showed that CLS-GSO outperformed GSO in terms of efficiency, precision, success rate of convergence and reliability.
Qu et al. [27] proposed a GSO algorithm hybrid with simplex search method for solving a system of non-linear equations. In this algorithm, simplex search method is applied as a local search operator, on those glowworms that have no neighbours. So, if a glowworm has neighbours, it moves to its one neighbour with a probability, if it has not neighbours, this shows it is local optimum. Its quality is better and can be used as the initial point of simplex search method. The hybrid algorithm improved the convergence rate, high accuracy, and robustness.
In [26], Ouyang et al. proposed a hybrid algorithm using the Broyde-Fletcher-Goldfarb-Shanno (BFGS) algorithm and GSO. BFGS is a quasi-newton method and is used as a local operator whereas GSO is used to search globally in the BFGS-GSO algorithm. It’s showed that BFGS-GSO is feasible and effective in solving multi-extremum global optimisation.
Zhou et al. [44] proposed a hybrid GSO to solve constrained problems by embedding predatory behaviour of the AFS algorithm into GSO. This algorithm avoids the situation in which glowworms have empty neighbour sets. The glowworm whose neighbours set is empty, is only allowed to predatory in the area determined by the dynamic decision, then the result of the previous predatory determines the next state. Moreover, to escape from the local optimum, the local search strategy based on SA is applied to the best solution of the population of each generation. It’s showed that the algorithm has faster convergence speed and high computational precision as compared to other algorithms.
One significant finding of the literature review is that some of the existing optimisation algorithms suffer from premature convergence, lack in finding global optimised solution and struck into local optima. Moreover, no algorithm can provide optimal solution for all types of problems according to Wolpert and Macready’s no free lunch (NFL) theorem [37]. This theorem encourages researchers to develop new algorithms or improve the existing ones.
Hybrid GSO algorithms in the literature improved the performance of the basic GSO by adding another algorithm as a local search such as AFS [20], Hooke-Jeeves [40], chaotic local search [43], simplex search [27], BFGS [26] and SA [44]. So, the GSO algorithm carries out the global initial search while the local search carries out the exact solution. However, GSO has some drawbacks. It highly depends on initial solutions. Initialisation process of GSO is random. Although random initialisation can guarantee the initial solutions distributed evenly in the solution space, the quality of solutions are unreliable, because some solutions apart from the global optimum. If the initial solutions are distributed evenly and also high-quality, it will contribute to the quality and efficiency of solutions, and prevent algorithm to be prematurely trapped in local optima in a certain extent.
To address this problem, this paper aims to improve the performance of GSO by combining the ability of exploration in MFO with the ability of exploitation in GSO, to benefit from both algorithms. MFO carries out the global search, while GSO carries out the local search in the satisfactory solution domains that are obtained by MFO, which makes the algorithm can obtain high-quality and evenly distributed initial solutions. MFGSO outperforms the basic GSO algorithm and most of metaheuristic algorithms on most test functions, which means that improving the exploration of GSO can give superior results in terms of local optima avoidance, convergence speed and stability.
However, in contrast to [38, 27, 44], MFGSO is not designed to improve the situation in which glowworms have no neighbour sets, which is the default situation of the basic GSO algorithm. In MFGSO, a random glowworm is generated when there is no neighbours.
Proposed hybrid metaheuristic algorithm
Exploration is the ability of an algorithm to explore the search space whereas exploitation is the ability of the algorithm to exploit the best solution. The main aim of hybridising algorithms is to reduce the probability of being trapped in local optimum and speed up convergence, thus improving the performance of algorithm to solve a wide range of real-world problems. The basic GSO algorithm may get trapped into some local optima and it is often unable to explore the space efficiently and cannot perform global search efficiently as well. Moreover, the search by GSO depends on random moves, so a fast convergence cannot be guaranteed. In order to increase the diversity of the GSO population and therefore to avoid being trapped into local optima, MFO is incorporated as a mutation operator into the GSO with the aim of speeding up the convergence.
Schematic of MFGSO.
The basic idea of our proposed hybrid metaheuristic algorithm – moth-flame glowworm swarm optimisation (MFGSO) is to take advantage of the exploration and exploitation abilities of MFO and GSO. MFO is used for exploration as it uses logarithmic spiral function so it covers larger area in search space, whereas GSO is used for exploitation. The working principle of the proposed MFGSO is illustrated in Fig. 1. Position of glowworms that is responsible for finding the optimum solution is replaced by the best position generated from MFO algorithm which is highly efficient to direct the glowworms faster toward optimal value. Hence, best features, namely exploration by MFO and exploitation by GSO are combined to obtain best possible optimal solution and also avoid being trapped in local optima.
The hybridisation of GSO with MFO is a high-level, relay, heterogeneous hybrid method. According to [32], the hybrid is high-level because the two metaheuristics are self-contained. It is relay in that one metaheuristic is applied after another, each using the output of the preceding as its input. It is heterogeneous in that the two algorithms for the hybrid are different.
The MFGSO algorithm can be formulated as in Algorithm 1. The process of MFGSO algorithm as follows:
Phase 1: Initialisation phase (lines 1–5), initialise the population size
Phase 2: Exploration by MFO algorithm, the moths
Phase 3: Exploitation by GSO algorithm (lines 26–35), the current optimal position obtained from MFO,
Phase 4: Termination, when MFGSO algorithm reaches the maximum iterations, the optimal position searching by MFGSO algorithm is obtained and the algorithm exits (line 37). Otherwise, go to (line 11).
In MFO algorithm, the moths are considered as the candidate solutions and their position is considered as a vector of decision variables. Flames are the best positions of moths that are obtained so far by the moth. Therefore, each moth searches around a flame and updates it in case of finding a better solution.
In the initialisation phase of MFO algorithm, moths are randomly initialised. Also, flames are initialised randomly and then they are sorted based on its fitness function not based on the fittest moth and then saved in the flame matrix.
A moth represents a position in the problem’s search space, that is for
where
In order to set the population of MFO algorithm, the set of moths
where
Likewise, a flame represents a (better) position in the problem’s search space, that is for
At the initialisation, since each moth flies around its corresponding flame, therefore, the flame matrix
where
At initialisation, a random population of moths
The position of each individual moth in the population is initialised using:
The position of each individual flame in the population is initialised using:
where
For all moths, assume there is an array for storing the corresponding objective function (fitness) value of the moths.
where fit denotes the fitness function.
Moreover, assume that there is an array for storing the corresponding fitness value of the flames.
Moths and flames are sorted with their fitness values in order from best to worst.
Each moth
The movements of moths and flames are the essential function that determines how the moths move around the search space. Moth’s and flame’s movements are iteratively updated until the termination condition is satisfied. For each iteration, update the position and fitness of moths and flames. Moths update their positions in hyper spheres around the best solutions obtained so far. The sequence of flames is changed based on the best solutions in each iteration, and the moths are required to update their positions with respect to the updated flames. The logarithmic spiral function is chosen as the main updating mechanism of the position of each moth with respect to the flame (lines 17–24).
The flames are used to update the position of moths in two cases. Firstly, when the number of moths is lower than the number of flames (line 21), the position of moths is updated with respect to its corresponding flame (line 22). The first moth always updates its position with respect to the best flame, whereas the last moth updates its position with respect to the worst flame in the list.
However, when the number of moths is higher than the number of flames (line 23), the position of moths is updated with respect to the last flame (line 24) as below.
where
where
Then, the moth
For each
The operations of
To allow for much exploitation of the best promising solutions, the number of flames to be followed is adaptively decreased over iterations (line 11) as below.
where
After moving the best positions of moths around the flames, the moved moths, from Eq. (12), are passed forward as initial positions
The set of glowworms is denoted as a matrix, i.e.,
where
Therefore, the luciferin values of glowworms are updated according to the objective function values. A higher luciferin value means a better result. Also, the luciferin value decreases along the time to simulate the decay. Then, a glowworm chooses to move toward one of its neighbours
where
For each glowworm, the probability about the glowworm’s movement direction toward the neighbour with a higher luciferin value (lines 30–31) is calculated as below.
where
Glowworm
where
The position of the glowworm is changed based on the position of the selected glowworm
where
Finally, the local radial range
where max_radius is the maximum range,
After moving the glowworms, the moved glowworms, from Eq. (20), are passed back to the moths for the next iteration (line 35), that is,
When the maximum number of iterations reached, the best solution of MFGSO algorithm is returned (line 37). Otherwise, return to initialise MFO algorithm (line 11).
Experiments are conducted to compare the proposed hybrid algorithm MFGSO to the basic GSO, MFO and four other metaheuristic algorithms namely, GA [13], DE [31], multi-verse optimiser (MVO) [23] and FF [39].
GA and DE are the most popular algorithms. MVO is one of the recent algorithms developed in 2016. FF follows a similar logic as GSO with some variations. The similarities are that the attractiveness of each firefly is proportional to its brightness and the brightness of the glow of each firefly is determined by the landscape of the objective function. However, the FF algorithm has two variations. In GSO, the attractiveness of each glowworm is constant within a fixed sensor range and zero beyond the range, while the attractiveness of each firefly in FF exponentially decays with distance. The second variation is the addition of a small randomisation into the movement update of each firefly.
The maximum iteration times is set as
Parameter settings of the algorithms
Parameter settings of the algorithms
Most metaheuristic algorithms have some parameters that can affect their performance. In general, the problem of optimising these parameters is outside the scope of this paper. However, in the experiments we follow the recommended value of parameters for all algorithm as presented in Table 3 [13, 31, 39, 23, 18].
To test the performance of the proposed hybrid algorithm MFGSO, a set of 20 test functions is used. These test functions are generally used to evaluate the performance of algorithms. Table 4 presents formulation, properties, dimension
Test functions
For the performance evaluations, all algorithms are implemented in Python. We implement MFO, MVO and FF algorithms from EvoloPy open source [11]. Each experiment is repeated for
For each test function, we calculate the averaged fitness values (average best function values found in the last iteration) over the experimental results from the
Results on unimodal functions (
Results on multimodal functions (
To plot the convergence curve, we record
where
Otherwise, for comparisons amongst the algorithms, we are only interested in the
The
Results on multimodal functions (
The results of unimodal test functions are presented in Table 5. The unimodal test functions are useful to examine exploitation of the algorithms. For unimodal functions (
The rest of functions, (
For the average best of 20 runs, MFGSO reaches global minima on nine test functions, i.e.,
Statistically speaking, for the best average over 20 runs on 20 test functions, GA has the best results on 11 functions (
Figures 2(a)–(t) and 3(a)–(t) depict the convergence curves of all algorithms on all test functions (
Convergence curves of functions (
Convergence curves of functions (
In addition, Fig. 4(a)–(t) depict the box-plots on all test functions employed using all algorithms. The box-plots are used to analyse the variability in getting fitness values averaged of best function values in 20 runs obtained by each algorithm. In this plot, the box relates to the interquartile range, the whiskers represent the maximum and minimum fitness values and the bar in the box represents the median value. The box-plots show that MFGSO algorithm performs well for minimising these test functions.
Box-plots of fitness functions (
To further evaluate the performance of the metaheuristic algorithms, the non-parametric statistical test, Wilcoxon’s rank sum test is performed using the results of MFGSO against all algorithms at 5% significance level. Table 8 lists the
The
Existing hybrid GSO algorithms focus on improving the basic GSO by combining it with other methods to carry out the local search, while the random initialisation process of GSO makes the quality of solutions unreliable, because a part of solutions are apart from the global optimum. To address the problem, this paper has proposed a hybrid algorithm of GSO with MFO to improve the performance of basic GSO algorithm. The main idea of MFGSO is to balance between local optima avoidance and convergence speed of the algorithm. In the proposed hybrid algorithm MFGSO, MFO carries out the global search, while GSO carries out the local search in the satisfactory solution domains that are obtained by MFO, which enables the hybrid algorithm to obtain high-quality and evenly distributed initial solutions.
The MFGSO algorithm has been compared with the basic GSO and other metaheuristic algorithms on 20 test functions in terms of local optima avoidance and convergence speed. The results have showed that MFGSO outperforms the basic GSO algorithm and some of metaheuristic algorithms on most test functions.
One future work will be improving the MFGSO to avoid the situation in which glowworms have no neighbour sets. Another will be applying MFGSO to solve real-world problems.
Footnotes
Authors’ Bios
