test_functions N-D Test Functions S

class go_benchmark.Salomon(dimensions=2)

Salomon test objective function.

This class defines the Salomon global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Salomon}}(\mathbf{x}) = 1 - \cos \left (2 \pi \sqrt{\sum_{i=1}^{n} x_i^2} \right) + 0.1 \sqrt{\sum_{i=1}^n x_i^2}

Here, n represents the number of dimensions and x_i \in [-100, 100] for i=1,...,n.

Salomon function

Two-dimensional Salomon function

Global optimum: f(x_i) = 0 for x_i = 0 for i=1,...,n


class go_benchmark.Sargan(dimensions=2)

Sargan test objective function.

This class defines the Sargan global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Sargan}}(\mathbf{x}) = \sum_{i=1}^{n} n \left (x_i^2 + 0.4 \sum_{i \neq j}^{n} x_ix_j \right)

Here, n represents the number of dimensions and x_i \in [-100, 100] for i=1,...,n.

Sargan function

Two-dimensional Sargan function

Global optimum: f(x_i) = 0 for x_i = 0 for i=1,...,n


class go_benchmark.Schaffer01(dimensions=2)

Schaffer 1 test objective function.

This class defines the Schaffer 1 global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Schaffer01}}(\mathbf{x}) = 0.5 + \frac{\sin^2 (x_1^2 + x_2^2)^2 - 0.5}{1 + 0.001(x_1^2 + x_2^2)^2}

Here, n represents the number of dimensions and x_i \in [-100, 100] for i=1,2.

Schaffer 1 function

Two-dimensional Schaffer 1 function

Global optimum: f(x_i) = 0 for x_i = 0 for i=1,2


class go_benchmark.Schaffer02(dimensions=2)

Schaffer 2 test objective function.

This class defines the Schaffer 2 global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Schaffer02}}(\mathbf{x}) = 0.5 + \frac{\sin^2 (x_1^2 - x_2^2)^2 - 0.5}{1 + 0.001(x_1^2 + x_2^2)^2}

Here, n represents the number of dimensions and x_i \in [-100, 100] for i=1,2.

Schaffer 2 function

Two-dimensional Schaffer 2 function

Global optimum: f(x_i) = 0 for x_i = 0 for i=1,2


class go_benchmark.Schaffer03(dimensions=2)

Schaffer 3 test objective function.

This class defines the Schaffer 3 global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Schaffer03}}(\mathbf{x}) = 0.5 + \frac{\sin^2 \left( \cos \lvert x_1^2 - x_2^2 \rvert \right ) - 0.5}{1 + 0.001(x_1^2 + x_2^2)^2}

Here, n represents the number of dimensions and x_i \in [-100, 100] for i=1,2.

Schaffer 3 function

Two-dimensional Schaffer 3 function

Global optimum: f(x_i) = 0.00156685 for \mathbf{x} = [0, 1.253115]


class go_benchmark.Schaffer04(dimensions=2)

Schaffer 4 test objective function.

This class defines the Schaffer 4 global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Schaffer04}}(\mathbf{x}) = 0.5 + \frac{\cos^2 \left( \sin(x_1^2 - x_2^2) \right ) - 0.5}{1 + 0.001(x_1^2 + x_2^2)^2}

Here, n represents the number of dimensions and x_i \in [-100, 100] for i=1,2.

Schaffer 4 function

Two-dimensional Schaffer 4 function

Global optimum: f(x_i) = 0.292579 for \mathbf{x} = [0, 1.253115]


class go_benchmark.SchmidtVetters(dimensions=3)

Schmidt-Vetters test objective function.

This class defines the Schmidt-Vetters global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{SchmidtVetters}}(\mathbf{x}) = \frac{1}{1 + (x_1 - x_2)^2} + \sin \left(\frac{\pi x_2 + x_3}{2} \right) + e^{\left(\frac{x_1+x_2}{x_2} - 2\right)^2}

