| 
 
 |  | 
for n in p.nextStates(s)
  if not path.member(n)
    paths.push(path.copy().add(n))
for n in p.nextStates(s)if not n.visited n.visited = truepaths.push(path.copy().add(n))
| 
 
 | 
 | 
path = paths.pop() s = path.tail()if visited.member(s) continue visited.add(s)if p.goalState(s)
| 
 
 |  | 
| 
 
 |  | 
| 
 
 | 
 | 
| This page last modified on 2011 September 15. |