package multinomad.algorithms;

import multinomad.config.Configuration;
import multinomad.config.LoadProperties;
import multinomad.config.Logger;
import multinomad.individuals.DoubleIndividual;
import multinomad.individuals.Population;
import multinomad.tools.cec2013.Basins;

public class SamplingMultipleTest implements Runnable{

	public void run() {
		
		
		//for (int i=0;i<40000;i+=1000) {
		for (int i=0;i<400;i+=10) {
			Configuration.Psize = i;
			int success = 0;
			for (int j=0;j<1000;j++) {
				int noOfTouchedBasins = SamplingTest.testonepopulation();
				int noOfActualBasins = Configuration.f.getNoOptima();
				if (noOfTouchedBasins == noOfActualBasins) {
					success++;
				}
			}
			
		
			System.out.println(i+" " + (success/(1000.0)) );
		}
	}
	
	
	public static void main(String[] args) {
		//System.out.println(Pattern.quote("["));
		LoadProperties lp = new LoadProperties(args,null);
		Configuration.setConfiguration(lp);
		SamplingMultipleTest sampling = new SamplingMultipleTest();
		Thread t1 =new Thread(sampling);  
		t1.start();		
	}
	
}
