def calculate_fitness(reference, population):
    """
    Calculate how many binary digits in each solution are the same as our
    reference solution.
    """
    # Create an array of True/False compared to reference
    identical_to_reference = population == reference
    # Sum number of genes that are identical to the reference

    fitness_scores = identical_to_reference.sum(axis=1)
    return fitness_scores