Skip to content
Iannick Gagnon edited this page May 19, 2024 · 21 revisions

Description

The Sphere function is a commonly used benchmark for testing optimization algorithms. It is defined mathematically as:

$$ f(\vec{x}) = \sum_{i=1}^{d} a_i x_i^2 $$

Where $d$ corresponds to the number of dimensions (Sphere.dimensionality) with a default value of 2. The $\vec a$ parameter is a $1\times d$ real-valued vector that we introduced for flexibility reasons. More specifically, if any one $a_i$ is less than zero, saddle points appear, which represents a different optimization challenge. This can be seen in the interactive Desmos version linked below.

Visualization : Sphere().visualize()

Here is a link to a Desmos version I created : https://www.desmos.com/3d/wnvkpux9oy

Features

  1. Unimodality: The function has a single global minimum, making it easier for optimization algorithms to find the optimal solution.
  2. Global minimum: The global minimum is located at $f(x^{*}=<0,...,0>)=0$.
  3. Search space: Typically, it is evaluated over $[-5.12, 5.12]$ for each dimension.
  4. Smoothness: The function is smooth and differentiable, which is advantageous for gradient-based optimization methods.

Sources

The Sphere function is a well-known mathematical function used in optimization literature. More information can be found in relevant optimization textbooks and research papers.

Clone this wiki locally