def gen_goals(self, verbose): arsonist = self.free_arsonist() anomalous = self.mem.get(self.memKeys.MEM_ANOM) anomalous = anomalous and anomalous[-1] if arsonist and anomalous: goal = Goal(Goal.GOAL_APPREHEND, [arsonist]) goal.priority = 2 #highest used return [goal] return []
def gen_goals(self, verbose): world = self.mem.get(self.memKeys.MEM_STATES)[-1] block = self.random_fired_block(world) if not block: return [] blocks = blockstate.get_block_list(world) for realblock in blocks: if realblock.id == block.name: block = realblock break goal = Goal(Goal.GOAL_NO_FIRE, [block]) goal.priority = 1 #higher than stacking return [goal]