UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Blind State-Space Search Notes for Ch.11 of Bratko For CSCE 580 Sp03 Marco.

Slides:



Advertisements
Similar presentations
CSCE 580 ANDREW SMITH JOHNNY FLOWERS IDA* and Memory-Bounded Search Algorithms.
Advertisements

5-1 Chapter 5 Tree Searching Strategies. 5-2 Satisfiability problem Tree representation of 8 assignments. If there are n variables x 1, x 2, …,x n, then.
CS 480 Lec 3 Sept 11, 09 Goals: Chapter 3 (uninformed search) project # 1 and # 2 Chapter 4 (heuristic search)
CMSC 471 Spring 2014 Class #4 Thu 2/6/14 Uninformed Search Professor Marie desJardins,
Blind Search1 Solving problems by searching Chapter 3.
Search Strategies Reading: Russell’s Chapter 3 1.
1 Tree Searching Strategies Updated: 2010/12/27. 2 The procedure of solving many problems may be represented by trees. Therefore the solving of these.
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
1 Chapter 3 Solving Problems by Searching. 2 Outline Problem-solving agentsProblem-solving agents Problem typesProblem types Problem formulationProblem.
Touring problems Start from Arad, visit each city at least once. What is the state-space formulation? Start from Arad, visit each city exactly once. What.
CSC 423 ARTIFICIAL INTELLIGENCE
Artificial Intelligence (CS 461D)
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2004.
6 - 1 § 6 The Searching Strategies e.g. satisfiability problem x1x1 x2x2 x3x3 FFF FFT FTF FTT TFF TFT TTF TTT.
Artificial Intelligence
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Ch.3 [P]: Searching Fall 2009 Marco Valtorta.
Search I Tuomas Sandholm Carnegie Mellon University Computer Science Department [Read Russell & Norvig Chapter 3]
1 Tree Searching Strategies. 2 The procedure of solving many problems may be represented by trees. Therefore the solving of these problems becomes a tree.
Artificial Intelligence Chapter 3: Solving Problems by Searching
Using Search in Problem Solving
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Problem Spaces and Search Fall 2008 Jingsong.
Using Search in Problem Solving
1 Tree Searching Strategies. 2 The procedure of solving many problems may be represented by trees. Therefore the solving of these problems becomes a tree.
CS 188: Artificial Intelligence Spring 2006 Lecture 2: Queue-Based Search 8/31/2006 Dan Klein – UC Berkeley Many slides over the course adapted from either.
5-1 Chapter 5 Tree Searching Strategies. 5-2 Breadth-first search (BFS) 8-puzzle problem The breadth-first search uses a queue to hold all expanded nodes.
Uninformed Search (cont.)
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Dijkstra’s Algorithm: Notes to Complement.
Solving problems by searching
1 Structures and Strategies for State Space Search 3 3.0Introduction 3.1Graph Theory 3.2Strategies for State Space Search 3.3Using the State Space to Represent.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Heuristic Search Notes for Ch.12 of Bratko and Ch.2 of Shoham For CSCE 580.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Operations on Data Structures Notes for Ch.9 of Bratko For CSCE 580 Sp03 Marco.
For Friday Finish chapter 3 Homework: –Chapter 3, exercise 6 –May be done in groups. –Clarification on part d: an “action” must be running the program.
Solving Problems by Searching
Artificial Intelligence Course outline Introduction Problem solving Generic algorithms Knowledge Representation and Reasoning Expert Systems Uncertainty.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
3.0 State Space Representation of Problems 3.1 Graphs 3.2 Formulating Search Problems 3.3 The 8-Puzzle as an example 3.4 State Space Representation using.
1 Problem Solving and Searching CS 171/271 (Chapter 3) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Solving Problems by Searching CPS Outline Problem-solving agents Example problems Basic search algorithms.
CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Lecture #3 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam.
Problem-Solving by Searching Uninformed (Blind) Search Algorithms.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
Lecture 7: Uninformed Search Dr John Levine Algorithms and Complexity February 13th 2006.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
Lecture 3: Uninformed Search
1 Solving problems by searching 171, Class 2 Chapter 3.
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Chapter 3 Algorithms Complexity Analysis Search and Flow Decomposition Algorithms.
Problem solving by search Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
Computer Science CPSC 322 Lecture 6 Iterative Deepening and Search with Costs (Ch: 3.7.3, 3.5.3)
For Friday Read chapter 4, sections 1 and 2 Homework –Chapter 3, exercise 7 –May be done in groups.
1 Solving problems by searching Chapter 3. Depth First Search Expand deepest unexpanded node The root is examined first; then the left child of the root;
Solving problems by searching 1. Outline Problem formulation Example problems Basic search algorithms 2.
Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Ver Chapter 13: Graphs Data Abstraction & Problem Solving with C++
Slides by: Eric Ringger, adapted from slides by Stuart Russell of UC Berkeley. CS 312: Algorithm Design & Analysis Lecture #36: Best-first State- space.
Informed Search CSE 473 University of Washington.
Search Techniques CS480/580 Fall Introduction Trees: – Root, parent, child, sibling, leaf node, node, edge – Single path from root to any node Graphs:
© 2006 Pearson Addison-Wesley. All rights reserved 14 A-1 Chapter 14 Graphs.
CPSC 322, Lecture 6Slide 1 Uniformed Search (cont.) Computer Science cpsc322, Lecture 6 (Textbook finish 3.5) Sept, 17, 2012.
CSCE350 Algorithms and Data Structure Lecture 21 Jianjun Hu Department of Computer Science and Engineering University of South Carolina
1 Tree Searching Strategies 2010/12/03. 2 The procedure of solving many problems may be represented by trees. Therefore the solving of these problems.
Best-first search is a search algorithm which explores a graph by expanding the most promising node chosen according to a specified rule.
Lecture 2: Problem Solving using State Space Representation CS 271: Fall, 2008.
Brian Williams, Fall 041 Analysis of Uninformed Search Methods Brian C. Williams Sep 21 st, 2004 Slides adapted from: Tomas Lozano Perez,
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
Informed Search Idea: be smart about what paths to try.
Implementation of Dijkstra’s Algorithm
Informed Search Idea: be smart about what paths to try.
Presentation transcript:

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Blind State-Space Search Notes for Ch.11 of Bratko For CSCE 580 Sp03 Marco Valtorta

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering State-Space Search Formulation of Problem Solving Initial state –a distinguished node in a directed graph Goal state(s) –a (set of) distinguished nodes in a directed graph sometimes represented implicitly as a predicate Possible actions (moves) –edges (arcs) in a directed graph usually represented by a successor function

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering State-Space Search Problem Solution A path in the directed graph representing the problem –shortest –cheapest (least-cost) Examples (puzzles and practical problems): –block rearrangement (figs.11.1 and 11.2) –traveling salesman –towers of Hanoi –eight puzzle (fig. 11.3) –farmer, wolf, cabbage –eight queens –VLSI placement –other examples: see Ch.3 of Russell and Norvig

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Block Rearrangement: Details state: a list of the three stacks on the table: e.g., [[c,a,b],[ ],[ ]]---top block is head of list three goal states: [[a,b,c],[],[]], [[],[a,b,c],[]], [[],[],[a,b,c]]---a on top moves (of equal cost; s for successor): s(Stacks,[Stack1,[Top|Stack2]|OtherStacks]) :- del([Top1|Stack1],Stacks,Stacks1), del(Stack2,Stacks1,OtherStacks). goal condition: goal(Situation) :- member([a,b,c],Situation). initial state is Start in solve( Start,Solution).

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Depth-first Search To find a solution path, Sol, from a given node N to some goal node, –if N is a goal node, then Sol = [N] –if there is a successor node, N1, of N, such that there is a path Sol1 from N to a goal node, then Sol = [ N | Sol1]. solve( N,[N]) :- goal( N). solve( N,[ N|Sol1]) :- s( N,N1), solve( N1,Sol1). solve is a depth-first program! solve exploits the depth-first order in which Prolog explores goal trees. Example: Figure 11.4

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Refinement of DFS Cycle detection –fig11_7.pl (add parentheses for nots!) depth-limited depth-first search –fig11_8.pl iterative-deepening depth-first search –ch11_1.pl

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Breadth-First Search To do BFS when given a set of candidate path: If the head of the first path is a goal node, then this path is a solution, else Remove the first path from the candidate set and generate the set of one-step extensions of this path, add this set of extensions at the end of the candidate set, and execute BFS on this updated set.

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering BFS Programs fig11_10.pl Basic program fig11_11.pl Uses difference lists for open list management

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Complexity of Blind Search Procedures See Table 11.1 See Ch.3 [Russell and Norvig] Discusses Dijkstra’s shortest path algorithm also Dijkstra’s algorithm is optimal among admissible blind unidirectional algorithms, according to the measure “number of node expansions.” The implementation of Dijkstra’s algorithm that uses heaps is optimal in the decision tree model (Kingston) IDDFS is, in practice, best, because of the enormous savings in space.

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Lower Bound for Dijkstra’s Algorithm A simple adversary argument shows that any algorithm for shortest paths must examine all edges of a graph (in the worst case): Ω (n+m) lower bound It is possible to transform (in linear time) sorting to shortest paths, and transform the result back to sorting: Ω (n log n) lower bound in the decision tree model The implementation of Dijkstra’s algorithm that uses Fibonacci heaps (for the priority queue) achieves the Ω (m + nlogn) lower bound To improve, either Go outside the decision tree model (e.g., use radix sorting for the priority queue) Use an algorithm that cannot generate the sequence of expanded nodes in non-decreasing order from the start node (e.g., use bi- directional search)