Introduction

Differential evolution (DE) has become popular for solving optimization problems and has proven to outperform other well-known algorithms in solving continuous optimization problems with different properties [1,2,3]. It starts with an initial population and constructs a new solution from the current ones. Three kinds of operators, mutation, crossover, and selection, are employed during the search process. Due to the simple structure and high search efficiency, researchers have devoted much effort to studying the DE algorithm and developed numerous DE variants. It is essential for saving costs and improving efficiency to select the most suitable algorithm from a set of DE algorithms before solving the unknown problem [4, 5]. Although the algorithmic elements of the DE algorithm are easy to understand, the behavior that emerges is often unpredictable. The reason is that the difficulty of algorithm performance prediction is increased by the different properties of optimization problems [6, 7]. Therefore, predicting the behavior of DE algorithms on unknown problems remains a significant and challenging task.

Fitness landscape analysis (FLA), a set of data-driven methods for extracting descriptive or numerical landscape features for optimization problems, can be used to tackle this challenge. The extracted landscape features can be used as the input to a predictive model to predict the performance of an algorithm [8, 9]. Several landscape features have been shown to affect the search difficulty of the optimization problem, such as the ruggedness of the fitness landscape, the degree of variable interdependency, the landscape structure of optima, the global landscape structure, and so on. In particular, Malan et al. [10] demonstrated that the steepness of gradients in fitness landscapes influences the search difficulty of optimization problems for particle swarm optimization (PSO). They concluded that low gradients were not always associated with algorithm success, but high gradients in higher dimensions were mostly related to algorithm failure. Langdon et al. [11] presented how the features of the problem affect the search process of PSO. They also found that genetic programming always finds a more suitable landscape for the algorithm, which confirms the link between landscape features and algorithm performance.

Several studies have successfully predicted the performance of algorithms for solving optimization problems using landscape features. For example, Malan et al. [12] developed a prediction model to predict the failure of seven PSO variants by using decision trees based on landscape features. The experimental results indicated that high levels of accuracy were achieved in predicting failure for most PSO models. Liefooghe et al. [13] analyzed features interrelation as well as their impact on the performance of the global simple evolutionary multiobjective optimizer (G-SEMO) and pareto local search (PLS). The results of statistical analysis showed the ability of features to predict algorithm performance, and the main differences induced by the two search approaches. Ventresca et al. [14] utilized the information-theoretic fitness landscape measures to analyze landscapes features on various vehicle routing problem, and predicted the optimization performance of genetic algorithm (GA). Merz et al. [15] found that the efficiency of memetic algorithms (MAs) is strongly affected by local features of fitness landscapes while the evolutionary search is strongly affected by global features of fitness landscapes. They also [16] studied the relationship between landscapes features and evolutionary operators when solving quadratic assignment problems, and they found epistasis, ruggedness, and the correlation between fitness and distance of local optima in the landscape together are useful for predicting the performance of MAs to a certain extent. Jankovic et al. [17] used a random forest regression model based on features of fitness landscapes to predict the algorithmic performance of the covariance matrix adaptation evolution strategy (CMA-ES) variants. Muñoz et al. [18] designed a neural network regression prediction model for the algorithmic performance on continuous optimization problems by using landscape features and parameters of the CMA-ES algorithm. Yang et al. [19] used several landscape features to study the performance of DE based on benchmark functions. Experimental results reflected the relationship between landscape features and the performance of the DE algorithm in response to specific parameter settings. Zhang et al. [20] investigated the relationship between the DE parameter settings and problem properties based on fitness landscape analysis. The classifier model obtained from decision trees showed that different types of DE algorithms can be classified using the landscape information obtained from iterative solutions. However, the landscape features of continuous optimization problems still need further investigation so that the problem can be more fully characterized and understood. In addition, the research of DE algorithm performance prediction for continuous optimization problems is still in its infancy. Therefore, we aim to develop a new landscape feature for characterizing continuous optimization problems and predicting DE algorithm performance.

Keenness is the main feature for evaluating combinatorial optimization problems proposed by Lu et al. [21, 22]. The keenness in the frequency domain (\(\textrm{kee}_{fd}\)) and the keenness in the time domain (\(\textrm{kee}_{td}\)) both reflect the sharpness of the fitness landscape. Neither of them depends on the distribution of variables or a priori information about the solution and the algorithm. The difference is that \(\textrm{kee}_{fd}\) only uses the information from high-frequency components in the spectrum, while \(\textrm{kee}_{td}\) uses information from all search points in the landscape. Thus, it is more significant to study the latter. However, there are three limitations for \(\textrm{kee}_{td}\). First, it is not applicable to characterize the fitness landscape of continuous optimization problems. Second, the relevance of the search points in the whole sample must be known in advance. Third, it is not a normalized metric and is not conducive to the comparison of optimization problems.

Inspired by the above observations, a keenness for characterizing continuous optimization problems (\(\textrm{KEE}_{s}\)) is proposed in this paper. In \(\textrm{KEE}_{s}\), the connection for each search point in the fitness landscape is determined by the mirror simple random walk. The fitness value of each point is replaced by the specific integer. The landscape information is calculated as a feature scalar by considering the cumulative values of the same circumstances using the formula. In this way, \(\textrm{KEE}_{s}\) cannot only characterize the sharpness of fitness landscapes for continuous optimization problems but also predict the performance of search algorithms on unknown problems. In summary, three contributions are listed for this work:

  1. (1)

    \(\textrm{KEE}_{s}\) is proposed for characterizing the sharpness of the fitness landscape for continuous optimization problems and predicting differential evolution algorithm performance. \(\textrm{KEE}_{s}\) uses a novel mirror simple random walk to construct correlations between the front and back search points in the sampling.

  2. (2)

    The performance prediction of differential evolution for continuous optimization problems is used as a representative application of \(\textrm{KEE}_{s}\) to demonstrate its practicability in algorithm performance prediction.

  3. (3)

    Comprehensive experiments are conducted on a variety of test functions to prove the efficacy and superiority of \(\textrm{KEE}_{s}\).

The rest of this paper is organized as follows: the related work is introduced in the next section. The proposed \(\textrm{KEE}_{s}\) is presented in the third section. The fourth section provides the experimental study on the efficiency of \(\textrm{KEE}_{s}\). The fifth section studies the DE performance prediction as a representative application of \(\textrm{KEE}_{s}\). Finally, the paper is concluded in the last section.

