def index_dependent_values(self, chromosome):
    """Test of the GA's ability to improve fitness when the value is index-dependent.
    If a gene is equal to its index in the chromosome + 1, fitness is incremented.
    """

    # Overall fitness value
    fitness = 0

    for i, gene in enumerate(chromosome):

        # Increment fitness is the gene's value is i+1
        if gene.value == i+1:
            fitness += 1

    return fitness