Searches Algorithms for Exploration
Graphs Graphs represent spatial data How do I get from Augsburg to Wurzburg?
Graphs Graphs can also represent state changes – How do I turn cat into dog?
Graph Algorithms Many paths in a graph, how do we find the right one?
Graph Algorithms Many paths in a graph, how do we find the right one? Search
Best First Search – Maintain list of "towns I know I can reach" – Always explore shortest remaining path – Stop when path to goal is shortest remaining path
Heuristic Heuristic : rule of thumb – guesstimation Sometimes we can't give an exact answer, to what is best, but can estimate
Applying Search to a Problem 4 Steps: 1) Design your state representation for the problem 2) Define the set of possible transformations that change the state 3) Define your state evaluation function Heuristic 4) Construct the state search tree
Sliding Puzzle State – where the tiles are Transformations – switch blank with neighbor Heuristic – – 1 pt for each move so far – 1 pt for each out of place block
Sliding Puzzle Heuristic – – 1 pt for each move so far – 1 pt for each out of place block Start:Goal:
TicTacToe & Chess
Game Difficulty
Towers of Hanoi
Towers of Hanoi
1) State: 2) Transformations – move one number 3) Heuristic – 1pt for each move 1 pt for each out of place disk 1 2 3