rosenbrock


The Rosenbrock function is unimodal, and the global minimum lies in a narrow, parabolic valley [1].

of = rosenbrock(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}) = \sum_{i=1}^{d-1}\left [ 100 \left ( x_{i+1} - x_{i}^{2} \right )_{}^{2} + \left ( x_{i} + 1 \right )_{}^{2} \right ] \]

(1)

\[ x_{i} \in [-5, 10], x_{i} \in [-5, 10], i=1, ... , d; \;...\; f(\mathbf{x}^*) = 0, \; \mathbf{x}^* = (1,...,1) \]

(2)

Example 1

Considering the design variable \(\mathbf{x} = [1,1]\), what value does the objective function expect?

# Data
  x = [1, 1]

  # Call function
  of = rosenbrock(x)

  # Output details
  print("of_best rosenbrock: of = {:.4f}".format(of))
of_best rosenbrock: of = 0.0000

Reference list