A fitness landscape is a triple $(X, N, f)$: the candidate solutions, the neighbors one variation step reaches, and fitness, so difficulty depends on the algorithm's moves as well as the function. Local optima and their basins, plateaus, ruggedness from epistasis, and deception make a fitness landscape hard to search. In Kauffman's NK model with ring neighborhoods the one-step correlation is about $1 - \frac{K+1}{N} \cdot \frac{M}{M-1}$, with $M = 2^{K+1}$, and a fully random fitness landscape has $2^N/(N+1)$ local optima on average. Over 30 seeded runs each, a $(1+1)$-EA solved 20-bit OneMax in a median of 146 iterations and never solved Trap in 100,000 evaluations; on single 16-bit NK instances it succeeded 30 times at $K = 0$ and never at $K = 15$. Fitness-distance correlation tracked this as a summary, not a verdict.
Consider two functions on bitstrings of length 20. The first is OneMax, the unit's running example, which counts the ones. The second, which Droste, Jansen, and Wegener (2002) call Trap, also counts the ones, except that the all-zeros string scores $n + 1 = 21$, more than any other string. Both have a single best point, and they agree everywhere else. Yet a simple evolutionary algorithm that flips random bits, and keeps any child at least as good as its parent, is expected to find the optimum of OneMax after about 130 evaluations. In 30 runs of 100,000 evaluations each, it never finds the optimum of Trap. Every run ends at the all-ones string, the point farthest from the answer. The two functions differ at a single point, so why is one trivial and the other hopeless?
The answer is in how fitness is arranged over the search space relative to the moves the algorithm can make. Nothing about the algorithm changed between the two runs, and the search space is the same. The fitness landscape is the standard way to describe that arrangement: the candidate solutions, the moves that connect them, and the fitness of each.
First we trace the idea to Wright's adaptive landscape in population genetics, and then define it precisely, with closeness set by the algorithm's operators. Next come the features that make a fitness landscape hard to search: local optima, plateaus, ruggedness, and deception. Then we test one attempt to summarize hardness in a single number. Finally one small algorithm, the $(1+1)$ EA of the evolutionary algorithm loop, is run on all of these problems, so the differences in its behavior come from the problems alone.
Wright's adaptive landscape
The picture comes from population genetics. Sewall Wright (1932) was explaining his theory of evolution to a general audience of geneticists. He asked the reader to imagine the field of all possible gene combinations, graded by adaptive value and drawn as a contour map. High-fitness combinations form peaks, and poor ones form valleys between them. A population occupies a small region of this map, and selection moves it uphill.
Wright's question was how a population on a minor peak could ever reach a higher one. Crossing a valley means passing through less fit combinations, which selection removes. His answer, the shifting balance theory, relied on small, partly isolated subpopulations, in which random drift could carry a population down and across a valley.
Wright was explicit that the two-dimensional diagram is a drastic simplification. The real field of gene combinations has an enormous number of dimensions, one for each locus. The diagram has also been read in two different ways: as a surface over the genotypes of individuals, or as mean fitness over the gene frequencies of a population. Its value as a heuristic has been disputed by historians and philosophers of biology (Skipper, 2004).
Evolutionary computation takes the first reading. Each candidate solution is a point and its fitness is the height. A population is a cloud of points that moves over the surface as it evolves (Eiben and Smith, 2015, ch. 2). Wright's valley-crossing question becomes the central problem of search: an algorithm that mostly accepts improvements has to escape a point that is better than everything near it. The section on local optima below names the ways it can.
To state that problem precisely, we need to say what "near" means.
A precise definition
The contour map suggests that the search space has a geometry of its own. It does not. A set of bitstrings, permutations, or programs has no built-in notion of which points are close. Closeness comes from the algorithm: two points are neighbors if one variation step can turn one into the other. A fitness landscape is therefore a triple
$$(X, N, f),$$
where $X$ is the set of candidate solutions, $N(x) \subseteq X$ is the set of neighbors of $x$, and $f : X \to \mathbb{R}$ is the fitness function. For bitstrings of length $n$ under single-bit-flip mutation, $N(x)$ is the $n$ strings at Hamming distance 1, and the space has the shape of an $n$-dimensional hypercube.
Jones (1995) made the dependence on the algorithm the center of his account, summarized as "one operator, one landscape". Each variation operator induces its own neighborhood structure on the same fitness function, and therefore its own fitness landscape.
Back to Trap. Under single-bit flips, Trap has two local optima: the all-zeros string, which is the global optimum, and the all-ones string. Every other string can gain fitness by gaining a one.
Example (making Trap easy). Trap becomes easy without any change to its fitness function, by changing the moves. Add a second operator that complements every bit, and the all-ones string becomes a neighbor of the all-zeros string. It is then no longer a local optimum, and the problem is easy. The fitness function did not change, only the moves.
The same reasoning explains why the choice between standard binary and Gray coding changes the difficulty of a numeric problem (see binary encoding and Gray codes). It also explains why crossover, which combines two parents, does not fit a simple neighbor graph at all.
With neighbors defined, we can say what makes a fitness landscape hard to search.
Features that make search hard
Local optima and basins
A point $x$ is a local optimum if no neighbor is better: $f(x) \ge f(y)$ for all $y \in N(x)$. Its basin of attraction is the set of starting points from which a strictly improving walk, such as a hill climber, ends at $x$. The number of local optima and the sizes of their basins describe how often a greedy search will stop short.
The same structure appears outside evolutionary computation. K-means is a hill climber on the residual sum of squares, and its local minima are why it is restarted from several initial centroids. Mutation in an evolutionary algorithm can usually make larger jumps than a single neighbor step, with small probability, which is one way it escapes. Escaping local optima covers the others.
A two-dimensional example makes basins visible, with the caution of Wright's own diagram that two dimensions are not many. Take the square $[0, 1]^2$, divided into a grid of $201 \times 201$ points, each a neighbor of the eight around it. Its fitness is made of three smooth hills:
- a broad one of height 1.00, centered at $(0.25, 0.70)$;
- a narrower one of height 0.80, at $(0.72, 0.30)$;
- a small one of height 0.56, at $(0.75, 0.80)$.
A steepest-ascent hill climber moves to the best neighbor until no neighbor is better. Running it from every grid point labels each point with the peak it ends on (the figure script tools/figures/fitness-landscapes.py does this).
Example (a larger budget does not help). A climber that starts inside the basin of the small peak, the one of height 0.56, does not reach the global peak however large its budget of evaluations. Once it reaches the small peak, every neighbor is worse, so it stops, however many evaluations remain. Only a different kind of move helps: a restart from a new point, or a jump larger than one grid step.
The basin shares turn into a cost. A climber started at a uniformly random point finds the global peak with probability 0.442. So $r$ independent climbs from uniformly random starts all fail with probability $0.558^r$, and the chance of at least one success is $1 - 0.558^r$: 0.688 with two climbs, 0.826 with three and 0.946 with five (rounded to three decimals, and computed from the unrounded basin share). Restarting is the simplest cure for local optima, and its cost is set by the size of the best basin, which nobody knows in advance on a real problem. Where basins are many and small, as in the rugged NK fitness landscapes below, restarts become hopeless.
Plateaus and neutrality
A plateau is a connected set of neighboring points with equal fitness. On a plateau, selection provides no direction, and the search drifts at random until it stumbles on an edge. The extreme case is a "needle in a haystack" function, equal everywhere except at one point. There no algorithm can do better than guess, because every evaluation that misses the needle returns the same value and so says nothing about where the needle is.
Neutrality is not always harmful. In biology, and in some genetic programming and grammatical encodings, networks of equal-fitness points let a population move a long way without losing fitness. From there it can reach regions where improvements are possible. Genetic drift, the random change that dominates when selection provides no direction, is treated in natural selection for computer scientists.
A block function shows neutrality at work. Split a string of 32 bits into eight blocks of four, and let fitness be the number of blocks that are all ones. A block with three ones scores the same as a block with none. So almost every point lies on a large plateau, and almost every mutation that is accepted is neutral.
The $(1+1)$-EA described in the experiment below accepts a child of equal fitness. It solved the block function in all 30 seeded runs, after a median of 602 iterations (interquartile range 440 to 806). A median of 92.3% of the moves it accepted left fitness unchanged (script tools/experiments/evolution/landscape_structure.py).
The flat stretches in the top panel are not idle time. The neutral moves carry the string across its plateau, and each improvement happens when a drifting incomplete block happens to complete.
Example (strict improvements only). If the algorithm accepted only strict improvements on the block function, it would be slower. Between improvements the string would not move at all. So it would have to complete each block from wherever its bits happened to be, flipping all of the missing bits in one mutation. That is far less likely when two or three bits are missing than when drift has already brought the block to three ones. With a flip probability of $1/32$ per bit, a mutation flips one given bit with probability $1/32$, two given bits with probability $1/32^2 = 1/1{,}024$, and three with probability $1/32^3 = 1/32{,}768$.
The worst case is a block that starts as four zeros. A random start has at least one such block with probability $1 - (15/16)^8 \approx 0.40$. Under strict acceptance, progress inside the block is never accepted on its own, because it does not raise fitness. The block is completed only by one mutation that flips all four of its bits, which has probability at most $32^{-4} \approx 9.5 \times 10^{-7}$ per iteration. The one exception is that the block may change as a side effect of an accepted mutation that completes another block, and a run has at most eight accepted mutations. So the expected wait for such a block is of the order of a million iterations.
The script ran the strict variant on the same 30 starting strings, with a cap of 10 million iterations. All 30 runs reached the optimum, after a median of 634,534 iterations (interquartile range 115,442 to 3,061,148; minimum 3,999, maximum 6,073,519). That is about 1,050 times the median of 602, and the fastest strict run was slower than the slowest run that accepted neutral moves. As it happened, 20 of the 30 starts contained a block of four zeros. Those runs took a median of 1,601,179 iterations, and the other 10 a median of 143,054.
Ruggedness and epistasis
A fitness landscape is rugged when neighboring points can have very different fitness, so that the value at one point says little about the values next to it. Weinberger (1990) proposed measuring this with the autocorrelation of fitness along a random walk. On a smooth fitness landscape, fitness values a few steps apart are still strongly correlated. On a rugged one the correlation dies off quickly. Fitness read along the walk is a series in time, and its correlation between values $h$ steps apart is the autocorrelation at lag $h$ that Autocorrelation and Stationarity defines.
Ruggedness usually comes from epistasis, the biological term for interaction between genes, where the effect of one gene depends on the values of others. Without epistasis, every bit can be optimized separately, as in OneMax. Kauffman's NK model makes the amount of interaction a parameter (Kauffman and Levin, 1987; Kauffman and Weinberger, 1989).
A string in the NK model has $N$ binary loci. The fitness contribution $f_i$ of locus $i$ depends on its own value and the values of $K$ other loci. Each of the $2^{K+1}$ possible combinations of those values is assigned an independent random number drawn uniformly from $[0, 1]$. Total fitness is the mean:
$$F(x) = \frac{1}{N} \sum_{i=1}^{N} f_i\bigl(x_i, x_{i_1}, \dots, x_{i_K}\bigr).$$
With $K = 0$ each locus contributes independently, so setting every bit to its better value gives a single optimum, and every other point has an improving neighbor. With $K = N - 1$ every contribution depends on the whole string. Changing one bit then draws fresh random values for every term, and fitness values at neighboring points are effectively unrelated.
For such an uncorrelated fitness landscape on the hypercube, a point is a local optimum when it is the best of itself and its $N$ neighbors. Those are $N + 1$ independent values from the same continuous distribution. Each of them is equally likely to be the largest, and ties have probability zero, so the point is the best with probability $1/(N+1)$. Adding that probability over the $2^N$ points, the expected number of local optima is $2^N / (N + 1)$, which for $N = 16$ is about 3,855, out of 65,536 points. Between the two extremes, $K$ tunes the fitness landscape from smooth to random.
How fast correlation decays with $K$. Weinberger's autocorrelation can be worked out for the NK model in a few lines. Here is the idea in one sentence: a one-bit flip changes only the contributions that read that bit, so the correlation after one step is roughly the share of contributions left untouched.
The formal version. Take one step of a random walk: flip one bit, chosen uniformly. With the ring neighborhoods used here, that bit is read by exactly $K + 1$ of the $N$ contributions (its own and the $K$ loci before it). The other $N - K - 1$ contributions do not change. Fitness is the mean of the contributions, each with the same variance $v$, so $\operatorname{Var}(F) = v/N$. The covariance between the fitness before and after the step comes from the terms the two values share. Write $x'$ for the string after the step. Each of the $N - K - 1$ unchanged contributions appears in both $F(x)$ and $F(x')$ with weight $1/N$, and adds $v/N^2$ to the covariance. If each changed contribution takes a fresh, independent value, the changed terms add nothing, and
$$\rho(1) = \frac{\operatorname{cov}(F(x), F(x'))}{\operatorname{Var}(F)} \approx \frac{(N - K - 1)\, v / N^2}{v / N} = 1 - \frac{K + 1}{N}.$$
Inside one fixed instance a changed contribution does not quite take a fresh value. It moves to another entry of its own table of $M = 2^{K+1}$ random numbers, and the correlation is measured over the points of that one instance, so each entry counts as a deviation from the mean of its own table. Two different entries of the same finite table are slightly negatively correlated in that sense, by $-1/(M - 1)$ on average over tables.
The reason is short. Let the entries $t_1, \dots, t_M$ be independent with variance $\sigma^2$, let $\bar t$ be their mean, and let $d_a = t_a - \bar t$. Then $\operatorname{cov}(t_a, \bar t) = \sigma^2/M$ and $\operatorname{Var}(\bar t) = \sigma^2/M$, so
$$\operatorname{Var}(d_a) = \sigma^2 - \frac{2\sigma^2}{M} + \frac{\sigma^2}{M} = \sigma^2\, \frac{M - 1}{M},$$
and for two different entries $a \ne b$, which are independent, so that $\operatorname{cov}(t_a, t_b) = 0$,
$$\operatorname{cov}(d_a, d_b) = 0 - \frac{\sigma^2}{M} - \frac{\sigma^2}{M} + \frac{\sigma^2}{M} = -\frac{\sigma^2}{M}.$$
Their ratio is $-1/(M - 1)$. So with $v = \operatorname{Var}(d_a)$, each of the $K + 1$ changed contributions adds $-\frac{1}{M-1} \cdot v/N^2$ to the covariance instead of nothing, and
$$\rho(1) \approx \frac{(N - K - 1) - (K + 1)/(M - 1)}{N} = 1 - \frac{K + 1}{N} \left(1 + \frac{1}{M - 1}\right) = 1 - \frac{K + 1}{N} \cdot \frac{M}{M - 1}.$$
The formula remains an approximation for a single instance, because it replaces each table's own variances and covariances by their averages over tables.
For $K = 0$ the correction is large: each contribution has only two values, and flipping its bit always swaps one for the other, so $\rho(1) = 1 - 2/N$. In general the correction is $\frac{K + 1}{N} \cdot \frac{1}{M - 1}$. For $N = 16$ it is about 0.01 at $K = 4$, which still matters for the walk at $K = 4$ below, about 0.001 at $K = 8$, and below 0.0001 from $K = 12$ on.
Example (the formula at $K = 15$). With $N = 16$ and $K = 15$, where every contribution reads every bit, the formula predicts a $\rho(1)$ of essentially zero. All $K + 1 = 16$ contributions change, so nothing is shared, and the correction $M/(M-1)$ is 1 to four decimals.
The script tools/experiments/evolution/landscape_structure.py checked the formula exactly, over every edge of the hypercube, on 30 random instances for each $K$ from 0 to 15 with $N = 16$. The median measured $\rho(1)$ was:
- 0.875 for $K = 0$ (corrected formula 0.875, uncorrected 0.938);
- 0.786 for $K = 2$ (0.786 and 0.813);
- 0.436 for $K = 8$ (0.436 and 0.438);
- 0.000 for $K = 15$.
Along a longer walk the correlation at distance $d$ decays roughly as $\rho(1)^d$, since each step replaces another fraction of the contributions. On one instance with $K = 4$, a walk of 100,000 steps gave correlations of 0.675, 0.470 and 0.337 at distances 1, 2 and 3, against $\rho(1)^d$ = 0.677, 0.459 and 0.311. The measured values sit a little above the prediction, because a walk sometimes flips the same bit back, undoing a step. For $K = 15$ this effect is the only correlation left. Two steps return to the start with probability $1/16$, and the measured correlation at distance 2 was 0.069.
The local optima climb by more than three orders of magnitude, out of 65,536 points: medians of 1 at $K = 0$, 31 at $K = 2$, 168.5 at $K = 4$, 893 at $K = 8$ and 3,855 at $K = 15$. Instances vary, most at small $K$. The single instance with $K = 2$ in the experiment below has 64 local optima, above the interquartile range of 24 to 44 for that $K$. Its instance with $K = 4$ has 173, inside the range of 155 to 191.
The demo's default instance has $N = 10$ and $K = 2$. It has 8 local optima among its 1,024 points and a fitness-distance correlation of $-0.354$, and steepest ascent from a uniformly random start reaches its global optimum 29.1% of the time. With the same seed, $K = 0$ gives one optimum, reached from every start, and $K = 9$ gives 101 local optima and a success rate of 4.4% (script tools/experiments/evolution/nk_demo_check.py, which reproduces the demo's generator).
Deception
Ruggedness scatters the search among many local optima. Deception does something worse: it points the search the wrong way. Deception is a notion from the theory of genetic algorithms developed by Goldberg and his colleagues. It describes problems in which the information a genetic algorithm gathers about short building blocks points away from the optimum (see the schema theorem).
Trap functions are the standard examples. They depend only on the number of ones $\lvert x \rvert$, rise steadily toward one end of the space, and place the global optimum at the other end. Deb and Goldberg (1993) analyzed which trap functions are deceptive in this sense. The Trap function of the introduction is the extreme case, credited by Droste, Jansen, and Wegener (2002) to Ackley (1987):
$$\mathrm{Trap}(x) = \lvert x \rvert + (n + 1) \prod_{i=1}^{n} (1 - x_i).$$
The product is 1 only for the all-zeros string. Every other string improves by gaining a one, so an improving search is led to the all-ones string. From there the only improving move is to flip all $n$ bits at once. With bit-flip probability $1/n$, that happens with probability $n^{-n}$ per step. Droste, Jansen, and Wegener (2002) proved that the expected optimization time of the (1+1)-EA on Trap is $\Theta(n^n)$. For $n = 20$, $n^{-n}$ is about $9.5 \times 10^{-27}$.
With $n = 4$ the whole fitness landscape fits in a picture. Every string with $k \ge 1$ ones scores $k$, and 0000 scores $n + 1 = 5$.
Example (the basin of 0000). Under steepest ascent, five of the 16 strings end at 0000: 0000 itself and the four strings with a single one. From a string with a single one, the best neighbor is 0000, with fitness 5 against 2 for the neighbors with two ones. Every string with two or more ones climbs to 1111, since its neighbors with one more one score higher than it does and its neighbors with one fewer score lower.
For $n = 20$ the same reasoning gives a basin of 21 points out of $2^{20} = 1{,}048{,}576$. A random start lands in it with probability about $2 \times 10^{-5}$.
Deception is a property of a fitness function together with a search process, not of the function alone. Trap is perfectly easy for an algorithm whose first guess is the all-zeros string, and for the complement operator above.
Local optima, plateaus, ruggedness and deception all describe hardness in words. The next section examines one attempt to put it in a number, and finds it a useful summary but not a verdict.
Fitness-distance correlation
Jones and Forrest (1995) proposed fitness-distance correlation (FDC): the correlation coefficient between the fitness of a point and its distance to the nearest global optimum. Given fitness values $F$ and distances $D$ over a sample of points,
$$r = \frac{\operatorname{cov}(F, D)}{\sigma_F \, \sigma_D},$$
where $\operatorname{cov}(F, D)$ is their covariance and $\sigma_F$ and $\sigma_D$ are their standard deviations. For a maximization problem, fitness that rises as the distance to the optimum falls gives a negative $r$, and an improving search is led toward the optimum. A positive $r$ means that fitter points tend to lie farther away, so improvement leads the search astray.
Jones and Forrest proposed rough bands:
- $r \le -0.15$ for straightforward problems;
- $r \ge 0.15$ for misleading ones;
- the band in between, where the correlation says little, for difficult ones.
On the problems they tested, FDC classified easy deceptive problems as easy and hard non-deceptive problems as hard. It also predicted when Gray coding outperformed binary coding.
Example (the two extremes). The FDC of OneMax is exactly $-1$, and the FDC of Trap is just below $+1$. For OneMax on $n$ bits, a string with $k$ ones has fitness $k$ and distance $n - k$ to the all-ones optimum. Fitness is an exact decreasing linear function of distance, so $r = -1$. FDC is Pearson's correlation coefficient, and Correlation: Pearson, Spearman and Kendall proves that it reaches $-1$ or $+1$ only when one variable is an exact linear function of the other, which is the OneMax case. For Trap, fitness equals distance everywhere except at the optimum itself, which is one point in $2^n$, so $r$ is just below $+1$.
Every other function falls between these. The exact values over all $2^{16}$ points for $n = 16$ are (script tools/experiments/evolution/landscape_structure.py, rounded to three decimals):
| Function ($n = 16$) | FDC |
|---|---|
| OneMax | −1.000 |
| Blocks of 4 (complete blocks of ones) | −0.516 |
| LeadingOnes (ones before the first zero) | −0.354 |
| NK, $K = 0$ | −0.723 |
| NK, $K = 2$ | −0.403 |
| NK, $K = 8$ | −0.046 |
| NK, $K = 15$ | −0.003 |
| Trap | +0.999 |
The table also shows that FDC is a statistic, not a verdict. LeadingOnes has a weaker correlation than the block function. Yet the $(1+1)$-EA solves it reliably in $\Theta(n^2)$ expected time (Droste, Jansen, and Wegener, 2002), because every non-optimal string has an improving one-bit neighbor. The correlation is weak because many points far from the optimum have a fitness of 0 or 1, not because the search is led astray.
FDC has clear limits:
- It needs the global optimum, so it is a tool for studying benchmark problems, not for diagnosing a new one.
- It compresses an entire fitness landscape into one linear statistic, and constructed problems exist on which it gives the wrong answer. Tomassini, Vanneschi, Collard, and Clergue (2005) found it a useful indicator for genetic programming problems in nearly all their cases. They also built an artificial problem on which it gives contradictory indications.
- The distance in the formula must match the operator. Hamming distance suits bit-flip mutation and says nothing about a complement operator.
The features and the summary number can now be put to one test: the same algorithm on all of these problems.
Experiment: one algorithm, three kinds of problem
The (1+1)-EA is the simplest evolutionary algorithm: a population of one parent and one child. It starts from a random bitstring $x$ and creates a child $y$ by flipping each bit independently with probability $1/n$. It replaces $x$ by $y$ if $f(y) \ge f(x)$. Accepting equal fitness lets it drift across plateaus. Each problem below gets 30 seeded runs. FDC is computed exactly over the whole search space, using Hamming distance to the global optimum.
OneMax. Here the fitness landscape is as smooth as possible. With $d(x)$ the distance to the all-ones optimum, $f(x) = n - d(x)$, so FDC is exactly $-1$.
A standard argument bounds the run time. In words: progress is slowest at the end, when the few remaining zeros are hard to hit, and adding up the waits at each level gives $n \ln n$ up to a constant. In detail, with $i$ zeros left, one way to improve is to flip exactly one of those $i$ bits and nothing else, which has probability $i \cdot \frac{1}{n} (1 - \frac{1}{n})^{n-1} \ge \frac{i}{en}$. For $n = 1$ the factor $(1 - \frac1n)^{n-1}$ is 1. For $n \ge 2$ the inequality $(1 - \frac1n)^{n-1} \ge \frac1e$ holds because $\ln(1 + \frac{1}{n-1}) \le \frac{1}{n-1}$, so $(n-1) \ln(1 - \frac1n) = -(n-1) \ln(1 + \frac{1}{n-1}) \ge -1$. The number of zeros never rises, because a child with more zeros is rejected. So the run leaves the level with $i$ zeros at most once, and the expected wait there is at most $en/i$ iterations. Summing over $i = 1, \dots, n$ gives at most $e n \sum_{i=1}^{n} \frac1i = e n H_n$, where $H_n$ is the $n$-th harmonic number. Since $\ln n < H_n \le \ln n + 1$, this is $e n \ln n$ up to a term of at most $en$.
Droste, Jansen, and Wegener (2002) proved that every linear function, OneMax included, is optimized in expected time $O(n \ln n)$. The precise constant took longer. Hwang, Panholzer, Rolin, Tsai, and Chen (2018) give the expected number of iterations as
$$e n \ln n - 1.89254\, n + \tfrac{e}{2} \ln n + 0.59790 + O\!\left(\tfrac{\ln n}{n}\right).$$
| $n$ | Median iterations (IQR) | Mean | $e n \ln n$ | Hwang et al. |
|---|---|---|---|---|
| 25 | 154 (132 to 201) | 170 | 219 | 176 |
| 50 | 386 (335 to 466) | 424 | 532 | 443 |
| 100 | 1,074 (928 to 1,312) | 1,124 | 1,252 | 1,069 |
| 200 | 2,317 (2,061 to 2,774) | 2,557 | 2,880 | 2,510 |
The sample means are within about one standard error of the expansion, and well below $e n \ln n$, whose linear correction is still large at these sizes. The medians sit below the means because the distribution of run times has a long right tail. Most of the time is spent at the end, waiting for the last few zeros to be hit. For the 20-bit OneMax of the introduction the expansion gives 129.7 iterations, and 30 seeded runs took a median of 146 (interquartile range 115 to 160, mean 141). The 50-bit runs of the evolutionary algorithm loop were separate runs with a different random number generator. Their median of 411 evaluations lies inside the interquartile range here, 335 to 466.
Trap, with $n = 20$ and a budget of 100,000 evaluations: 0 of 30 runs found the optimum, and all 30 ended at the all-ones string. FDC is $+1.000$ to three decimals, since Trap equals the distance to the optimum everywhere except at the optimum itself, one point in $2^{20}$. The prediction of FDC and the behavior of the algorithm agree.
NK model, with $N = 16$ and the $K$ other loci taken to be the next $K$ positions around a ring. There is one random instance per $K$, enumerated in full (65,536 points) to find its global optimum and count its local optima under single-bit flips. Each run had a budget of 20,000 evaluations.
| $K$ | Local optima | FDC | Runs that found the optimum | Median evaluations when found (IQR) |
|---|---|---|---|---|
| 0 | 1 | −0.723 | 30 / 30 | 87 (68 to 127) |
| 2 | 64 | −0.403 | 26 / 30 | 634 (406 to 1,072) |
| 4 | 173 | −0.156 | 10 / 30 | 762 (546 to 968) |
| 8 | 931 | −0.046 | 2 / 30 | 5,350 (2,771 to 7,930) |
| 15 | 3,813 | −0.003 | 0 / 30 | none |
As $K$ grows, local optima multiply, the correlation between fitness and distance to the optimum fades to nothing, and success falls from 30 runs to none. At $K = 15$ the count of 3,813 local optima is close to the $2^{16}/17 \approx 3{,}855$ expected for an uncorrelated fitness landscape.
The (1+1)-EA is not a pure hill climber, since it occasionally flips several bits at once. That is how most of the successful runs at $K = 2$, 4, and 8 got past a local optimum on the way. These are single instances of each problem, so the exact counts would shift with a different random draw, but the trend is the one Kauffman's model is designed to produce. The script is tools/experiments/evolution/landscapes.py in the site repository.
Limits of the picture
The fitness landscape is a useful model of a single-point search with one operator. It is less faithful for the algorithms the rest of this course studies.
- A population with crossover moves in ways that depend on the whole population, not on one point's neighbors.
- In high dimensions, intuitions from two-dimensional pictures mislead. A point that looks trapped on a map may have many escape routes through dimensions the picture cannot show, which is the same caution Wright gave about his own diagram.
- When fitness depends on other evolving individuals, as in competitive coevolution, the fitness landscape itself changes as the search moves, and peaks stop being fixed targets (Red Queen dynamics).
- No single feature determines difficulty. FDC, ruggedness, and counts of local optima are all summaries, and each has counterexamples.
What we have learned
OneMax and Trap differ at one point, yet one is solved in about 130 evaluations and the other never. The fitness landscape explains why. Difficulty belongs to the fitness function together with the moves of the algorithm: local optima and their basins, plateaus that need drift, ruggedness that grows with epistasis, and deception that points the wrong way. FDC summarizes some of this in one number, and the (1+1)-EA's behavior followed it on these problems, with LeadingOnes as a reminder that it is a summary, not a verdict.
This raises a broader question. If every algorithm does well on some arrangements of fitness values and badly on others, is any algorithm better in general? Averaged over every possible arrangement, the answer is no, and every search algorithm performs equally. Algorithms succeed on real problems because those problems have structure, such as smoothness, low epistasis, or a strong correlation between fitness and distance to the optimum, that the algorithm's operators can exploit. The next article, the No Free Lunch theorems, makes that precise.
References
- Ackley, D. H. (1987). A Connectionist Machine for Genetic Hillclimbing. Kluwer Academic Publishers. record
- Deb, K., and Goldberg, D. E. (1993). Analyzing deception in trap functions. In L. D. Whitley (Ed.), Foundations of Genetic Algorithms 2, 93–108. Morgan Kaufmann. record
- Droste, S., Jansen, T., and Wegener, I. (2002). On the analysis of the (1+1) evolutionary algorithm. Theoretical Computer Science, 276(1–2), 51–81. record · 5 pages
- Eiben, A. E., and Smith, J. E. (2015). Introduction to Evolutionary Computing, 2nd ed., chapter 2. Springer. record · 35 pages
- Hwang, H.-K., Panholzer, A., Rolin, N., Tsai, T.-H., and Chen, W.-M. (2018). Probabilistic analysis of the (1+1)-evolutionary algorithm. Evolutionary Computation, 26(2), 299–345. record
- Jones, T. (1995). Evolutionary Algorithms, Fitness Landscapes and Search. PhD thesis, University of New Mexico. record
- Jones, T., and Forrest, S. (1995). Fitness distance correlation as a measure of problem difficulty for genetic algorithms. In Proceedings of the Sixth International Conference on Genetic Algorithms (ICGA 1995), 184–192. Morgan Kaufmann. record
- Kauffman, S., and Levin, S. (1987). Towards a general theory of adaptive walks on rugged landscapes. Journal of Theoretical Biology, 128(1), 11–45. record
- Kauffman, S. A., and Weinberger, E. D. (1989). The NK model of rugged fitness landscapes and its application to maturation of the immune response. Journal of Theoretical Biology, 141(2), 211–245. record
- Skipper, R. A., Jr. (2004). The heuristic role of Sewall Wright's 1932 adaptive landscape diagram. Philosophy of Science, 71(5), 1176–1188. record
- Tomassini, M., Vanneschi, L., Collard, P., and Clergue, M. (2005). A study of fitness distance correlation as a difficulty measure in genetic programming. Evolutionary Computation, 13(2), 213–239. record
- Weinberger, E. (1990). Correlated and uncorrelated fitness landscapes and how to tell the difference. Biological Cybernetics, 63(5), 325–336. record
- Wright, S. (1932). The roles of mutation, inbreeding, crossbreeding and selection in evolution. In Proceedings of the Sixth International Congress of Genetics, 1, 356–366. record
Reviewed: verified, 16 Nov 2026 · citations checked, 16 Nov 2026 · editorial review, 23 Nov 2026 · 7 revisions