diff --git a/wozek.py b/wozek.py index 98a6dfe..8507242 100644 --- a/wozek.py +++ b/wozek.py @@ -280,7 +280,8 @@ def bfs(isstate,final): explored.append(node) successors=succ(node) for successor in successors: - fringe.append(successor) + if (successor not in fringe and successor not in explored): + fringe.append(successor) # Main game loop def game_loop():