Solving Mazes
Constraint propagation, Graph traversal, and Backtracking
Solving Mazes Constraint propagation, Graph traversal, and - - PowerPoint PPT Presentation
Solving Mazes Constraint propagation, Graph traversal, and Backtracking Constraint Satisfaction Given some constraints, can I find a solution? e.g. Given the contents of my fridge, is there a nutritious dinner to be made? e.g. Can we
Constraint propagation, Graph traversal, and Backtracking
nutritious dinner to be made?
equation evaluates to True? A & ~B
problem?
traverse every edge and vertex in a graph.
systematic way so that we don’t miss anything.
most twice.
be powerful enough to enable us to get out of an arbitrary maze.
checked out all its incident edges.
traversal the state of each vertex progresses from undiscovered to discovered to processed.
we have discovered but not yet completely explored.
discovered.
we mark it discovered and add it to the list of work to do.
explore, each edge is considered exactly twice, when each of its endpoints are explored.
https://brilliant.org/wiki/depth-first-search-dfs/
solutions to some computational problems, notably constraint satisfaction problems. - Wikipedia
chessboard so that no queen attacks another.
diagonal
Start in the leftmost column If all queens are placed, return true for (every possible choice among the rows in this column): if the queen can be placed safely there, make that choice and then recursively try to place the rest of the queens if recursion successful, return true if ! successful, remove queen and try another row in this column if all rows have been tried and nothing worked, return false to trigger backtracking
https://www.cs.bu.edu/teaching/alg/maze/