Ejemplo n.º 1
0
class SolveAgentH(ProblemAgent):

    def __init__(self,heuristics):
        self.heuristic = heuristics
        #self.algo = BestFirstGraphSearch()
        self.algo = BeamSearch(40, 100)
    def getHeuristic(self):
        return self.heuristic

    def solve(self, problem_state, time_limit):
        (s, all_s) = self.algo.find(problem_state, self.heuristic)
        return s
    
    def solve2(self, problem_state, time_limit):
        return self.algo.find(problem_state, self.heuristic)