INNER CODE UNIT · Python
solve
Kushal997-das/Project-Guidance · Desktop Application/Basic/Python/Maze Solver/main.py:81
def solve(self):
self.num_explored = 0
start = Node(state=self.start, parent=None, action=None)
frontier = StackFrontier()
frontier.add(start)
self.explored = set()
while True:
if frontier.empty():
raise Exception("No solution")
node = frontier.remove()
self.num_explored += 1
if node.state == self.goal:
actions = []
cells = []
while node.parent is not None: