Single-Objective

bm_rand(*_)

Random test objective function. The unnamed args parameter is an input sink for internal DEAP-ER functionality and has no effect on the result.

Returns

A completely random number.

Return type

tuple[float]

Equations

Type

minimization or maximization

Range

none

Global optima

none

Function

\(f(\mathbf{x}) = \text{random}(0,1)\)

bm_plane(individual)

Plane test objective function.

Parameters

individual (Individual) – The Individual to be evaluated.

Returns

The first Fitness value of the individual.

Return type

tuple[float]

Equations

Type

minimization

Range

none

Global optima

\(x_i = 0, \forall i \in \lbrace 1 \ldots N\rbrace\), \(f(\mathbf{x}) = 0\)

Function

\(f(\mathbf{x}) = x_0\)

bm_sphere(individual)

Sphere test objective function.

Parameters

individual (Individual) – The Individual to be evaluated.

Returns

Fitness value of the individual.

Return type

tuple[float]

Equations

Type

minimization

Range

none

Global optima

\(x_i = 0, \forall i \in \lbrace 1 \ldots N\rbrace\), \(f(\mathbf{x}) = 0\)

Function

\(f(\mathbf{x}) = \sum_{i=1}^Nx_i^2\)

bm_cigar(individual)

Cigar test objective function.

Parameters

individual (Individual) – The Individual to be evaluated.

Returns

Fitness value of the individual.

Return type

tuple[float]

Equations

Type

minimization

Range

none

Global optima

\(x_i = 0, \forall i \in \lbrace 1 \ldots N\rbrace\), \(f(\mathbf{x}) = 0\)

Function

\(f(\mathbf{x}) = x_0^2 + 10^6\sum_{i=1}^N\,x_i^2\)

bm_rosenbrock(individual)

Rosenbrock test objective function.

Parameters

individual (Individual) – The Individual to be evaluated.

Returns

Fitness value of the individual.

Return type

tuple[float]

Equations

Type

minimization

Range

none

Global optima

\(x_i = 1, \forall i \in \lbrace 1 \ldots N\rbrace\), \(f(\mathbf{x}) = 0\)

Function

\(f(\mathbf{x}) = \sum_{i=1}^{N-1} (1-x_i)^2 + 100 (x_{i+1} - x_i^2 )^2\)

bm_h1(individual)

Simple two-dimensional function containing several local maxima.

Parameters

individual (Individual) – The Individual to be evaluated.

Returns

Fitness value of the individual.

Return type

tuple[float]

Equations

Type

maximization

Range

\(x_i \in [-100, 100]\)

Global optima

\(\mathbf{x} = (8.6998, 6.7665)\), \(f(\mathbf{x}) = 2\)

Function

\(f(\mathbf{x}) = \frac{\sin(x_1 - \frac{x_2}{8})^2 + \sin(x_2 + \frac{x_1}{8})^2}{\sqrt{(x_1 - 8.6998)^2 + (x_2 - 6.7665)^2} + 1}\)

bm_ackley(individual)

Ackley test objective function.

Parameters

individual (Individual) – The Individual to be evaluated.

Returns

Fitness value of the individual.

Return type

tuple[float]

Equations

Type

minimization

Range

\(x_i \in [-15, 30]\)

Global optima

\(x_i = 0, \forall i \in \lbrace 1 \ldots N\rbrace\), \(f(\mathbf{x}) = 0\)

Function

\(f(\mathbf{x}) = 20 - 20\exp\left(-0.2 \sqrt{\frac{1}{N} \sum_{i=1}^N x_i^2} \right) + e - \exp\left(\frac{1}{N} \sum_{i=1}^N \cos(2\pi x_i) \right)\)

bm_bohachevsky(individual)

Bohachevsky test objective function.

Parameters

individual (Individual) – The Individual to be evaluated.

Returns

Fitness value of the individual.

Return type

tuple[float]

Equations

Type

minimization

Range

\(x_i \in [-100, 100]\)

Global optima

\(x_i = 0, \forall i \in \lbrace 1 \ldots N\rbrace\), \(f(\mathbf{x}) = 0\)

Function

\(f(\mathbf{x}) = \sum_{i=1}^{N-1}(x_i^2 + 2x_{i+1}^2 - 0.3\cos(3\pi x_i) - 0.4\cos(4 \pi x_{i+1}) + 0.7)\)

bm_griewank(individual)

Griewank test objective function.

Parameters

individual (Individual) – The Individual to be evaluated.

Returns

Fitness value of the individual.

Return type

tuple[float]

Equations

Type

minimization

Range

\(x_i \in [-600, 600]\)

Global optima

\(x_i = 0, \forall i \in \lbrace 1 \ldots N\rbrace\), \(f(\mathbf{x}) = 0\)

Function

\(f(\mathbf{x}) = \frac{1}{4000}\sum_{i=1}^N \,x_i^2 - \prod_{i=1}^N\cos\left( \frac{x_i}{\sqrt{i}}\right) + 1\)

bm_schaffer(individual)

Schaffer test objective function.

