def calc_local_map_entropy(individual, config):
    b = config.TERRAIN_BORDER
    map_arr = individual.chromosome.map_arr[b:(- b), b:(- b)]
    local_ent = skimage.filters.rank.entropy(map_arr, disk(3))
    local_ent = ((local_ent.mean() * 100) / np.log2(individual.n_tiles))
    return local_ent.item()
def calc_local_map_entropy(individual, config):
    b = config.TERRAIN_BORDER
    map_arr = individual.chromosome.map_arr[b:(- b), b:(- b)]
    local_ent = skimage.filters.rank.entropy(map_arr, disk(3))
    local_ent = ((local_ent.mean() * 100) / np.log2(individual.n_tiles))
    return local_ent.item()