Problem Solving by Searching

Slides:



Advertisements
Similar presentations
Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
Advertisements

Additional Topics ARTIFICIAL INTELLIGENCE
Solving problems by searching
Announcements Course TA: Danny Kumar
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
Problem Solving Agents A problem solving agent is one which decides what actions and states to consider in completing a goal Examples: Finding the shortest.
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
Feng Zhiyong Tianjin University Fall  datatype PROBLEM ◦ components: INITIAL-STATE, OPERATORS, GOAL- TEST, PATH-COST-FUNCTION  Measuring problem-solving.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
1 Solving problems by searching Chapter 3. 2 Why Search? To achieve goals or to maximize our utility we need to predict what the result of our actions.
CS 380: Artificial Intelligence Lecture #3 William Regli.
Search Problems Russell and Norvig: Chapter 3, Sections 3.1 – 3.3 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2003/home.htm by Prof. Jean-Claude.
1 Solving problems by searching Chapter 3. 2 Why Search? To achieve goals or to maximize our utility we need to predict what the result of our actions.
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2004.
Search I Tuomas Sandholm Carnegie Mellon University Computer Science Department [Read Russell & Norvig Chapter 3]
Artificial Intelligence Chapter 3: Solving Problems by Searching
Uninformed Search Reading: Chapter 3 by today, Chapter by Wednesday, 9/12 Homework #2 will be given out on Wednesday DID YOU TURN IN YOUR SURVEY?
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3.
Solving problems by searching
1 Solving problems by searching Chapter 3. 2 Why Search? To achieve goals or to maximize our utility we need to predict what the result of our actions.
Solving problems by searching This Lecture Read Chapters 3.1 to 3.4 Next Lecture Read Chapter 3.5 to 3.7 (Please read lecture topic material before and.
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.
1 Solving problems by searching This Lecture Chapters 3.1 to 3.4 Next Lecture Chapter 3.5 to 3.7 (Please read lecture topic material before and after each.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
AI in game (II) 권태경 Fall, outline Problem-solving agent Search.
Vilalta&Eick:Uninformed Search Problem Solving By Searching Introduction Solutions and Performance Uninformed Search Strategies Avoiding Repeated States/Looping.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
1 Solving problems by searching 171, Class 2 Chapter 3.
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
An Introduction to Artificial Intelligence Lecture 3: Solving Problems by Sorting Ramin Halavati In which we look at how an agent.
SOLVING PROBLEMS BY SEARCHING Chapter 3 August 2008 Blind Search 1.
A General Introduction to Artificial Intelligence.
Artificial Intelligence
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
CPSC 420 – Artificial Intelligence Texas A & M University Lecture 3 Lecturer: Laurie webster II, M.S.S.E., M.S.E.e., M.S.BME, Ph.D., P.E.
Solving problems by searching A I C h a p t e r 3.
1 Solving problems by searching Chapter 3. 2 Outline Problem types Example problems Assumptions in Basic Search State Implementation Tree search Example.
Blind Search Russell and Norvig: Chapter 3, Sections 3.4 – 3.6 CS121 – Winter 2003.
Search Part I Introduction Solutions and Performance Uninformed Search Strategies Avoiding Repeated States Partial Information Summary.
Lecture 2: Problem Solving using State Space Representation CS 271: Fall, 2008.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Artificial Intelligence Solving problems by searching.
Lecture 3: Uninformed Search
Solving problems by searching
Problem Solving Agents
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
Last time: Problem-Solving
ECE 448 Lecture 4: Search Intro
Introduction to Artificial Intelligence
Problem Solving as Search
Artificial Intelligence (CS 370D)
Artificial Intelligence
Russell and Norvig: Chapter 3, Sections 3.4 – 3.6
Solving problems by searching
Solving problems by searching
Lecture 1B: Search.
Problem Solving and Searching
Searching for Solutions
Artificial Intelligence
Problem Solving and Searching
CS 2710, ISSP 2160 Foundations of Artificial Intelligence
A General Backtracking Algorithm
Solving problems by searching
Solving problems by searching
Solving problems by searching
Solving Problems by Searching
Solving Problems by Searching
Solving problems by searching
Presentation transcript:

Problem Solving by Searching Chapter 3 Fall 2009 Copyright, 1996 © Dale Carnegie & Associates, Inc.

Problem-Solving Agents This is a kind of goal-based agents that decide what to do by finding sequences of actions that lead to desirable states. Some problems cannot be solved by reflex agents Formulating problems Example problems Searching for solutions CSE 471/598 by H. Liu

A simple problem-solving agent Goal formulation - limiting the objectives (for any task, we may have more than one objective) A goal is a set of world states in which the goal is satisfied. Problem formulation - deciding what actions and states to consider The above two are about focusing Search - looking for the best sequence of actions CSE 471/598 by H. Liu

A simple agent (2) Solutions - the results of search, so they are sequences of actions that lead to the goal Execution - acting upon the world Formulate -> Search -> Execute An algorithm in Fig 3.1 CSE 471/598 by H. Liu

Well-defined problems and solutions A problem is defined by four components Initial state is where an agent starts Possible actions, successor function <action,successor> Goal test determines if a state is a goal state Path cost function, step cost A solution is a path from the initial state to a goal state Path - connecting sets of states CSE 471/598 by H. Liu

Problems and Solutions States and actions are the basic elements of a problem A world of states: initial state I, operator O (or successor) State space - the set of all states reachable from I by any sequences of O CSE 471/598 by H. Liu

A simplified Romania map CSE 471/598 by H. Liu

Formulating Problems Choosing states and actions The real art of problem solving is in what goes into the description of the states and operators and what does not How to achieve those? Abstraction - removing detail from a representation A key problem solving skill What are irrelevant details for the case of Romania Map we can think of? CSE 471/598 by H. Liu

Measuring problem-solving performance Performance measures Completeness – if there is a solution, it will find it Optimality – the solution found is the best Time complexity – number of nodes generated during search Space complexity – maximum number of nodes stored in memory Reach the goal Search cost Total cost = path cost + search cost CSE 471/598 by H. Liu

Example Problems Toy problems: concise and exact, used to illustrate or exercise various problem-solving methods - ideal cases Real-world problems: more difficult and we want solutions, but there might be many different descriptions Toy problems can also be used to test ideas quickly: if it does not work for toy problems, we have reasons to believe that it won’t work for real-world problems. CSE 471/598 by H. Liu

Toy problem (1) Vacuum world (next slide) States: 8 (2*2^2) or n*2^n What is the first n about? Initial states: any Successor function: Left, Right, Suck Goal test: Clean or not Path cost: Each step costs 1 Comparing with the real world case, how different the two are? n is the number of locations CSE 471/598 by H. Liu

CSE 471/598 by H. Liu

Toy problem (2) The 8-puzzle States:O(9!) Initial state: Start state Successor function: Left, Right, Up, Down Goal test: Goal state Path cost: Each step costs 1 O(9!/2) CSE 471/598 by H. Liu

Toy problem (3) The 8-queens (Fig 3.5) States: 64*63*…*57 Initial states: Empty board Successor function: Add a queen to any empty square Goal test: 8 queens on the board, none attacked Path cost: N/A A better formulation with constraint One per column in the leftmost n column w/o attacking queens Add a queen to any square in the leftmost empty column w/o attacking queens What is the difference between the two? Generate first and test next If not good, don’t generate for test For 100 Qs 10^400 to 10^52 CSE 471/598 by H. Liu

Real-world problems Route finding Touring and traveling salesperson problem VLSI layout Robot navigation Assembly sequencing Protein design Internet searching CSE 471/598 by H. Liu

Search Generating action sequences A state map Expanding the current state by ... Generating a new set of states Let’s look at a situation we come to BY … PHX -> ASU -> BY A state map CSE 471/598 by H. Liu

What is search? The essence of search is to consider one choice at a time. Search tree – generated by the initial state and successor, defines the state space (two examples - Figs 3.6 and 3.8) root, nodes, fringe (leaf nodes) A general search algorithm (Fig 3.9) Initial state, test, expand, test, expand, … How to expand is determined by a search strategy How to implement the fringe - a queue CSE 471/598 by H. Liu

Search Evaluation Evaluating search strategies (Criteria) Completeness – guaranteed to find a solution if there is one Time complexity – big O Space (memory) complexity – big O Optimality – the solution is optimal Branching factor (b), depth of the shallowest goal (d), maximum length of any path (m) Two types of search Blind search (uninformed) Heuristic search (informed) CSE 471/598 by H. Liu

Uninformed Search Strategies Breadth-first search (a binary tree example) Expanding the shallowest node Complete? Optimal? How to implement it branching factor - a killing cost (Fig 3.11) The main concerns the memory requirements exponential complexity Uniform-cost search – expands the node with the lowest path cost Complete? Optimal? What if a node has a zero-cost action leading back to the same node? When is it identical to BFS? CSE 471/598 by H. Liu

Search Strategies (2) Depth-first search The main concerns The cures A binary tree example (Fig 3.12) Complete? Optimal? How to implement it The main concerns Wrong branch Deep branch The cures Depth-limited search (Fig 3.13) Determining depth limit based on the problem (how many cities in the map of Romania?) Iterative deepening search (Fig 3.15) CSE 471/598 by H. Liu

Search Strategies (3) Comparing ID Depth-First with Breadth-First Which one is faster? Bidirectional search The two directions: Start, Goal (Fig 3.16) What’s the saving? The main concerns How to search backwards Multiple goal states Efficient checking to avoid redundant search in the other tree CSE 471/598 by H. Liu

Search Strategies (4) Which one to use and when We need to know the strategies in terms of the four criteria Comparing uninformed search strategies (Fig 3.17) We need to know the problem to be solved Human intelligence is still required, or not plug-and-play. CSE 471/598 by H. Liu

Avoiding Repeated States It’s wasting time to expand states that have already been encountered and expanded before. How to avoid? Systematic search Remembering what have been visited (open list vs. closed list) Graph-Search (Fig 3.19) CSE 471/598 by H. Liu

Searching with partial information Sensorless problems Reason about sets of states instead of a single state (Fig 3.21) Contingency problems Environment is partially observable, actions are uncertain [Suck, Right, if [R,Dirty] then Suck] with position and local dirt sensors Exploration problems Both the states and actions of E are unknown Can be viewed as an extreme case of contingency problems CSE 471/598 by H. Liu

Summary Problem solving is goal-based A problem consists of 4 parts initial state, operator, goal test, path cost A single general search algorithm can solve any problem, but … Four criteria: completeness, optimality, time complexity, space complexity Discussed various search strategies We haven’t answered the question – how far we are away from the goal? Is it possible to answer? CSE 471/598 by H. Liu