private double expectedScore(int[] distribution,int[] plate)
	{
		double[] problist = new double[numfruits * length + 1];
		int minscore = numfruits * 1, maxscore = numfruits * length;



		time01 = System.nanoTime();
		initFruitProbs();

		time11 += System.nanoTime() - time01;
		time02 = System.nanoTime();

		double expectedscore = 0.0;

		int increment = 1;
		/*
		int increment = (int) Math.ceil((maxscore - minscore) / 55.0);
		if(numfruits % 2 == 1)
			minscore = minscore + 1;
		if(increment % 2 == 1 && increment != 1)
			increment = increment - 1;
		*/

		for(int i = minscore; i <= maxscore; i = i + increment)
		{
			problist[i] = problist[i - increment] + getFruitProbs(0,(int) Math.round(numfruits),i) * increment;
			expectedscore = expectedscore + i * (Math.pow(problist[i], choicesleft) - Math.pow(problist[i - increment], choicesleft));
//			outfile.println(Integer.toString(i) + "\t" + Double.toString(problist[i] - problist[i - 1]));
		}
//		outfile.println("");
//		outfile.println(Integer.toString((int) expectedscore) + " " + Integer.toString((int) (plateScore(distribution) / choicesleft)) + " " + Integer.toString(choicesleft));
//		outfile.flush();

		time12 += System.nanoTime() - time02;

		return Math.floor(expectedscore);
	}