def get_fitness(self, obj):
    lattice = npr.random_integers(0, 1, size=(2, 1))
    model = SnowDrift(lattice)
    iter_num = 100
    (benefit, cost) = obj
    res = list(model.iterate(iter_num, benefit=benefit, cost=cost))
    ss = res[(- int((iter_num / 10))):]
    fit = (- np.sum(ss))
    return fit
def get_fitness(self, obj):
    lattice = npr.random_integers(0, 1, size=(2, 1))
    model = SnowDrift(lattice)
    iter_num = 100
    (benefit, cost) = obj
    res = list(model.iterate(iter_num, benefit=benefit, cost=cost))
    ss = res[(- int((iter_num / 10))):]
    fit = (- np.sum(ss))
    return fit