search (slides3) Flashcards
tree search basic idea
offline, simulated exploration of state space by generating successors of already explored states (a.k.a ~expanding states)
tree-search general pseudocode
function Tree-Search(problem, strategy) returns a solution, or failure initialize the search tree using the initial state of problem loop do -if there are no candidates for expansion then return failure
- choose a leaf node for expansion according to strategy
- if the node contains a goal state then return the corresponding solution
- else expand the node and add the resulting nodes to the search tree
state
representation of physical configuration
node
data structure constituting part of a search tree includes state, parent node, action, path cost g(x), sometimes the depth
expand function
creates new nodes, filling in the various fields and using the Successor Function of the problem to create the corresponding states
-frontier is usually organized as FIFO, LIFO, or Priority Queue
general tree search implementation (Tree-search)
function Tree-Search(problem, fringe) returns a solution, or failure fringe<-- InsertAll(Expand(node,problem), fringe)
general treesearch implementation (Expand)
function Expand(node, problem) returns a set of nodes
successors<–Depth[node] + 1
add s to successors
return successors