Parameters

individual (Individual) – The Individual to be evaluated.

Returns

Fitness value of the individual.

Return type

tuple[float]

Equations

Type

minimization

Range

\(x_i \in [-100, 100]\)

Global optima

\(x_i = 0, \forall i \in \lbrace 1 \ldots N\rbrace\), \(f(\mathbf{x}) = 0\)

Function

\(f(\mathbf{x}) = \sum_{i=1}^{N-1} (x_i^2+x_{i+1}^2)^{0.25} \cdot \left[ \sin^2(50\cdot(x_i^2+x_{i+1}^2)^{0.10}) + 1.0 \right]\)

bm_schwefel(individual)

Schwefel test objective function.

Parameters

individual (Individual) – The Individual to be evaluated.

Returns

Fitness value of the individual.

Return type

tuple[float]

Equations

Type

minimization

Range

\(x_i \in [-500, 500]\)

Global optima

\(x_i = 420.96874636, \forall i \in \lbrace 1 \ldots N\rbrace\), \(f(\mathbf{x}) = 0\)

Function

\(f(\mathbf{x}) = 418.9828872724339\cdot N - \sum_{i=1}^N\,x_i\sin\left(\sqrt{|x_i|}\right)\)

bm_himmelblau(individual)

The Himmelblaus function has 4 defined minimums in the range of \([-6, 6]^2\).

Parameters

individual (Individual) – The Individual to be evaluated.

Returns

Fitness value of the individual.

Return type

tuple[float]

Equations

Type

minimization

Range

\(x_i \in [-6, 6]\)

Global optima

\(\mathbf{x}_1 = (3.0, 2.0)\), \(f(\mathbf{x}_1) = 0\)

\(\mathbf{x}_2 = (-2.805118, 3.131312)\), \(f(\mathbf{x}_2) = 0\)

\(\mathbf{x}_3 = (-3.779310, -3.283186)\), \(f(\mathbf{x}_3) = 0\)

\(\mathbf{x}_4 = (3.584428, -1.848126)\), \(f(\mathbf{x}_4) = 0\)

Function

\(f(x_1, x_2) = (x_1^2 + x_2 - 11)^2 + (x_1 + x_2^2 -7)^2\)

bm_rastrigin(individual)

Rastrigin test objective function.

Parameters

individual (Individual) – The Individual to be evaluated.

Returns

Fitness value of the individual.

Return type

tuple[float]

Equations

Type

minimization

Range

\(x_i \in [-5.12, 5.12]\)

Global optima

\(x_i = 0, \forall i \in \lbrace 1 \ldots N\rbrace\), \(f(\mathbf{x}) = 0\)

Function

\(f(\mathbf{x}) = 10N + \sum_{i=1}^N x_i^2 - 10 \cos(2\pi x_i)\)

bm_rastrigin_scaled(individual)

Scaled Rastrigin test objective function.

Parameters

individual (Individual) – The Individual to be evaluated.

Returns

Fitness value of the individual.

Return type

tuple[float]

Equations

Type

minimization

Range

\(x_i \in [-5.12, 5.12]\)

Global optima

\(x_i = 0, \forall i \in \lbrace 1 \ldots N\rbrace\), \(f(\mathbf{x}) = 0\)

Function

\(f(\mathbf{x}) = 10N + \sum_{i=1}^N \left(10^{\left(\frac{i-1}{N-1}\right)} x_i \right)^2 - 10\cos\left(2\pi 10^{\left( \frac{i-1}{N-1}\right)} x_i \right)\)

bm_rastrigin_skewed(individual)

Skewed Rastrigin test objective function.

Parameters

individual (Individual) – The Individual to be evaluated.

Returns

Fitness value of the individual.

Return type

tuple[float]

Equations

Type

minimization

Range

\(x_i \in [-5.12, 5.12]\)

Global optima

\(x_i = 0, \forall i \in \lbrace 1 \ldots N\rbrace\), \(f(\mathbf{x}) = 0\)

Function

\(f(\mathbf{x}) = 10N + \sum_{i=1}^N \left(y_i^2 - 10 \cos(2\pi x_i)\right)\)

\(\text{where } y_i = 10\cdot x_i \text{ if } x_i > 0 \text{, else } x_i\)

bm_shekel(individual, matrix, vector)

The Shekel multimodal function can have any number of maxima. The maxima count is given by the length of the arguments matrix and vector.

Parameters
  • individual (Individual) – The Individual to be evaluated.

  • matrix (numpy.ndarray) – Matrix of size \(M\times N\), where \(M\) is the number of maxima and \(N\) is the number of dimensions.

  • vector (numpy.ndarray) – Vector of size \(M\times 1\), where \(M\) is the number of maxima.

Returns

Fitness value of the individual.

Return type

tuple[float]

Equations

Type

maximization

Range

None

Global optima

None

Function

\(f(\mathbf{x}) = \sum_{i = 1}^{M} \frac{1}{c_{i} + \sum_{j = 1}^{N} (x_{j} - a_{ij})^2 }\)