@overrides
    def compute_reward(self, action):
        yield
        notdone = 1 - int(self.is_current_done())
        ucost = 1e-5*(action**2).sum()
        xcost = 1 - np.cos(self.pole.angle)
        yield notdone * 10 - notdone * ucost - notdone * xcost
dataset/ETHPy150Open rllab/rllab/rllab/envs/box2d/cartpole_env.py/CartpoleEnv.compute_reward/swapped operands of `-`