def deliberate(self, beliefs): action = SPAgent.deliberate(self, beliefs) options = self.getOptions() if len(options) > 0: action = random.choice(list(self.getOptions())) return action
def __init__(self, selfishness, public, goal): SPAgent.__init__(self, public, goal) # decision parameter: balance of self vs. social improvement self.__a = selfishness