A+ A A-

I. Mathematical Expression:

$$f(X)=\text{min}\Bigg[\sum^n_{i=1}\left(x_i-\mu_1\right)^2 \ , \ d \cdot n + s \cdot \sum^n_{i=1}\left(x_i-\mu_2\right)^2\Bigg]+10\sum^n_{i=1}\Bigg\{1-\cos\left[2 \pi \left(x_i-\mu_1\right)\right]\Bigg\}$$

where:

\(\bullet\) \(\mu_1=2.5\) and \(\mu_2=-\sqrt{\frac{\displaystyle \mu^2_1-d}{\displaystyle s}}\)

\(\bullet\) \(d\) is any value of the set \(\{1,2,3,4\}\) as described in [1] \(\rightarrow\) However, it is standardized with \(d=1\) in [2]

\(\bullet\) \(s\) is any value between \(0.2\) and \(1.4\) as simulated in [1] \(\rightarrow\) However, it is generalized as \(s=1-\frac{\displaystyle 1}{\displaystyle 2\sqrt{2+20}-8.2}\) in [2]

\(\bullet\) \(-5.12\leq x_i\leq 5.12\) , \(i=1,2,\cdots,n\)

\(\bullet\) For \(n=1\):

\( \ \ \ \ \ \ \rhd\) \(f_{min}(x^*)=0\)

\( \ \ \ \ \ \ \rhd\) \(x^*=\mu_1\)

\(\bullet\) For \(n=2\):

\( \ \ \ \ \ \ \rhd\) \(f_{min}(X^*)=0\)

\( \ \ \ \ \ \ \rhd\) \(x^*_i=\mu_1\)

\(\bullet\) It is also known with different names; like: Lunacek's Function No.02, Bi-Rastrigin Function and Double-Rastrigin Function [3].

 

II. Citation Policy:

If you publish material based on databases obtained from this repository, then, in your acknowledgments, please note the assistance you received by using this repository. This will help others to obtain the same data sets and replicate your experiments. We suggest the following pseudo-APA reference format for referring to this repository:

