예제 #1
0
class TheAgent(ProblemAgent):
    def __init__(self):
        self.heuristic = heuristics.PowerHeuristic2()
        self.algorithm = AnytimeBeamSearch(20, (1.3, 'exp'))

    def solve(self, problem_state, time_limit=NO_LIMIT):
        solution, _ = self.algorithm.find(problem_state, self.heuristic,
                                          time_limit)
        return solution
예제 #2
0
파일: agent.py 프로젝트: hizki/AI1
class TheAgent(ProblemAgent):
    
    def __init__(self):
        self.heuristic = heuristics.PowerHeuristic2()
        self.algorithm = AnytimeBeamSearch(20, (1.3, 'exp') )
        
    def solve(self, problem_state, time_limit = NO_LIMIT):
        solution, _ = self.algorithm.find(problem_state, self.heuristic,time_limit)
        return solution
예제 #3
0
class SolveAgent(ProblemAgent):
    def __init__(self):
        self.heuristic = heuristics.PowerHeuristic2()
        self.algo = AnytimeBeamSearch(10, (1.2, "exp"))

    def getHeuristic(self):
        return self.heuristic

    def solve(self, problem_state, time_limit):
        return self.algo.find(problem_state, self.heuristic, time_limit)
예제 #4
0
파일: solve_agent.py 프로젝트: hizki/AI1
class SolveAgent(ProblemAgent):
    def __init__(self):
        self.heuristic = heuristics.PowerHeuristic2()
        self.algo = AnytimeBeamSearch(10,(1.2,"exp"))

    def getHeuristic(self):
        return self.heuristic

    def solve(self, problem_state, time_limit):
        return self.algo.find(problem_state, self.heuristic, time_limit)