def getReward(self):
        # -1    reward for falling over
        #  0.01 reward for close to goal
        #  return reward inversely proportional to heading error otherwise

        r_factor = 0.0001

        if np.abs(self.env.getTilt()) > self.max_tilt:
            return -1.0
        else:
            temp = self.calc_dist_to_goal()
            heading = self.calc_angle_to_goal()
            if (1e-3 < temp):
                return 0.01
            else:
                return (0.95 - heading**2) * r_factor
dataset/ETHPy150Open chrisdembia/agent-bicycle/randlov1998/tasks_gotorewards.py/LinearFATileCoding3456GoToTask.getReward/swapped operands of `<`