# Ackley function

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Ackley_function
> Markdown URL: https://mediated.wiki/source/Ackley_function.md
> Source: https://en.wikipedia.org/wiki/Ackley_function
> Source revision: 1340243446
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{short description|Function used as a performance test problem for optimization algorithms}}
{{multiple image
| direction         = vertical
| width             = 300
| header            = 
| image1            = Ackley 2d.png
| caption1          = Ackley function of two variables
| image2            = Ackley-3d.png
| caption2          = Contour surfaces of Ackley's function in 3D
}}

In [mathematical optimization](/source/mathematical_optimization), the '''Ackley function''' is a non-[convex function](/source/convex_function) used as a performance test problem for [optimization algorithm](/source/optimization_algorithm)s. It was proposed by David Ackley in his 1987 PhD dissertation.<ref>Ackley, D. H. (1987) "[https://books.google.com/books?id=sx_VBwAAQBAJ&q=%22Ackley+function%22 A connectionist machine for genetic hillclimbing]", Kluwer Academic Publishers, Boston MA. p. 13-14</ref> The function is commonly used as a minimization function with [global minimum](/source/Maximum_and_minimum) value 0 at 0,.., 0 in the form due to Thomas Bäck. While Ackley gives the function as an example of "fine-textured broadly [unimodal](/source/Unimodality) space" his thesis does not actually use the function as a test.

On an <math>d</math>-dimensional domain it is defined as<ref>{{Cite web |url=https://www.sfu.ca/~ssurjano/ackley.html |title=Ackley Function |last=Bingham |first=Derek |date=2013 |website=Virtual Library of Simulation Experiments: Test Functions and Datasets |publisher=Simon Fraser University |access-date=December 22, 2024}}</ref>:
 
<math>
f(\mathbf{x}) = -a \exp \left( -b \sqrt{\frac{1}{d} \sum_{i=1}^d x_i^2} \right) 
</math>

<math>- \exp \left( \frac{1}{d} \sum_{i=1}^d \cos(c x_i) \right) + a + \exp(1)</math>

Recommended variable values are <math>a = 20</math>, <math>b = 0.2</math>, and <math>c = 2\pi</math>.

The global minimum is <math>f(\mathbf{x}^*) = 0</math> at <math>\mathbf{x}^* = \mathbf{0}</math>.

== See also ==
*[Test functions for optimization](/source/Test_functions_for_optimization)

==Notes==
<references/>

Category:Test functions for optimization

---
Adapted from the Wikipedia article [Ackley function](https://en.wikipedia.org/wiki/Ackley_function) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Ackley_function?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
