Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).

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
Review: Search problem formulation
Announcements Course TA: Danny Kumar
Artificial Intelligence Solving problems by searching
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
January 26, 2003AI: Chapter 3: Solving Problems by Searching 1 Artificial Intelligence Chapter 3: Solving Problems by Searching Michael Scherger Department.
Problem Solving and Search Andrea Danyluk September 9, 2013.
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.
1 Lecture 3 Uninformed Search. 2 Uninformed search strategies Uninformed: While searching you have no clue whether one non-goal state is better than any.
Solving Problems by Searching Currently at Chapter 3 in the book Will finish today/Monday, Chapter 4 next.
CS 480 Lec 3 Sept 11, 09 Goals: Chapter 3 (uninformed search) project # 1 and # 2 Chapter 4 (heuristic search)
Blind Search1 Solving problems by searching Chapter 3.
Search Strategies Reading: Russell’s Chapter 3 1.
May 12, 2013Problem Solving - Search Symbolic AI: Problem Solving E. Trentin, DIISM.
1 Chapter 3 Solving Problems by Searching. 2 Outline Problem-solving agentsProblem-solving agents Problem typesProblem types Problem formulationProblem.
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
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.
Artificial Intelligence for Games Uninformed search Patrick Olivier
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
Artificial Intelligence (CS 461D)
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.
CS 380: Artificial Intelligence Lecture #3 William Regli.
Review: Search problem formulation
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?
Artificial Intelligence Methods Rao Vemuri Searching - 2.
Solving problems by searching
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.
Copyright R. Weber Search in Problem Solving Search in Problem Solving INFO 629 Dr. R. Weber.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
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.
Problem Solving and Search Andrea Danyluk September 11, 2013.
Copyright R. Weber Search in Problem Solving ISYS 370 Dr. R. Weber.
Search I Tuomas Sandholm Carnegie Mellon University Computer Science Department Read Russell & Norvig Sections (Also read Chapters 1 and 2 if.
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.
For Monday Read chapter 4, section 1 No homework..
1 Solving problems by searching 171, Class 2 Chapter 3.
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
G5BAIM Artificial Intelligence Methods Graham Kendall Searching.
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.
Problem solving by search Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
For Friday Read chapter 4, sections 1 and 2 Homework –Chapter 3, exercise 7 –May be done in groups.
Uninformed Search ECE457 Applied Artificial Intelligence Spring 2007 Lecture #2.
Solving problems by searching 1. Outline Problem formulation Example problems Basic search algorithms 2.
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.
Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information.
Problem Solving as Search. Problem Types Deterministic, fully observable  single-state problem Non-observable  conformant problem Nondeterministic and/or.
Implementation: General Tree Search
Solving problems by searching A I C h a p t e r 3.
Search Part I Introduction Solutions and Performance Uninformed Search Strategies Avoiding Repeated States Partial Information Summary.
WEEK 5 LECTURE -A- 23/02/2012 lec 5a CSC 102 by Asma Tabouk Introduction 1 CSC AI Basic Search Strategies.
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.
Introduction to Artificial Intelligence
Problem Solving by Searching
Problem Solving as Search
Solving problems by searching
Problem Solving and Searching
Problem Solving and Searching
Solving Problems by Searching
Presentation transcript:

Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state). Problem formation Determining actions and states to consider given the goal. Objective: Select the best sequence of actions and states to attain goal.

Goal-based Problem Solving Example: The 8 Puzzle Initial State Goal State Goal: Find sequence of actions that lead to the final configuration Actions: move tiles up, down, left, or right when possible. Process of finding sequence of actions: search.

Problem Types Deterministic, fully observable: single-state problem Deterministic, partially observable: multiple-state problem Stochastic, partially observable: contingency problem Have to use sensors during execution Agent acts before it has found a guaranteed plan Interleaving of search and execution Unknown state space: exploration problem Review the four problem examples types in book: Section 3.2

Defining the problem space State space approach – Problem described as a set of states Initial state, s i, that the agent knows itself to be in at the start. Actions: Possible actions available to agent  Application of operator a i moves agent from current state s j to state s k in the state space. Goal Test: Is the current state is the goal state, s g ? A path in a state space is a set of actions that transition from one state to another.  Path cost: a function that assigns cost to a path  Solution: A path from s i to s g.

8-Puzzle Initial State Goal State

State Space Definition for 8 Puzzle State description: Operators: Goal Test: Path cost: each move is assigned a cost of 1. position of each of the 8 tiles in one of 9 squares (or 3x3 board). blank position moves up, down, left, or right current state matches goal configuration illustrated on slide 3.

Example Problems Toy Problems 8 Puzzle Missionaries and Cannibals 8 Queens Real World Problems Route Finding Traveling Salesperson problem VLSI Layout Robot Navigation Task: Determine the state space representation for the above problems

Search Process: Generating Solutions Represented as a tree What is a characteristic of this problem regarding tree size?

Evaluate Strategies Completeness Is the strategy guaranteed to find a solution if one exists? Time Complexity How long does the algorithm take to find a solution? Space Complexity How much memory does it take to perform the search? Optimality Does the method find the best (highest quality) solution when there is more than one solution?

