def mean_reward(self):
    if self.rewbuffer:
        return np.mean(self.rewbuffer)
    else:
        return 0
def mean_reward(self):
    if self.rewbuffer:
        return np.mean(self.rewbuffer)
    else:
        return 0