A collection of test functions for optimization with known global minima.
Univariate problems follow the collection of one dimensional global optimization problems by Gavana (https://infinity77.net/global_optimization/test_functions_1d.html). For every problem there are three functions: problemNN takes a number and returns the value, problemNN-bounds returns the search domain as a vector with one [lo hi] pair, and dproblemNN is the derivative, which takes a sequence with one number (the form used by the optimizers) and returns a vector with the derivative. The numbers follow the collection, so some of them are missing.
Multivariate problems follow the virtual library of simulation experiments by Surjanovic and Bingham (https://www.sfu.ca/~ssurjano/optimization.html): ->ackley, bukin-no-6, cross-in-tray, drop-wave, egg-holder, rosenbrock, himmelblau, beale and sphere. They take the point as one sequence of numbers and return a double. Every problem has a -bounds function with its usual search domain (a function of the number of dimensions for the problems with any number of dimensions). The gradients of rosenbrock, himmelblau, beale and sphere are given by rosenbrock-gradient, himmelblau-gradient, beale-gradient and sphere-gradient.
The docstrings give the global minimum of every function.
A collection of test functions for optimization with known global minima. Univariate problems follow the collection of one dimensional global optimization problems by Gavana (https://infinity77.net/global_optimization/test_functions_1d.html). For every problem there are three functions: `problemNN` takes a number and returns the value, `problemNN-bounds` returns the search domain as a vector with one `[lo hi]` pair, and `dproblemNN` is the derivative, which takes a sequence with one number (the form used by the optimizers) and returns a vector with the derivative. The numbers follow the collection, so some of them are missing. Multivariate problems follow the virtual library of simulation experiments by Surjanovic and Bingham (https://www.sfu.ca/~ssurjano/optimization.html): [[->ackley]], [[bukin-no-6]], [[cross-in-tray]], [[drop-wave]], [[egg-holder]], [[rosenbrock]], [[himmelblau]], [[beale]] and [[sphere]]. They take the point as one sequence of numbers and return a double. Every problem has a `-bounds` function with its usual search domain (a function of the number of dimensions for the problems with any number of dimensions). The gradients of [[rosenbrock]], [[himmelblau]], [[beale]] and [[sphere]] are given by [[rosenbrock-gradient]], [[himmelblau-gradient]], [[beale-gradient]] and [[sphere-gradient]]. The docstrings give the global minimum of every function.
(->ackley)(->ackley {:keys [a b c]})Creates the Ackley function for any number of dimensions: -a exp(-b sqrt(mean(x^2))) - exp(mean(cos(c x))) + a + e.
The function has many local minima and one global minimum f(x*) = 0 at x* = (0, ..., 0). The usual domain is given by ackley-bounds.
Parameters:
opts (optional map): :a (default: 20.0), :b (default: 0.2) and :c (default: 2 pi).Returns a function of one sequence of numbers (the point) which returns the value as a double.
Creates the Ackley function for any number of dimensions: `-a exp(-b sqrt(mean(x^2))) - exp(mean(cos(c x))) + a + e`. The function has many local minima and one global minimum `f(x*) = 0` at `x* = (0, ..., 0)`. The usual domain is given by [[ackley-bounds]]. Parameters: - `opts` (optional map): `:a` (default: `20.0`), `:b` (default: `0.2`) and `:c` (default: `2 pi`). Returns a function of one sequence of numbers (the point) which returns the value as a double.
(->branin [a b c r s t])(->langerman N m)As defined in Adorio, 1<=N<=10; 1<=m<=30
As defined in Adorio, 1<=N<=10; 1<=m<=30
(->langerman-general c A-rows)(->michalewicz m)(->perm-0db beta)(->perm-db beta)(->power-sum b)(ackley-bounds N)Returns the usual search domain of the Ackley function ->ackley for N dimensions: [-32.768 32.768] in every dimension.
Parameters:
N (long): number of dimensions.Returns a sequence of N pairs [lo hi].
Returns the usual search domain of the Ackley function [[->ackley]] for `N` dimensions: `[-32.768 32.768]` in every dimension. Parameters: - `N` (long): number of dimensions. Returns a sequence of `N` pairs `[lo hi]`.
(beale [x1 x2])Beale function: (1.5 - x1 + x1 x2)^2 + (2.25 - x1 + x1 x2^2)^2 + (2.625 - x1 + x1 x2^3)^2.
The function has sharp peaks at the corners of the domain and flat valleys. Domain: [-4.5, 4.5]^2, see beale-bounds. Global minimum: f(x*) = 0 at x* = (3, 0.5).
Parameters:
[x1 x2] (sequence of two numbers): the point.Returns the value as a double.
See also beale-gradient.
Beale function: `(1.5 - x1 + x1 x2)^2 + (2.25 - x1 + x1 x2^2)^2 + (2.625 - x1 + x1 x2^3)^2`. The function has sharp peaks at the corners of the domain and flat valleys. Domain: `[-4.5, 4.5]^2`, see [[beale-bounds]]. Global minimum: `f(x*) = 0` at `x* = (3, 0.5)`. Parameters: - `[x1 x2]` (sequence of two numbers): the point. Returns the value as a double. See also [[beale-gradient]].
(beale-bounds)Returns the usual search domain of beale: [-4.5 4.5] for x1 and [-4.5 4.5] for x2.
Returns the usual search domain of [[beale]]: `[-4.5 4.5]` for x1 and `[-4.5 4.5]` for x2.
(beale-gradient [x1 x2])Gradient of the beale function.
Parameters:
[x1 x2] (sequence of two numbers): the point.Returns a vector of two doubles with the partial derivatives.
Gradient of the [[beale]] function. Parameters: - `[x1 x2]` (sequence of two numbers): the point. Returns a vector of two doubles with the partial derivatives.
(bohachevsky-1 [x1 x2])(bohachevsky-2 [x1 x2])(bohachevsky-3 [x1 x2])(bohachevsky-bounds)(booth [x1 x2])(booth-bounds)(branin-bounds)(bukin-no-6 [x1 x2])Bukin function number 6: 100 sqrt(|x2 - 0.01 x1^2|) + 0.01 |x1 + 10|.
The function has a long narrow valley of local minima and is not differentiable on it. Domain: [-15, -5] x [-3, 3], see bukin-no-6-bounds. Global minimum: f(x*) = 0 at x* = (-10, 1).
Parameters:
[x1 x2] (sequence of two numbers): the point.Returns the value as a double.
Bukin function number 6: `100 sqrt(|x2 - 0.01 x1^2|) + 0.01 |x1 + 10|`. The function has a long narrow valley of local minima and is not differentiable on it. Domain: `[-15, -5] x [-3, 3]`, see [[bukin-no-6-bounds]]. Global minimum: `f(x*) = 0` at `x* = (-10, 1)`. Parameters: - `[x1 x2]` (sequence of two numbers): the point. Returns the value as a double.
(bukin-no-6-bounds)Returns the usual search domain of bukin-no-6: [-15.0 -5.0] for x1 and [-3.0 3.0] for x2.
Returns the usual search domain of [[bukin-no-6]]: `[-15.0 -5.0]` for x1 and `[-3.0 3.0]` for x2.
(colville [x1 x2 x3 x4])(colville-bounds)(cross-in-tray [x1 x2 :as v])Cross-in-tray function: -0.0001 (|sin(x1) sin(x2) exp(|100 - sqrt(x1^2 + x2^2) / pi|)| + 1)^0.1.
The function has four global minima. Domain: [-10, 10]^2, see cross-in-tray-bounds. Global minimum: f(x*) = -2.06261 at x* = (1.34941, 1.34941), (-1.34941, 1.34941), (1.34941, -1.34941) and (-1.34941, -1.34941).
Parameters:
[x1 x2] (sequence of two numbers): the point.Returns the value as a double.
Cross-in-tray function: `-0.0001 (|sin(x1) sin(x2) exp(|100 - sqrt(x1^2 + x2^2) / pi|)| + 1)^0.1`. The function has four global minima. Domain: `[-10, 10]^2`, see [[cross-in-tray-bounds]]. Global minimum: `f(x*) = -2.06261` at `x* = (1.34941, 1.34941)`, `(-1.34941, 1.34941)`, `(1.34941, -1.34941)` and `(-1.34941, -1.34941)`. Parameters: - `[x1 x2]` (sequence of two numbers): the point. Returns the value as a double.
(cross-in-tray-bounds)Returns the usual search domain of cross-in-tray: [-10.0 10.0] for x1 and [-10.0 10.0] for x2.
Returns the usual search domain of [[cross-in-tray]]: `[-10.0 10.0]` for x1 and `[-10.0 10.0]` for x2.
(de-jong-5 [x1 x2])(de-jong-5-bounds)(dixon-price [x1 :as v])(dixon-price-bounds N)(dproblem02 [x])Derivative of the univariate test function problem02.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem02.
Derivative of the univariate test function [[problem02]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem02]].
(dproblem03 [x])Derivative of the univariate test function problem03.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem03.
Derivative of the univariate test function [[problem03]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem03]].
(dproblem04 [x])Derivative of the univariate test function problem04.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem04.
Derivative of the univariate test function [[problem04]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem04]].
(dproblem05 [x])Derivative of the univariate test function problem05.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem05.
Derivative of the univariate test function [[problem05]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem05]].
(dproblem06 [x])Derivative of the univariate test function problem06.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem06.
Derivative of the univariate test function [[problem06]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem06]].
(dproblem07 [x])Derivative of the univariate test function problem07.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem07.
Derivative of the univariate test function [[problem07]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem07]].
(dproblem08 [x])Derivative of the univariate test function problem08.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem08.
Derivative of the univariate test function [[problem08]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem08]].
(dproblem09 [x])Derivative of the univariate test function problem09.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem09.
Derivative of the univariate test function [[problem09]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem09]].
(dproblem10 [x])Derivative of the univariate test function problem10.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem10.
Derivative of the univariate test function [[problem10]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem10]].
(dproblem11 [x])Derivative of the univariate test function problem11.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem11.
Derivative of the univariate test function [[problem11]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem11]].
(dproblem12 [x])Derivative of the univariate test function problem12.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem12.
Derivative of the univariate test function [[problem12]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem12]].
(dproblem13 [x])Derivative of the univariate test function problem13.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem13.
Derivative of the univariate test function [[problem13]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem13]].
(dproblem14 [x])Derivative of the univariate test function problem14.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem14.
Derivative of the univariate test function [[problem14]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem14]].
(dproblem15 [x])Derivative of the univariate test function problem15.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem15.
Derivative of the univariate test function [[problem15]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem15]].
(dproblem18 [x])Derivative of the univariate test function problem18.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem18.
Derivative of the univariate test function [[problem18]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem18]].
(dproblem20 [x])Derivative of the univariate test function problem20.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem20.
Derivative of the univariate test function [[problem20]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem20]].
(dproblem21 [x])Derivative of the univariate test function problem21.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem21.
Derivative of the univariate test function [[problem21]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem21]].
(dproblem22 [x])Derivative of the univariate test function problem22.
Parameters:
[x] (sequence with one number): the point, in the form used by the optimizers.Returns a vector with the derivative at x as the only element.
See also problem22.
Derivative of the univariate test function [[problem22]]. Parameters: - `[x]` (sequence with one number): the point, in the form used by the optimizers. Returns a vector with the derivative at `x` as the only element. See also [[problem22]].
(drop-wave v)Drop-wave function: -(1 + cos(12 sqrt(x1^2 + x2^2))) / (0.5 (x1^2 + x2^2) + 2).
The function is multimodal. Domain: [-5.12, 5.12]^2, see drop-wave-bounds. Global minimum: f(x*) = -1 at x* = (0, 0).
Parameters:
v (sequence of two numbers): the point.Returns the value as a double.
Drop-wave function: `-(1 + cos(12 sqrt(x1^2 + x2^2))) / (0.5 (x1^2 + x2^2) + 2)`. The function is multimodal. Domain: `[-5.12, 5.12]^2`, see [[drop-wave-bounds]]. Global minimum: `f(x*) = -1` at `x* = (0, 0)`. Parameters: - `v` (sequence of two numbers): the point. Returns the value as a double.
(drop-wave-bounds)Returns the usual search domain of drop-wave: [-5.12 5.12] for x1 and [-5.12 5.12] for x2.
Returns the usual search domain of [[drop-wave]]: `[-5.12 5.12]` for x1 and `[-5.12 5.12]` for x2.
(easom [x1 x2])(easom-bounds)(egg-holder [x1 x2])Egg-holder function: -(x2 + 47) sin(sqrt(|x2 + x1 / 2 + 47|)) - x1 sin(sqrt(|x1 - (x2 + 47)|)).
The function is very rugged with many local minima. Domain: [-512, 512]^2, see egg-holder-bounds. Global minimum: f(x*) = -959.6407 at x* = (512, 404.2319).
Parameters:
[x1 x2] (sequence of two numbers): the point.Returns the value as a double.
Egg-holder function: `-(x2 + 47) sin(sqrt(|x2 + x1 / 2 + 47|)) - x1 sin(sqrt(|x1 - (x2 + 47)|))`. The function is very rugged with many local minima. Domain: `[-512, 512]^2`, see [[egg-holder-bounds]]. Global minimum: `f(x*) = -959.6407` at `x* = (512, 404.2319)`. Parameters: - `[x1 x2]` (sequence of two numbers): the point. Returns the value as a double.
(egg-holder-bounds)Returns the usual search domain of egg-holder: [-512.0 512.0] for x1 and [-512.0 512.0] for x2.
Returns the usual search domain of [[egg-holder]]: `[-512.0 512.0]` for x1 and `[-512.0 512.0]` for x2.
(forrester-2018 [x])(forrester-2018-bounds)(goldstein-price [x1 x2])(goldstein-price-bounds)(gramacy-lee-2012 x)(gramacy-lee-2012-bounds)(griewank v)(griewank-bounds N)(himmelblau [x1 x2])Himmelblau function: (x1^2 + x2 - 11)^2 + (x1 + x2^2 - 7)^2.
The function has four global minima. Domain: [-5, 5]^2, see himmelblau-bounds. Global minimum: f(x*) = 0 at x* = (3, 2), (-2.805118, 3.131312), (-3.779310, -3.283186) and (3.584428, -1.848126).
Parameters:
[x1 x2] (sequence of two numbers): the point.Returns the value as a double.
See also himmelblau-gradient.
Himmelblau function: `(x1^2 + x2 - 11)^2 + (x1 + x2^2 - 7)^2`. The function has four global minima. Domain: `[-5, 5]^2`, see [[himmelblau-bounds]]. Global minimum: `f(x*) = 0` at `x* = (3, 2)`, `(-2.805118, 3.131312)`, `(-3.779310, -3.283186)` and `(3.584428, -1.848126)`. Parameters: - `[x1 x2]` (sequence of two numbers): the point. Returns the value as a double. See also [[himmelblau-gradient]].
(himmelblau-bounds)Returns the usual search domain of himmelblau: [-5.0 5.0] for x1 and [-5.0 5.0] for x2.
Returns the usual search domain of [[himmelblau]]: `[-5.0 5.0]` for x1 and `[-5.0 5.0]` for x2.
(himmelblau-gradient [x1 x2])Gradient of the himmelblau function.
Parameters:
[x1 x2] (sequence of two numbers): the point.Returns a vector of two doubles with the partial derivatives.
Gradient of the [[himmelblau]] function. Parameters: - `[x1 x2]` (sequence of two numbers): the point. Returns a vector of two doubles with the partial derivatives.
(holder-table [x1 x2 :as v])(holder-table-bounds)(langerman-bounds N)(levy v)(levy-13 [x1 x2])(levy-13-bounds)(levy-bounds N)(matyas [x1 x2])(matyas-bounds)(mccormick [x1 x2])(mccormick-bounds)(michalewicz-bounds N)(perm-0db-bounds N)(perm-db-bounds N)(power-sum-4-bounds)(power-sum-bounds N)(problem02 x)Univariate test function number 02 of the collection of one dimensional global optimization problems: sin(x) + sin(10x/3).
Domain: [2.7, 7.5], see problem02-bounds. Global minimum: f(x*) = -1.899599 at x* = 5.145735.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem02 (the derivative).
Univariate test function number 02 of the collection of one dimensional global optimization problems: `sin(x) + sin(10x/3)`. Domain: `[2.7, 7.5]`, see [[problem02-bounds]]. Global minimum: `f(x*) = -1.899599 at x* = 5.145735`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem02]] (the derivative).
(problem02-bounds)Returns the search domain of problem02, the interval [2.7 7.5], as a vector with one [lo hi] pair.
See also problem02, dproblem02.
Returns the search domain of [[problem02]], the interval `[2.7 7.5]`, as a vector with one `[lo hi]` pair. See also [[problem02]], [[dproblem02]].
(problem03 x)Univariate test function number 03 of the collection of one dimensional global optimization problems: -sum of k sin((k+1)x + k) for k = 1..5.
Domain: [-10, 10], see problem03-bounds. Global minimum: f(x*) = -12.031249 at x* = -6.774576, -0.491391 and 5.791794 (three minima of the same depth).
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem03 (the derivative).
Univariate test function number 03 of the collection of one dimensional global optimization problems: `-sum of k sin((k+1)x + k) for k = 1..5`. Domain: `[-10, 10]`, see [[problem03-bounds]]. Global minimum: `f(x*) = -12.031249 at x* = -6.774576, -0.491391 and 5.791794` (three minima of the same depth). Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem03]] (the derivative).
(problem03-bounds)Returns the search domain of problem03, the interval [-10.0 10.0], as a vector with one [lo hi] pair.
See also problem03, dproblem03.
Returns the search domain of [[problem03]], the interval `[-10.0 10.0]`, as a vector with one `[lo hi]` pair. See also [[problem03]], [[dproblem03]].
(problem04 x)Univariate test function number 04 of the collection of one dimensional global optimization problems: -(16x^2 - 24x + 5) exp(-x).
Domain: [1.9, 3.9], see problem04-bounds. Global minimum: f(x*) = -3.850450 at x* = 2.868034.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem04 (the derivative).
Univariate test function number 04 of the collection of one dimensional global optimization problems: `-(16x^2 - 24x + 5) exp(-x)`. Domain: `[1.9, 3.9]`, see [[problem04-bounds]]. Global minimum: `f(x*) = -3.850450 at x* = 2.868034`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem04]] (the derivative).
(problem04-bounds)Returns the search domain of problem04, the interval [1.9 3.9], as a vector with one [lo hi] pair.
See also problem04, dproblem04.
Returns the search domain of [[problem04]], the interval `[1.9 3.9]`, as a vector with one `[lo hi]` pair. See also [[problem04]], [[dproblem04]].
(problem05 x)Univariate test function number 05 of the collection of one dimensional global optimization problems: -(1.4 - 3x) sin(18x).
Domain: [0, 1.2], see problem05-bounds. Global minimum: f(x*) = -1.489073 at x* = 0.966090.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem05 (the derivative).
Univariate test function number 05 of the collection of one dimensional global optimization problems: `-(1.4 - 3x) sin(18x)`. Domain: `[0, 1.2]`, see [[problem05-bounds]]. Global minimum: `f(x*) = -1.489073 at x* = 0.966090`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem05]] (the derivative).
(problem05-bounds)Returns the search domain of problem05, the interval [0.0 1.2], as a vector with one [lo hi] pair.
See also problem05, dproblem05.
Returns the search domain of [[problem05]], the interval `[0.0 1.2]`, as a vector with one `[lo hi]` pair. See also [[problem05]], [[dproblem05]].
(problem06 x)Univariate test function number 06 of the collection of one dimensional global optimization problems: -(x + sin(x)) exp(-x^2).
Domain: [-10, 10], see problem06-bounds. Global minimum: f(x*) = -0.824239 at x* = 0.679560.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem06 (the derivative).
Univariate test function number 06 of the collection of one dimensional global optimization problems: `-(x + sin(x)) exp(-x^2)`. Domain: `[-10, 10]`, see [[problem06-bounds]]. Global minimum: `f(x*) = -0.824239 at x* = 0.679560`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem06]] (the derivative).
(problem06-bounds)Returns the search domain of problem06, the interval [-10.0 10.0], as a vector with one [lo hi] pair.
See also problem06, dproblem06.
Returns the search domain of [[problem06]], the interval `[-10.0 10.0]`, as a vector with one `[lo hi]` pair. See also [[problem06]], [[dproblem06]].
(problem07 x)Univariate test function number 07 of the collection of one dimensional global optimization problems: sin(x) + sin(10x/3) + ln(x) - 0.84x + 3.
Domain: [2.7, 7.5], see problem07-bounds. Global minimum: f(x*) = -1.601308 at x* = 5.199780.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem07 (the derivative).
Univariate test function number 07 of the collection of one dimensional global optimization problems: `sin(x) + sin(10x/3) + ln(x) - 0.84x + 3`. Domain: `[2.7, 7.5]`, see [[problem07-bounds]]. Global minimum: `f(x*) = -1.601308 at x* = 5.199780`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem07]] (the derivative).
(problem07-bounds)Returns the search domain of problem07, the interval [2.7 7.5], as a vector with one [lo hi] pair.
See also problem07, dproblem07.
Returns the search domain of [[problem07]], the interval `[2.7 7.5]`, as a vector with one `[lo hi]` pair. See also [[problem07]], [[dproblem07]].
(problem08 x)Univariate test function number 08 of the collection of one dimensional global optimization problems: -sum of k cos((k+1)x + k) for k = 1..5.
Domain: [-10, 10], see problem08-bounds. Global minimum: f(x*) = -14.508008 at x* = -7.083506, -0.800321 and 5.482864 (three minima of the same depth).
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem08 (the derivative).
Univariate test function number 08 of the collection of one dimensional global optimization problems: `-sum of k cos((k+1)x + k) for k = 1..5`. Domain: `[-10, 10]`, see [[problem08-bounds]]. Global minimum: `f(x*) = -14.508008 at x* = -7.083506, -0.800321 and 5.482864` (three minima of the same depth). Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem08]] (the derivative).
(problem08-bounds)Returns the search domain of problem08, the interval [-10.0 10.0], as a vector with one [lo hi] pair.
See also problem08, dproblem08.
Returns the search domain of [[problem08]], the interval `[-10.0 10.0]`, as a vector with one `[lo hi]` pair. See also [[problem08]], [[dproblem08]].
(problem09 x)Univariate test function number 09 of the collection of one dimensional global optimization problems: sin(x) + sin(2x/3).
Domain: [3.1, 20.4], see problem09-bounds. Global minimum: f(x*) = -1.905961 at x* = 17.039199.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem09 (the derivative).
Univariate test function number 09 of the collection of one dimensional global optimization problems: `sin(x) + sin(2x/3)`. Domain: `[3.1, 20.4]`, see [[problem09-bounds]]. Global minimum: `f(x*) = -1.905961 at x* = 17.039199`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem09]] (the derivative).
(problem09-bounds)Returns the search domain of problem09, the interval [3.1 20.4], as a vector with one [lo hi] pair.
See also problem09, dproblem09.
Returns the search domain of [[problem09]], the interval `[3.1 20.4]`, as a vector with one `[lo hi]` pair. See also [[problem09]], [[dproblem09]].
(problem10 x)Univariate test function number 10 of the collection of one dimensional global optimization problems: -x sin(x).
Domain: [0, 10], see problem10-bounds. Global minimum: f(x*) = -7.916727 at x* = 7.978666.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem10 (the derivative).
Univariate test function number 10 of the collection of one dimensional global optimization problems: `-x sin(x)`. Domain: `[0, 10]`, see [[problem10-bounds]]. Global minimum: `f(x*) = -7.916727 at x* = 7.978666`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem10]] (the derivative).
(problem10-bounds)Returns the search domain of problem10, the interval [0.0 10.0], as a vector with one [lo hi] pair.
See also problem10, dproblem10.
Returns the search domain of [[problem10]], the interval `[0.0 10.0]`, as a vector with one `[lo hi]` pair. See also [[problem10]], [[dproblem10]].
(problem11 x)Univariate test function number 11 of the collection of one dimensional global optimization problems: 2 cos(x) + cos(2x).
Domain: [-pi/2, 2 pi], see problem11-bounds. Global minimum: f(x*) = -1.5 at x* = 2 pi / 3 and x* = 4 pi / 3.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem11 (the derivative).
Univariate test function number 11 of the collection of one dimensional global optimization problems: `2 cos(x) + cos(2x)`. Domain: `[-pi/2, 2 pi]`, see [[problem11-bounds]]. Global minimum: `f(x*) = -1.5 at x* = 2 pi / 3 and x* = 4 pi / 3`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem11]] (the derivative).
(problem11-bounds)Returns the search domain of problem11, the interval [-pi/2 2 pi], as a vector with one [lo hi] pair.
See also problem11, dproblem11.
Returns the search domain of [[problem11]], the interval `[-pi/2 2 pi]`, as a vector with one `[lo hi]` pair. See also [[problem11]], [[dproblem11]].
(problem12 x)Univariate test function number 12 of the collection of one dimensional global optimization problems: sin(x)^3 + cos(x)^3.
Domain: [0, 2 pi], see problem12-bounds. Global minimum: f(x*) = -1 at x* = pi and x* = 3 pi / 2.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem12 (the derivative).
Univariate test function number 12 of the collection of one dimensional global optimization problems: `sin(x)^3 + cos(x)^3`. Domain: `[0, 2 pi]`, see [[problem12-bounds]]. Global minimum: `f(x*) = -1 at x* = pi and x* = 3 pi / 2`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem12]] (the derivative).
(problem12-bounds)Returns the search domain of problem12, the interval [0 2 pi], as a vector with one [lo hi] pair.
See also problem12, dproblem12.
Returns the search domain of [[problem12]], the interval `[0 2 pi]`, as a vector with one `[lo hi]` pair. See also [[problem12]], [[dproblem12]].
(problem13 x)Univariate test function number 13 of the collection of one dimensional global optimization problems: -x^(2/3) - (1 - x^2)^(1/3).
Domain: [0.001, 0.99], see problem13-bounds. Global minimum: f(x*) = -1.587401 at x* = 1 / sqrt(2) = 0.707107.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem13 (the derivative).
Univariate test function number 13 of the collection of one dimensional global optimization problems: `-x^(2/3) - (1 - x^2)^(1/3)`. Domain: `[0.001, 0.99]`, see [[problem13-bounds]]. Global minimum: `f(x*) = -1.587401 at x* = 1 / sqrt(2) = 0.707107`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem13]] (the derivative).
(problem13-bounds)Returns the search domain of problem13, the interval [0.001 0.99], as a vector with one [lo hi] pair.
See also problem13, dproblem13.
Returns the search domain of [[problem13]], the interval `[0.001 0.99]`, as a vector with one `[lo hi]` pair. See also [[problem13]], [[dproblem13]].
(problem14 x)Univariate test function number 14 of the collection of one dimensional global optimization problems: -exp(-x) sin(2 pi x).
Domain: [0, 4], see problem14-bounds. Global minimum: f(x*) = -0.788685 at x* = 0.224885.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem14 (the derivative).
Univariate test function number 14 of the collection of one dimensional global optimization problems: `-exp(-x) sin(2 pi x)`. Domain: `[0, 4]`, see [[problem14-bounds]]. Global minimum: `f(x*) = -0.788685 at x* = 0.224885`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem14]] (the derivative).
(problem14-bounds)Returns the search domain of problem14, the interval [0.0 4.0], as a vector with one [lo hi] pair.
See also problem14, dproblem14.
Returns the search domain of [[problem14]], the interval `[0.0 4.0]`, as a vector with one `[lo hi]` pair. See also [[problem14]], [[dproblem14]].
(problem15 x)Univariate test function number 15 of the collection of one dimensional global optimization problems: (x^2 - 5x + 6) / (x^2 + 1).
Domain: [-5, 5], see problem15-bounds. Global minimum: f(x*) = -0.035534 at x* = 1 + sqrt(2) = 2.414214.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem15 (the derivative).
Univariate test function number 15 of the collection of one dimensional global optimization problems: `(x^2 - 5x + 6) / (x^2 + 1)`. Domain: `[-5, 5]`, see [[problem15-bounds]]. Global minimum: `f(x*) = -0.035534 at x* = 1 + sqrt(2) = 2.414214`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem15]] (the derivative).
(problem15-bounds)Returns the search domain of problem15, the interval [-5.0 5.0], as a vector with one [lo hi] pair.
See also problem15, dproblem15.
Returns the search domain of [[problem15]], the interval `[-5.0 5.0]`, as a vector with one `[lo hi]` pair. See also [[problem15]], [[dproblem15]].
(problem18 x)Univariate test function number 18 of the collection of one dimensional global optimization problems: (x - 2)^2 for x <= 3, otherwise 2 ln(x - 2) + 1.
Domain: [0, 6], see problem18-bounds. Global minimum: f(x*) = 0 at x* = 2.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem18 (the derivative).
Univariate test function number 18 of the collection of one dimensional global optimization problems: `(x - 2)^2 for x <= 3, otherwise 2 ln(x - 2) + 1`. Domain: `[0, 6]`, see [[problem18-bounds]]. Global minimum: `f(x*) = 0 at x* = 2`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem18]] (the derivative).
(problem18-bounds)Returns the search domain of problem18, the interval [0.0 6.0], as a vector with one [lo hi] pair.
See also problem18, dproblem18.
Returns the search domain of [[problem18]], the interval `[0.0 6.0]`, as a vector with one `[lo hi]` pair. See also [[problem18]], [[dproblem18]].
(problem20 x)Univariate test function number 20 of the collection of one dimensional global optimization problems: -(x - sin(x)) exp(-x^2).
Domain: [-10, 10], see problem20-bounds. Global minimum: f(x*) = -0.063491 at x* = 1.195137.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem20 (the derivative).
Univariate test function number 20 of the collection of one dimensional global optimization problems: `-(x - sin(x)) exp(-x^2)`. Domain: `[-10, 10]`, see [[problem20-bounds]]. Global minimum: `f(x*) = -0.063491 at x* = 1.195137`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem20]] (the derivative).
(problem20-bounds)Returns the search domain of problem20, the interval [-10.0 10.0], as a vector with one [lo hi] pair.
See also problem20, dproblem20.
Returns the search domain of [[problem20]], the interval `[-10.0 10.0]`, as a vector with one `[lo hi]` pair. See also [[problem20]], [[dproblem20]].
(problem21 x)Univariate test function number 21 of the collection of one dimensional global optimization problems: x sin(x) + x cos(2x).
Domain: [0, 10], see problem21-bounds. Global minimum: f(x*) = -9.508350 at x* = 4.795400.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem21 (the derivative).
Univariate test function number 21 of the collection of one dimensional global optimization problems: `x sin(x) + x cos(2x)`. Domain: `[0, 10]`, see [[problem21-bounds]]. Global minimum: `f(x*) = -9.508350 at x* = 4.795400`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem21]] (the derivative).
(problem21-bounds)Returns the search domain of problem21, the interval [0.0 10.0], as a vector with one [lo hi] pair.
See also problem21, dproblem21.
Returns the search domain of [[problem21]], the interval `[0.0 10.0]`, as a vector with one `[lo hi]` pair. See also [[problem21]], [[dproblem21]].
(problem22 x)Univariate test function number 22 of the collection of one dimensional global optimization problems: exp(-3x) - sin(x)^3.
Domain: [0, 20], see problem22-bounds. Global minimum: f(x*) = -1 (to about 1e-10) at x* = 5 pi / 2 = 7.853982 and further minima of the same depth.
Parameters:
x (number): the point.Returns the value of the function as a double.
See also dproblem22 (the derivative).
Univariate test function number 22 of the collection of one dimensional global optimization problems: `exp(-3x) - sin(x)^3`. Domain: `[0, 20]`, see [[problem22-bounds]]. Global minimum: `f(x*) = -1 (to about 1e-10) at x* = 5 pi / 2 = 7.853982 and further minima of the same depth`. Parameters: - `x` (number): the point. Returns the value of the function as a double. See also [[dproblem22]] (the derivative).
(problem22-bounds)Returns the search domain of problem22, the interval [0.0 20.0], as a vector with one [lo hi] pair.
See also problem22, dproblem22.
Returns the search domain of [[problem22]], the interval `[0.0 20.0]`, as a vector with one `[lo hi]` pair. See also [[problem22]], [[dproblem22]].
(rastrigin v)(rastrigin-bounds N)(rosenbrock v)Rosenbrock function for any number of dimensions: the sum of 100 (x[i+1] - x[i]^2)^2 + (x[i] - 1)^2 for consecutive pairs of coordinates.
The function has a long curved valley and one global minimum (for more than three dimensions also a local one close to (-1, 1, ..., 1)). Domain: [-5, 10]^N, see rosenbrock-bounds. Global minimum: f(x*) = 0 at x* = (1, ..., 1).
Parameters:
v (sequence of numbers): the point.Returns the value as a double. A point with fewer than two coordinates gives 0.0.
See also rosenbrock-gradient.
Rosenbrock function for any number of dimensions: the sum of `100 (x[i+1] - x[i]^2)^2 + (x[i] - 1)^2` for consecutive pairs of coordinates. The function has a long curved valley and one global minimum (for more than three dimensions also a local one close to `(-1, 1, ..., 1)`). Domain: `[-5, 10]^N`, see [[rosenbrock-bounds]]. Global minimum: `f(x*) = 0` at `x* = (1, ..., 1)`. Parameters: - `v` (sequence of numbers): the point. Returns the value as a double. A point with fewer than two coordinates gives `0.0`. See also [[rosenbrock-gradient]].
(rosenbrock-bounds N)Returns the usual search domain of rosenbrock for N dimensions: [-5 10] in every dimension.
Parameters:
N (long): number of dimensions.Returns a sequence of N pairs [lo hi]. A smaller domain [-2.048, 2.048] is also common.
Returns the usual search domain of [[rosenbrock]] for `N` dimensions: `[-5 10]` in every dimension. Parameters: - `N` (long): number of dimensions. Returns a sequence of `N` pairs `[lo hi]`. A smaller domain `[-2.048, 2.048]` is also common.
(rosenbrock-gradient v)Gradient of the rosenbrock function.
Parameters:
v (sequence of numbers): the point.Returns a vector of doubles with the partial derivatives, one for every coordinate. A point with fewer than two coordinates gives zeros.
Gradient of the [[rosenbrock]] function. Parameters: - `v` (sequence of numbers): the point. Returns a vector of doubles with the partial derivatives, one for every coordinate. A point with fewer than two coordinates gives zeros.
(rotated-hyper-ellipsoid v)(rotated-hyper-ellipsoid-bounds N)(schaffer-2 [x1 x2])(schaffer-2-bounds)(schaffer-4 [x1 x2])(schaffer-4-bounds)(schwefel v)(schwefel-bounds N)(shubert [x1 x2])(shubert-bounds)(six-hump-camel [x1 x2])(six-hump-camel-bounds)(sphere v)Sphere function for any number of dimensions: the sum of squares of the coordinates.
The function is convex with one global minimum. Domain: [-5.12, 5.12]^N, see sphere-bounds. Global minimum: f(x*) = 0 at x* = (0, ..., 0).
Parameters:
v (sequence of numbers): the point.Returns the value as a double.
See also sphere-gradient.
Sphere function for any number of dimensions: the sum of squares of the coordinates. The function is convex with one global minimum. Domain: `[-5.12, 5.12]^N`, see [[sphere-bounds]]. Global minimum: `f(x*) = 0` at `x* = (0, ..., 0)`. Parameters: - `v` (sequence of numbers): the point. Returns the value as a double. See also [[sphere-gradient]].
(sphere-bounds N)Returns the usual search domain of sphere for N dimensions: [-5.12 5.12] in every dimension.
Parameters:
N (long): number of dimensions.Returns a sequence of N pairs [lo hi].
Returns the usual search domain of [[sphere]] for `N` dimensions: `[-5.12 5.12]` in every dimension. Parameters: - `N` (long): number of dimensions. Returns a sequence of `N` pairs `[lo hi]`.
(sphere-gradient v)Gradient of the sphere function: twice the point.
Parameters:
v (sequence of numbers): the point.Returns the partial derivatives in the form of the argument (a vector for a vector, an array for an array).
Gradient of the [[sphere]] function: twice the point. Parameters: - `v` (sequence of numbers): the point. Returns the partial derivatives in the form of the argument (a vector for a vector, an array for an array).
(styblinski-tang v)(styblinski-tang-bounds N)(sum-of-different-powers v)(sum-of-different-powers-bounds N)(sum-squares v)(sum-squares-bounds N)(three-hump-camel [x1 x2])(three-hump-camel-bounds)(trid v)(trid-bounds N)(zakharov v)(zakharov-bounds N)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |