def _reward(self, reward): """Change all the positive rewards to 1, negative to -1 and keep zero.""" return np.sign(reward)