Problem Solving as Search

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.
INTRODUÇÃO AOS SISTEMAS INTELIGENTES
Additional Topics ARTIFICIAL INTELLIGENCE
Announcements Course TA: Danny Kumar
Solving problems by searching Chapter 3 Artificial Intelligent Team Teaching AI (created by Dewi Liliana) PTIIK 2012.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
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.
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.
Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
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.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
UNINFORMED SEARCH Problem - solving agents Example : Romania  On holiday in Romania ; currently in Arad.  Flight leaves tomorrow from Bucharest.
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.
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.
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.
Toy Problem: Missionaries and Cannibals
Artificial Intelligence Chapter 3: Solving Problems by Searching
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.
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 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.
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.
1 Solving problems by searching 171, Class 2 Chapter 3.
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 Agents
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.
Problem Solving as Search. Problem Types Deterministic, fully observable  single-state problem Non-observable  conformant problem Nondeterministic and/or.
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.
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
Lecture 3: Uninformed Search
More with Ch. 2 Ch. 3 Problem Solving Agents
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
Uninformed Search Chapter 3.4.
CSCE 580 Artificial Intelligence Ch.3: Uninformed (Blind) Search
Solving Problems: Blind Search
Problem solving and search
Artificial Intelligence (CS 370D)
AI I: problem-solving and search
Artificial Intelligence
Solving problems by searching
Solving problems by searching
Lecture 1B: Search.
Problem Solving and Searching
Artificial Intelligence
Artificial Intelligence
Problem Solving and 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 as Search

Chapter 3 : Problem Solving by Searching “In which we see how an agent can find a sequence of actions that achieves its goals when no single action will do.” Such agents must be able to: Formulate a goal Formulate the overall problem Find a solution

Appropriate environment for Searching Agents Observable?? Deterministic?? Episodic?? Static?? Discrete?? Agents?? Yes Either

Problem Types Deterministic, fully observable  single-state problem Agent knows exactly which state it will be in Solution is a sequence Non-observable  conformant problem Agent may have no idea where it is Solution (if any) is a sequence Nondeterministic and/or partially observable  contingency problem percepts provide new information about current state solution is a tree or policy often interleave search, execution Unknown state space  exploration problem ( “online” )

Problem Types Example: vacuum world Start in #5. Solution?? [Right, Suck]

Problem Types Deterministic, fully observable  single-state problem Agent knows exactly which state it will be in Solution is a sequence Non-observable  conformant problem Agent may have no idea where it is Solution (if any) is a sequence Nondeterministic and/or partially observable  contingency problem percepts provide new information about current state solution is a tree or policy often interleave search, execution Unknown state space  exploration problem ( “online” )

Problem Types Conformant, start in {1,2,3,4,5,6,7,8} Solution??

Problem Types Conformant, start in {1,2,3,4,5,6,7,8} e.g., Right goes to {2,4,6,8}. [Right, Suck, Left, Suck]

Problem Types Deterministic, fully observable  single-state problem Agent knows exactly which state it will be in Solution is a sequence Non-observable  conformant problem Agent may have no idea where it is Solution (if any) is a sequence Nondeterministic and/or partially observable  contingency problem percepts provide new information about current state solution is a tree or policy often interleave search, execution Unknown state space  exploration problem ( “online” )

Problem Types Contingency, start in #5 Murphy’s Law: Suck can dirty a clean carpet Local Sensing: dirt, location only. Solution?? [Right, if dirt then Suck]

Problem Types Deterministic, fully observable  single-state problem Agent knows exactly which state it will be in Solution is a sequence Non-observable  conformant problem Agent may have no idea where it is Solution (if any) is a sequence Nondeterministic and/or partially observable  contingency problem percepts provide new information about current state solution is a tree or policy often interleave search, execution Unknown state space  exploration problem “online” 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

Single-State Problem Formulation A problem is defined by four items: initial state successor function (which actually defines all reachable states) goal test 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

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??

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) Move one missionary. Move one cannibal. Move two missionaries. Move two cannibals. Move three missionaries. Move three cannibals. Move one missionary and one cannibal. Move one missionary and two cannibals. Move two missionaries and one cannibal.

Problem Representation : Cannibals and Missionaries Successor Function (9 actions) Move one missionary. Move one cannibal. Move two missionaries. Move two cannibals. Move three missionaries. Move three cannibals. Move one missionary and one cannibal. Move one missionary and two cannibals. 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 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.

Why do we look at “toy” problems. Real world is absurdly complex state space must be abstracted for problem solving (Abstract) state = set of real states (Abstract) action = complex combination of real actions e.g., “Arad  Zerind” represents a complex set of possible route, detours, rest stops, etc. For guaranteed realizability, any real state “in Arad” must get to some real state “in Zerind” (Abstract) solution = set of real paths that are solutions in the real world each abstract action should e “easier” than the original problem!

Implementation: General Tree Search

Tree Search Example

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

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)