Solving Problems by Searching CPS 4801-01. Outline Problem-solving agents Example problems Basic search algorithms.

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
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.
Artificial Intelligence Problem Solving Eriq Muhammad Adams
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.
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.
Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
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.
Feng Zhiyong Tianjin University Fall  datatype PROBLEM ◦ components: INITIAL-STATE, OPERATORS, GOAL- TEST, PATH-COST-FUNCTION  Measuring problem-solving.
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.
Problem Solving and Search in AI Part I Search and Intelligence Search is one of the most powerful approaches to problem solving in AI Search is a universal.
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.
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2004.
Artificial Intelligence Chapter 3: Solving Problems by Searching
Solving problems by searching
Problem-solving agents
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 Problem Solving and Searching CS 171/271 (Chapter 3) Some text and images in these slides were drawn from Russel & Norvig’s published material.
MIDTERM REVIEW. Intelligent Agents Percept: the agent’s perceptual inputs at any given instant Percept Sequence: the complete history of everything 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.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Problem-Solving by Searching Uninformed (Blind) Search Algorithms.
Search Tamara Berg CS 560 Artificial Intelligence Many slides throughout the course adapted from Dan Klein, Stuart Russell, Andrew Moore, Svetlana Lazebnik,
AI in game (II) 권태경 Fall, outline Problem-solving agent Search.
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.
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).
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.
Pengantar Kecerdasan Buatan
Artificial Intelligence Lecture No. 6 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Solving problems by searching
Solving problems by searching A I C h a p t e r 3.
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.
Solving problems by searching Chapter 3. Types of agents Reflex agent Consider how the world IS Choose action based on current percept Do not consider.
Solving problems by searching
ECE 448 Lecture 4: Search Intro
Problem Solving by Searching
Artificial Intelligence
Solving problems by searching
Solving problems by searching
Artificial Intelligence
Solving problems by searching
Solving problems by searching
Solving problems by searching
Solving Problems by Searching
CS440/ECE 448 Lecture 4: Search Intro
Solving problems by searching
Presentation transcript:

Solving Problems by Searching CPS

Outline Problem-solving agents Example problems Basic search algorithms

Problem-Solving Agents Intelligent agents are supposed to maximize their performance measure. o If the agent can adopt a goal and aim at satisfying it.

Problem-Solving Agents “formulate, search, execute” design

Problem-Solving Agents Goal formulation, based on the current situation and the agent’s performance measure, is the first step in problem solving. Problem formulation is the process of deciding what actions and states to consider, given a goal. The process of looking for a sequence of actions that reaches the goal is search. Execution phase: once a solution is found, the actions it recommended can be carried out.

Example: Romania On holiday in Romania; currently in Arad. Flight leaves tomorrow from Bucharest Formulate goal: be in Bucharest Formulate problem: o states: various cities o action: drive between cities Find solution: o sequence of cities: e.g., Arad, Sibiu, Fagaras, Bucharest

Example: Romania

Problem Formulation A problem is defined by five components. Initial state e.g., “at Arad” Actions (s)  {a1, a2, a3, … } o e.g., {Go(Sibiu), Go(Timisoara), Go(Zerind)} Transition model: Result (s,a)  s’ o e.g., Result(In(Arad), Go(Timisoara)) = In(Timisoara) Goal test (s)  T/F e.g., “at Bucharest” Path cost (s  s  s)  n (additive) o sum of cost of individual steps, e.g., number of miles traveled, number of minutes to get to destination

Example Problems Toy problems: to illustrate or exercise various problem-solving methods, given a concise, exact description. Real-world problems: tend not to have a single agreed-upon description.

Example: Vacuum World states? initial state? actions? transition model? goal test? path cost?

states? location and dirt, 2*2 2 =8, n*2 n initial state? any state actions? Left, Right, Suck (Up, Down) transition model? goal test? no dirt at all locations path cost? 1 per action (0 for NoOp)

Example: The 8-Puzzle states? initial state? actions? transition model? goal test? path cost?

states? A state description specifies the location of the eight tiles and the blank one. initial state? any state actions? movement of the blank space: Left, Right, Up, Down transition model? (s,a)  s’ goal test? goal state (given) path cost? 1 per move

The 8-Queens Problem states? initial state? actions? transition model? goal test? path cost?

states? Any arrangement of 0 to 8 queens initial state? No queens on the board actions? Add a queen to any empty square transition model? Return the board with a queen added goal test? 8 queens, none attacked path cost? no interest Incremental formulation

The 8-Queens Problem 64*63*…*57 ~= 1.8*10 14 A better formation: states: All possible arrangement of n queens, one per column in the leftmost n columns, with no queen attacking another. (0<=n<=8) actions: Add a queen to any square in the leftmost empty column such that it is not attacked by any other queen.

Donald Knuth (1964): starting with the number 4, a sequence of factorial, square root, and floor operation will reach any desired positive integer. states? Positive numbers initial state? 4 actions? Apply factorial, square root, or floor operation transition model? definition of the operations goal test? desired positive integer path cost? number of operations

Real-World Problems Route-finding problem Touring problems o e.g., visit every city in the Romania example at least once, starting and ending in Bucharest. Traveling salesman problem (TSP) o each city must be visited exactly once o shortest tour

Tree Search Algorithms search tree: initial state as the root, the branches as actions and the nodes as states. We expand the current state and generate a new set of states. parent node, child nodes leaf node: a node with no children (frontier) search strategy: how to choose which state to expand next repeated state, redundant paths

Tree Search Example The initial state

Tree Search Example After expanding Arad

Tree Search Example After expanding Sibiu

Graph Search Algorithm explored set: remembers every expanded node Newly generated nodes that are in the explored set are discarded. The frontier separates the explored region and the unexplored region.

Data Structure For each node n, n.State n.Parent n.Action: parent generated the node n.Path-Cost

Data Structure Frontier: queue o Empty? (queue) : T/F o Pop (queue) o Insert (queue) o FIFO, LIFO, priority Explored set: hash table

Search Strategies A search strategy is defined by picking the order of node expansion Strategies are evaluated along the following dimensions: o completeness: does it always find a solution if one exists? o time complexity : number of nodes generated o space complexity : maximum number of nodes in memory o optimality: does it always find a least-cost solution? Time and space complexity are measured in terms of o b: branching factor or maximum number of successors of any node o d: depth of the least-cost solution o m: maximum length of any path in the state space (may be ∞)

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