Problem Solving as Search. Problem Types Deterministic, fully observable  single-state problem Non-observable  conformant problem Nondeterministic and/or.

Slides:



Advertisements
Similar presentations
Artificial Intelligent
Advertisements

Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
Additional Topics ARTIFICIAL INTELLIGENCE
Review: Search problem formulation
Uninformed search strategies
January 26, 2003AI: Chapter 3: Solving Problems by Searching 1 Artificial Intelligence Chapter 3: Solving Problems by Searching Michael Scherger Department.
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.
Uninformed (also called blind) search algorithms) This Lecture Chapter Next Lecture Chapter (Please read lecture topic material before.
Properties of breadth-first search Complete? Yes (if b is finite) Time? 1+b+b 2 +b 3 +… +b d + b(b d -1) = O(b d+1 ) Space? O(b d+1 ) (keeps every node.
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.
PSU CS 370 – Artificial Intelligence Dr. Mohamed Tounsi Artificial Intelligence 3. Solving Problems By Searching.
Search Search plays a key role in many parts of AI. These algorithms provide the conceptual backbone of almost every approach to the systematic exploration.
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 Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
1 Lecture 3: 18/4/1435 Uninformed search strategies Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
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.
EIE426-AICV 1 Blind and Informed Search Methods Filename: eie426-search-methods-0809.ppt.
Search Strategies CPS4801. Uninformed Search Strategies Uninformed search strategies use only the information available in the problem definition Breadth-first.
UNINFORMED SEARCH Problem - solving agents Example : Romania  On holiday in Romania ; currently in Arad.  Flight leaves tomorrow from Bucharest.
Artificial Intelligence Lecture No. 7 Dr. Asad Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Lecture 3 Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
CHAPTER 3 CMPT Blind Search 1 Search and Sequential Action.
An Introduction to Artificial Intelligence Lecture 3: Solving Problems by Sorting Ramin Halavati In which we look at how an agent.
CS 380: Artificial Intelligence Lecture #3 William Regli.
Review: Search problem formulation
Toy Problem: Missionaries and Cannibals
Artificial Intelligence Chapter 3: Solving Problems by Searching
1 Lecture 3 Uninformed Search. 2 Complexity Recap (app.A) We often want to characterize algorithms independent of their implementation. “This algorithm.
Solving problems by searching
1 Lecture 3 Uninformed Search
Lecture 3 Uninformed Search.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Search Tamara Berg CS 560 Artificial Intelligence Many slides throughout the course adapted from Dan Klein, Stuart Russell, Andrew Moore, Svetlana Lazebnik,
Artificial Intelligence
AI in game (II) 권태경 Fall, outline Problem-solving agent Search.
Carla P. Gomes CS4700 CS 4700: Foundations of Artificial Intelligence Prof. Carla P. Gomes Module: Search I (Reading R&N: Chapter.
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.
1 Solving problems by searching Chapter 3. Depth First Search Expand deepest unexpanded node The root is examined first; then the left child of the root;
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
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.
1 search CS 331/531 Dr M M Awais REPRESENTATION METHODS Represent the information: Animals are generally divided into birds and mammals. Birds are further.
Pengantar Kecerdasan Buatan
Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information.
Problem Solving by Searching
Implementation: General Tree Search
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.
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.
Lecture 3 Problem Solving through search Uninformed Search
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
Uninformed Search Chapter 3.4.
Uninformed Search Strategies
Problem Solving as Search
Solving problems by searching
Solving Problems by Searching
Presentation transcript:

Problem Solving as Search

Problem Types Deterministic, fully observable  single-state problem Non-observable  conformant problem Nondeterministic and/or partially observable  contingency problem Unknown state space  exploration problem

Consider this problem Five missionaries and five cannibals Want to cross a river using one canoe. Canoe can hold up to three people. Can never be more cannibals than missionaries on either side of the river. Aim: To get all safely across the river without any missionaries being eaten. States?? Actions?? Goal test?? Path cost??

Single-State Problem Formulation A problem is defined by four items: 1.initial state 2.successor function (which actually defines all reachable states) 3.goal test 4.path cost (additive) e.g., sum of distances, number of actions executed, etc. C(x,a,y) is the step cost, assumed to be  0

Problem Representation : Cannibals and Missionaries Initial State –We can show number of cannibals, missionaries and canoes on each side of the river. –Start state is therefore: [5,5,1,0,0,0]

Problem Representation : Cannibals and Missionaries Initial State –However, since the system is closed, we only need to represent one side of the river, as we can deduce the other side. –We will represent the starting side of the river, and omit the ending side. –So start state is: [5,5,1]

Problem Representation : Cannibals and Missionaries Goal State(s) –[0,0,0] –TECHNICALLY also [0,0,1]

Problem Representation : Cannibals and Missionaries Successor Function (9 actions) 1.Move one missionary. 2.Move one cannibal. 3.Move two missionaries. 4.Move two cannibals. 5.Move three missionaries. 6.Move three cannibals. 7.Move one missionary and one cannibal. 8.Move one missionary and two cannibals. 9.Move two missionaries and one cannibal.

Problem Representation : Cannibals and Missionaries Successor Function (9 actions) 1.Move one missionary. 2.Move one cannibal. 3.Move two missionaries. 4.Move two cannibals. 5.Move three missionaries. 6.Move three cannibals. 7.Move one missionary and one cannibal. 8.Move one missionary and two cannibals. 9.Move two missionaries and one cannibal.

Problem Representation : Cannibals and Missionaries Successor Function –To be a little more mathematical/computer like, we want to represent this in a true successor function format… S(state)  state 1.Move one cannibal across the river. S([x,y,1])  [x-1,y,0] S([x,y,0])  [x+1,y,1] [Note, this is a slight simplification. We also require, 0  x, y, [x+1 or x-1]  5 ]

Problem Representation : Cannibals and Missionaries Successor Function S([x,y,0])  [x+1,y,1] //1 missionary S([x,y,1])  [x-1,y,0] … S([x,y,0])  [x+2,y,1] //2 missionaries S([x,y,1])  [x-2,y,0] … S([x,y,0])  [x+1,y+1,1] // 1 of each S([x,y,1])  [x-1,y-1,0]

Problem Representation : Cannibals and Missionaries Path Cost –One unit per trip across the river.

Implementation: General Tree Search

Tree Search Example

Uninformed Search Strategies Uninformed strategies use only information available in the problem definition –Breadth-first search –Uniform-cost search –Depth-first search –Depth-limited search –Iterative deepening search

Uninformed Search Strategies Uninformed strategies use only information available in the problem definition –Breadth-first search –Uniform-cost search –Depth-first search –Depth-limited search –Iterative deepening search

Breadth-First Search Expanding shallowest unexpanded node Implementation fringe is a FIFO queue, i.e., new successors go at end

Breadth-First Search Expanding shallowest unexpanded node Implementation fringe is a FIFO queue, i.e., new successors go at end

Breadth-First Search Expanding shallowest unexpanded node Implementation fringe is a FIFO queue, i.e., new successors go at end

Breadth-First Search Expanding shallowest unexpanded node Implementation fringe is a FIFO queue, i.e., new successors go at end

Depth-First Search Expand deepest unexpanded node Implementation: fringe = LIFO queue, I.e., put successors at front

Depth-First Search Expand deepest unexpanded node Implementation: fringe = LIFO queue, I.e., put successors at front

Depth-First Search Expand deepest unexpanded node Implementation: fringe = LIFO queue, I.e., put successors at front

Depth-First Search Expand deepest unexpanded node Implementation: fringe = LIFO queue, I.e., put successors at front

Depth-First Search Expand deepest unexpanded node Implementation: fringe = LIFO queue, I.e., put successors at front

Depth-First Search Expand deepest unexpanded node Implementation: fringe = LIFO queue, I.e., put successors at front

Depth-First Search Expand deepest unexpanded node Implementation: fringe = LIFO queue, I.e., put successors at front

Depth-First Search Expand deepest unexpanded node Implementation: fringe = LIFO queue, I.e., put successors at front

Depth-First Search Expand deepest unexpanded node Implementation: fringe = LIFO queue, I.e., put successors at front

Depth-First Search Expand deepest unexpanded node Implementation: fringe = LIFO queue, I.e., put successors at front

Depth-First Search Expand deepest unexpanded node Implementation: fringe = LIFO queue, I.e., put successors at front

Depth-First Search Expand deepest unexpanded node Implementation: fringe = LIFO queue, I.e., put successors at front

Search Strategies A strategy is defined by picking the order of node expansion Strategies are evaluated along the following dimensions: completeness – does it always find a solution if one exists? time complexity – number of nodes generated/expanded space complexity – maximum number of nodes in memory optimality – does it always find a least-cost solution

This is how far we got

Search Strategies Time and space complexity are measured in terms of b – maximum branching factor of the search tree d – depth of the least-cost solution m – maximum depth of the state space (may be infinite)

Properties of Depth-first Search Complete??

Properties of Depth-first Search Complete?? No: fails in infinite-depth spaces, spaces with loops Modify to avoid repeated states along path  complete in finite spaces Time??

Properties of Depth-first Search Complete?? No: fails in infinite-depth spaces, spaces with loops Modify to avoid repeated states along path  complete in finite spaces Time?? O(b m ): terrible if m is much larger than d but if solutions are dense, may be much faster than breadth-first Space??

Properties of Depth-first Search Complete?? No: fails in infinite-depth spaces, spaces with loops Modify to avoid repeated states along path  complete in finite spaces Time?? O(b m ): terrible if m is much larger than d but if solutions are dense, may be much faster than breadth-first Space?? O(bm), I.e., linear space! Optimal??

Properties of Depth-first Search Complete?? No: fails in infinite-depth spaces, spaces with loops Modify to avoid repeated states along path  complete in finite spaces Time?? O(b m ): terrible if m is much larger than d but if solutions are dense, may be much faster than breadth-first Space?? O(bm), I.e., linear space! Optimal?? No.

Properties of Breadth-First Search Complete??

Properties of Breadth-First Search Complete?? Yes (if b is finite) Time??

Properties of Breadth-First Search Complete?? Yes (if b is finite) Time?? 1 + b + b 2 + b 3 + … + b d + b(b d – 1) = O( b d+1 ), ie, exp. in d Space??

Properties of Breadth-First Search Complete?? Yes (if b is finite) Time?? 1 + b + b 2 + b 3 + … + b d + b(b d – 1) = O( b d+1 ), ie, exp. in d Space?? O( b d+1 ) (keep every node in memory) Optimal??

Properties of Breadth-First Search Complete?? Yes (if b is finite) Time?? 1 + b + b 2 + b 3 + … + b d + b(b d – 1) = O( b d+1 ), ie, exp. in d Space?? O( b d+1 ) (keep every node in memory) Optimal?? Yes (if cost = 1 per step); not optimal in general Space is the big problem: can easily generate nodes at 10MB/sec, so 24hours = 860GB.

Implementation: General Tree Search