Abstract
Slime mould algorithm (SMA) is a new metaheuristic algorithm proposed in 2020, which has attracted extensive attention from scholars. Similar to other optimization algorithms, SMA also has the drawbacks of slow convergence rate and being trapped in local optimum at times. Therefore, the enhanced SMA named as ESMA is presented in this paper for solving global optimization problems. Two effective methods composed of multiple mutation strategy (MMS) and restart mechanism (RM) are embedded into the original SMA. MMS is utilized to increase the population diversity, and the RM is used to avoid the local optimum. To verify the ESMA’s performance, twenty-three classical benchmark functions are employed, as well as three well-known engineering design problems, including welded beam design, pressure vessel design and speed reducer design. Several famous optimization algorithms are also chosen for comparison. Experimental results show that the ESMA outperforms other optimization algorithms in most of the test functions with faster convergence speed and higher solution accuracy, which indicates the merits of proposed ESMA. The results of Wilcoxon signed-rank test also reveal that ESMA is significant superior to other comparative optimization algorithms. Moreover, the results of three constrained engineering design problems demonstrate that ESMA is better than comparative algorithms.
Keywords
Introduction
Over the last few decades, optimization algorithms have been extensively studied and applied for solving various real-world problems. The objective of optimization algorithms is to find the optimal solution within given search spaces or constraints which is urgently requisite in various fields covering the mathematics, computer science, statistics, and engineering [1–4]. Different from conventional gradient method, modern optimization algorithms can acquire the optimal solutions much more efficiently. Metaheuristic algorithms (MAs) have attracted lots of attentions in the aspect of optimization algorithm research. In general, they can be divided into four main categories: evolution-based algorithms (EAs) [5], human-based algorithms (HAs) [6], physics-based algorithms (PAs) [7] and swarm-based algorithms (SAs) [8]. In recent years, a variety of SAs have been proposed by related researchers. Some well-known algorithms are particle swarm optimization (PSO) [9], ant colony optimization (ACO) [10], whale optimization algorithm (WOA) [11], grey wolf optimizer (GWO) [12], salp swarm algorithm (SSA) [13] and slime mould algorithm (SMA) [8]. Though many optimization approaches have been proposed, optimization algorithms may suffer from some drawbacks or issues, such as premature convergence, local optima, low convergence rate, and unbalanced distribution between exploration and exploitation [14, 15]. Thus it is important to improve these existing algorithms for better performance. For instances, Mousavi, Arora, Kohli and Onay et al. utilized the chaotic maps to improve the searching capability of MAs [16–19].
The main motivation of developing new optimization algorithms is the no free lunch (NFL) theorem [20], which says that no one algorithm can solve all the optimization problems.
Inspired by the foraging process of slime mould, Li et al. [8] proposed the SMA in 2020, which shows very competitive performance compared with many traditional and advanced algorithms. Kouadri et al. [4] applied the SMA to solve the optimal power flow (OPF) problem. Ewees et al. [21] developed the feature selection (FS) method by hybridizing the SMA and firefly algorithm (FA) [22]. Although SMA has been extensively used, it still suffers from some drawbacks, such as being trapped in local optimum, insufficient exploration capability. In order to strengthen the SMA, some improvements are proposed by scholars. Cui et al. [23] improved the exploration ability of SMA by integrating the Levy flight. In the works of Sun et al. [24], Brownian motion and tournament selection mechanism were employed to extend the exploration capability of SMA. Houssein et al. [25] utilized the adaptive guided differential evolution (AGDE) to overcome the improper balance between exploration and exploitation in SMA.
It is worth mentioning that the probability parameter z used in SMA plays a pivotal role on the balance between exploration and exploitation. For a determined parameter value z, the exploration capability of SMA may be unstable and insufficient for some optimization problems. Thus to strengthen the SMA, multiple mutation strategy (MMS) and restart mechanism (RM) are employed to realize the function of parameter z. According to previous researches, mutation scheme is an effective way to enhance the exploration search and/or exploitation search for the optimization algorithms [25–29]. For instances, both Cui et al. [27] and Li et al. [28] utilized three kinds of mutation operators to improve the differential evolution (DE). Refer to this effective strategy, the multiple mutation strategy (MMS) are considered in this paper to improve the global search ability of SMA. In addition, in order to avoid the case of local optimum, a kind of method called restart mechanism (RM) also can be introduced into SMA [30]. As its name implies, when the search agent cannot jump out the local optimum, RM will be activated to generate a new position for it. Thus the local optimum can be avoided to some extent. In this paper, The enhanced SMA (ESMA) is proposed by using the combination of multiple mutation strategy and restart mechanism, on which very little research has been done. A series of experimental tests were conducted to evaluate the ESMA’s performance, including twenty-three classical benchmark functions [31] and three traditional constrained engineering design problems.
The rest paper is organized as follows: The fundamental of original SMA is introduced in Section 2. The proposed ESMA with MMS and RM is described in Section 3. The experimental results including test functions and engineering optimization design problems are presented and analyzed in Section 4. At last, Section 5 concludes this paper and gives some ideas about future work.
Related works
Slime mould algorithm (SMA)
The detailed principle of slime mould optimization algorithm will be described in this section. As mentioned earlier, SMA is a new metaheuristic algorithm which mainly mimics the foraging behavior of slime mould [8]. There are three main characteristics of slime mould modeled in the SMA: (1) the positive and negative feedback based on the quality of food source; (2) contraction mode; and (3) oscillation mode.
As shown in Fig. 1, the process of approaching food for slime mould is formulated as:

Assessment of fitness by slime mould [8].
Here, p is defined by:
Parameters a and b can be calculated by:
In addition,
Moreover, each of the slime mould has a certain probability (z) to find the possible new food source, which can be expressed as:
The procedures of SMA are illustrated in Algorithm 1.
Pseudo-code of SMA
In this work, multiple mutation operators are employed to generate diverse individuals in order to strengthen the global search capability of SMA. The proposed mutation strategy is based on the rand local mutation method of composite DE [26]. To be specific, three types of mutation methods are utilized to generate candidate positions for each of the search agents. The mathematical formulas are as follows:
These three mutation methods can be called as DE/rand/1/bin, DE/rand/2/bin and DE/current-to-rand/2/bin, respectively. Subsequently, the fitness values of three mutant positions are compared with the original one of
During the iteration process, some search agents maybe not able to find a better position during the iteration. That is to say, they are trapped in local optimum. Thus these individuals are not valid to some degree for the later optimization process. However, these search agents still take up a certain resources of the population. Therefore, based on the goal of searching the optimal result efficiently, the RM can be introduced into the SMA [30]. Specifically, when a better position cannot be found by search agent within a finite number of times, a new position will be generated by RM to replace the old one. A trial vector trial(i) is utilized to record the information about the status of position updates for all the individuals. To be exact, if the position of individual has been updated, the trial(i) will be reset to zero. Otherwise, the trial(i) will be increased by one. In addition, a threshold value (Limit) is preset to determine whether to initiate the restart mechanism. When the trial(i) is greater than the Limit, two new positions will be generated and the better one will be utilized to replace the position of current individual. The two new positions are calculated by following:
In the original SMA, the updated position of search agent mainly depends on the optimal position when the current position is away from the optimal position found so far. And for the search agent which is close to the optimal position, the updated position will depend more on the original position. In addition, the SMA utilizes the constant value z to balance the exploration and exploitation. In spite of this, the global search capability of SMA may be limited for some optimization problems. The results of local optimum may occur over the course of iterations. Therefore, in order to overcome the SMA’s drawbacks, this paper adopts the MMS and RM to enhance the exploration capability of SMA. And the parameter z will not be used. The original position update formula of SMA remains the same referring to Equation (1).
Enhanced SMA (ESMA)
By integrating the multiple mutation operators and restart method into the original SMA, the enhanced SMA is obtained, which is named as ESMA. The pseudo-code of ESMA is given in Algorithm 2. And the flowchart of ESMA is illustrated in Fig. 2.

