def near_5(self, chromosome):
    """Test's the GA's ability to handle floats. Computes how close each gene is to 5."""

    # Overall fitness value
    fitness = 0

    for gene in chromosome:

        # Add squared distance to 5
        fitness += (5 - gene.value) ** 2

    return fitness