goldstein_price
The Goldstein-Price function has several local minima [1].
of = goldstein_price(x)
Input variables
Name | Description | Type |
---|---|---|
x | Current design variables of the i agent. | List |
Output variables
Name | Description | Type |
---|---|---|
of | Objective function value of the i agent. | Float |
Problem
\[ f(\mathbf{x}) = \left [ 1 + (x_{1} + x_{2} + 1)^2 (19 - 14x_{1} + 3x^2_{1} - 14x_{2} + 6x_{1}x_{2} +3x^2_{2}) \right ] + \left [ 30 + (2x_{1} + 3x_{2} )^2 (18-32x_{1} + 12x^2_{1} + 48x_{2} - 36x_{1}x_{2} + 27x^2_{2}) \right ] \] | (1) |
\[ x_{i} \in [-2, 2], i=1, 2; \;...\; f(\mathbf{x}^*) = 3, \; \mathbf{x}^* =(0, 1) \] | (2) |
Example 1
Considering the design variable \(\mathbf{x} = [0, -1]\), what value does the objective function expect?
# Data
x = [0, -1]
# Call function
of = goldstein_price(x)
# Output details
print("of_best goldstein-Price: of = {:.4f}".format(of))
of_best goldstein-Price: of = 3.0000