The flowchart of ESMA.
Pseudo-code of ESMA
Firstly, the positions of population are initialized within the upper and lower boundaries. And then these search agents enter into the iterative loop. First of all, the fitness of each slime mould is calculated and the best fitness (X b ) is found. The position of slime mould is updated by Equation (1). Meanwhile, three candidate positions are produced by the MMS according to Equations (8), (9) and (10). The best position with lowest fitness will be adopted by current individual. Later, it is need to decide whether to activate the RM by comparing the trial vector trial(i) to the threshold value. If the trial(i) is greater than the Limit, the RM will be activated. Thus, current position will be replaced by new random one. At last, when the number of iterations reaches the maximum value, the algorithm ends and returns the found optimal solution.
The computational complexity is an important indicator for an optimization algorithm, which is relevant with the time consumption during operating. Better performance with lower computational complexity is expected for each optimization algorithm. In the ESMA, the computational complexity is analyzed below:
Firstly, the initialization positions of slime mould are generated which requires computational complexity O(N×D). Then during the iteration process, the individuals are sorted by the fitness size and best fitness is addressed, which needs computational complexity O(N + NlogN). In addition, the computational complexity of weight’s calculation is O(N×D). In the next, the computational complexity of updated positions including those of original SMA and multiple mutation strategy should be O(4×N×D). The comparison of fitness between these positions needs O(3×N). At last, to consider the worst case, i.e., each individual keeps being reinitialized, the computational complexity of restart mechanism is O(2×T×N×D/Limit). Therefore, the computational complexity of the ESMA is O(N×D×(1 + 5×T+2×T/Limit)+N×T×(4 + logN)).
Compared to the original SMA, the computational complexity of ESMA is increased to some extent. However, better performance can be obtained in solving optimization problems, which is the main objective of the optimization algorithms. In the next section, a set of benchmark functions and several engineering design problems are utilized to verify the performance of ESMA. Meanwhile, some well-known metaheuristic algorithms are also employed to illustrate the superiority of proposed algorithm.
Experimental results and discussions
Benchmark function test
In this section, the performance of the ESMA is tested by twenty-three benchmark functions [31]. These benchmark functions include unimodal (F1–F7), multimodal (F8–F13), and fixed-dimension (low dimension) multimodal (F14–F23) benchmark functions. In order to illustrate the performance of ESMA, seven metaheuristic algorithms and two modified algorithms are employed for comparison, which are as following: Slime mould algorithm (SMA) [8] Whale optimization algorithm (WOA) [11] Grey wolf optimizer (GWO) [12] Salp swarm algorithm (SSA) [13] Moth-flame optimization (MFO) [32] Muti-verse optimization (MVO) [33] Particle swarm optimization (PSO) [9] Dynamic sine cosine algorithm (DSCA) [34] Random opposition-based learning grey wolf optimizer (ROL-GWO) [35]
Table 1 lists the main parameters used in each of the comparative algorithms. To perform a fair comparison, the population size and maximum iteration are set as 30 and 500, respectively. And the results of average values and standard deviations obtained from 30 times tests were utilized for comparison and analyzation. In addition, the Wilcoxon signed-rank test [36] is utilized to evaluate the statistical performance of the ESMA. And the qualitative results and convergence behavior of proposed algorithm were also analyzed with several representative functions.
Parametric setups for comparative algorithms
Parametric setups for comparative algorithms
Table 2 lists the results of 23 benchmark functions for all the optimization algorithms.
Comparison of the test results of 23 benchmark functions for different algorithms (the best values are in bold)
Comparison of the test results of 23 benchmark functions for different algorithms (the best values are in bold)
Functions F1–F7 can be utilized to evaluate the exploitation capability of algorithm since they have only one global optimum. From the data in Table 2, ESMA obtained the theoretical optimal values in F1–F4 with zero standard deviation and the best results in F5 and F7. Note that ESMA is significantly better than other methods in F5. PSO is able to find the best result in F6. However, ESMA obtained the third best result. Consequently, ESMA show the superior performance of exploitation compared with other algorithms.
The exploration capability of optimization algorithms can be evaluated by F8–F23 because they have multiple local optimums. It can be seen from Table 2 that ESMA also is able to achieve the theoretical optimal values in F9 and F11 with zero standard deviation, which is same with SMA and WOA. The best results in F8, F10, F13, F14, F19, F21, F22 and F23 are obtained by ESMA. And the results in F16, F17 and F18 are similar with those of comparative algorithms. In addition, PSO gets the best result in F12 with lowest standard deviation. Also, ROL-GWO obtains the best result in F15 with the lowest standard deviation. GWO achieves the best result in F20. Moreover, the improvements of ESMA compared with SMA are significant in F12 and F13. On the whole, ESMA presents very outstanding performance in the exploration of multimodal functions than other algorithms. Therefore, ESMA has the merits of exploration.
Wilcoxon signed-rank test
Wilcoxon signed-rank test [36] is utilized to evaluate the statistical performance differences between the proposed ESMA and other optimization algorithms. To be specific, two compared algorithms are consider to have significant differences when the P-value is lower than 0.05. Otherwise, the two algorithms present similar level performance on solving the optimization problems. The calculated results are listed in Table 3.
P-values of the Wilcoxon signed-rank test between ESMA and other comparative algorithms (P-values>0.05 are in bold)
P-values of the Wilcoxon signed-rank test between ESMA and other comparative algorithms (P-values>0.05 are in bold)
Table 3 lists the P-values obtained by Wilcoxon signed-rank test between the ESMA and each of these nine algorithms for each test function. As can be seen from Table 3, the ESMA outperformes SMA on all test functions except F7, F8, F15, F20 and F21. Both ESMA and SMA can achieve identical results on F8 and F21. Moreover, ESMA is superior to other algorithms on most of the test functions. To sum up, ESMA can offer better optimization results on almost all test functions compared with other comparative algorithms.
Figure 3 presents the results of some representative test functions on search history, trajectory in the 1st dimension, the average fitness and convergence curve. In the search history subplot, ESMA shows cross-type search trajectory clustered around the optimal value, indicating that it can find the optimal values reliably. Moreover, ESMA has very strong global search capability according to the distribution of search agents because of the composite mutation method. And ESMA also can avoid the local optimum with the help of restart mechanism.

