def GetReward(self, x):
        # r: the returned reward.
        # f: true if the car reached the goal, otherwise f is false
        y_acrobot = [0, 0, 0]

        theta1 = x[0]
        theta2 = x[1]
        y_acrobot[1] = cos(theta1) - y_acrobot[0]
        y_acrobot[2] = y_acrobot[1] - cos(theta2)
        #print(y_acrobot)
        #goal
        goal = y_acrobot[0] + self.target
        if self.easy_rewards:
            r = y_acrobot[2]
        else:
            #r = -0.01
            r = 0
        f = 0

        if  y_acrobot[2] >= goal:
            if self.easy_rewards:
                r = 10 * y_acrobot[2]
            else:
                r = 1
            f = 1

        if self.steps >= self.maxSteps:
            f = 5
            #r = -1

        return r, f
dataset/ETHPy150Open pybrain/pybrain/pybrain/rl/environments/classic/acrobot.py/AcrobotTask.GetReward/swapped operands of `-`