Related work

Differential evolution (DE)

DE is a stochastic search algorithm, where each particle is considered as a possible solution for the optimization problem [23, 24]. D and NP are the problem dimension and population size, respectively. \(x_{i,d}^{\min }\) and \(x_{i,d}^{\max }\) are the lower and upper bounds of the variable \(x_{i,d}\) \((i=1,2,\ldots ,NP; d=1,2,\ldots ,D)\), respectively. At the generation \(G=0\), the initial individuals are randomly generated as follows:

$$\begin{aligned} \begin{array}{c} {x}_{i,d}^{0}=x_{i,d}^{\min }+{rand(0,1)}\cdot \left( x_{i,d}^{\max }-x_{i,d}^{\min }\right) \\ \end{array} \end{aligned}$$
(1)

where \({x}_{i,d}^{0}\) is the d-th dimension of the individual \({x}_{i}^{0}\). rand(0, 1) is a random number in the range [0,1].

Next, a mutation vector \({v}_{i}^{G}\) is generated for each target individual \({x}_{i}^{G}\) using the mutation strategy DE/rand/1/bin:

$$\begin{aligned} {v}_{i}^{G}={x}_{r1}^{G}+F \cdot \left( {x}_{r2}^{G}-{x}_{r3}^{G}\right) \end{aligned}$$
(2)

where \(r_{1}, r_{2}\) and \(r_{3}\) are mutually different integers uniformly generated from the set \(\left\{ 1,2, \ldots , NP\right\} \). F is the scaling factor, which is generally set to 0.5. Then, a trial vector \({u}_{i}^{G}\) can be obtained:

