pruning and cycle pruning for the cyclic delivery problem which works better in terms of number of paths expandedcomputational time or space branch-and-bound search to run the demoin folder "aipython"load "searchbranchandbound py"and copy and paste the example queries at the bottom of that file depth-first search methods do not need an priority queuebut can use list as stack in this implementation of branch-and-bound searchwe call search to find an optimal solution with cost less than bound this uses depthfirst search to find path to goal that extends path with cost less than the bound once path to goal has been foundthat path is remembered as the best paththe bound is reducedand the search continues searchbranchandbound py -branch and bound search from searchproblem import path from searchgeneric import searcher from display import displayablevisualize class df_branch_and_bound(searcher)"""returns branch and bound searcher for problem an optimal path with cost less than bound can be found by calling search(""def __init__(selfproblembound=float("inf"))"""creates searcher than can be used with search(to find an optimal path bound gives the initial bound by default this is infinite meaning there is no initial pruning due to depth bound ""super(__init__(problemself best_path none self bound bound @visualize def search(self)"""returns an optimal solution to problem with cost less than bound returns none if there is no solution with cost less than bound ""self frontier [path(self problem start_node())self num_expanded while self frontierpath self frontier pop(if path cost+self problem heuristic(path end()self boundif path end(not in path initial_nodes()for cycle pruning version june