2.2 Fitness Landscape Analysis
How to describe and display the landscape of the solution space can be dated back to the 1930s or even earlier. Among them is a very early study (Wright,
1932), in which Wright used contour lines to show the fitness values of a set of chromosomes to visualize a two-dimensional fitness landscape metaphor for evolutionary biology. From this perspective, valleys, peaks, ridges, and plateaus can be used to visualize the kind of fitness landscape a search algorithm confronts, as shown in Fig.
1. More precisely, in this example, “+” and “−” represent peaks and valleys, while darker colours represent lower fitness values and vice versa. Several later studies (Grefenstette,
1999; Malan and Engelbrecht,
2013) attempted to visualize the relationships between feasible solutions, fitness values of solutions, and the landscape of the solution space to further understand the search performance of a metaheuristic algorithm for various optimization problems. A general and formal definition of the fitness landscape, resting on three basic assumptions, can be found in Stadler (
2002):
-
• a current solution s in the solution space,
-
• a candidate solution v that is the neighbour of the current solution s in the solution space, and
-
• a fitness function $f(s)$.
With this definition and the three assumptions, we can easily visualize the landscape of a discrete solution space. For instance, a candidate solution
v can be generated from the current solution
s by a transition operator in such a way that the Hamming distance between these two solutions is one. This definition can also be used for the continuous landscape. For example, a candidate solution
v can also be a neighbour of the current solution
s so that the Euclidean distance between these two solutions is less than a predefined small value (Stadler,
2002; Malan and Engelbrecht,
2013). Other studies (Pitzer and Affenzeller,
2012; Ochoa and Malan,
2019; Zou
et al.,
2022) also focus on understanding the fitness landscape of the solution space of an optimization problem via different perspectives when we want to use a metaheuristic algorithm to solve it. For example, the information from FLA can be used to know the ruggedness (Weinberger,
1990; Malan and Engelbrecht,
2009) or difficulty (Jones and Forrest,
1995) of a search algorithm for solving a particular optimization problem. This means that we can use the characteristics of the solution space of an optimization problem extracted by FLA (e.g. local optima and modality, basins of attraction and funnels, ruggedness and neutrality, gradients and deception, and searchability) to further design a better search algorithm. Nowadays, several methods for characterizing fitness functions and landscapes have been discussed in various studies (Malan and Engelbrecht,
2013; Richter and Engelbrecht,
2014; Ochoa and Malan,
2019) to understand the ruggedness, neutrality, and difficulty of the fitness landscape, such as autocorrelation function (Weinberger,
1990), ruggedness of information entropy (RIE) (Vassilev
et al.,
2000), neutral walk (Reidys and Stadler,
2001), and fitness distance correlation (FDC) (Jones and Forrest,
1995).

Fig. 1
A simple example of Wright’s fitness landscape (Wright,
1932).

