private int pickGene() {
		double selector = Math.abs(random.nextDouble())%fitnessSum;//random number between 0 and fitnessSum
		
		int j = 0;
		
		double count = fitnesses[j];
		
		while(count < selector && j<fitnesses.length-1){
			count += fitnesses[++j];
		}
		
		return j;
	}