State Space Search I Chapter 3

Slides:



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

Artificial Intelligence: Knowledge Representation
The Algorithmic problems?
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 Representation and Search
CSC411Artificial Intelligence 1 Chapter 3 Structures and Strategies For Space State Search Contents Graph Theory Strategies for Space State Search Using.
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.
Michele Samorani Manuel Laguna. PROBLEM : In meta-heuristic methods that are based on neighborhood search, whenever a local optimum is encountered, the.
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.
Lecture 3 Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
Best-First Search: Agendas
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
CS 460 Midterm solutions. 1.b 2.PEAS : Performance Measure, Environment, Actuators, Sensors 3.c 4.a. Environment: non-English language Internet sites.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Graphs.
Using Search in Problem Solving
C M M Awais (LUMS)1 SEARCH METHODS State space search Heuristic search.
Brute Force Search Depth-first or Breadth-first search
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.
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.
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.
Chapter 2 Problems, Problem Spaces, and Search?
Measuring With Jugs A Solution in Finite Domain. Outline The Puzzle The Algorithm Introduction to Oz3 Implementation in Oz3.
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.
Chapter 9: Rules and Expert Systems Lora Streeter.
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?
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.
CSCI 4310 Lecture 2: Search. Search Techniques Search is Fundamental to Many AI Techniques.
ALGORITHMS.
Week 10 - Friday.  What did we talk about last time?  Graph representations  Adjacency matrix  Adjacency lists  Depth first search.
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.
Chapter 20: Graphs. Objectives In this chapter, you will: – Learn about graphs – Become familiar with the basic terminology of graph theory – Discover.
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.
Maths problem-solving with Bruce Willis and Samuel L. Jackson
ARTIFICIAL INTELLIGENCE
Decision Trees DEFINITION: DECISION TREE A decision tree is a tree in which the internal nodes represent actions, the arcs represent outcomes of an action,
Graphs Chapter 20.
Breadth First and Depth First
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
SOLVING PROBLEMS BY SEARCHING
CMSC 202 Trees.
STATE SPACE REPRESENTATION
Algorithms Lecture # 29 Dr. Sohail Aslam.
Compound Inequalities and their Graphs
CPSC 322 Introduction to Artificial Intelligence
CSE (c) S. Tanimoto, 2002 State-Space Search
Supplemental slides for CSE 327 Prof. Jeff Heflin
CSE (c) S. Tanimoto, 2004 State-Space Search
Chapter 2 Problems, Problem Spaces, and Search?
CS203 Lecture 14.
EMIS 8374 Search Algorithms: DFS Updated 12 February 2004
Presentation transcript:

State Space Search I Chapter 3 The Basics

State Space Problem Space is a Graph Nodes: problem states Arcs: steps in a solution process One node corresponds to an initial state One node corresponds to a goal state State Space

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

State Space Search Algorithm Finds a solution path through a state space State Space

The Water Jug Problem Die Hard: With a Vengeance (1995) (Bruce Willis, Samuel L. Jackson, Jeremy Irons) The Water Jug Problem

A Slight Variation Suppose we have An empty 4 gallon jug A source of water A task: put 2 gallons of water in the 4 gallon jug A Slight Variation

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} Representation

Rules if x < 4, fill x : (x,y)  (4,y) if y < 3, fill y : (x,y)  (x,3) if x > 0, empty x : (x,y)  (0,y) if y > 0, empty y : (x,y)  (x,0) if (x+y) >= 4 and y > 0 : (x,y)  (4, y – (4 – x)) fill the 4 gallon jug from the 3 gallon jug (see next slide) if (x+y) >= 3 and x > 0 : (x,y)  (x –(3 – y), 3)) Fill the 3 gallon jug from the 4 gallon jug if (x+y) <= 4 and y > 0 : (x,y)  (x+y), 0) Pour the 3 gallon jug into the 4 gallon jug if (x+y) <= 3 and x > 0 : (x,y)  (0, x + y) pour the 4 gallon jug into the 3 gallon jug Rules

5 & 6 Redux if (x+y) >= 4 and y > 0 : (x,y)  (4, y – (4 – x)) fill the 4 gallon jug from the 3 gallon jug if (x+y) >= 3 and x > 0 : (x,y)  (x –(3 – y), 3)) Fill the 3 gallon jug from the 4 gallon jug 4-X 3-Y If x is the amount in the 4 gallon, 4-X is the amount necessary to fill it. This amount has to be subtracted from the 3 gallon jug (where the water came from). 5 & 6 Redux

if (x+y) <= 4 and y > 0 if (x+y) <= 3 and x > 0 Pour the 3 gallon jug into the 4 gallon jug: (x,y)  (x+y), 0) if (x+y) <= 3 and x > 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) Is there a solution path?

Breadth First Search (0,0) 1 2 (0,3) (4,0) (0,3) 6 7 2 (3,0) 6 (4,3) (1,3) Breadth First Search etc

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

Backward/Forward Chaining Search can proceed From data to goal 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 Backward/Forward Chaining

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 Examples

Reduce the size of the search space Object

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 Goal Driven

If Most data is given at the outset Only a few ways to use the facts Difficult to form a goal (i.e., hypothesis) For example: DENDRAL, an expert system that finds molecular structure of organic compounds based on spectrographic data. There are lots of final possibilities, but only a few ways to use the initial data Said another way: initial data constrains search Use Data Driven