Fig. 2
The ruggedness of different test functions.
Among them, the autocorrelation function, presented in Weinberger (
1990), is an early method based on random walks to understand the “ruggedness” of the binary fitness landscape. Figure
2 shows the landscapes of Rastrigin and Schwefel 2.26 test functions, respectively, which explain that different test functions might have different kinds of ruggedness. The autocorrelation function assumes that the behaviours of a random walk on a landscape will be the same even if they started from different points. Based on this assumption, the autocorrelation function will then use a sequence of fitness values generated by the random walk process on the landscape to calculate the correlation with the same sequence of values a small distance away to further know the ruggedness of the fitness landscape. By using this method, the fitness landscape of a solution space is smooth when the autocorrelation is high and vice versa. Vassilev
et al. (
2000) presented the ruggedness of information entropy (RIE) to measure the ruggedness of the fitness landscape. This RIE metric, of course, also uses a random walk process to sample a set of solutions. A string
$\textbf{s}(\epsilon )=\{{\textbf{s}_{1}},{\textbf{s}_{2}},\dots ,{\textbf{s}_{n}}\}$ in RIE will be used to represent the ruggedness of the fitness landscape. An element
${\textbf{s}_{i}}$ of
$\textbf{s}(\epsilon )$ can be defined as:
where
ϵ is a real number to determine the accuracy of the calculation of the string
$\textbf{s}(\epsilon )$ which is the observation value of the fitness landscape,
n is both the number of solutions and the number of sampling steps of the random walk process, and
${f_{i}}$ is the objective value of the
i-th sampling solution by a random walk process.
Malan and Engelbrecht (
2009) proposed a different approach for measuring the ruggedness of the fitness landscape of an optimization problem, in which strings are generated between predefined maximum and minimum values. The string
$\textbf{s}(\epsilon )$, based on Eq. (
2) with
ϵ defined by
and
${\varepsilon ^{\ast }}$ by
is used to calculate the information entropy value for generating nine different types of strings to map different states of the fitness landscapes, as shown in Table
1. This means that whether the fitness landscape is rugged, neutral, or smooth can then be measured by three neighbour candidate solutions.
Table 1
Ruggedness of information entropy analysis for different states of the fitness landscapes.
The entropic measure
$H(\epsilon )$ is calculated as follows:
where
a and
b, elements from the set
$\{\bar{1},0,1\}$, are adjacent elements in the string
$\textbf{s}(\epsilon )$, and
${P_{[ab]}}={n_{[ab]}}/n$ with
${n_{[ab]}}$ representing the number of sub-blocks
$[ab]$ appearing in the string
$\textbf{s}(\epsilon )$. In summary, by using Eq. (
5) to measure the fitness landscape, a higher value of
$H(\epsilon )$ implies a more rugged landscape in the random walk process.
Another type of FLA measurement can be found in Reidys and Stadler (
2001), in which it is called the neutral walk and can be used to understand the “neutrality” of the fitness landscape. This method will start with a random solution
${s_{0}}$ in the search space and use the neutral walk process to generate all neutral neighbour solutions around
${s_{0}}$. The fitness values of these neutral neighbour solutions (e.g.
${s_{1}}$) from a neutral walk process need to be the same or similar if and only if
$f({s_{0}})=f({s_{1}})$. This neutral walk process will continue until it cannot find more neutral neighbours farther away than the current neutral neighbours. The number of steps in the neutral walk will then be used as a measure of the neutrality of the fitness landscape. The fitness distance correlation (Jones and Forrest,
1995) provides an alternative way to measure the “difficulty” of an optimization problem for the search algorithm. The basic idea is to define the correlation coefficient between the objective values of solutions and the distances of the solutions from their corresponding best-searched solutions as follows:
where
$\mathcal{F}$ is the correlation coefficient value,
$F=\{{f_{1}},{f_{2}},\dots ,{f_{n}}\}$ is a set of objective values of solutions, and
$D=\{{d_{1}},{d_{2}},\dots ,{d_{n}}\}$ is the corresponding distances of those solutions to the optimal solution. Besides,
$\text{cov}(F,D)=\frac{1}{n}{\textstyle\sum _{i=1}^{n}}({f_{i}}-\bar{f})({d_{i}}-\bar{d})$ is the covariance between the objective values
F and distances
D, where
${\sigma _{F}}$,
${\sigma _{D}}$,
$\bar{f}$, and
$\bar{d}$ are the standard deviations and means of
F and
D, respectively. The value of
$\mathcal{F}$ is in the range
$[-1,+1]$, with a lower value implying that the analysed problem is an easy maximization problem while a higher value implying that the analysed problem is an easy minimization problem. This means that the optimization problem can be easily solved if the objective (fitness) values of the solutions are similar and their distances are small.
Shen and He (
2010) also presented an FLA method for measuring terrain fitness called the “number of optimal values,” which is computed from the fitness values of individuals in the population after sorting. Assume that the population is
$s=({s_{1}},{s_{2}},\dots ,{s_{n}})$, where
${s_{i}}$ is the
i-th solution and
n is the number of solutions in
s. Further assume that each solution in the population is
d-dimensional (i.e. contains
d subsolutions); that is,
${s_{i}}=({s_{i,1}},{s_{i,2}},\dots ,{s_{i,d}})$, where
${s_{i,j}}$ represents the
j-th dimension of the
i-th solution in the population. We can then compute the distances between all solutions and the best one. All these distances will then be sorted in ascending order, yielding the sequence
$\{{k_{1}},{k_{2}},\dots ,{k_{n}}\}$. This means that each solution
${s_{i}}$ is associated with an order index
${k_{j}}$ with
$i\ne j$, so that the value of
${k_{j}}$ is
i. Subsequently, the fitness values of individuals are compared in their sorted order. In case that
${f_{({k_{i+1}})}}\leqslant {f_{({k_{i}})}}$, the counter
χ will be incremented by one. After completing the comparison of all individuals, this count is normalized by the population size as follows:
where
ϕ can be used as an approximation of terrain roughness. When
$\phi =0$, the structure is closer to unimodal, which makes the problem relatively easy to solve; conversely, when
$\phi =1$, there are many “good” solutions in the region, resulting in terrain with varying elevations and greater problem complexity.