
class f9 extends f_xj// Easom  f(x)=-1.0  @x=(pi,pi)   -100.0<=x[i]<=100.0 i=0,1
{
double func(double x[])
{
double first=0.0;	
first=-Math.cos(x[0])*Math.cos(x[1])*Math.exp(-(x[0]-Math.PI)*(x[0]-Math.PI)-(x[1]-Math.PI)*(x[1]-Math.PI));
return first;	
}	
}


public class Hunting_search_test
{
       public static void main(String args[])
	  {
		int maxiter=20000;  
		int epochiter=40;
		int HGS=100;  
		double MML=0.3;  
		double HGCR=0.2;
		double[] Lower={-5.0,-5.0};
		double[] Upper={5.0,5.0};
		double alfa=-0.1;
		double beta=1.0;
		double Ramax=1.0e-2;
		double Ramin=1.0e-7;
		f9 ff=new f9();
		  
		Hunting_search hunt=new Hunting_search(ff,HGS,MML,HGCR,Lower,Upper,alfa,beta,Ramax,Ramin,maxiter,epochiter);  
		hunt.toStringnew();
	    ContourPlot pp = new ContourPlot(ff,0,4,100,0,4,100,40, false,"Easom function", "x", "y");
	  pp.plot();
	    } 
}