From Surf Wiki (app.surf) — the open knowledge base
Test functions for optimization
Functions used to evaluate optimization algorithms
Functions used to evaluate optimization algorithms
In applied mathematics, test functions, known as artificial landscapes, are useful to evaluate characteristics of optimization algorithms, such as convergence rate, precision, robustness and general performance.
Here some test functions are presented with the aim of giving an idea about the different situations that optimization algorithms have to face when coping with these kinds of problems. In the first part, some objective functions for single-objective optimization cases are presented. In the second part, test functions with their respective Pareto fronts for multi-objective optimization problems (MOP) are given.
The artificial landscapes presented herein for single-objective optimization problems are taken from Bäck, Haupt et al. and from Rody Oldenhuis software. Given the number of problems (55 in total), just a few are presented here.
The test functions used to evaluate the algorithms for MOP were taken from Deb, Binh et al. and Binh. The software developed by Deb can be downloaded, which implements the NSGA-II procedure with GAs, or the program posted on Internet, which implements the NSGA-II procedure with ES.
Just a general form of the equation, a plot of the objective function, boundaries of the object variables and the coordinates of global minima are given herein.
Test functions for single-objective optimization
| Name | Plot | Formula | Global minimum | Search domain | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Rastrigin function | [[File:Rastrigin contour plot.svg | 200px | Rastrigin function for n=2]] | f(\mathbf{x}) = A n + \sum_{i=1}^n \left[x_i^2 - A\cos(2 \pi x_i)\right] | f(0, \dots, 0) = 0 | -5.12\le x_{i} \le 5.12 | ||||||||||||||||||||
| Ackley function | [[File:Ackley contour function.svg | 200px | Ackley's function for n=2]] | f(x,y) = -20\exp\left[-0.2\sqrt{0.5\left(x^{2}+y^{2}\right)}\right] | f(0,0) = 0 | -5\le x,y \le 5 | ||||||||||||||||||||
| Sphere function | [[File:Sphere contour.svg | 200px | Sphere function for n=2]] | f(\boldsymbol{x}) = \sum_{i=1}^{n} x_{i}^{2} | f(x_{1}, \dots, x_{n}) = f(0, \dots, 0) = 0 | -\infty \le x_{i} \le \infty, 1 \le i \le n | ||||||||||||||||||||
| Rosenbrock function | [[File:Rosenbrock contour.svg | 200px | Rosenbrock's function for n=2]] | f(\boldsymbol{x}) = \sum_{i=1}^{n-1} \left[ 100 \left(x_{i+1} - x_{i}^{2}\right)^{2} + \left(1 - x_{i}\right)^{2}\right] | \text{Min} = | -\infty \le x_{i} \le \infty, 1 \le i \le n | ||||||||||||||||||||
| Beale function | [[File:Beale contour.svg | 200px | Beale's function]] | f(x,y) = \left( 1.5 - x + xy \right)^{2} + \left( 2.25 - x + xy^{2}\right)^{2} | f(3, 0.5) = 0 | -4.5 \le x,y \le 4.5 | ||||||||||||||||||||
| Goldstein–Price function | [[File:Goldstein-Price contour.svg | 200px | Goldstein–Price function]] | f(x,y) = \left[1+\left(x+y+1\right)^{2}\left(19-14x+3x^{2}-14y+6xy+3y^{2}\right)\right] | f(0, -1) = 3 | -2 \le x,y \le 2 | ||||||||||||||||||||
| Booth function | [[File:Booth contour.svg | 200px | Booth's function]] | f(x,y) = \left( x + 2y -7\right)^{2} + \left(2x +y - 5\right)^{2} | f(1,3) = 0 | -10 \le x,y \le 10 | ||||||||||||||||||||
| Bukin function N.6 | [[File:Bukin 6 contour.svg | 200px | Bukin function N.6]] | y - 0.01x^{2}\right | } + 0.01 \left | x+10 \right | .\quad | f(-10,1) = 0 | -15\le x \le -5, -3\le y \le 3 | |||||||||||||||||
| Matyas function | [[File:Matyas contour.svg | 200px | Matyas function]] | f(x,y) = 0.26 \left( x^{2} + y^{2}\right) - 0.48 xy | f(0,0) = 0 | -10\le x,y \le 10 | ||||||||||||||||||||
| Lévi function N.13 | [[File:Levi13 contour.svg | 200px | Lévi function N.13]] | f(x,y) = \sin^{2} 3\pi x + \left(x-1\right)^{2}\left(1+\sin^{2} 3\pi y\right) | f(1,1) = 0 | -10\le x,y \le 10 | ||||||||||||||||||||
| Griewank function | [[File:Griewank 2D Contour.svg | 200px | Griewank's function]] | f(\boldsymbol{x})= 1+ \frac {1}{4000} \sum _{i=1}^n x_i^2 -\prod _{i=1}^n P_i(x_i), where P_i(x_i)=\cos \left( \frac {x_i}{\sqrt {i}} \right) | f(0, \dots, 0) = 0 | -\infty \le x_{i} \le \infty, 1 \le i \le n | ||||||||||||||||||||
| Himmelblau's function | [[File:Himmelblau contour plot.svg | 200px | Himmelblau's function]] | f(x, y) = (x^2+y-11)^2 + (x+y^2-7)^2.\quad | \text{Min} = | -5\le x,y \le 5 | ||||||||||||||||||||
| Three-hump camel function | [[File:Three-hump-camel contour.svg | 200px | Three Hump Camel function]] | f(x,y) = 2x^{2} - 1.05x^{4} + \frac{x^{6}}{6} + xy + y^{2} | f(0,0) = 0 | -5\le x,y \le 5 | ||||||||||||||||||||
| Easom function | [[File:Easom contour.svg | 200px | Easom function]] | f(x,y) = -\cos \left(x\right)\cos \left(y\right) \exp\left(-\left(\left(x-\pi\right)^{2} + \left(y-\pi\right)^{2}\right)\right) | f(\pi , \pi) = -1 | -100\le x,y \le 100 | ||||||||||||||||||||
| Cross-in-tray function | [[File:Cross-in-tray contour.svg | 200px | Cross-in-tray function]] | \sin x \sin y \exp \left(\left | 100 - \frac{\sqrt{x^{2} + y^{2}}}{\pi} \right | \right)\right | + 1 \right]^{0.1} | \text{Min} = | -10\le x,y \le 10 | |||||||||||||||||
| last1=Whitley | first1=Darrell | last2=Rana | first2=Soraya | last3=Dzubera | first3=John | last4=Mathias | first4=Keith E. | title=Evaluating evolutionary algorithms | journal=Artificial Intelligence | publisher=Elsevier BV | volume=85 | issue=1–2 | year=1996 | issn=0004-3702 | doi=10.1016/0004-3702(95)00124-7 | pages=264 | doi-access=free }} | [[File:Eggholder contour.svg | 200px | Eggholder function]] | \frac{x}{2}+\left(y+47\right)\right | } - x \sin \sqrt{\left | x - \left(y + 47 \right)\right | } | f(512, 404.2319) = -959.6407 | -512\le x,y \le 512 |
| Hölder table function | [[File:Hoelder table contour.svg | 200px | Holder table function]] | \sin x \cos y \exp \left(\left | 1 - \frac{\sqrt{x^{2} + y^{2}}}{\pi} \right | \right)\right | \text{Min} = | -10\le x,y \le 10 | ||||||||||||||||||
| McCormick function | [[File:McCormick contour.svg | 200px | McCormick function]] | f(x,y) = \sin \left(x+y\right) + \left(x-y\right)^{2} - 1.5x + 2.5y + 1 | f(-0.54719,-1.54719) = -1.9133 | -1.5\le x \le 4, -3\le y \le 4 | ||||||||||||||||||||
| Schaffer function N. 2 | [[File:Schaffer2 contour.svg | 200px | Schaffer function N.2]] | f(x,y) = 0.5 + \frac{\sin^{2}\left(x^{2} - y^{2}\right) - 0.5}{\left[1 + 0.001\left(x^{2} + y^{2}\right) \right]^{2}} | f(0, 0) = 0 | -100\le x,y \le 100 | ||||||||||||||||||||
| Schaffer function N. 4 | [[File:Schaffer4 contour.svg | 200px | Schaffer function N.4]] | x^{2} - y^{2}\right | \right)\right] - 0.5}{\left[1 + 0.001\left(x^{2} + y^{2}\right) \right]^{2}} | \text{Min} = | -100\le x,y \le 100 | |||||||||||||||||||
| Styblinski–Tang function | [[File:Styblinski-Tang contour.svg | 200px | Styblinski-Tang function]] | f(\boldsymbol{x}) = \frac{\sum_{i=1}^{n} x_{i}^{4} - 16x_{i}^{2} + 5x_{i}}{2} | -39.16617n | -5\le x_{i} \le 5, 1\le i \le n.. | ||||||||||||||||||||
| Shekel function | [[Image:Shekel_2D.jpg | 200px | A Shekel function in 2 dimensions and with 10 maxima]] | -\infty \le x_{i} \le \infty, 1 \le i \le n |
Test functions for constrained optimization
| Name | Plot | Formula | Global minimum | Search domain | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Rosenbrock function constrained to a disk | [[File:Rosenbrock circle constraint.svg | 200px | Rosenbrock function constrained to a disk]] | f(x,y) = (1-x)^2 + 100(y-x^2)^2, | f(1.0,1.0) = 0 | -1.5\le x \le 1.5, -1.5\le y \le 1.5 | ||||||
| Mishra's Bird function - constrained | [[File:Mishra bird contour.svg | 200px | Bird function (constrained)]] | f(x,y) = \sin(y) e^{\left [(1-\cos x)^2\right]} + \cos(x) e^{\left [(1-\sin y)^2 \right]} + (x-y)^2, | f(-3.1302468,-1.5821422) = -106.7645367 | -10\le x \le 0, -6.5\le y \le 0 | ||||||
| Townsend function (modified) | [[File:Townsend contour.svg | 200px | Heart constrained multimodal function]] | f(x,y) = -[\cos((x-0.1)y)]^2 - x \sin(3x+y), | f(2.0052938,1.1944509) = -2.0239884 | -2.25\le x \le 2.25, -2.5\le y \le 1.75 | ||||||
| Keane's bump functionKeane's bump function | [[File:Keane Function1.png | 200px | Keane's bump function]] | f(\boldsymbol{x}) = -\left | \frac{\left[ \sum_{i=1}^m \cos^4 (x_i) - 2 \prod_{i=1}^m \cos^2 (x_i) \right]} \right | , | f((1.60025376,0.468675907)) = -0.364979746 | 0 |
Test functions for multi-objective optimization
| Name | Plot | Functions | Constraints | Search domain | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Binh and Korn function: | [[File:Binh and Korn function.pdf | 200px | Binh and Korn function]] | \text{Minimize} = | \text{s.t.} = | 0\le x \le 5, 0\le y \le 3 | |||||||||||||||||||
| Chankong and Haimes function: | [[File:Chakong and Haimes function.pdf | 200px | Chakong and Haimes function]] | \text{Minimize} = | \text{s.t.} = | -20\le x,y \le 20 | |||||||||||||||||||
| first1=C. M. | last1=Fonseca | first2=P. J. | last2=Fleming | title=An Overview of Evolutionary Algorithms in Multiobjective Optimization | journal=Evol Comput | volume=3 | issue=1 | pages=1–16 | year=1995 | doi=10.1162/evco.1995.3.1.1 | citeseerx=10.1.1.50.7779 | s2cid=8530790 }} | [[File:Fonseca and Fleming function.pdf | 200px | Fonseca and Fleming function]] | \text{Minimize} = | -4\le x_{i} \le 4, 1\le i \le n | ||||||||
| Test function 4: | [[File:Test function 4 - Binh.pdf | 200px | Test function 4.]] | \text{Minimize} = | \text{s.t.} = | -7\le x,y \le 4 | |||||||||||||||||||
| PPSN]] I, Vol 496 Lect Notes in Comput Sc. Springer-Verlag, 1991, pp. 193–197. | [[File:Kursawe function.pdf | 200px | Kursawe function]] | \text{Minimize} = | -5\le x_{i} \le 5, 1\le i \le 3. | ||||||||||||||||||||
| last=Schaffer | first=J. David | date=1984 | chapter=Multiple Objective Optimization with Vector Evaluated Genetic Algorithms | title=Proceedings of the First International Conference on Genetic Algorithms | editor1=G.J.E Grefensette | editor2=J.J. Lawrence Erlbraum | oclc=20004572 }} | [[File:Schaffer function 1.pdf | 200px | Schaffer function N.1]] | \text{Minimize} = | -A\le x \le A. Values of A from 10 to 10^{5} have been used successfully. Higher values of A increase the difficulty of the problem. | |||||||||||||
| Schaffer function N. 2: | [[File:Schaffer function 2 - multi-objective.pdf | 200px | Schaffer function N.2]] | \text{Minimize} = | -5\le x \le 10. | ||||||||||||||||||||
| Poloni's two objective function: | [[File:Poloni's two objective function.pdf | 200px | Poloni's two objective function]] | \text{Minimize} = | -\pi\le x,y \le \pi | ||||||||||||||||||||
| last1=Deb | first1=Kalyan | last2=Thiele | first2=L. | last3=Laumanns | first3=Marco | last4=Zitzler | first4=Eckart | title=Proceedings of the 2002 Congress on Evolutionary Computation. CEC'02 (Cat. No.02TH8600) | chapter=Scalable multi-objective optimization test problems | date=2002 | volume=1 | pages=825–830 | doi=10.1109/CEC.2002.1007032 | isbn=0-7803-7282-4 | s2cid=61001583 }} | [[File:Zitzler-Deb-Thiele's function 1.pdf | 200px | Zitzler-Deb-Thiele's function N.1]] | \text{Minimize} = | 0\le x_{i} \le 1, 1\le i \le 30. | |||||
| Zitzler–Deb–Thiele's function N. 2: | [[File:Zitzler-Deb-Thiele's function 2.pdf | 200px | Zitzler-Deb-Thiele's function N.2]] | \text{Minimize} = | 0\le x_{i} \le 1, 1\le i \le 30. | ||||||||||||||||||||
| Zitzler–Deb–Thiele's function N. 3: | [[File:Zitzler-Deb-Thiele's function 3.pdf | 200px | Zitzler-Deb-Thiele's function N.3]] | \text{Minimize} = | 0\le x_{i} \le 1, 1\le i \le 30. | ||||||||||||||||||||
| Zitzler–Deb–Thiele's function N. 4: | [[File:Zitzler-Deb-Thiele's function 4.pdf | 200px | Zitzler-Deb-Thiele's function N.4]] | \text{Minimize} = | 0\le x_{1} \le 1, -5\le x_{i} \le 5, 2\le i \le 10 | ||||||||||||||||||||
| Zitzler–Deb–Thiele's function N. 6: | [[File:Zitzler-Deb-Thiele's function 6.pdf | 200px | Zitzler-Deb-Thiele's function N.6]] | \text{Minimize} = | 0\le x_{i} \le 1, 1\le i \le 10. | ||||||||||||||||||||
| last1=Osyczka | first1=A. | last2=Kundu | first2=S. | title=A new method to solve generalized multicriteria optimization problems using the simple genetic algorithm | journal=Structural Optimization | date=1 October 1995 | volume=10 | issue=2 | pages=94–99 | doi=10.1007/BF01743536 | s2cid=123433499 | issn=1615-1488}} | [[File:Osyczka and Kundu function.pdf | 200px | Osyczka and Kundu function]] | \text{Minimize} = | \text{s.t.} = | 0\le x_{1},x_{2},x_{6} \le 10, 1\le x_{3},x_{5} \le 5, 0\le x_{4} \le 6. | |||||||
| last1=Jimenez | first1=F. | last2=Gomez-Skarmeta | first2=A. F. | last3=Sanchez | first3=G. | last4=Deb | first4=K. | title=Proceedings of the 2002 Congress on Evolutionary Computation. CEC'02 (Cat. No.02TH8600) | chapter=An evolutionary algorithm for constrained multi-objective optimization | date=May 2002 | volume=2 | pages=1133–1138 | doi=10.1109/CEC.2002.1004402 | isbn=0-7803-7282-4 | s2cid=56563996 }} | [[File:CTP1 function (2 variables).pdf | 200px | CTP1 function (2 variables).]] | \text{Minimize} = | \text{s.t.} = | 0\le x,y \le 1. | ||||
| Constr-Ex problem: | [[File:Constr-Ex problem.pdf | 200px | Constr-Ex problem.]] | \text{Minimize} = | \text{s.t.} = | 0.1\le x \le 1, 0\le y \le 5 | |||||||||||||||||||
| Viennet function: | [[File:Viennet function.pdf | 200px | Viennet function]] | \text{Minimize} = | -3\le x,y \le 3. |
References
References
- Bäck, Thomas. (1995). "Evolutionary algorithms in theory and practice : evolution strategies, evolutionary programming, genetic algorithms". Oxford University Press.
- Haupt, Randy L. Haupt, Sue Ellen. (2004). "Practical genetic algorithms with CD-Rom". J. Wiley.
- Oldenhuis, Rody. "Many test functions for global optimizers". Mathworks.
- Deb, Kalyanmoy (2002) Multiobjective optimization using evolutionary algorithms (Repr. ed.). Chichester [u.a.]: Wiley. {{isbn. 0-471-87339-X.
- Binh T. and Korn U. (1997) [https://web.archive.org/web/20190801183649/https://pdfs.semanticscholar.org/cf68/41a6848ca2023342519b0e0e536b88bdea1d.pdf MOBES: A Multiobjective Evolution Strategy for Constrained Optimization Problems]. In: Proceedings of the Third International Conference on Genetic Algorithms. Czech Republic. pp. 176–182
- Binh T. (1999) [https://www.researchgate.net/profile/Thanh_Binh_To/publication/2446107_A_Multiobjective_Evolutionary_Algorithm_The_Study_Cases/links/53eb422f0cf28f342f45251d.pdf A multiobjective evolutionary algorithm. The study cases.] Technical report. Institute for Automation and Communication. Barleben, Germany
- Deb K. (2011) Software for multi-objective NSGA-II code in C. Available at URL: https://www.iitk.ac.in/kangal/codes.shtml
- Ortiz, Gilberto A.. "Multi-objective optimization using ES as Evolutionary Algorithm.". Mathworks.
- (1996). "Evaluating evolutionary algorithms". Elsevier BV.
- Vanaret C. (2015) [https://www.researchgate.net/publication/337947149_Hybridization_of_interval_methods_and_evolutionary_algorithms_for_solving_difficult_optimization_problems Hybridization of interval methods and evolutionary algorithms for solving difficult optimization problems.] PhD thesis. Ecole Nationale de l'Aviation Civile. Institut National Polytechnique de Toulouse, France.
- "Solve a Constrained Nonlinear Problem - MATLAB & Simulink".
- "Bird Problem (Constrained) {{!}} Phoenix Integration".
- Mishra, Sudhanshu. (2006). "Some new test functions for global optimization and performance of repulsive particle swarm method". MPRA Paper.
- Townsend, Alex. (January 2014). "Constrained optimization in Chebfun".
- (5 May 2007). "Minimization of Keane’s Bump Function by the Repulsive Particle Swarm and the Differential Evolution Methods". University Library of Munich, Germany.
- (1983). "Multiobjective decision making. Theory and methodology.". North Holland.
- (1995). "An Overview of Evolutionary Algorithms in Multiobjective Optimization". [[Evolutionary Computation (journal).
- PPSN]] I, Vol 496 Lect Notes in Comput Sc. Springer-Verlag, 1991, pp. 193–197.
- Schaffer, J. David. (1984). "Proceedings of the First International Conference on Genetic Algorithms".
- (2002). "Proceedings of the 2002 Congress on Evolutionary Computation. CEC'02 (Cat. No.02TH8600)".
- (1 October 1995). "A new method to solve generalized multicriteria optimization problems using the simple genetic algorithm". Structural Optimization.
- (May 2002). "Proceedings of the 2002 Congress on Evolutionary Computation. CEC'02 (Cat. No.02TH8600)".
This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.
Ask Mako anything about Test functions for optimization — get instant answers, deeper analysis, and related topics.
Research with MakoFree with your Surf account
Create a free account to save articles, ask Mako questions, and organize your research.
Sign up freeThis content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.
Report