heuristic search while heuristic search is not the solution to every problemas data sizes growthe use of heuristics will become more important this provides the necessary information to choose between at least some of these techniques to improve performance and solve some interesting large problems that would otherwise be unsolvable in reasonable amount of time depth first search we first encountered depth first search in chap where we discuss search spaces and using depth first search to find solution to some sudoku puzzles thenin chap the depth first search algorithm was generalized bit to handle search spaces that include cycles to prevent getting stuck in cyclea visited set was used to avoid looking at vertices that had already been considered slightly modified version of the depth first search for graphs is presented in sect in this version the path from the start to the goal is returned if the goal is found otherwisethe empty list is returned to indicate the goal was not found iterative depth first search of graph def graphdfs(gstartgoal) ( ,eis the graph with verticesvand edgese , stack stack(visited set(stack push([start]the stack is stack of paths while not stack isempty() path is popped from the stack path stack pop(current path[ the last vertex in the path if not current in visitedthe current vertex is added to the visited set visited add(current if the current vertex is the goal vertexthen we discontinue the search reporting that we found the goal if current =goalreturn path return path to goal otherwisefor every adjacent vertexvto the current vertex in the graphv is pushed on the stack of paths yet to search unless is already in the path in which case the edge leading to is ignored for in adjacent(current, )if not in pathstack push([ ]+path if we get this farthen we did not find the goal return [return an empty path this copy belongs to 'acha