Calculate the Shannon entropy of a given environment, treating each niche
    (where niches are defined by regions in which different sets of resources
    are rewarded) as a category. The environment is specified with the
    following inputs:

    world - a list of lists of sets of resources (strings) indicating
            the set of resources in every cell in the world.

    world_size - a tuple indicating the dimensions of the world.
           Default = 60x60, because that's the default Avida world siz

    excludeDesert - an optional argument which defaults to False. If True is
          specific, niches in which no tasks are rewarded
          will not be considered in the calculation.

def calc_environment_entropy(world, world_size=(60, 60),
                             exclude_desert=False):
    """
    Calculate the Shannon entropy of a given environment, treating each niche
    (where niches are defined by regions in which different sets of resources
    are rewarded) as a category. The environment is specified with the
    following inputs:

    world - a list of lists of sets of resources (strings) indicating
            the set of resources in every cell in the world.

    world_size - a tuple indicating the dimensions of the world.
           Default = 60x60, because that's the default Avida world siz

    excludeDesert - an optional argument which defaults to False. If True is
          specific, niches in which no tasks are rewarded
          will not be considered in the calculation.
    """

    niches = make_niche_dictionary(world, world_size)

    if exclude_desert and frozenset([]) in niches:
        del niches[frozenset([])]

    # Calculate entropy
    return entropy(niches)