public static void generateNewPopulation( Individual[] pop )
	{
		sumFitness = 0;
		
		for( int i=0; i<POPULATION_SIZE; i++ )
			sumFitness += pop[i].fitness;
		
		generation[ currentGeneration++ ] = sumFitness / POPULATION_SIZE; 
		
		Individual[] tempGen = new Individual[POPULATION_SIZE];
		for( int i=0; i<POPULATION_SIZE; i++ )
		{
			tempGen[i] = new Individual( pop[ select(sumFitness) ], pop[ select(sumFitness) ] );
			if( Math.random() < MUTATION_RATE )
				tempGen[i].genotype[ (int) Math.random() * GENOME_SIZE ] = Math.abs( tempGen[i].genotype[ (int) Math.random() * GENOME_SIZE ] - 1 ); 
		}
		population = tempGen;
	}