State Space Search. State Space representation of a problem is a graph  Nodes correspond to problem states  Arcs correspond to steps in a solution process.

Slides:



Advertisements
Similar presentations
Lecture Notes on AI-NN Chapter 5 Information Processing & Utilization.
Advertisements

Artificial Intelligence: Knowledge Representation
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal.
1 State-Space representation and Production Systems Introduction: what is State-space representation? What are the important trade-offs? (E.Rich, Chapt.2)
State Space Search I Chapter 3
State Space Representation and Search
CSC411Artificial Intelligence 1 Chapter 3 Structures and Strategies For Space State Search Contents Graph Theory Strategies for Space State Search Using.
CPSC 322, Lecture 4Slide 1 Search: Intro Computer Science cpsc322, Lecture 4 (Textbook Chpt ) Sept, 11, 2013.
PROBLEM SOLVING AND SEARCH
Search in Python Chapter 3.
State Space 3 Chapter 4 Heuristic Search. Three Algorithms Backtrack Depth First Breadth First All work if we have well-defined: Goal state Start state.
January 26, 2003AI: Chapter 3: Solving Problems by Searching 1 Artificial Intelligence Chapter 3: Solving Problems by Searching Michael Scherger Department.
Formal Description of a Problem
State Space Search Classic AI.
Part2 AI as Representation and Search
KU NLP Artificial Intelligence1 Ch 3. Structures and Strategies for State Space Search q Introduction q Graph Theory  Structures for state space search.
Implementation and Evaluation of Search Methods. Use a stack data structure. 1. Push root node of tree on the stack. 2. Pop the top node off the stack.
Graphs Graphs are the most general data structures we will study in this course. A graph is a more general version of connected nodes than the tree. Both.
Best-First Search: Agendas
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
Breadth First Search
Backtracking and Theorem Proving Lecture 23 CS 312.
CS 460 Midterm solutions. 1.b 2.PEAS : Performance Measure, Environment, Actuators, Sensors 3.c 4.a. Environment: non-English language Internet sites.
Using Search in Problem Solving
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Graphs.
Graphs CS-240/341. Uses for Graphs computer networks and routing airline flights geographic maps course prerequisite structures tasks for completing a.
Using Search in Problem Solving
C M M Awais (LUMS)1 SEARCH METHODS State space search Heuristic search.
Intro to AI, Fall 2004 © L. Joskowicz 1 Introduction to Artificial Intelligence LECTURE 3: Uninformed Search Problem solving by search: definitions Graph.
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.
 Jim has six children.  Chris fights with Bob,Faye, and Eve all the time; Eve fights (besides with Chris) with Al and Di all the time; and Al and Bob.
Production Systems A production system is –a set of rules (if-then or condition-action statements) –working memory the current state of the problem solving,
1 Chapter 2 Heuristic Search Techniques AI & ESChapter 2 2 Defining the problem A water jug problem: 4-gallon and 3-gallon - no marker on the.
Chapter 2 Problems, Problem Spaces, and Search?
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Today’s Topics FREE Code that will Write Your PhD Thesis, a Best-Selling Novel, or Your Next Methods for Intelligently/Efficiently Searching a Space.
Problems, Problem Spaces and Search
CS 415 – A.I. Slide Set 5. Chapter 3 Structures and Strategies for State Space Search – Predicate Calculus: provides a means of describing objects and.
Chapter 2 Problems, Problem Spaces, and Search?
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
PROBLEM SOLVING – BASIC SEARCH METHODS 12/8/2015Dr. Sunil Kumar 1.
Basic Problem Solving Search strategy  Problem can be solved by searching for a solution. An attempt is to transform initial state of a problem into some.
1 Directed Graphs Chapter 8. 2 Objectives You will be able to: Say what a directed graph is. Describe two ways to represent a directed graph: Adjacency.
Introduction to Artificial Intelligence CS 438 Spring 2008 Today –AIMA, Ch. 3 –Problem Solving Agents State space search –Programming Assignment Thursday.
Graphing Linear Equations
Jugs An Investigation Jugs A girl wishes to measure out 4 litres of water. She has only two jugs which, when full, hold 3 litres and 5 litres respectively.
1 BASIC ROBLEM SOLVING METHODS Many of the problems that fall within the purview of artificial intelligence are too complex to be solvable by direct techniques.
ARTIFICIAL INTELLIGENCE
We do it for the glory #allbrains #Advancedgeoisthebest #Ms.uckar #thereisalsoextracreditinvolved.
Solving a Maze using Graph Algorithms
Breadth First and Depth First
Heuristic Search A heuristic is a rule for choosing a branch in a state space search that will most likely lead to a problem solution Heuristics are used.
Csc 2720 Instructor: Zhuojun Duan
Introduction Defining the Problem as a State Space Search.
STATE SPACE REPRESENTATION
CS Fall 2016 (Shavlik©), Lecture 8, Week 5
CMSC 202 Trees.
STATE SPACE REPRESENTATION
BEST FIRST SEARCH -OR Graph -A* Search -Agenda Search CSE 402
Algorithms Lecture # 29 Dr. Sohail Aslam.
CPSC 322 Introduction to Artificial Intelligence
CSE (c) S. Tanimoto, 2002 State-Space Search
Supplemental slides for CSE 327 Prof. Jeff Heflin
ARTIFICIAL INTELLIGENCE
3.2 Graph Traversal.
CSE (c) S. Tanimoto, 2004 State-Space Search
Chapter 2 Problems, Problem Spaces, and Search?
EMIS 8374 Search Algorithms: DFS Updated 12 February 2004
Presentation transcript:

