Skip to content
Iannick Gagnon edited this page May 22, 2025 · 7 revisions

Description

The Levy function is a well-known benchmark for testing optimization algorithms due to its complex landscape with many local minima. It is particularly challenging due to its deceptive nature, with many local optima that can trap optimization algorithms. The Levy function is defined mathematically as:

$$ \LARGE f(\vec{x}) = \sin^2(\pi w_1) + \sum_{i=1}^{d-1} (w_i - 1)^2 \left[ 1 + 10 \sin^2(\pi w_i + 1) \right] + (w_d - 1)^2 \left[ 1 + \sin^2(2 \pi w_d) \right] $$

where

$$ \LARGE w_i = 1 + \frac{x_i - 1}{4}$$

Visualization

Here is a link to an interactive Desmos version we created: https://www.desmos.com/3d/a8jny6q7o9

Levy().visualize()

Features

  1. Multimodality: The function has numerous local minima, making it difficult for optimization algorithms to find the global minimum.
  2. Global minimum: The global minimum is $f(x^*=<1,\cdots,1>) = 0$.
  3. Search space: The function is generally evaluated within the bounded region $-10 \leq x_i \leq 10$.

Discussion

The Levy function is particularly useful for evaluating the performance of optimization algorithms due to its complex and multimodal landscape. The presence of numerous local minima requires algorithms to effectively explore the search space to locate the global minimum. This makes the Levy function a valuable test case for global optimization methods, particularly those that are designed to escape local optima and explore extensively.

Sources

The Levy test function was introduced in the following article :

Levy, A. V., & Montalvo, A. (1985). The tunneling algorithm for the global minimization of functions. SIAM Journal on Scientific and Statistical Computing, 6(1), 15-29.

It can be found here : https://epubs.siam.org/doi/abs/10.1137/0906002

Clone this wiki locally