Ali R. Al-Roomi (2015). Unconstrained Single-Objective Benchmark Functions Repository [https://www.al-roomi.org/benchmarks/unconstrained]. Halifax, Nova Scotia, Canada: Dalhousie University, Electrical and Computer Engineering.

Here is a BiBTeX citation as well:

@MISC{Al-Roomi2015,
author = {Ali R. Al-Roomi},
title = {{Unconstrained Single-Objective Benchmark Functions Repository}},
year = {2015},
address = {Halifax, Nova Scotia, Canada},
institution = {Dalhousie University, Electrical and Computer Engineering},
url = {https://www.al-roomi.org/benchmarks/unconstrained}
}

 

III. 2&3D-Plots:

 

IV. Controllable 3D Model:

- In case you want to adjust the rendering mode, camera position, background color or/and 3D measurement tool, please check the following link

- In case you face any problem to run this model on your internet browser (it does not work on mobile phones), please check the following link

 

V. MATLAB M-File:

% Lunacek's bi-Rastrigin Function
% Range of initial points: -5.12 <= xj <= 5.12 , j=1,2,...,n
% For n=1:
% Global minima: x1=mu1
% f(x)=0
% For n=2:
% Global minima: (x1,x2)=mu1
% f(x1,x2)=0
% Coded by: Ali R. Alroomi | Last Update: 23 July 2015 | www.al-roomi.org
        
clear
clc
warning off
   
s_1=1-1/(2*sqrt(1+20)-8.2); % Or, it can be any float value between 0.2 and 1.4 as in the original reference
s_2=1-1/(2*sqrt(2+20)-8.2);
d=1; % 1, 2, 3 or 4
mu1=2.5;
mu2_1=-sqrt((mu1^2-d)/s_1); % for 1-dimensional plotting
mu2_2=-sqrt((mu1^2-d)/s_2); % for 2-dimensional plotting
 
x1min=-5.12;
x1max=5.12;
x2min=-5.12;
x2max=5.12;
R=1500; % steps resolution
x1=x1min:(x1max-x1min)/R:x1max;
x2=x2min:(x2max-x2min)/R:x2max;
 
for j=1:length(x1)
   
    % For 1-dimensional plotting
    f1(j)=min((x1(j)-mu1)^2,d*1+s_1*(x1(j)-mu2_1)^2)+10*(1-cos(2*pi*(x1(j)-mu1)));
   
    % For 2-dimensional plotting
    for i=1:length(x2)
        fn(i)=min((x1(j)-mu1)^2+(x2(i)-mu1)^2,d*1+s_2*((x1(j)-mu2_2)^2+(x2(i)-mu2_2)^2))+10*((1-cos(2*pi*(x1(j)-mu1)))+(1-cos(2*pi*(x2(i)-mu1))));
    end
   
    fn_tot(j,:)=fn;
 
end
 
figure(1)
plot(x1,f1,'r','LineWidth',2);set(gca,'FontSize',12);
xlabel('x','FontName','Times','FontSize',20,'FontAngle','italic');
ylabel('f(x)','FontName','Times','FontSize',20,'FontAngle','italic');
title('2D View','FontName','Times','FontSize',24,'FontWeight','bold');
 
figure(2)
meshc(x1,x2,fn_tot);colorbar;set(gca,'FontSize',12);shading interp;
xlabel('x_2','FontName','Times','FontSize',20,'FontAngle','italic');
set(get(gca,'xlabel'),'rotation',25,'VerticalAlignment','bottom');
ylabel('x_1','FontName','Times','FontSize',20,'FontAngle','italic');
set(get(gca,'ylabel'),'rotation',-25,'VerticalAlignment','bottom');
zlabel('f(X)','FontName','Times','FontSize',20,'FontAngle','italic');
title('3D View','FontName','Times','FontSize',24,'FontWeight','bold');
 
figure(3)
mesh(x1,x2,fn_tot);view(0,90);colorbar;set(gca,'FontSize',12);
xlabel('x_2','FontName','Times','FontSize',20,'FontAngle','italic');
ylabel('x_1','FontName','Times','FontSize',20,'FontAngle','italic');
zlabel('f(X)','FontName','Times','FontSize',20,'FontAngle','italic');
title('X-Y Plane View','FontName','Times','FontSize',24,'FontWeight','bold');
 
figure(4)
mesh(x1,x2,fn_tot);view(90,0);colorbar;set(gca,'FontSize',12);
xlabel('x_2','FontName','Times','FontSize',20,'FontAngle','italic');
ylabel('x_1','FontName','Times','FontSize',20,'FontAngle','italic');
zlabel('f(X)','FontName','Times','FontSize',20,'FontAngle','italic');
title('X-Z Plane View','FontName','Times','FontSize',24,'FontWeight','bold');
 
figure(5)
mesh(x1,x2,fn_tot);view(0,0);colorbar;set(gca,'FontSize',12);
xlabel('x_2','FontName','Times','FontSize',20,'FontAngle','italic');
ylabel('x_1','FontName','Times','FontSize',20,'FontAngle','italic');
zlabel('f(X)','FontName','Times','FontSize',20,'FontAngle','italic');
title('Y-Z Plane View','FontName','Times','FontSize',24,'FontWeight','bold');

Click here to download m-file

 

VI. References:

[1] Monte Lunacek, Darrell Whitley, and Andrew Sutton, "The Impact of Global Structure on Search," in Parallel Problem Solving from Nature – PPSN X, ser. Lecture Notes in Computer Science, Günter Rudolph, Thomas Jansen, Simon Lucas, Carlo Poloni, and Nicola Beume, Eds. Berlin, Germany: Springer-Verlag, 2008, vol. 5199, pp. 498-507.
[2] Nikolaus Hansen, Steffen Finck, Raymond Ros, and Anne Auger, "Real-Parameter Black-Box Optimization Benchmarking 2009: Noiseless Functions Definitions," TAO - INRIA Saclay - Ile de France, Microsoft Research - Inria Joint Centre - MSR - INRIA, The Process- and Product-Engineering research centre, Laboratoire de Recherche en Informatique - LRI, France, Tech. Rep. RR-6829, 2009. [Online]. Available: http://hal.inria.fr/inria-00362633/PDF/RR-6829.pdf
[3] Johannes M. Dieterich, and Bernd Hartke, "Empirical Review of Standard Benchmark Functions Using Evolutionary Global Optimization," Applied Mathematics, vol. 3, no. 10A, pp. 1552-1564, Oct. 2012. [Online]. Available: http://www.scirp.org/Journal/PaperInformation.aspx?PaperID=24149
[4] Ali R. Alroomi, "The Farm of Unconstrained Benchmark Functions," University of Bahrain, Electrical and Electronics Department, Bahrain, Oct. 2013. [Online]. Available: http://www.al-roomi.org/cv/publications