Skip to content
Surf Wiki
Save to docs
general/constraint-programming

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

NamePlotFormulaGlobal minimumSearch domain
Rastrigin function[[File:Rastrigin contour plot.svg200pxRastrigin 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.svg200pxAckley'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.svg200pxSphere 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.svg200pxRosenbrock'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.svg200pxBeale'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.svg200pxGoldstein–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.svg200pxBooth'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.svg200pxBukin function N.6]]y - 0.01x^{2}\right} + 0.01 \leftx+10 \right.\quadf(-10,1) = 0-15\le x \le -5, -3\le y \le 3
Matyas function[[File:Matyas contour.svg200pxMatyas function]]f(x,y) = 0.26 \left( x^{2} + y^{2}\right) - 0.48 xyf(0,0) = 0-10\le x,y \le 10
Lévi function N.13[[File:Levi13 contour.svg200pxLé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.svg200pxGriewank'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.svg200pxHimmelblau'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.svg200pxThree 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.svg200pxEasom 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.svg200pxCross-in-tray function]]\sin x \sin y \exp \left(\left100 - \frac{\sqrt{x^{2} + y^{2}}}{\pi} \right\right)\right+ 1 \right]^{0.1}\text{Min} =-10\le x,y \le 10
last1=Whitleyfirst1=Darrelllast2=Ranafirst2=Sorayalast3=Dzuberafirst3=Johnlast4=Mathiasfirst4=Keith E.title=Evaluating evolutionary algorithmsjournal=Artificial Intelligencepublisher=Elsevier BVvolume=85issue=1–2year=1996issn=0004-3702doi=10.1016/0004-3702(95)00124-7pages=264doi-access=free }}[[File:Eggholder contour.svg200pxEggholder function]]\frac{x}{2}+\left(y+47\right)\right} - x \sin \sqrt{\leftx - \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.svg200pxHolder table function]]\sin x \cos y \exp \left(\left1 - \frac{\sqrt{x^{2} + y^{2}}}{\pi} \right\right)\right\text{Min} =-10\le x,y \le 10
McCormick function[[File:McCormick contour.svg200pxMcCormick function]]f(x,y) = \sin \left(x+y\right) + \left(x-y\right)^{2} - 1.5x + 2.5y + 1f(-0.54719,-1.54719) = -1.9133-1.5\le x \le 4, -3\le y \le 4
Schaffer function N. 2[[File:Schaffer2 contour.svg200pxSchaffer 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.svg200pxSchaffer 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.svg200pxStyblinski-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.jpg200pxA 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

NamePlotFormulaGlobal minimumSearch domain
Rosenbrock function constrained to a disk[[File:Rosenbrock circle constraint.svg200pxRosenbrock 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.svg200pxBird 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.svg200pxHeart 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.png200pxKeane'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.3649797460

Test functions for multi-objective optimization

NamePlotFunctionsConstraintsSearch domain
Binh and Korn function:[[File:Binh and Korn function.pdf200pxBinh 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.pdf200pxChakong and Haimes function]]\text{Minimize} =\text{s.t.} =-20\le x,y \le 20
first1=C. M.last1=Fonsecafirst2=P. J.last2=Flemingtitle=An Overview of Evolutionary Algorithms in Multiobjective Optimizationjournal=Evol Computvolume=3issue=1pages=1–16year=1995doi=10.1162/evco.1995.3.1.1citeseerx=10.1.1.50.7779s2cid=8530790 }}[[File:Fonseca and Fleming function.pdf200pxFonseca and Fleming function]]\text{Minimize} =-4\le x_{i} \le 4, 1\le i \le n
Test function 4:[[File:Test function 4 - Binh.pdf200pxTest 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.pdf200pxKursawe function]]\text{Minimize} =-5\le x_{i} \le 5, 1\le i \le 3.
last=Schafferfirst=J. Daviddate=1984chapter=Multiple Objective Optimization with Vector Evaluated Genetic Algorithmstitle=Proceedings of the First International Conference on Genetic Algorithmseditor1=G.J.E Grefensetteeditor2=J.J. Lawrence Erlbraumoclc=20004572 }}[[File:Schaffer function 1.pdf200pxSchaffer 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.pdf200pxSchaffer function N.2]]\text{Minimize} =-5\le x \le 10.
Poloni's two objective function:[[File:Poloni's two objective function.pdf200pxPoloni's two objective function]]\text{Minimize} =-\pi\le x,y \le \pi
last1=Debfirst1=Kalyanlast2=Thielefirst2=L.last3=Laumannsfirst3=Marcolast4=Zitzlerfirst4=Eckarttitle=Proceedings of the 2002 Congress on Evolutionary Computation. CEC'02 (Cat. No.02TH8600)chapter=Scalable multi-objective optimization test problemsdate=2002volume=1pages=825–830doi=10.1109/CEC.2002.1007032isbn=0-7803-7282-4s2cid=61001583 }}[[File:Zitzler-Deb-Thiele's function 1.pdf200pxZitzler-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.pdf200pxZitzler-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.pdf200pxZitzler-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.pdf200pxZitzler-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.pdf200pxZitzler-Deb-Thiele's function N.6]]\text{Minimize} =0\le x_{i} \le 1, 1\le i \le 10.
last1=Osyczkafirst1=A.last2=Kundufirst2=S.title=A new method to solve generalized multicriteria optimization problems using the simple genetic algorithmjournal=Structural Optimizationdate=1 October 1995volume=10issue=2pages=94–99doi=10.1007/BF01743536s2cid=123433499issn=1615-1488}}[[File:Osyczka and Kundu function.pdf200pxOsyczka 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=Jimenezfirst1=F.last2=Gomez-Skarmetafirst2=A. F.last3=Sanchezfirst3=G.last4=Debfirst4=K.title=Proceedings of the 2002 Congress on Evolutionary Computation. CEC'02 (Cat. No.02TH8600)chapter=An evolutionary algorithm for constrained multi-objective optimizationdate=May 2002volume=2pages=1133–1138doi=10.1109/CEC.2002.1004402isbn=0-7803-7282-4s2cid=56563996 }}[[File:CTP1 function (2 variables).pdf200pxCTP1 function (2 variables).]]\text{Minimize} =\text{s.t.} =0\le x,y \le 1.
Constr-Ex problem:[[File:Constr-Ex problem.pdf200pxConstr-Ex problem.]]\text{Minimize} =\text{s.t.} =0.1\le x \le 1, 0\le y \le 5
Viennet function:[[File:Viennet function.pdf200pxViennet function]]\text{Minimize} =-3\le x,y \le 3.

References

References

  1. Bäck, Thomas. (1995). "Evolutionary algorithms in theory and practice : evolution strategies, evolutionary programming, genetic algorithms". Oxford University Press.
  2. Haupt, Randy L. Haupt, Sue Ellen. (2004). "Practical genetic algorithms with CD-Rom". J. Wiley.
  3. Oldenhuis, Rody. "Many test functions for global optimizers". Mathworks.
  4. Deb, Kalyanmoy (2002) Multiobjective optimization using evolutionary algorithms (Repr. ed.). Chichester [u.a.]: Wiley. {{isbn. 0-471-87339-X.
  5. 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
  6. 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
  7. Deb K. (2011) Software for multi-objective NSGA-II code in C. Available at URL: https://www.iitk.ac.in/kangal/codes.shtml
  8. Ortiz, Gilberto A.. "Multi-objective optimization using ES as Evolutionary Algorithm.". Mathworks.
  9. (1996). "Evaluating evolutionary algorithms". Elsevier BV.
  10. 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.
  11. "Solve a Constrained Nonlinear Problem - MATLAB & Simulink".
  12. "Bird Problem (Constrained) {{!}} Phoenix Integration".
  13. Mishra, Sudhanshu. (2006). "Some new test functions for global optimization and performance of repulsive particle swarm method". MPRA Paper.
  14. Townsend, Alex. (January 2014). "Constrained optimization in Chebfun".
  15. (5 May 2007). "Minimization of Keane’s Bump Function by the Repulsive Particle Swarm and the Differential Evolution Methods". University Library of Munich, Germany.
  16. (1983). "Multiobjective decision making. Theory and methodology.". North Holland.
  17. (1995). "An Overview of Evolutionary Algorithms in Multiobjective Optimization". [[Evolutionary Computation (journal).
  18. PPSN]] I, Vol 496 Lect Notes in Comput Sc. Springer-Verlag, 1991, pp. 193–197.
  19. Schaffer, J. David. (1984). "Proceedings of the First International Conference on Genetic Algorithms".
  20. (2002). "Proceedings of the 2002 Congress on Evolutionary Computation. CEC'02 (Cat. No.02TH8600)".
  21. (1 October 1995). "A new method to solve generalized multicriteria optimization problems using the simple genetic algorithm". Structural Optimization.
  22. (May 2002). "Proceedings of the 2002 Congress on Evolutionary Computation. CEC'02 (Cat. No.02TH8600)".
Info: Wikipedia Source

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.

Want to explore this topic further?

Ask Mako anything about Test functions for optimization — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This 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