Qualitative results: search history, trajectory, average fitness, and convergence.
From the representative trajectory subplots in functions F1, F5, F11, F12 and F15, the fast oscillation behavior in the early stage is benefit to find the optimal solution. In the later stage, the slow oscillation behavior means the ESMA can converge quickly. For the functions F8, F17 and F22, the trajectory oscillates violently throughout the whole iteration, which means the search agent keeps looking for the optimal solution on global. This reflects the adaptability and robustness of ESMA in different functions.
The curves for the average fitness show obviously descending trend in all functions except F17. ESMA can find the theoretical optimal solution in F17. The smooth average fitness curves in F1, F5, F8, F11 and F12 show the exploitation ability of ESMA. In F15 and F21, the continuous violent oscillation indicates the exploration process of ESMA.
At last, these convergence curves have displayed the best fitness values found by search agents after the iterations. By observing this, we can see the ESMA has very fast convergence speed compared to other algorithms.
The convergence behavior of the ESMA is analyzed by comparing with SMA, WOA, GWO, SSA, MFO, MVO, PSO, DSCA and ROL-GWO. Figure 4 shows the comparative results of two unimodal test functions (F1, F5), three multimodal test functions (F8, F11, F12) and two fixed-dimension multimodal test functions (F15, F23). It can be seen that ESMA outperforms other algorithms with quicker convergence rate and better optimal solutions in all functions except F12, in which the PSO achieves the best solution. However, ESMA still beats the other algorithms in F12.

Convergence curves of ESMA compared with other population-based algorithms.
The superior ability of ESMA is evident due to the combination of multiple mutation strategy and restart mechanism. To be specific, mutation method can increase the population diversity for the search agents. The search agents can choose the best one from multiple positions in each iteration. Thus, the search agents tend to explore the promising areas widely and randomly. In other words, the global search capability of individuals has been improved significantly. Thus the optimal position can be found very fast. The convergence rate is accelerated and the accuracy is ensured. Besides, the positions of search agents will be forced to initialize the position if they cannot find better one within limit times. From the convergence curves, it can be seen that the two applied methods can improve the performance of SMA effectively.
In conclusion, the results of convergence curves have shown that the ESMA is superior to other algorithms when dealing with these test functions. Therefore, the SMA is effectively enhanced with the multiple mutation operators and restart method.
It is obvious that the performance of the ESMA is affected by the values of parameters set in ESMA. Thus it is necessary to investigate the influence of these parameters. In the ESMA, there are three kinds of parameters, i.e., crossover rate, scale coefficient and the threshold value of RM. Considering the crossover rate will have a great impact on the calculation time of algorithm, hence the left two parameters are assessed here. As shown in Table 4, the other eight conditions are considered, and the results of mean-square error are obtained for the twenty-three test functions. It can be observed that the ESMA has the best performance in general when F1 = F2 = F3 = 0.1 and Limit = 2.
Sensitivity analysis on the ESMA’s parameters (the lowest values are in bold)
Sensitivity analysis on the ESMA’s parameters (the lowest values are in bold)
In this part, three engineering design problems with different inequality constraints are provided to check the optimization capability of the ESMA, including welded beam design, pressure vessel design and speed reducer design. In the same way, the number of search agents and iterations are set as 30 and 500, respectively. The results are also compared with other well-known algorithms to verify the ESMA’s performance.
Welded beam design
The first engineering design problems introduced here is the design of welded beam [37]. Figure 5 presents the three-dimensional model of welded beam and main design parameters, including the reinforced thickness (h), the reinforced length of attached part (l), the reinforced height (t) and the thickness of weld (b).