State Space Search

State Space representation of a problem is a graph  Nodes correspond to problem states  Arcs correspond to steps in a solution process  One node corresponds to an initial state  One node corresponds to a goal state

Solution Path An ordered sequence of nodes from the initial state to the goal state

Search Algorithm Finds a solution path through a state space

The Water Jug Problem Suppose we have  An empty 4 gallon jug  An empty 3 gallon jug  A source of water  A task: put 2 gallons of water in the 4 gallon jug

Representation  State Space  Node on the graph is an ordered pair (x,y) –X is the contents of the 4 gallon jug –Y is the contents of the 3 gallon jug  Intitial State: (0,0)  Goal State: (2,N) N ε {0, 1, 2, 3}

Rules 1. if x < 4, fill x : (x,y)  (4,y) 2. if y < 3, fill y : (x,y)  (x,3) 3. if x > 0, empty x : (x,y)  (0,y) 4. if y > 0, empty y : (x,y)  (x,0) 5. if (x+y) >= 4 and y > 0 fill the 4 gallon jug from the 3 gallon jug (x,y)  (4, y – (4 – x)) 6. if (x+y) >= 3 and x > 0 Fill the 3 gallon jug from the 4 gallon jug (x,y)  (x –(3 – y), 3)) 7. if (x+y) 0 Pour the 3 gallon jug into the 4 gallon jug: (x,y)  (x+y), 0) 8. if (x+y) 0 pour the 4 gallon jug into the 3 gallon jug: (x,y)  (0, x + y)

Is there a solution path? Initial State: (0,0) Goal State: (2,N)

Breadth First Search (0,3) (4,0) (4,3)(1,3) (3,0) (0,3) etc

Depth First ( 3,0 ) ( 3,3 ) ( 0,3 ) ( 4,0 ) ( 4,3 ) ( 0,0 ) Etc. and without visiting already visited states

Backward/Forward Chaining Search can proceed 1. From data to goal 2. From goal to data Either could result in a successful search path, but one or the other might require examining more nodes depending on the circumstances

Data to goal is called forward chaining for data driven search Goal to data is called backward chaining or goal driven search

Examples  Water jug was data driven  Grandfather problem was goal driven  To make water jug goal driven: –Begin at (2,y) –Determine how many rules could produce this goal –Follow these rules backwards to the start state

Object  Reduce the size of the search space

Use Goal Driven  if –Goal is clearly stated –Many rules match the given facts  For example: the number of rules that conlude a given theorem is much smaller than the number that may be applied to the entire axiom set

Use Data Driven  If –Most data is given at the outset –Only a few ways to use the facts –Difficult to form an initial hypothesis  Water Jug: could go either way, but the presence of only a few rules, data existing in only a handful of states, and the difficulty of forming a hypothesis suggests data driven  Said another way: initial data constrains search