Uninformed Search Strategies Breadth First Search Uniform Cost Search Depth First Search Iterative Deepening Depth First Search

Search Algorithm: Implementation Applied to State Space Representation Function GENERAL-SEARCH (problem, QUEUING-FN) returns a solution or failure nodes  MAKE-QUEUE( MAKE-NODE(INITIALSTATE[problem])) :initialize search tree loop do if nodes is empty then return failure :no candidates to expand node  REMOVE-FRONT (nodes) :remove first node to expand if GOAL-TEST[problem] applied to STATE(node) succeeds then return node :if goal test is satisfied return node as the solution nodes  QUEUING-FN(node, EXPAND(node,OPERATORS[problem])) :otherwise find node’s successors and insert in to queue end

Definitions Branching Factor (b) The maximum number of successors to any node. Depth (d) The depth of the shallowest goal node Max Path Length (m) The maximum length of any path in the state space. Time Number of nodes generated during the search. Space The maximum number of nodes stored in memory.

Breadth-first Search (BFS) All nodes at a given depth are expanded before any nodes at a lower level are expanded. A B E C D I J K F Start node Level 1 Level 2 L Level 3 G H Queuing: FIFO Queue : A Queue : B,C Queue : C, D Queue : D, E, F Queue : E, F, G, H Queue : F, G, H, I, J Queue : G, H, I, J, K, L A Queue : I, J, K, L Queue : J, K, L Queue : K, L A Queue : B Queue : C B D Queue : D CC Queue : E, F D Queue : F, G, H EE Queue : G, H, I, J F Queue : H, I, J, K, L F GG HH I I J Added queue Removed queue Expanded

Breadth-first Search Will always find solution but may not be the most efficient solution. Is it complete? What is the time complexity? What is the space complexity? Is it optimal?

Uniform-cost Search Expand node with least path cost first Means must insert nodes into queue by increasing path cost (PC). A B E C D I J F G H J Queue : A Queue : C, B Queue : B, E, F Queue : D, E, F Queue : E, G, F, H Queue : J, G, F, I, H PC: = 11 PC: = PC: = 15 3 PC: = 14 NOTE: Node F is never expanded, therefore, nodes K & L from our BFS tree are never seen in this tree. 9 PC: = 20 4 PC: = 16 1 PC: = 13 Queue : G, F, I, H Added queue Removed queue Expanded A Queue :Queue : B A C C Queue : E, F BB D D Queue : G, F, H EE

Uniform-cost Search Only concerned about the total path cost. Can it get into an infinite loop? Is it complete? How does the worst case time and space complexity compare to breadth-first search? Is it optimal?

Depth-first Search (DFS) Follows each path to the greatest depth before moving to the next path. A B E C D I J F Start node Level 1 Level 2 Level 3 G H J Queuing: LIFO Queue : A Queue : B,C Queue : D, C Queue : G, H, C Queue : C Queue : E, F Queue : I, J, F Queue : J, F Queue : F 11 Added queue Removed queue Expanded Queue : AA Queue : C BB DD Queue : H, C GG H Queue : H C Queue : F C E E II

Depth-first Search What is a problem with this method? What are the space requirements? What is the worst case? What about the processing requirements? What is the worst case?

Depth-Limited Search Depth-first search with depth limit l i.e., cut off search at preset depth l Start node Level 1 Level 2 Level 3 Is this result the same as DFS? Let l = 3 What changes if l = 2? Added queue Removed queue Expanded A B E C D I J F G H J Queue : A Queue : B,C Queue : D, C Queue : G, H, C Queue : C Queue : E, F Queue : I, J, F Queue : J, F Queue : F Queue : AA Queue : C BB DD Queue : H, C G H Queue : C Queue : F C E E I

Depth-limited Search Does this algorithm solve the infinite path problem? What happens if the goal is at a node below the depth limit? What does this mean for completeness? What happens if l is larger than d, the depth of the goal node? What is the diameter? How does it affect the depth limit?

Iterative deepening search Depth-first search that gradually increases the depth limit until the goal is found. Again combines DFS and BFS. A B E C D I J F G H J Limit = 0 Limit = 1 Queue : A Queue : B, C Queue : C Limit = 2 Queue : D, CQueue : E, F Queue : F Limit = 3 Queue : G, H, C Queue : H, C Queue : I, J, F Queue : J, F Added queue Removed queue Expanded Queue : A B C D E F G I H A B D E C

Iterative Deepening Search Combines the best of breadth-first and depth-first searches. What is this factor for breadth-first search? For depth-first search? What is the time complexity? Is iterative deepening faster than breadth- first? When is it best to apply this algorithm?

Some Conceptual Questions What is common between BFS and Uniform cost search? Not much; Uniform cost search is more like DFS. True or False What is a definite advantage of DFS over BFS? (choose 1) DFS is always faster than BFS. DFS will always find the optimal solution. DFS requires much less memory than BFS. None of the above

Some Conceptual Questions IDS is truly wasteful, because you keep generating the same nodes again and again. True – at the k th iteration, the root node will already have been generated k times. False: it does not have a significant effect on complexity of the search.

Uninformed Search Each of the algorithms discussed are considered uninformed search algorithms. Why? Is it possible to improve the search process if it was more intelligent?