$$\begin{aligned} u_{i}^{G}=\left\{ \begin{array}{ll} v_{i}^{G}, &{} \text{ if } \ {rand \,(0,1)}\,\,\,\,\,\le CR \text{ or } j=j_\text {rand} \\ x_{i}^{G}, &{} \text{ otherwise } \end{array}\right. \end{aligned}$$
(3)

where CR is the crossover rate, which is generally recommended to 0.9. \(j_\text {rand}\) is a random integer selected from 1 to D.

Finally, the objective function values f of \({x}_{i}^{G}\) and \({u}_{i}^{G}\) are compared to select the better individual into the next generation. The evolutionary steps are repeated until the stopping criterion is satisfied:

$$\begin{aligned} {x}_{i}^{G+1}=\left\{ \begin{array}{ll} {u}_{i}^{G}, &{} \text{ if } f\left( {u}_{i}^{G}\right) \le f\left( {x}_{i}^{G}\right) \\ {x}_{i}^{G}, &{} \text{ otherwise } \end{array}\right. \end{aligned}$$
(4)

In the past few decades, some improved variants of DE have been developed. Generally, existing DE algorithms can be divided into single-strategy DE variants and multi-strategy DE variants. Single-strategy DE has only one mutation strategy to produce offspring. This type of approach relies heavily on improved mutation strategies or other auxiliary techniques. For example, Zhang et al. [25] proposed an adaptive DE algorithm with an optional external memory (JADE) to improve optimization performance by implementing a new mutation strategy (DE/current-to-pbest) with an optional external archive and adaptively updating control parameters. In JADE, the \(CR_i\) of each individual \(x_i\) in each generation is independently generated according to the normal distribution of mean CR and standard deviation 0.1. When the value of \(CR_i\) is beyond [0,1], it is repaired to the value in [0,1]. Similarly, the \(F_i\) of each individual \(x_i\) was independently generated according to the Cauchy distribution with parameter F and scale parameter 0.1. If the value of \(F_i\) is bigger than 1, it is set to 1. If the value of \(F_i\) is smaller than 0, it is regenerated. Tanabe et al. [26] proposed the success-history-based parameter adaptation for differential evolution (SHADE). The algorithm extends JADE by using the historical memory of the most recent successful parameter set to guide the generation of new control parameter values. Later, they improved the SHADE algorithm by using the linear population size reduction to dynamically resize the population size as the number of fitness evaluations increases, which was called LSHADE [27]. It showed better performance than other algorithms in solving a set of unconstrained optimization problems. Compared with single-strategy DE, the use of strategy pools in multi-strategy DE provides more abilities. For example, an improved composite differential evolution (ICoDE) was developed by Qiao et al. [28] to improve diversity and convergence speed by dynamically selecting different search strategies. Awad et al. [29] proposed the LSHADE-EpSin algorithm, which uses the ensemble of the non-adaptive sinusoidal decreasing adjustment, and the adaptive history-based sinusoidal increasing adjustment to automatically adjust the values of the scaling factor. The statistical results confirmed the efficiency and robustness of the proposed algorithm, which gave better results that other state-of-the-art algorithms.

Fitness landscape analysis (FLA)

Generally, the mathematical representation of a fitness landscape is \({\mathcal {L}}=(S, f, d)\) [30, 31]. The set of all potential solutions is denoted by S. The distance function between candidates is represented by \(d: S \times S\rightarrow R\). In continuous optimization, the Euclidean distance is frequently utilized as the distance function d. The fitness function is used as the objective function in this paper and is denoted as \(f: S\rightarrow R\). The minimization optimization problem is studied in this paper, where the smaller the objective value is, the better. A fitness function with \(D=2\) is introduced in Fig. 1 to understand the idea of fitness landscapes in more depth. The three-dimensional surface with peaks, valleys, plateaus, and basins shown in Fig. 1a represents the fitness landscape. The lowest parts of the surface are where you can find the local and global optima. A contour depiction of the fitness landscape, along with the position of a candidate \({\varvec{x}} \in S\) and an input sample \({\varvec{x}} \subset X\) are displayed in Fig. 1b. The various fitness values are depicted by the color bars.

Fig. 1
figure 1

Fitness landscape of a function with \(D=2\)

Since numerous practical optimization problems are difficult to describe explicitly with analytic expressions in the real world. The experimental data collection has been used to construct a large number of models for fitting various characteristics of the real-world optimization problem, such as the parameter estimation of photovoltaic models [32, 33], the maximum power point tracking of solar power plants [34]. As a result, the approximate fitness landscape is denoted as \(\overline{{\mathcal {L}}}=(X, f, d)\), which considers a dataset of search points X that were selected from S using a particular sampling approach. The random walk (RW) algorithm has been commonly used to sample fitness landscapes due to its simple implementation and high sampling efficiency [35]. On the one hand, they do not require the knowledge of fitness values to guide the walk. On the other hand, they record the relationship between the front and back points in the walk, which has important implications for the computation of landscape features. Up to now, many RW algorithms have been developed. For example, the simple random walk (SRW) algorithm was first proposed by Malan et al. [6]. The algorithm worked by randomly sampling the starting point and generating the next point in steps of random size and direction until a preset number of search points is reached. The Chebyshev chaotic random walk (CCRW) algorithm and iterative chaotic random walk (ICRW) algorithm were proposed by Jana et al. [36], which was generated by the Chebyshev and iterative with infinite collapse chaotic maps. Experimental studies showed that the ICRW algorithm and CCRW algorithm provided better coverage of the search space.

Based on the approximated fitness landscape and the specific sampling approach, many descriptive or numerical fitness landscape features have been proposed. Next, four well-known landscape features are presented below, which are fitness distance correlation [37], information landscape measure [38], dispersion metric [39], and keenness in the time domain [22].

Fitness distance correlation

Fitness distance correlation by Jones et al. [37] with extension (\(\textrm{FDC}_{s}\)) [6] was focused on the correlation between the fitness value of the solution and the distance to the nearest global optimum for predicting the performance of genetic algorithms. Given a set of points \(X=\left\{ x_{1}, x_{2}, \ldots , x_{n}\right\} \) with fitness values \(F=\left\{ f_{1}, f_{2}, \ldots , f_{n}\right\} \), the fittest point in the search points is denoted as \(x^{*}\). The Euclidean distance of every point \(x_i\) from \(x^{*}\) are denoted as \(Dist^*=\left\{ d_{1}^*, d_{2}^*, \ldots , d_{n}^*\right\} \). \(\textrm{FDC}_{s}\in [-1,1]\) is calculated as follows:

$$\begin{aligned} \textrm{FDC}_{s}=\frac{\sum _{i=1}^{n}\left( f_{i}-{\bar{f}}\right) \left( d_{i}^{*}-{\bar{d}}^{*}\right) }{\sqrt{\sum _{i=1}^{n}\left( f_{i}-{\bar{f}}\right) ^{2}} \sqrt{\sum _{i=1}^{n}\left( d_{i}^{*}-{\bar{d}}^{*}\right) ^{2}}} \end{aligned}$$
(5)

where \({\bar{f}}\) and \(\bar{d^*}\) are the means of the fitness value F and the distance value \(Dist^*\), respectively. For minimization problems, larger \(\textrm{FDC}_{s}\) values indicate higher searchability.

Information landscape measure

Information landscape measure by Borenstein et al. [38] with extension (\(\textrm{IL}_{n s}\)) [6] was known as a negative searchability measure. The fittest point is denoted as \(x^{*}\) for all search points X. The vector \(v_p\) representing the information matrix of the problem p is computed as Eq.(6). Based on the reference function \(f_r\) defined as Eq.(7), the vector \(v_r\) is constructed using the same search point X to represent the reference landscape information matrix. Finally, \(\textrm{IL}_{ns}\in [0,1]\) is computed as follows:

$$\begin{aligned} v_p= & {} \left\{ \begin{array}{ll} 1 &{} \text{ if } f\left( x_{i}\right) <f\left( x_{i+1}\right) \\ 0.5 &{} \text{ if } f\left( x_{i}\right) =f\left( x_{i+1}\right) \\ 0 &{} \text{ otherwise } \end{array}\right. \end{aligned}$$
(6)
$$\begin{aligned} f_{r}({x})= & {} \sum _{i=1}^{D} x_{i}^{2}-2 x^{*} x_{i}+x^{* 2} \end{aligned}$$
(7)
$$\begin{aligned} \textrm{IL}_{ns}= & {} \frac{1}{m} \sum _{i=1}^{m}\left| v_{p}-v_{r}\right| \end{aligned}$$
(8)

where \(|{v}|=m=(|X|-1)(|X|-2)/2\). A high value of \(\textrm{IL}_{n s}\) implies lower searchability.

Dispersion metric

Dispersion metric by Lunacek et al. [39] with extension (\(\textrm{DM}\)) [6] was used to estimate the global topology of fitness landscapes. Given a uniform random sample of n points from the search space of the problem with D dimension, the subset \(S^*\) of \(n\times p\%\) points based on the fitness value are determined. Next, the position vectors of the points in \(S^*\) are normalized so that the search space of all dimensions is defined in the domain [0,1]. Then, the average pairwise distance \(disp (S^*)\) between the normalized position vectors in the subset \(S^*\) is calculated. Finally, \(\textrm{DM}\in [-{\textrm{disp}_D}, \sqrt{D}-{\textrm{disp}_D}]\) is calculated as follows:

$$\begin{aligned} \textrm{DM}=\textrm{disp} (S^*)-\textrm{disp}_D \end{aligned}$$
(9)

where \(\textrm{disp}_D\) is a predetermined constant value for the dispersion of large uniform random samples in the search space. More information about \(\textrm{DM}\) can be found in [6]. Positive values of \(\textrm{DM}\) demonstrate the presence of multiple funnels in the fitness landscape.

Keenness in the time domain

Keenness in the time domain (\(\textrm{kee}_{td}\)) was proposed by Lu et al. [22] to characterize the acute degree of fitness landscapes. The procedure of \(\textrm{kee}_{td}\) is expressed as follows. First, when comparing problems of different scales, the search space of the large-scale problem is divided into several segments, and the number of points in each segment is the same as the number of points of the small-scale problem. Second, the two adjacent points are compared from front to back. If the fitness value of the latter point is greater than the fitness value of the former point, both fitness values are replaced with 1. If the fitness value of the latter is smaller than that of the former, both of them are replaced by -1. Otherwise, they are replaced by 0. As a result, the search space is replaced by the integer array \(\{1,-1,0\}^{n-1}\), where n is the sample size. Third, the integer array is checked from front to back. If 0 occurs consecutively, the number of 0s is counted and recorded as \(a_i\), where i denotes the number of occurrences in this case. If 1 or -1 occurs consecutively, the number of 1s or -1s is recorded as \(c_i\) and \(d_i\), respectively. If 1 and -1 occur alternately, the number of changes in \(\pm 1\) is denoted as \(e_i\). Otherwise, it is denoted as \(b_i\). Fourth, the accumulated values of \(a_i\), \(b_i\), \(c_i\), \(d_i\), and \(e_i\) are computed as \(a_\textrm{sum}\), \(b_\textrm{sum}\), \(c_\textrm{sum}\), \(d_\textrm{sum}\), and \(e_\textrm{sum}\), respectively. Finally, the \(\textrm{kee}_{td}\) is computed as follows:

$$\begin{aligned} \textrm{kee}_{td}{} & {} =a_{\text{ sum } } \times (-1)+b_{\text{ sum } } \times (-0.6)+c_{\text{ sum } } \times (-0.2)\nonumber \\{} & {} \quad +d_{\text{ sum } } \times (-0.2)+e_{\text{ sum } } \times (+1) \end{aligned}$$
(10)

where the coefficients of \(a_\textrm{sum}\), \(b_\textrm{sum}\), \(c_\textrm{sum}\), \(d_\textrm{sum}\), and \(e_\textrm{sum}\) are assigned based on the contribution to \(\textrm{kee}_{td}\). The higher the value of \(\textrm{kee}_{td}\), the sharper the fitness landscape.

The proposed approach

Motivation

Although \(\textrm{kee}_{td}\) is the main metric for exploring the sharpness of the fitness landscape in combinatorial optimization problems from the perspective of search spaces, it does not apply to continuous optimization problems. A significant limitation of \(\textrm{kee}_{td}\) is that the correlation of search points in the entire sample must be known beforehand. In addition, it is not a normalized metric, which is not conducive to the characterization of optimization problems. Therefore, keenness (\(\textrm{KEE}_{s}\)) is proposed in this paper. Specifically, a mirror simple random walk is designed to record the neighborhood of each search point in the fitness landscape, thus presenting the correlation between search points. Then, the corresponding integer is used to replace the fitness value of each point. The landscape information is calculated as a feature scalar value based on the cumulative calculation mechanism. With the help of the mirror simple random walk and the cumulative calculation mechanism, \(\textrm{KEE}_{s}\) can characterize the sharpness of continuous optimization problems and predict the performance of a given algorithm for unknown problems.

Keenness (\(\textrm{KEE}_{s}\))

Mirror simple random walk (MSRW)

The basic idea of the MSRW algorithm is as follows: the starting point within the boundary of the multidimensional search space is initialized randomly. Then, the search point walks randomly around the search space. When the walk exceeds the boundary, its current position is reset to a mirror position within the boundary. When the walk goes out of bounds again, its current position is regenerated within the boundaries of the search space. The continuous walks are generated until the required number of steps is reached. The details of MSRW are given as follows.

A sample of MSRW is represented as a set of parameter vectors \(x_{i}\) (\(i=1,2,\ldots ,n\)), where n is the sample size. The starting point of the walk is determined as follows:

$$\begin{aligned} x_{i,d}=x_{i,d}^{\max }-{\textrm{rand}(0,1)} \cdot \left( x_{i,d}^{\max }-x_{i,d}^{\min }\right) \end{aligned}$$
(11)

where \({x}_{i,d}\) is the d-th dimension of the individual \({x}_{i}\). The value of \(\textrm{rand}(0,1)\) is uniformly distributed in [0,1]. \(x_{i,d}^{\min }\) and \(x_{i,d}^{\max }\) denote the lower and upper bounds of the variable \(x_{i,d}\).

After initializing the starting point as the current point, the perturbation variable \(\delta _{i}\) is generated for each dimension and added to the current point in each walk. Recursively, the next point in the walk is computed as follows:

$$\begin{aligned}{} & {} \delta _{i}=-s+{rand(0,1)}\cdot 2\cdot s \end{aligned}$$
(12)
$$\begin{aligned}{} & {} x_{i+1}=x_{i}+\delta _{i} \end{aligned}$$
(13)

where s is the step size for the search space.

In [40], Malan et al. proposed that the boundary handling approach significantly affects the performance of RW algorithms. Since the random direction selection of the next point causes the search points to be clustered in a limited area, which may lead to the search points being trapped in a local optimum with small sample coverage. Therefore, a mirrored boundary processing method is introduced in the step to produce symmetry or anisotropic random walk, as shown in Eqs. (14) and (15):

$$\begin{aligned} x_{i+1}= & {} {\left\{ \begin{array}{ll}2 \cdot x_{i}^{\max }-x_{i+1} &{} \text{ if } x_{i+1}>x_{i}^{\max } \\ 2 \cdot x_{i}^{\min }-x_{i+1} &{} \text{ if } x_{i+1}<x_{i}^{\min } \end{array}\right. } \end{aligned}$$
(14)
$$\begin{aligned} x_{i+1}= & {} x_{i}^{\min }+{ rand } \cdot \left( x_{i}^{\max }-x_{i}^{\min }\right) \end{aligned}$$
(15)

It can be seen that when the current point \(x_{i+1}\) exceeds the boundary, it will be set to the mirror position inside the boundary. When the particle is out of the boundary for the second time, its position is reinitialized in the range of variables according to Eq. (15). The walking process of MSRW is repeated until the number of steps in the walk is satisfied.

Cumulative calculation mechanism

The search points obtained by the mirror simple random walk are used to evaluate the fitness values. Then, the integer set is used to replace the fitness values of the search point as follows. If the fitness value of the latter point is higher than the fitness value of the former point, the fitness values of both points are replaced by 1. If the fitness value of the latter point is smaller than the fitness value of the former point, the fitness values of both points are replaced by \(-1\). Otherwise, both of them are replaced by 0. Consequently, the integer set \(\left\{ {1,-1,0}\right\} ^{n-1}\) can be obtained. Next, the integer set is searched from front to back. If 0 appears consecutively, the number of 0s is counted and recorded as \(a_i\), where i denotes the number of times this happens. If there are consecutive 1s or \(-1s\), the number of them is counted as \(c_i\) and \(d_i\), respectively. If there are alternate 1 and -1, the number of changes of ± 1 is calculated and denoted as \(e_i\). Otherwise, it is recorded by \(b_i\). The values of \(a_i\), \(b_i\), \(c_i\), \(d_i\) and \(e_i\) are calculated cumulatively as \(a_\textrm{sum}\), \(b_\textrm{sum}\), \(c_\textrm{sum} \), \(d_\textrm{sum}\) and \(e_\textrm{sum}\). Finally, \(\textrm{KEE}_{s}\in [-1,1]\) is computed as follows:

$$\begin{aligned} \textrm{KEE}_{s}{} & {} =\frac{1}{(n-2) \times 2}\times (a_{\text{ sum } } \times (-1)+b_{\text{ sum } } \times (-0.6)\nonumber \\{} & {} \quad +c_{\text{ sum } } \times (-0.2)+d_{\text{ sum } } \times (-0.2)+e_{\text{ sum } } \times (+1)) \end{aligned}$$
(16)

where the coefficients of \(a_\textrm{sum}\), \(b_\textrm{sum}\), \(c_\textrm{sum}\), \(d_\textrm{sum}\) and \(e_\textrm{sum}\) are assigned to the same parameters as in [22]. For \(\textrm{KEE}_{s}\), the larger the value is, the rugged the fitness landscape of the continuous optimization problem.

The procedure of \(\textrm{KEE}_{s}\)

The procedure of \(\textrm{KEE}_{s}\) is shown in Algorithm 1. Specifically, in the computation of the mirror simple random walk, the time complexity of generating n search points is O(1). Then, the fitness value of each point calculates, where the corresponding complexity is O(n). The codes in Lines 3–9 are linear operators, resulting in the corresponding complexity being O(1). Therefore, the total complexity of implementing this loop is O(n). Finally, the \(\textrm{KEE}_{s}\) is obtained using Eq. (16), where the complexity is O(1). In summary, the total computation complexity of \(\textrm{KEE}_{s}\) is O(1)+O(n)+O(n)+O(1)=O(n), which is competitive among most landscape features.

figure a

Two examples for calculating \(\textrm{KEE}_{s}\)

To illustrate the computation of \(\textrm{KEE}_{s}\) and the comparison of different search orders for fitness landscapes, two examples are conducted. In Fig. 2, the sample size of both feature vectors is set to 30. In the first vector, the fitness values of the sample are set to [4 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 8 9 9 9 10 10 10 10]. In the second vector, the fitness values of the sample are defined as [6 6 8 5 5 5 6 4 7 7 6 5 5 5 5 5 5 5 6 10 10 10 10 5 7 6 9 9 6 9]. The search space corresponding to vector 1 is shown in Fig. 2a. Next, the computation of \(\textrm{KEE}_{s1}\) for vector 1 is used as an example for explanation. First, the fitness value of vector 1 is generated by the MSRW algorithm as mentioned above. Second, the search points are searched from front to back. Specifically, 4 is equal to 4, so the values from the first to the third point are replaced by 0. 4 is smaller than 5, so the values of the third point is replaced by 1. A new array can be obtained after comparing the other fitness values in the same way, i.e., [0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0]. Note that there are only 29 elements in the integer array because the comparison stops when the 30th element finishes comparing with the 29th element. Third, the new array is searched from front to back. \(a_1=2-1+1=2\), because the first two digits belong to the case of consecutive 0s. \(b_1=4-2+1=3\), because the 2nd and 4th digits belong to the case of alternating 0 and 1. The 4th and 13th digits belong to the case of consecutive 0s, so \(a_2=13-4+1=10\). The 13th and 15th digits belong to the case of alternating 0s and 1s, so \(b_2=15-13+1=3\). Similarly, \(a_3=20-15+1=6\), \(a_4=23-22+1=2\), \(a_5=27-26+1=2\), \(b_3=22-20+1=3\), \(b_4=24-23+1=2\), \(b_5=26-25+1=2\), \(b_6=29-27+1=3\), and \(c_1=25-24+1=2\) can be obtained. Fourth, the cumulative value of each case can be calculated as \(a_\textrm{sum}=a_1+a_2+a_3+a_4+a_5=22\), \(b_\textrm{sum}= b_1+b_2+b_3+b_4+b_5+b_6=16\), \(c_\textrm{sum}= c_1=2\), \(d_\textrm{sum}=0\), and \(e_\textrm{sum}=0\). Finally, the normalized feature value is \(\textrm{KEE}_{s1}=\frac{1}{(30-2) \times 2}\times (a_{\text{ sum } } \times (-1)+b_{\text{ sum } } \times (-0.6) +c_{\text{ sum } } \times (-0.2)+d_{\text{ sum } } \times (-0.2)+e_{\text{ sum } } \times (+1))=-0.5714\). In the same way, the value of \(\textrm{KEE}_{s2}\) for vector 2 is \(-\)0.2286. The corresponding parameters of the two examples in Fig. 2 are shown in Table 1.

It can be seen that the fitness landscape of Fig. 2a is multi-step and less acute, while the fitness landscape of Fig. 2b has more peaks and is more rugged. It can also be observed that the value of \(\textrm{KEE}_{s1}\) in Table 1 is smaller than that of \(\textrm{KEE}_{s2}\). As a result, the sharpness of vector 1 is less than vector 2, which is consistent with the observed actual fitness landscape. In summary, experimental results illustrate that \(\textrm{KEE}_{s}\) can reflect the sharpness of fitness landscapes. Although two vectors contain the same elements in different search orders, they generate fitness landscapes with different shapes and correspondingly different values of \(\textrm{KEE}_{s}\).

Fig. 2
figure 2

The fitness landscapes of the two vectors

Table 1 The corresponding parameters for the two examples in Fig. 2

Experimental studies for characterizing continuous optimization problems

In this section, \(\textrm{KEE}_{s}\) and three well-known landscape features are used to characterize seven benchmark functions. Next, the influence of step size (s) in MSRW and the coverage of MSRW in fitness landscapes for \(\textrm{KEE}_{s}\) are analyzed. All comparison experiments in this paper are conducted on the computer with an Intel Core 3.20 GHz CPU and 8 GB RAM using Matlab R2016a software.

Experimental setups

Seven benchmark functions with different characteristics [41,42,43] are shown in Table 2. Each function includes a mathematical formula provided, the domain, and the known global optimum. The Sphere and Zakharov functions are both smooth, unimodal functions with low gradients. The Rosenbrock function is smooth, relatively flat that has been widely recognized as a unimodal function but has been proven to have a local (non-global) minimum at \(4 \le D \le 30\) [44]. The fitness landscape of Griewank, Ackley, Rastrigin, and Schwefel 2.26 functions are all rugged. However, the Griewank function is more rugged than others on the microscopic scale. The Ackley function has very steep gradients than others. The Schwefel 2.26 function is the only multi-funnel function.

Table 2 Benchmark functions with different characteristics, where D is the problem dimension
Table 3 Statistical results of \(\textrm{FDC}_{s}\), \(\textrm{IL}_{ns}\), \(\textrm{DM}\), and \(\textrm{KEE}_{s}\) for the benchmark functions shown in Table 2

\(\textrm{FDC}_{s}\), \(\textrm{IL}_{ns}\), \(\textrm{DM}\), and \(\textrm{KEE}_{s}\) are compared in the first experiment. Without loss of generality, the parameter of each landscape feature is set based on the recommendation in the corresponding reference [6]. \(\textrm{FDC}_{s}\) is calculated with a sample size of \(500\times D\). \(\textrm{IL}_{ns}\), \(\textrm{KEE}_{s}\) and \(\textrm{DM}\) are computed with a sample size of 1000. The p in \(\textrm{DM}\) is set to 10. SRW, CCRW, ICRW, and MSRW algorithms are contrasted in the last experiment. The step size (s) of all RW algorithms is set to 10% of the search space [36]. The coverage of the RW algorithm is measured using the Hausdorff distance (\(d_H\)) [35]. It is a general metric to measure the distance between the approximate set and the reference set in the search space. The approximate set is a series of search points generated by the RW algorithm, while the reference set is generated by the pseudo-random number generator. If every point in one subset is close to some point in the other subset, two finite subsets are considered to be close in Hausdorff distance. The \(d_H\) is defined as follows:

$$\begin{aligned} G D(A, R)= & {} \frac{1}{|A|}\left( \sum _{a \in A} \min _{r \in R} d(a, r)\right) \end{aligned}$$
(17)
$$\begin{aligned} IGD(A, R)= & {} G D(R, A) \end{aligned}$$
(18)
$$\begin{aligned} d_H= & {} \max \{G D(A, R), I G D(A, R)\} \end{aligned}$$
(19)

where d(ar) is the Euclidean distance between a point a in the approximation set A and a point r in the reference set R. The number of search points in R is set to the number of steps in RW, which is the number of search points in A. Since the reference set in \(d_H\) is extracted from a uniform distribution, the search points in R will uniformly cover the entire search space for sufficiently large samples. Consequently, the smaller the value of \(d_H\), the better the coverage of the search space by the RW algorithm.

Comparison results of \(\textrm{KEE}_{s}\) on problem characterization

To investigate the accuracy and robustness of the proposed \(\textrm{KEE}_{s}\), the mean (mean) and standard deviation (std) values of different landscape features for 30 independent runs are compared. Seven functions are tested on \(D=1,2\), and 5. It can be observed from Table 3 that the \(\textrm{FDC}_{s}\) value for the Sphere function is close to 1. Because the fitness value is positively correlated with the distance to the best point of the sample, which is consistent with the expected results. The \(\textrm{FDC}_{s}\) value of the Rastrigin function is lower than that of the Sphere function. Second, the \(\textrm{IL}_{ns}\) value of the Sphere function is close to 0 since its landscape information is the same as the reference function in the computation of \(\textrm{IL}_{ns}\). The values of \(\textrm{IL}_{ns}\) for the Rastrigin function, Ackley function, Griewank function, and Schwefel 2.26 function increase as the problem dimensions increase. Third, the \(\textrm{DM}\) values are negative for all functions except the multi-funneled Schwefel 2.26 function (above one dimension). Finally, the following results can be observed for \(\textrm{KEE}_{s}\). The mean value of \(\textrm{KEE}_{s}\) for the Sphere function in all problem dimensions is 0.32, indicating that the basic shape of the function is highly similar even if the search space becomes larger. The Zakharov function has the lowest value among these functions, indicating that the landscape is relatively flat. The \(\textrm{KEE}_{s}\) values of the Rosenbrock and Ackley functions increase as the problem dimensions increase, implying a sophisticated fitness landscape for these two functions in higher dimensions. The Griewank function has a fairly low mean value of \(\textrm{KEE}_{s}\) in \(D=2\), indicating a simpler landscape in this dimension. When \(D=2\), the Rastrigin function, and the Schwefel 2.26 function have the highest values and are more stable. Overall, the proposed \(\textrm{KEE}_{s}\) to characterize the sharpness of the fitness landscape for continuous optimization problems is meaningful. The values of corresponding landscape features are consistent with the expected results for the properties of the fitness landscape.

Comparison results of MSRW in \(\textrm{KEE}_{s}\)

The influence of step size in MSRW

The step size (s) is an essential parameter that controls the distribution of the MSRW algorithm. The MSRW algorithm with a large s tends to generate a stochastic position in the search space. The MSRW algorithm with a small s is limited in a tiny region resulting in the lack of partial information about the fitness landscape structure of the entire search space. Therefore, a suitable s should be chosen to maintain a reasonable distance between search points and to provide better coverage of the search space. To determine the suitable s in MSRW with 200 steps, the influence of four s (\(20\%,10\%, 5\%, 2.5\%\) of the search space) are compared in Fig. 3. It can be seen that the MSRW algorithm with higher s (\(20\%\) and \(10\%\) of the search space) provides a better coverage area than the MSRW algorithm with smaller s. Since the MSRW algorithm with a s of \(10\%\) of the search space provides the best search space coverage while maintaining reasonable proximity between search points on the walk. In this study, s of the MSRW algorithm is set to \(10\%\) of the search space.

Fig. 3
figure 3

One independent random walk of 200 steps with variable step size (s) for MSRW

The coverage of MSRW in fitness landscapes

It has great significance to study the coverage of RW algorithms in characterizing the fitness landscape. The samples generated by the RW algorithm are representative of the entire fitness landscape. In general, a representative sample is considered to have good coverage of the decision space of the optimization problem. The coverage of the search space is given in the previous subsection, which can directly confirm the efficiency of MSRW in the proposed \(\textrm{KEE}_{s}\). Due to the stochastic nature of random numbers, there is no guarantee that the same coverage space will be found for each run. Therefore, the average performance of MSRW is further studied by comparing the maximum (Max), minimum (Min), mean (Mean), and standard deviation (Std) of the Hausdorff distance (\(d_H\)) values obtained by 30 independent runs, where the best comes are bolded. Without loss of generality, the experimental setup for all RW algorithms is the same as those used in [36]. The number of steps is set to \(10^4\times D\), where D is the problem dimension (\(D=1,2,3, 4\)). The boundary of each dimension in the search space is set to \([-100,100]\). The statistical significance of MSRW and other RW algorithms is verified using the Wilcoxon rank-sum test with a significance level of 0.05 [45]. Please note that ‘+’ indicates that the average performance of MSRW is significantly better than the competition, while ‘\(\approx \)’ indicates that it is similar to the competition. In addition, the probability distribution of search points obtained by different RW algorithms are plotted in Fig. 4. The frequency is based on 100 ( 10 \(\times \) 10 ) bins of equal size, so the average search points for each bin is 100.

The following conclusions can be obtained from Table 4 and Fig. 4. First, the best Max, Min, and Mean \(d_H\) value is achieved by MSRW for all problem dimensions, illustrating the effectiveness of MSRW. Second, the lowest Std value of MSRW is obtained when \(D=1\), which proves that the search points extracted by MSRW are very reliable. For the other dimensions, the best Std values are obtained by CCRW. However, the small difference in Std values between MSRW and CCRW implies that both RW algorithms are quite robust for sampling simple continuous optimization problems. Third, the comparison of the Wilcoxon rank-sum test shows that MSRW outperforms its competitors in each dimension. Overall, the superiority of MSRW is quite obvious. Finally, according to the histograms of the four RW algorithms in the two-dimensional search space, it can be seen that the frequencies of SRW and CCRW deviate severely from the mean value of 100. The clustering of search points in the search space is apparent in the histogram of SRW. MSRW produces a distribution of search points similar to that of ICRW. And for MSRW, the search points of the four vertices of the distribution histogram are less different from the average search points. In summary, MSRW provides the best coverage of the fitness landscape.

Table 4 Comparison of statistical results for different RW algorithms
Fig. 4
figure 4

Histogram of four RW algorithms on different independent sample walks with 10000 steps

Application for predicting the performance of DE algorithms

According to the experimental results in the previous section, the expectation value of \(\textrm{KEE}_{s}\) is closely related to the search space of continuous optimization problems. In [46], Jones et al. argued that the correspondence between evolutionary algorithms and the search space of optimization problems is developed based on the fitness model of directed labeled graphs. The search for an evolutionary algorithm is viewed as a process of navigation on a directed graph, where the vertices of the directed graph are labeled according to fitness values. Therefore, landscape features can be used as a medium for algorithm performance prediction and algorithm selection. In this paper, the performance prediction of the DE algorithm for continuous optimization problems is used as a representative application of \(\textrm{KEE}_{s}\) to demonstrate its practicability.

Experimental setups

Seven functions shown in Table 2 are tested on \(D=10\), 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, and 150. Each problem instance is characterized by the D and four landscape features to construct the 5-valued feature vector: (D, \(\textrm{FDC}_{s}\), \(\textrm{IL}_{ns}\), \(\textrm{DM}\), \(\textrm{KEE}_{s}\)). \(\textrm{FDC}_{s}\) is calculated with a sample size of \(500\times D\), while \(\textrm{IL}_{ns}\), \(\textrm{KEE}_{s}\) and \(\textrm{DM}\) are computed with a sample size of 5000. All problem instances are solved by 30 independent runs using DE [47, 48], JADE [25], ICoDE [28], and LSHADE-cnEpSin [29]. The maximum number of evaluations (MaxFES) and the fixed accuracy level of each algorithm are set to \(10^4 \times D\) and \(10^{-8}\), respectively. The other parameter settings of the four algorithms are consistent with the corresponding literature. As a result, the complete dataset consists of 105 problem instances. Each instance has a 5-value feature vector and a performance class (\(\textrm{F}\) or \(\mathrm {S^*}\) described below). Next, the entire dataset is divided into a training set and a test set in the ratio of 2:1. The entire dataset is sorted by all performance classes, The test set is selected from the ranked list of every three patterns to ensure that the distribution of performance classes in the training set (70 patterns) is similar to that in the test set (35 patterns). The classification of the different DE algorithms used for modeling is implemented by using the C4.5 decision tree in the WEKA tool [49]. All parameters within the tool are default values. Performance metrics quantify the success rate of each algorithm, the speed of reaching a solution, and the relative quality of the solution. Class information is a fairly fast technique for determining which optimization problems the algorithm can and cannot solve. Without loss of generality, the three normalized algorithm performance metrics and the two performance classes are defined in the same way as in [50], which are shown as follows:

  1. (1)

    Success Rate (SRate): \(SRate\in [0,1]\), where \(Success_{runs}\) and \(Total_{runs}\) denote the number of successful runs and the total number of runs, respectively:

    $$\begin{aligned} { SRate }=\frac{Success_{runs}}{Total_{runs}} \end{aligned}$$
    (20)
  2. (2)

    Success Speed (SSpeed): \(SSpeed\in [0,1]\), where FESr is the number of function evaluations per run that achieves the global optimum within the fixed accuracy level:

    $$\begin{aligned} {SSpeed}{} & {} =\big \{ 0, \text { if the run is not successful. } {Total_{runs}}, \nonumber \\{} & {} \quad \text{ otherwise. } \end{aligned}$$
    (21)
  3. (3)

    Quality Metric (QMetric): \(QMetric\in [0,1]\), where \(f_{\min }\) and \({\hat{f}}\) are the estimated minimum and maximum fitness values for a run of an optimization algorithm on the benchmark function f, respectively:

    $$\begin{aligned} q= & {} \frac{{\hat{f}}-f^{\min }}{{\hat{f}}-f} \end{aligned}$$
    (22)
    $$\begin{aligned} { QMetric }= & {} 2^{q^{10^{4}}}-1 \end{aligned}$$
    (23)
  4. (4)

    Failure (class symbol \(\textrm{F}\)): The value of all three performance metrics for the problem is equal to 0.

  5. (5)

    Success (class symbol \(\mathrm {S^*}\)): The problem is solved with some level of success.

Comparison results on the correlation between landscape features and performance metrics

To investigate the link between the fitness landscape features and standard DE performance, Fig. 5 shows scatter diagrams of four landscape features and three performance metrics visually illustrating the correlation (or lack of correlation) between them. The values of the Spearman correlation coefficients are given in parentheses. It is a nonparametric (distribution-free) rank statistic that assesses how strongly two variables are related [6, 51]. It can be observed that \(\textrm{IL}_{ns}\) provides the strongest correlation with SRate and SSpeed, where Spearman correlation coefficients are \(-\)0.6759 and \(-\)0.7103. \(\textrm{KEE}_{s}\) presents the strongest correlation with QMetric, where the Spearman correlation coefficient is \(-\)0.7317. It can also be seen that a large percentage of the values are located at the top and bottom, with several points scattered between them, indicating the existence of different sets of optimization problems depending on the performance of the evolutionary algorithm. In summary, the four landscape features show a moderate or strong correlation with the three performance metrics.

Fig. 5
figure 5

The scatter plot shows the correlation between the four landscape features (\(\textrm{FDC}_{s}\), \(\textrm{IL}_{ns}\), \(\textrm{DM}\), \(\textrm{KEE}_{s}\)) and three performance metrics (SRate, SSpeed, QMetric) of standard DE. The values of the Spearman correlation coefficients are given in parentheses

Comparison results for predicting the performance of DE algorithms

Based on the correlation of landscape features and performance metrics, the link between the landscape features and DE algorithm performance is investigated. The prediction models of different DE algorithms obtained using landscape features are shown in Fig. 6. The split values of the true features are rounded to three decimal places. The generated training and test accuracy are shown below each tree. The number of problem instances that reach each leaf node is shown in parentheses. The number after the slash in parentheses indicates the number of problem instances misclassified by the feature node. In addition, the corresponding confusion matrix concerning the test set for the DE, JADE, ICoDE, and LSHADE-cnEpSin algorithm performance prediction models is illustrated in Table 5.

Fig. 6
figure 6

Decision trees show the prediction models of problem difficulties based on five measures (D, \(\textrm{FDC}_{s}\), \(\textrm{IL}_{ns}\), \(\textrm{DM}\), \(\textrm{KEE}_{s}\)) and four DE algorithms (Standard DE, JADE, ICoDE, LSHADE-cnEpSin)

Table 5 Confusion matrixs with respect to the test set for the DE, JADE, ICoDE, and LSHAD-cnEpSin algorithm performance prediction models illustrated in Fig. 6

Next, the predictive performance of JADE is explained as an example as follows. First, 42 problem instances with \(D \le 90\) belong to the class \(S^*\) of the prediction model. Second, the model predicts that 16 problem instances with \(D>90\) and \(\textrm{KEE}_{s} \le 0.35\) are of the class \(S^*\). Third, 8 problem instances with \(D>90\) and \(\textrm{KEE}_{s}>0.388\) are of the class \(S^*\). Fourth, 4 problem instances with \(D>90\) and \(\textrm{KEE}_{s} \le 0.388\) become the class F. Fifth, the total number of training patterns is 70 and the training accuracy is 94.2857%, indicating that the model has 4 incorrect classification patterns and 66 correct classification training patterns. The test accuracy of 97.1429% indicates the significant value of the proposed \(\textrm{KEE}_{s}\) as a predictor of JADE performance, as well as providing insight into the various problems that the algorithm itself may encounter when solving continuous optimization problems. Finally, some relations between the DE algorithms and landscape features can be revealed in Fig. 6. On the one hand, \(\textrm{KEE}_{s}\) and D are the same and most important features for classifying the failure or success of the standard DE and JADE. On the other hand, \(\textrm{IL}_{ns}\), \(\textrm{DM}\), and \(\textrm{FDC}_{s}\) are the most important features for ICoDE. \(\textrm{KEE}_{s}\) and \(\textrm{IL}_{ns}\) are the most important features for LSHADE-cnEpSin. Overall, the prediction model based on the four landscape features and D can predict the performance of different DE algorithms with high accuracy. It can be inferred that when the values of these features for the unknown problem are calculated offline, it is possible to determine which algorithms can succeed or fail in solving the problem.

Conclusion

This paper proposed \(\textrm{KEE}_{s}\) to quantify the sharpness of fitness landscapes for continuous optimization problems and to predict the performance of DE algorithms. In \(\textrm{KEE}_{s}\), a mirror simple random walk (MSRW) is designed to record the neighborhood for each point in the sample to present the relevance between the search points. The efficiency of \(\textrm{KEE}_{s}\) has been verified by several experiments. First, \(\textrm{KEE}_{s}\) and three landscape features are evaluated to check whether the statistical results are consistent with the properties of the function. Next, the influence of step size in MSRW of \(\textrm{KEE}_{s}\) and the coverage of MSRW in fitness landscapes are analyzed. Finally, the correlation between landscape features and performance metrics, as well as the link between landscape features and the predictive performance of the DE algorithm are investigated. Experimental results show the effectiveness of the proposed \(\textrm{KEE}_{s}\) and the practicability of algorithm performance prediction. As a result, \(\textrm{KEE}_{s}\) has become a new landscape feature to quantify the sharpness of fitness landscapes for continuous optimization problems and can be used as the predictor of DE algorithm performance due to its excellence. \(\textrm{KEE}_{s}\) can characterize fitness landscapes of optimization problems and predict the performance of the DE algorithm due to its mirror simple random walk and cumulative calculation mechanism. However, the paired comparison of fitness values of adjacent search points in the cumulative calculation mechanism requires a certain time complexity, which causes a waste of computing resources to some extent. Therefore, \(\textrm{KEE}_{s}\)may consume excessive runtime to quantify the sharpness of some complex optimization problems. In the future, several topics can be investigated further. First, \(\textrm{KEE}_{s}\) can be improved regarding the execution time of characterizing the optimization problems. Second, \(\textrm{KEE}_{s}\) can be applied to design landscape-aware optimization algorithms for solving numerical optimization problems [52, 53]. Finally, \(\textrm{KEE} _ {s} \)can be used for the algorithm selection task, dedicated to choosing the most appropriate algorithm at hand for a particular problem.