from searchgeneric import searcherastarsearcher from searchbranchandbound import df_branch_and_bound from searchmpp import searchermpp df_branch_and_bound max_display_level searcher max_display_level def run(problem,name)print("\ \ *******",name print("\na*:"asearcher astarsearcher(problemprint("path found:",asearcher search(),cost=",asearcher solution costprint("there are",asearcher frontier count(asearcher solution cost)"elements remaining on the queue with -value=",asearcher solution cost print("\nawith mpp:")msearcher searchermpp(problemprint("path found:",msearcher search(),cost=",msearcher solution costprint("there are",msearcher frontier count(msearcher solution cost)"elements remaining on the queue with -value=",msearcher solution cost bound asearcher solution cost+ print("\nbranch and bound (with too-good initial bound of"bound,")"tbb df_branch_and_bound(problem,boundcheating!!!print("path found:",tbb search(),cost=",tbb solution costprint("rerunning & "print("path found:",tbb search() bbound asearcher solution cost* + print("\nbranch and bound (with not-very-good initial bound of"bbound")"tbb df_branch_and_bound(problem,bboundcheating!!!print("path found:",tbb search(),cost=",tbb solution costprint("rerunning & "print("path found:",tbb search() print("\ndepth-first search(use ^ if it goes on forever)"tsearcher searcher(problemprint("path found:",tsearcher search(),cost=",tsearcher solution cost import searchproblem from searchtest import run if __name__ ="__main__"run(searchproblem problem ,"problem "run(searchproblem acyclic_delivery_problem,"acyclic delivery"run(searchproblem cyclic_delivery_problem,"cyclic delivery"version june