Chapter 2 Problems, Problem Spaces, and Search?

Slides:



Advertisements
Similar presentations
Problems and Search Chapter 2.
Advertisements

Lecture Notes on AI-NN Chapter 5 Information Processing & Utilization.
Artificial Intelligence: Knowledge Representation
State Space Representation and Search
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 06 : First Order Logic Resolution Prove.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 4 Jim Martin.
January 26, 2003AI: Chapter 3: Solving Problems by Searching 1 Artificial Intelligence Chapter 3: Solving Problems by Searching Michael Scherger Department.
ICS-171:Notes 4: 1 Notes 4: Optimal Search ICS 171 Summer 1999.
State Space Search Classic AI.
Part2 AI as Representation and Search
Problems and Search Chapter 2.
CSC 423 ARTIFICIAL INTELLIGENCE
1 Pertemuan 2 PROBLEMS, PROBLEM SPACES, AND SEARCH Matakuliah: T0264/Inteligensia Semu Tahun: 2005 Versi: 1/0.
Best-First Search: Agendas
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2004.
Structures and Strategies for State Space Search
Blind Search-Part 2 Ref: Chapter 2. Search Trees The search for a solution can be described by a tree - each node represents one state. The path from.
Using Search in Problem Solving
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.
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.
Brute Force Search Depth-first or Breadth-first search
Problems, Problem Spaces and Search
Problem Solving and Search Andrea Danyluk September 11, 2013.
Artificial Intelligence Lecture 9. Outline Search in State Space State Space Graphs Decision Trees Backtracking in Decision Trees.
1 State Space of a Problem Lecture 03 ITS033 – Programming & Algorithms Asst. Prof.
Formal Description of a Problem In AI, we will formally define a problem as –a space of all possible configurations where each configuration is called.
Artificial Intelligence LECTURE 3 ARTIFICIAL INTELLIGENCE LECTURES BY ENGR. QAZI ZIA 1.
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.
Introduction to search Chapter 3. Why study search? §Search is a basis for all AI l search proposed as the basis of intelligence l inference l all learning.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Ch. 3 – Search Supplemental slides for CSE 327 Prof. Jeff Heflin.
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.
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.
A RTIFICIAL I NTELLIGENCE UNIT : 2 Search Techniques.
Chapter 2 Problems, Problem Spaces, and Search?
Formal Description of a Problem In AI, we will formally define a problem as –a space of all possible configurations where each configuration is called.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
1 Defining a Problem as a State Space 1. Define a state space that contains all the possible configurations of the relevant objects. 2. Specify one (or.
1 Solving problems by searching 171, Class 2 Chapter 3.
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Problem solving by search Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
PROBLEM SOLVING – BASIC SEARCH METHODS 12/8/2015Dr. Sunil Kumar 1.
For Friday Read chapter 4, sections 1 and 2 Homework –Chapter 3, exercise 7 –May be done in groups.
Reasoning as Search. Reasoning We can describe reasoning as search in a space of possible situations.
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.
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
Problem Reduction So far we have considered search strategies for OR graph. In OR graph, several arcs indicate a variety of ways in which the original.
Artificial Intelligence Lecture No. 6 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Search in State Spaces Problem solving as search Search consists of –state space –operators –start state –goal states A Search Tree is an efficient way.
Ch. 3 – Search Supplemental slides for CSE 327 Prof. Jeff Heflin.
Problem Characteristics
Lecture 2: Problem Solving using State Space Representation CS 271: Fall, 2008.
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
Problems, Problem Spaces and Search. Contents Defining the problem as a State Space Search Production Systems Control Strategies Breadth First Search.
Pertemuan 2 PROBLEMS, PROBLEM SPACES, AND SEARCH
ARTIFICIAL INTELLIGENCE
Problem and Production System Characteristics
Introduction to Artificial Intelligence
Introduction Defining the Problem as a State Space Search.
Problem and Production System Characteristics
STATE SPACE REPRESENTATION
STATE SPACE REPRESENTATION
Chapter 2 Problems, Problem Spaces, and Search?
Presentation transcript:

Chapter 2 Problems, Problem Spaces, and Search?

Defining the problem 4 3 A water jug problem: 4-gallon and 3-gallon no marker on the bottle pump to fill the water into the jug How can you get exactly 2 gallons of water into the 4-gallons jug? 4 3 Artificial Intelligence Chapter 2

A state space search (x,y) : order pair x : water in 4-gallons  x = 0,1,2,3,4 y : water in 3-gallons  y = 0,1,2,3 start state : (0,0) goal state : (2,n) where n = any value Rules : 1. Fill the 4 gallon-jug (4,-) 2. Fill the 3 gallon-jug (-,3) 3. Empty the 4 gallon-jug (0,-) 4. Empty the 3 gallon-jug (-,0) Artificial Intelligence Chapter 2

Water jug rules Artificial Intelligence Chapter 2

Water jug rules Artificial Intelligence Chapter 2

A water jug solution 4-Gallon Jug 3-Gallon Jug Rule Applied 0 0 0 3 2 0 0 0 3 2 3 0 9 3 3 2 4 2 7 0 2 5 or 12 2 0 9 or 11 Solution : path / plan Artificial Intelligence Chapter 2

Formal description of a problem The End Define a state space that contains all the possible configurations of the relevant objects. Specify state/states that describes the situation of start state. Specify state/states that describes the situation of goal state. Specify the set of rules. assumption, generalization Artificial Intelligence Chapter 2

Search Tree Water jug problem. The End (0,0) (4,0) (0,3) (4,3) (3,0) (1,3) Water jug problem. Artificial Intelligence Chapter 2

Search Graph The End Water jug problem. (0,0) (4,0) (0,3) (4,3) (3,0) (1,3) Water jug problem. Cycle When will the search terminate? Artificial Intelligence Chapter 2

Homework The End Is there any other solution for a water jug problem? If there is some other solution, describe in an order pair of how to solve it. Artificial Intelligence Chapter 2

Question answering question The End Marcus was a man. Marcus was a Pompeian. Marcus was born in 40 A.D. All men are mortal. All Pompeians died when the volcano erupted in 79 A.D. No mortal lives longer than 150 years. It is now 1991 A.D. Is Marcus alive? Artificial Intelligence Chapter 2

Solution 1 The End 1. Marcus was man. axiom 1 4. All men are mortal. axiom 4 8. Marcus is mortal. 1,4 3. Marcus was born in 40 A.D. axiom 3 7. It is now 1991 A.D. axiom 7 9. Marcus’ age is 1951 years. 3,7 6. No mortal lives longer than 150 years axiom 6 10. Marcus is dead. 8,6,9 Artificial Intelligence Chapter 2

Solution 2 The End 7. It is now 1991 A.D. axiom 7 5. All Pompeians died in 79 A.D. axiom 5 11. All Pompeians are dead now. 7,5 2. Marcus was a Pompeian. axiom 2 12. Marcus is dead…… 11,2 Artificial Intelligence Chapter 2

Understanding a sentence The End The bank president ate a dish of pasta salad with the fork. bank = financial institution / a side of a river dish = eat dish / eat pasta pasta salad : dog food  food with dog meat? with a fork : with ....her friend. / with vegetable. solution : state of the world Artificial Intelligence Chapter 2

Seven problem characteristics The End Decomposable Problem Block world problem Can solution steps be ignored or undone? Ignorable : theorem proving solution steps can be ignored Recoverable : 8 puzzle solution steps can be undone (backtracking) Irrecoverable : chess solution steps can not be undone Artificial Intelligence Chapter 2

A blocks world c b a d on(c,a). on(b,d). ontable(a). ontable(d). clear(b). clear(c). hand_empty. c b a d Artificial Intelligence Chapter 2

Seven problem characteristics The End 3. Is the universe predictable? 8-puzzel (yes) bridge (no)  but we can use probabilities of each possible outcomes controlling robot arm  gear of the arm might stuck helping the lawyer to decide how to defend his client against a murder charge. 4. Is a good solution absolute or relative? - formal inference methods - More than one solution? - traveling salesman problem Artificial Intelligence Chapter 2

Seven problem characteristics The End 5. Is the solution a state or a path ? - consistent…… interpretation for the sentence - water jug problem  path / plan 6. What is the role of knowledge? knowledge for perfect program of chess (need knowledge to constrain the search) newspaper story understanding (need knowledge to recognize a solution) 7. Does the task require interaction with a person? solitary/ conversational Artificial Intelligence Chapter 2

Production system The End A set of rules. Knowledge contains information for a particular task. A control strategy. resolve conflict rule. Breadth-first search Depth-first search Expert system shells : provide environment for construct knowledge based expert system. Artificial Intelligence Chapter 2

Breadth-first search The End Algorithm BFS: Create a variable called NODE-LIST and set it to the initial state. Until a goal state is found or NODE-LIST is empty do: Remove the first element from NODE-LIST and call it E. If NODE-LIST was empty, quit. For each way that each rule can match the state described in E do: Apply the rule to generate a new state. If the new state is a gold state, quit and return this state. Otherwise, add the new state to the end of NODE-LIST. Artificial Intelligence Chapter 2

Advantage BFS The End will not trapped exploring a blind alley (ไม่ลงลึกไปทางใดทางหนึ่งเฉพาะ ที่อาจจะไม่ใช่คำตอบ) if there is a solution, DFS is guaranteed to find it. if there are multiple solutions, a minimum solution will be found. Artificial Intelligence Chapter 2

Depth-first search The End Algorithm DFS: If the initial state is a goal state, quit and return success. Otherwise, do the following until success or failure is signaled: Generate a successor, E, of the initial state. If there are no more successors, signal failure. Call Depth-First Search with E as the initial state. If success is returned, signal success. Otherwise continue in this loop. Artificial Intelligence Chapter 2

Advantage DFS The End require less memory may find a solution without examining much of the search space. Artificial Intelligence Chapter 2

Heuristic Search The End Heuriskein  to discover (Greek word) Heuristic is a technique that improves the efficiency of the search process. - It is often useful to introduce heuristics based on relatively unstructured knowledge. - can not use Mathematical analysis. Heuristic function : is the function that maps from problem state descriptions to measures of desirability, usually represent as number.  guide the most profitable direction Artificial Intelligence Chapter 2

To solve a problem The End Define the problem precisely. Specify the problem space, and the starting and goal state (s). Analyze the problem to determine where it falls with respect to seven important issues. Identify and represent the knowledge required by the task. Choose one or more techniques for problem solving , and apply those techniques to the problem. Artificial Intelligence Chapter 2

Production System The End Working memory Production set = Rules Trace Data driven Goal driven Iteration # Conflict sets Rule fired Artificial Intelligence Chapter 2

Production System Artificial Intelligence Chapter 2

Production System Artificial Intelligence Chapter 2

Production System Artificial Intelligence Chapter 2

Production System Artificial Intelligence Chapter 2

And-Or Graph The End b c d e f g a Data driven Goal driven Artificial Intelligence Chapter 2

It is not enough to stare up the steps... We must step up the stairs. Artificial Intelligence Chapter 2