Here, n represents the number of dimensions and x_i \in [0, 10] for i=1,2,3.

Global optimum: f(x_i) = 3 for x_i = 0.78547 for i=1,2,3


class go_benchmark.Schwefel01(dimensions=2)

Schwefel 1 test objective function.

This class defines the Schwefel 1 global optimization problem. This is a unimodal minimization problem defined as follows:

f_{\text{Schwefel01}}(\mathbf{x}) = \left(\sum_{i=1}^n x_i^2 \right)^{\alpha}

Where, in this exercise, \alpha = \sqrt{\pi}.

Here, n represents the number of dimensions and x_i \in [-100, 100] for i=1,...,n.

Schwefel 1 function

Two-dimensional Schwefel 1 function

Global optimum: f(x_i) = 0 for x_i = 0 for i=1,...,n


class go_benchmark.Schwefel02(dimensions=2)

Schwefel 2 test objective function.

This class defines the Schwefel 2 global optimization problem. This is a unimodal minimization problem defined as follows:

f_{\text{Schwefel02}}(\mathbf{x}) = \sum_{i=1}^n \left(\sum_{j=1}^i x_i \right)^2

Here, n represents the number of dimensions and x_i \in [-100, 100] for i=1,...,n.

Schwefel 2 function

Two-dimensional Schwefel 2 function

Global optimum: f(x_i) = 0 for x_i = 0 for i=1,...,n


class go_benchmark.Schwefel04(dimensions=2)

Schwefel 4 test objective function.

This class defines the Schwefel 4 global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Schwefel04}}(\mathbf{x}) = \sum_{i=1}^n \left[(x_i - 1)^2 + (x_1 - x_i^2)^2 \right]

Here, n represents the number of dimensions and x_i \in [0, 10] for i=1,...,n.

Schwefel 4 function

Two-dimensional Schwefel 4 function

Global optimum: f(x_i) = 0 for x_i = 1 for i=1,...,n


class go_benchmark.Schwefel06(dimensions=2)

Schwefel 6 test objective function.

This class defines the Schwefel 6 global optimization problem. This is a unimodal minimization problem defined as follows:

f_{\text{Schwefel06}}(\mathbf{x}) = \max(\lvert x_1 + 2x_2 - 7 \rvert, \lvert 2x_1 + x_2 - 5 \rvert)

Here, n represents the number of dimensions and x_i \in [-100, 100] for i=1,2.

Schwefel 6 function

Two-dimensional Schwefel 6 function

Global optimum: f(x_i) = 0 for \mathbf{x} = [1, 3]


class go_benchmark.Schwefel20(dimensions=2)

Schwefel 20 test objective function.

This class defines the Schwefel 20 global optimization problem. This is a unimodal minimization problem defined as follows:

f_{\text{Schwefel20}}(\mathbf{x}) = \sum_{i=1}^n \lvert x_i \rvert

Here, n represents the number of dimensions and x_i \in [-100, 100] for i=1,...,n.

Schwefel 20 function

Two-dimensional Schwefel 20 function

Global optimum: f(x_i) = 0 for x_i = 0 for i=1,...,n


class go_benchmark.Schwefel21(dimensions=2)

Schwefel 21 test objective function.

This class defines the Schwefel 21 global optimization problem. This is a unimodal minimization problem defined as follows:

f_{\text{Schwefel21}}(\mathbf{x}) = \smash{\displaystyle\max_{1 \leq i \leq n}} \lvert x_i \rvert

Here, n represents the number of dimensions and x_i \in [-100, 100] for i=1,...,n.

Schwefel 21 function

Two-dimensional Schwefel 21 function

Global optimum: f(x_i) = 0 for x_i = 0 for i=1,...,n


class go_benchmark.Schwefel22(dimensions=2)

Schwefel 22 test objective function.

