def calculateReward(self):
    num_abnormal = self.state.get_num_abnormal()
    if (num_abnormal >= 3):
        return (- 1)
    elif ((num_abnormal == 0) and (not self.state.on_treatment())):
        return 1
    return 0
def calculateReward(self):
    num_abnormal = self.state.get_num_abnormal()
    if (num_abnormal >= 3):
        return (- 1)
    elif ((num_abnormal == 0) and (not self.state.on_treatment())):
        return 1
    return 0