public static double computeFitness(Individual indi){
		
		// Define variables
		double value = 0;    // The range of value is from 0 to (valueSystem^sizeOfChromosom)
		double xRange;       // Range between xMax and xMin
		double x;            // The range of x is from xMin to xMax 
		double fitness;      // Fitness is the computed fitness function.
		
		// Get data and chromosome of individual
		numberOfGenes   = indi.getNumberOfGenes();
		lengthOfOneGene = indi.getLengthOfGene();
		sizeOfChromosome = numberOfGenes*lengthOfOneGene;
		valueSystem     = indi.getValueSystem();
		int[] chromosome = new int[sizeOfChromosome];
		chromosome       = indi.getChromosom();
		
		// Convert int-values of the genes in the chromosomes in a double-value for x
		// The range of value is from 0 to (valueSystem^sizeOfChromosom)
		for (int i=0; i<sizeOfChromosome; i++){
			if (verboseLevel > 1) System.out.println("value = " + value);
			value += Math.pow(valueSystem,(sizeOfChromosome-i-1)) * chromosome[i];
		}
		if (verboseLevel > 0) System.out.print("value = " + value+ " \t");
		
		// Scale range that x is between xMin and xMax
		xRange = xMax - xMin; // Range between xMax and xMin
		x = value / (Math.pow(valueSystem,sizeOfChromosome)-1) * xRange + xMin;
		
		// Print x value
		DecimalFormat myFormatter = new DecimalFormat("##0.000000"); // Show exactly 6 fraction digits
		if (verboseLevel > 0) System.out.print("x = " + myFormatter.format(x) + " \t");
		
		// *** COMPUTE FITNESS FUNCTIONS *********************************************************************************************************************
		// *** Compute fitness = y = (x-3)^2-1 
		fitness = Math.pow(x-3.0,2)-1.0;
		
		// *** Compute fitness = y = (0.5*x-1)^4-10*(0.5*x-1.1)^2+10 
		//fitness = Math.pow(0.5*x-1.0,4)-10.0*Math.pow(0.5*x-1.1,2)+10.0;
		// ************************************************************************************************************************
		
		// Print fitness value
		if (verboseLevel > 0) System.out.print("Fitness = y = " + myFormatter.format(fitness) + " \t");
		
		// Print data in file?
		if (printDataInFile){
			try {
				fw.write(myFormatter.format(x) + " \t" + myFormatter.format(fitness) + "  \t");
				for (int i=0; i<sizeOfChromosome; i++){
					fw.write(""+chromosome[i]);
				}
				fw.write("\n");
			} catch (IOException e) {
				e.printStackTrace();
			}			
		}

		return fitness;
	}