State Space Search
1/23/17
State Space Search 1/23/17 State space problems have A set of - - PowerPoint PPT Presentation
State Space Search 1/23/17 State space problems have A set of discrete states A distinguished start state A set of actions available to the agent in each state; An action function that, given a state and an action, returns a new
1/23/17
action, returns a new state
deterministic.
state or set of states.
agent can transition the world from state A to state B.
from start to goal.
a plan the agent can execute to achieve its goal.
the world.
structure.
search; we can build it incrementally.
Environment model Partial adjacency graph
adjacent to?
Lab 0: maze search
Puzzle objective: move the red car to the exit.
Start state One of many states in the goal set
Rubick’s cube
add start to frontier while frontier not empty get state from frontier if state is goal return end if for neighbor of state add neighbor to frontier end for end while
Procedure Search(G,S,goal) Inputs G: graph with nodes N and arcs A S: set of start nodes goal: Boolean function of states Output path from a member of S to a node for which goal is true or ⊥ if there are no solution paths Local Frontier: set of paths Frontier ←{⟨s⟩: s∈S} while (Frontier ≠{}) select and remove ⟨s0,...,sk⟩ from Frontier if ( goal(sk)) then return ⟨s0,...,sk⟩ Frontier ←Frontier ∪{⟨s0,...,sk,s⟩: ⟨sk,s⟩∈A} return ⊥
add start to frontier while frontier not empty get state from frontier if state is goal return end if for neighbor of state add neighbor to frontier end for end while
select and remove state from Frontier
searches.
What is an appropriate metric to use for “priority”? What characteristics of the search are we trying to