Structure and parameters of the welded beam.
Table 5 lists the optimal values found by ESMA and several other optimization algorithms. The results show the ESMA is slightly better than SMA and can outperform other comparative algorithms. The optimal cost with ESMA is 1.6958 when the parameters h, l, t and b are set as 0.2053, 3.2615, 9.0362 and 0.2058, respectively.
Results of welded beam design problem compared with other algorithms
In the pressure vessel design, it is also need to determine four types of variable values to reduce or decrease the total price in terms of the material quality, welding and cylindrical shape of the pressure vessel. Figure 6 shows the structure of pressure vessel and its related parameters. It can be seen that the four variables contain the shell thickness (Ts), the head thickness (Th), the inner radius (R) and the cylindrical length (L).

Structure and parameters of the pressure vessel.
Table 6 gives the comparative results between ESMA and other algorithms. From this table, we see that ESMA is obviously superior to others. The lowest cost found by ESMA is 5790.34 when the parameters Ts, Th, R and L are set as 0.7699, 0.3826, 41.707 and 181.606, respectively.
Results of pressure vessel design problem compared with other algorithms
The main intention of speed reducer design is to decrease the weight of speed reducer. The optimization design of speed reducer is a discrete problem, which contains one discrete and six continuous variables. As shown in Fig. 7, x1 is the face width, x2 is the module of teeth, and x3 is a discrete design variable that refers to the teeth in the pinion. Moreover, x4 is the length of the first shaft between bearings, and x5 is the length of the second shaft between bearings. The x6 and x7 are the diameters of the first and second shaft, respectively.

Structure and parameters of the speed reducer.
The optimal results by ESMA and other algorithms are listed in Table 7. The results indicate that ESMA also can obtain very competitive results on the speed reducer design problem. And the optimal weight is 2995.438082 when the variables x1 to x7 are set as 3.49751, 0.7, 17, 7.3, 7.8, 3.350056 and 5.285518, respectively.
Results of speed reducer design problem compared with other algorithms
In this paper, the multiple mutation strategy and restart mechanism are introduced into SMA to strengthen its performance on tackling global optimization problems. The population diversity is effectively guaranteed by using the multiple mutation strategy and the local optimum is avoided by the restart mechanism. The obtained ESMA is compared with several well-known optimization algorithms based on the results of twenty-three benchmark functions. The experimental results indicate that MMS is an effective method of strengthening global exploration capability and RM can be used to avoid the local optimum. ESMA can converge to the optimal position quickly compared to other comparative algorithms. Meanwhile, ESMA can find the optimal solution in most of the benchmark functions. The statistical superior performance of ESMA is revealed by the Wilcoxon signed-rank test, comparing to the original SMA and other optimization algorithms. Furthermore, three classical engineering design problems, including welded beam, pressure vessel and speed reducer, are employed to validate the applicability of ESMA on real-world problems. The results of engineering design problems demonstrate that ESMA also can achieve better results.
This paper mainly studies two methods to improve SMA. As future perspectives, more optimization algorithms will be considered by using this composite strategy, and the application of the improved algorithm in more real-world problems is also one of the next important works.
Footnotes
Acknowledgments
This work was supported by Sanming University introduces high-level talents to start scientific research funding support project (21YG01, 20YG14), Fujian Natural Science Foundation Project (2021J011128), Research project on education and teaching reform of undergraduate colleges and universities in Fujian Province (FBJG20210338), Guiding science and technology projects in Sanming City (2021-S-8), Educational research projects of young and middle-aged teachers in Fujian Province (JAT200618), Scientific research and development fund of Sanming University (B202009), and funded by Open Research Fund Program of Fujian Provincial Key Laboratory of Agriculture Internet of Things Application (ZD2101).
