C-blind-search

C-blind-search - (Where we systematically explore...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1 1 Blind (Uninformed) Search (Where we systematically explore alternatives) R&N: Chap. 3, Sect. 3.3–5 2 Simple Problem-Solving-Agent Agent Algorithm 1. s 0 Å sense/read initial state 2. GOAL? Å select/read goal test 3. Succ Å read successor function 4. solution Å search (s 0 , GOAL?, Succ) 5. perform(solution) 3 Search Tree Search tree Note that some states may be visited multiple times State graph 4 Search Nodes and States 1 2 34 56 7 8 1 2 7 8 1 2 7 8 1 3 8 1 3 4 7 8 2 47 2 1 2 7 8 5 Search Nodes and States 1 2 7 8 1 2 7 8 1 2 7 8 1 3 8 1 3 4 7 8 2 2 1 2 7 8 If states are allowed to be revisited, the search tree may be infinite even when the state space is finite 6 Data Structure of a Node PARENT-NODE 1 2 7 8 STATE Depth of a node N = length of path from root to N (depth of the root = 0) BOOKKEEPING 5 Path-Cost 5 Depth Right Action Expanded yes ... CHILDREN
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 7 Node expansion The expansion of a node N of the search tree consists of: 1) Evaluating the successor function on STATE(N) 2) Generating a child of N for each state returned by the function node generation node expansion 1 2 34 56 7 8 N 1 3 8 1 3 4 7 8 2 47 2 1 2 7 8 8 Fringe of Search Tree ± The fringe is the set of all search nodes that haven’t been expanded yet 1 2 7 8 1 2 7 8 1 2 7 8 1 3 8 1 3 4 7 8 2 2 1 2 7 8 9 Is it identical to the set of leaves? 10 Search Strategy ± The fringe is the set of all search nodes that haven’t been expanded yet ± The fringe is implemented as a priority queue FRINGE INSERT(node,FRINGE) REMOVE(FRINGE) ± The ordering of the nodes in FRINGE defines the search strategy 11 Search Algorithm #1 SEARCH#1 1. If GOAL?(initial-state) then return initial-state 2. INSERT(initial-node,FRINGE) 3. Repeat: a. If empty(FRINGE) then return failure b. N Å REMOVE(FRINGE) c. s Å STATE( N ) d. For every state s’ in SUCCESSORS( s ) i. Create a new node N’ as a child of N ii. If GOAL?( s’ ) then return path or goal state iii. INSERT( N’ ,FRINGE) Expansion of N 12 Performance Measures ± Completeness A search algorithm is complete if it finds a solution whenever one exists [What about the case when no solution exists?] ± Optimality A search algorithm is optimal if it returns a minimum-cost path whenever a solution exists ± Complexity It measures the time and amount of memory required by the algorithm
Background image of page 2
3 13 Blind vs. Heuristic Strategies ± Blind (or un-informed ) strategies do not exploit state descriptions to order FRINGE. They only exploit the positions of the nodes in the search tree ± Heuristic (or informed ) strategies exploit state descriptions to order FRINGE (the most “promising” nodes are placed at the beginning of FRINGE) 14 Example For a blind strategy , N 1 and N 2 are just two nodes (at some position in the search tree) Goal state N 1 N 2 STATE STATE 1 2 34 56 7 8 123 45 6 78 456 15 Example For a
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 01/11/2011.

Page1 / 11

C-blind-search - (Where we systematically explore...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online