This class defines the Schwefel 22 global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Schwefel22}}(\mathbf{x}) = \sum_{i=1}^n \lvert x_i \rvert + \prod_{i=1}^n \lvert x_i \rvert

Here, n represents the number of dimensions and x_i \in [-100, 100] for i=1,...,n.

Schwefel 22 function

Two-dimensional Schwefel 22 function

Global optimum: f(x_i) = 0 for x_i = 0 for i=1,...,n


class go_benchmark.Schwefel26(dimensions=2)

Schwefel 26 test objective function.

This class defines the Schwefel 26 global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Schwefel26}}(\mathbf{x}) = 418.9829n - \sum_{i=1}^n x_i \sin(\sqrt{|x_i|})

Here, n represents the number of dimensions and x_i \in [-500, 500] for i=1,...,n.

Schwefel 26 function

Two-dimensional Schwefel 26 function

Global optimum: f(x_i) = 0 for x_i = 420.968746 for i=1,...,n


class go_benchmark.Schwefel36(dimensions=2)

Schwefel 36 test objective function.

This class defines the Schwefel 36 global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Schwefel36}}(\mathbf{x}) = -x_1x_2(72 - 2x_1 - 2x_2)

Here, n represents the number of dimensions and x_i \in [0, 500] for i=1,2.

Schwefel 36 function

Two-dimensional Schwefel 36 function

Global optimum: f(x_i) = -3456 for \mathbf{x} = [12, 12]


class go_benchmark.Shekel05(dimensions=4)

Shekel 5 test objective function.

This class defines the Shekel 5 global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Shekel05}}(\mathbf{x}) = \sum_{i=1}^{m} \frac{1}{c_{i} + \sum_{j=1}^{n} (x_{j} - a_{ij})^2 }`

Where, in this exercise:

\mathbf{a} = \begin{bmatrix} 4.0 & 4.0 & 4.0 & 4.0 \\ 1.0 & 1.0 & 1.0 & 1.0 \\ 8.0 & 8.0 & 8.0 & 8.0 \\ 6.0 & 6.0 & 6.0 & 6.0 \\ 3.0 & 7.0 & 3.0 & 7.0 \end{bmatrix}

\mathbf{c} = \begin{bmatrix} 0.1 \\ 0.2 \\ 0.2 \\ 0.4 \\ 0.6 \end{bmatrix}

Here, n represents the number of dimensions and x_i \in [0, 10] for i=1,...,4.

Global optimum: f(x_i) = -10.1527 for x_i = 4 for i=1,...,4


class go_benchmark.Shekel07(dimensions=4)

Shekel 7 test objective function.

This class defines the Shekel 7 global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Shekel07}}(\mathbf{x}) = \sum_{i=1}^{m} \frac{1}{c_{i} + \sum_{j=1}^{n} (x_{j} - a_{ij})^2 }`

Where, in this exercise:

\mathbf{a} = \begin{bmatrix} 4.0 & 4.0 & 4.0 & 4.0 \\ 1.0 & 1.0 & 1.0 & 1.0 \\ 8.0 & 8.0 & 8.0 & 8.0 \\
6.0 & 6.0 & 6.0 & 6.0 \\ 3.0 & 7.0 & 3.0 & 7.0 \\ 2.0 & 9.0 & 2.0 & 9.0 \\ 5.0 & 5.0 & 3.0 & 3.0 \end{bmatrix}

\mathbf{c} = \begin{bmatrix} 0.1 \\ 0.2 \\ 0.2 \\ 0.4 \\ 0.4 \\ 0.6 \\ 0.3 \end{bmatrix}

Here, n represents the number of dimensions and x_i \in [0, 10] for i=1,...,4.

Global optimum: f(x_i) = -10.3999 for x_i = 4 for i=1,...,4


class go_benchmark.Shekel10(dimensions=4)

Shekel 10 test objective function.

