title: Project IA in Python -- UnboundLocalError: local variable 'x' referenced before assignment
body: <p>`</p>
  
  <pre><code>def iterativeDeepeningSearch(problem):
      def depthLimitedDFS(node, problem, depth):
          if depth==0:
              return
          if problem.isGoalState(node[-1]):
              return node
          for move, acao, c in problem.getSuccessors(node[-1]):
              if move not in node: 
                  ode = depthLimitedDFS(node+[move],problem, depth-1)
          if x:
              return x
  
      for depth in itertools.count():
          node = depthLimitedDFS([problem.getStartState()], problem, depth)
          if node:
              return node`
  </code></pre>
  
  <p>I am trying to execute this code into the project(Pacman), but it returns an error: Un bound Local Error: local variable 'x' referenced before assignment....</p>