title: I didnt get my pacman to reach to its destination.. nd having an error mentioned below
body: <pre><code>[SearchAgent] using function depthFirstSearch
  [SearchAgent] using problem type PositionSearchProblem
  Path found with total cost of 999999 in 0.0 seconds
  Search nodes expanded: 1
  Traceback (most recent call last):
    File "C:\Documents and Settings\vpn\My Documents\Aptana Studio 3 Workspace\Project 1 - Search\pacman.py", line 672, in &lt;module&gt;
      runGames( **args )
    File "C:\Documents and Settings\vpn\My Documents\Aptana Studio 3 Workspace\Project 1 - Search\pacman.py", line 638, in runGames
      game.run()
    File "C:\Documents and Settings\vpn\My Documents\Aptana Studio 3 Workspace\Project 1 - Search\game.py", line 662, in run
      action = agent.getAction(observation)
    File "C:\Documents and Settings\vpn\My Documents\Aptana Studio 3 Workspace\Project 1 - Search\searchAgents.py", line 121, in getAction
      if i &lt; len(self.actions):
  TypeError: object of type 'NoneType' has no len()
  </code></pre>
  
  <p>m working on a project in which i have to test my pacman agent to reach to its destination in less possible space and time complexity by applying DFS(Depth First Algorithm)</p>
  
  <p>My code for it is</p>
  
  <pre><code>stack = util.Stack()
      explored = list()
      start = problem.getStartState()
  
      for item in problem.getSuccessors(start):
          state = item[0]
          path = list()
          path.append(item[1])
          stateInfo = (state, path)
          stack.push(stateInfo)
      explored.append(start)
  
      while stack.isEmpty():
          state = stack.pop()
  
          if problem.isGoalState(state[0]):
              return state[1]
  
          for states in problem.getSuccessor(state[0]):
              newstate = states[0]
              newpath = list(state[1])
              newpath.append(states[1])
              newstateInfo = (newstate, newpath)
              stack.push(newstateInfo)
          explored.append(state[0]) 
  </code></pre>
  
  <p>What should i suppose to do now.. my pacman agent get stuck to its starting position in east dirction opposite to its destination.
  The supporting files to run the agent is mentioned in <a href="https://www.edx.org/courses/BerkeleyX/CS188.1x/2012_Fall/courseware/Week_2/Project_1_Search/" rel="nofollow">https://www.edx.org/courses/BerkeleyX/CS188.1x/2012_Fall/courseware/Week_2/Project_1_Search/</a></p>