Learn R Programming

marinepredator (version 0.0.1)

F06: Step Function / Shifted Sphere (F06)

Description

A shifted version of the Sphere function with the minimum at \((-0.5, -0.5, ..., -0.5)\), also known as the Step function.

Usage

F06(x)

Value

Numeric scalar representing the function value.

Arguments

x

Numeric vector of input values.

Details

Formula: $$f(x) = \sum_{i=1}^{n} (x_i + 0.5)^2$$

Global minimum: \(f(-0.5, -0.5, ..., -0.5) = 0\)

Characteristics:

  • Type: Unimodal

  • Separable: Yes

  • Differentiable: Yes

  • Convex: Yes

  • Default bounds: \([-100, 100]^n\)

  • Default dimensions: 50

This function tests the algorithm's ability to find optima that are not located at the origin.

See Also

test-functions for an overview of all test functions, get_function_details to retrieve function parameters.

Examples

Run this code
F06(c(-0.5, -0.5))       # Returns 0 (global minimum)
F06(c(0, 0))             # Returns 0.5
F06(rep(-0.5, 50))       # Returns 0 in 50 dimensions

Run the code above in your browser using DataLab