This class defines the Shekel 10 global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Shekel10}}(\mathbf{x}) = \sum_{i=1}^{m} \frac{1}{c_{i} + \sum_{j=1}^{n} (x_{j} - a_{ij})^2 }`

Where, in this exercise:

\mathbf{a} = \begin{bmatrix} 4.0 & 4.0 & 4.0 & 4.0 \\ 1.0 & 1.0 & 1.0 & 1.0 \\ 8.0 & 8.0 & 8.0 & 8.0 \\
6.0 & 6.0 & 6.0 & 6.0 \\ 3.0 & 7.0 & 3.0 & 7.0 \\ 2.0 & 9.0 & 2.0 & 9.0 \\ 5.0 & 5.0 & 3.0 & 3.0 \\
8.0 & 1.0 & 8.0 & 1.0 \\ 6.0 & 2.0 & 6.0 & 2.0 \\ 7.0 & 3.6 & 7.0 & 3.6 \end{bmatrix}

\mathbf{c} = \begin{bmatrix} 0.1 \\ 0.2 \\ 0.2 \\ 0.4 \\ 0.4 \\ 0.6 \\ 0.3 \\ 0.7 \\ 0.5 \\ 0.5 \end{bmatrix}

Here, n represents the number of dimensions and x_i \in [0, 10] for i=1,...,4.

Global optimum: f(x_i) = -10.5319 for x_i = 4 for i=1,...,4


class go_benchmark.Shubert01(dimensions=2)

Shubert 1 test objective function.

This class defines the Shubert 1 global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Shubert01}}(\mathbf{x}) = \left( \sum\limits_{i=1}^{5} i\cos[(i+1)x_1 + i] \right) \left( \sum\limits_{i=1}^{5} i\cos[(i+1)x_2 + i] \right)

Here, n represents the number of dimensions and x_i \in [-10, 10] for i=1,...,n.

Shubert 1 function

Two-dimensional Shubert 1 function

Global optimum: f(x_i) = -186.7309 for \mathbf{x} = [-7.0835, 4.8580] (and many others).


class go_benchmark.Shubert03(dimensions=2)

Shubert 3 test objective function.

This class defines the Shubert 3 global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Shubert03}}(\mathbf{x}) = \sum_{i=1}^n \sum_{j=1}^5 j \sin \left[(j+1)x_i \right] + j

Here, n represents the number of dimensions and x_i \in [-10, 10] for i=1,...,n.

Shubert 3 function

Two-dimensional Shubert 3 function

Global optimum: f(x_i) = -24.062499 for \mathbf{x} = [5.791794, 5.791794] (and many others).


class go_benchmark.Shubert04(dimensions=2)

Shubert 4 test objective function.

This class defines the Shubert 4 global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Shubert04}}(\mathbf{x}) = \sum_{i=1}^n \sum_{j=1}^5 j \cos \left[(j+1)x_i \right] + j

Here, n represents the number of dimensions and x_i \in [-10, 10] for i=1,...,n.

Shubert 4 function

Two-dimensional Shubert 4 function

Global optimum: f(x_i) = -29.016015 for \mathbf{x} = [-0.80032121, -7.08350592] (and many others).


class go_benchmark.SineEnvelope(dimensions=2)

SineEnvelope test objective function.

This class defines the SineEnvelope global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{SineEnvelope}}(\mathbf{x}) = -\sum_{i=1}^{n-1}\left[\frac{\sin^2(\sqrt{x_{i+1}^2+x_{i}^2}-0.5)}{(0.001(x_{i+1}^2+x_{i}^2)+1)^2}+0.5\right]

Here, n represents the number of dimensions and x_i \in [-100, 100] for i=1,...,n.

SineEnvelope function

Two-dimensional SineEnvelope function

Global optimum: f(x_i) = 0 for x_i = 0 for i=1,...,n


class go_benchmark.SixHumpCamel(dimensions=2)

Six Hump Camel test objective function.

This class defines the Six Hump Camel global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{SixHumpCamel}}(\mathbf{x}) = 4x_1^2+x_1x_2-4x_2^2-2.1x_1^4+4x_2^4+\frac{1}{3}x_1^6

Here, n represents the number of dimensions and x_i \in [-5, 5] for i=1,2.

Six Hump Camel function

Two-dimensional Six Hump Camel function

Global optimum: f(x_i) = -1.031628453489877 for \mathbf{x} = [0.08984201368301331 , -0.7126564032704135] or \mathbf{x} = [-0.08984201368301331, 0.7126564032704135]


class go_benchmark.Sodp(dimensions=2)

Sodp test objective function.

This class defines the Sum Of Different Powers global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Sodp}}(\mathbf{x}) = \sum_{i=1}^{n} \lvert{x_{i}}\rvert^{i + 1}

Here, n represents the number of dimensions and x_i \in [-1, 1] for i=1,...,n.

Sodp function

Two-dimensional Sum Of Different Powers function

Global optimum: f(x_i) = 0 for x_i = 0 for i=1,...,n


class go_benchmark.Sphere(dimensions=2)

Sphere test objective function.

This class defines the Sphere global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Sphere}}(\mathbf{x}) = \sum_{i=1}^{n} x_i^2

Here, n represents the number of dimensions and x_i \in [-1, 1] for i=1,...,n.

Sphere function

Two-dimensional Sphere function

Global optimum: f(x_i) = 0 for x_i = 0 for i=1,...,n


class go_benchmark.Step(dimensions=2)

Step test objective function.

This class defines the Step global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Step}}(\mathbf{x}) = \sum_{i=1}^{n} \left ( \lfloor x_i \rfloor + 0.5 \right )^2

Here, n represents the number of dimensions and x_i \in [-100, 100] for i=1,...,n.

Step function

Two-dimensional Step function

Global optimum: f(x_i) = 0 for x_i = 0.5 for i=1,...,n


class go_benchmark.Stochastic(dimensions=2)

Stochastic test objective function.

This class defines a Stochastic global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{Stochastic}}(\mathbf{x}) = \sum_{i=1}^{n} \epsilon_i \left | {x_i - \frac{1}{i}} \right |

The variable \epsilon_i, (i=1,...,n) is a random variable uniformly distributed in [0, 1].

Here, n represents the number of dimensions and x_i \in [-5, 5] for i=1,...,n.

Stochastic function

Two-dimensional Stochastic function

Global optimum: f(x_i) = 0 for x_i = [1/n] for i=1,...,n


class go_benchmark.StretchedV(dimensions=2)

StretchedV test objective function.

This class defines the Stretched V global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{StretchedV}}(\mathbf{x}) = \sum_{i=1}^{n-1} t^{1/4} [\sin (50t^{0.1}) + 1]^2

Where, in this exercise:

t = x_{i+1}^2 + x_i^2

Here, n represents the number of dimensions and x_i \in [-10, 10] for i=1,...,n.

StretchedV function

Two-dimensional StretchedV function

Global optimum: f(x_i) = 0 for \mathbf{x} = [-9.38723188, 9.34026753] when n = 2.


class go_benchmark.StyblinskiTang(dimensions=2)

StyblinskiTang test objective function.

This class defines the Styblinski-Tang global optimization problem. This is a multimodal minimization problem defined as follows:

f_{\text{StyblinskiTang}}(\mathbf{x}) = \sum_{i=1}^{n} \left(x_i^4 - 16x_i^2 + 5x_i \right)

Here, n represents the number of dimensions and x_i \in [-5, 5] for i=1,...,n.

StyblinskiTang function

Two-dimensional Styblinski-Tang function

Global optimum: f(x_i) = -39.16616570377142n for x_i = -2.903534018185960 for i=1,...,n

Previous topic

N-D Test Functions R

Next topic

N-D Test Functions T

This Page