def v20_plan(problem, agent): problem.a_star = True problem.rand = True if not hasattr(problem, 'verbose'): problem.verbose = 0 root = pyhop.seek_bb(problem, problem.goals[agent], verbose=problem.verbose, all_plans=True) return [SolutionTree(root, agent, rand=False)]
def v17_plan(problem, agent): problem.a_star = True problem.rand = True # Only difference from v14 if not hasattr(problem, 'verbose'): problem.verbose = 0 elif problem.verbose == 1: print("Problem State: ") pyhop.print_state(problem) root = pyhop.seek_bb(problem, problem.goals[agent], verbose=problem.verbose, all_plans=True) # Even though we get the root, this planner imitates the result of a linear planner. solutions = [root.get_plan(rand=True)] if solutions[0] == False: return solutions return Planner.make_sol_obj(solutions, problem, agent)