Ackley

The Ackley function is widely used for testing optimization algorithms. In its two-dimensional form, as shown in the plot above, it is characterized by a nearly flat outer region, and a large hole at the centre. The function poses a risk for optimization algorithms, particularly hillclimbing algorithms, to be trapped in one of its many local minima.

Definition

f(x)=aexp[b1nni=1xi2]exp[1nni=1cos(cxi)]+a+e,a=20,b=15,c=2π32.768xi32.768,i=1,n

Optimum

f(x)=0atx=(0,,0)

Fitness Landscape

[1]:
import numpy as np

from pymoo.problems import get_problem
from pymoo.visualization.fitness_landscape import FitnessLandscape

problem = get_problem("ackley", n_var=2, a=20, b=1/5, c=2 * np.pi)

FitnessLandscape(problem, angle=(45, 45), _type="surface").show()
[1]:
<pymoo.visualization.fitness_landscape.FitnessLandscape at 0x11d9b32f0>
../../_images/problems_single_ackley_7_1.png
[2]:
FitnessLandscape(problem, _type="contour", colorbar=True).show()
[2]:
<pymoo.visualization.fitness_landscape.FitnessLandscape at 0x11e15f9e0>
../../_images/problems_single_ackley_8_1.png