public void init(int nplayers, int[] pref)
	{
		this.nplayers = nplayers;
		this.index = getIndex();
		this.pref = pref;
		length = pref.length;

		transform = new int[length];
		distribution = new int[length];
		observedlist = new int[length];
		distsum = new int[length];
		choicelist = new int[nplayers + 1][length];

		for(int i = 0; i < length; i++)
			transform[length - pref[i]] = i;
		
		/*
		if(createLog)
		{
			try{
				FileWriter fstream = new FileWriter("fruit/g5/log.txt", true);
				outfile = new PrintWriter(fstream);
			} catch (IOException e){ }

			
			outfile.println("Players    : " + Integer.toString(nplayers));
			outfile.println("Index      : " + Integer.toString(index));
			outfile.println("Pref       : " + Arrays.toString(pref));
			outfile.println("Transform  : " + Arrays.toString(transform));
			outfile.flush();
			
		} */
	}