Problem-solving agents

Slides:



Advertisements
Similar presentations
Review: Search problem formulation
Advertisements

Uninformed search strategies
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal.
Artificial Intelligence Solving problems by searching
Greedy best-first search Use the heuristic function to rank the nodes Search strategy –Expand node with lowest h-value Greedily trying to find the least-cost.
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.
G5AIAI Introduction to AI
ICS-171:Notes 4: 1 Notes 4: Optimal Search ICS 171 Summer 1999.
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.
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.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.4) January, 14, 2009.
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
EIE426-AICV 1 Blind and Informed Search Methods Filename: eie426-search-methods-0809.ppt.
CSC 423 ARTIFICIAL INTELLIGENCE
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.
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.
SE Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Review: Search problem formulation
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
Search I Tuomas Sandholm Carnegie Mellon University Computer Science Department [Read Russell & Norvig Chapter 3]
Artificial Intelligence Chapter 3: Solving Problems by Searching
Using Search in Problem Solving
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?
Using Search in Problem Solving
Artificial Intelligence Methods Rao Vemuri Searching - 2.
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
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.
3.0 State Space Representation of Problems 3.1 Graphs 3.2 Formulating Search Problems 3.3 The 8-Puzzle as an example 3.4 State Space Representation using.
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.
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.
Informed Search Methods. Informed Search  Uninformed searches  easy  but very inefficient in most cases of huge search tree  Informed searches  uses.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
Review: Tree search Initialize the frontier using the starting state While the frontier is not empty – Choose a frontier node to expand according to search.
Lecture 3: Uninformed Search
1 Solving problems by searching 171, Class 2 Chapter 3.
G5BAIM Artificial Intelligence Methods Graham Kendall Searching.
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.
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information.
Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu Blind Searches - Introduction.
Solving problems by searching A I C h a p t e r 3.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 13, 2013.
G5AIAI Introduction to AI
Lecture 2: Problem Solving using State Space Representation CS 271: Fall, 2008.
For Monday Read chapter 4 exercise 1 No homework.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Introduction to Artificial Intelligence
Problem Solving by Searching
Search Tuomas Sandholm Read Russell & Norvig Sections
Problem Solving and Searching
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 agents Formalizing problems: Goals, states and actions The search tree Uninformed search Breadth first Depth first

The 8-puzzle Initial state Goal state State: the location of each tiles in one of the nine squares Actions: move the blank up or down or left or rigth Path-cost: every action costs 1, so the path cost is the number of actions performed

The eight queens Goal: 8 queens on the checkboard, none attacked Problem: put 8 queens on the checkboard so that no queen attacks any other The eight queens Goal: 8 queens on the checkboard, none attacked Path-cost: 0 1 States: any arrangement of 0 to 8 queens on board Operators: add a queen 2 States: arrangements of 0 to 8 queens with none attacked Operators: place a queen in the left-most empty column such that it is not attacked by any other queen 3 States: arrangements of 0 to 8 queens, one in each column Operators: move any attached queen to another square in the same column

Example: a driving problem Problem: Your agent is in A and you have program it to drive to E Example: a driving problem A B D E C F What do we need to formalize the problem? We call state the description of the world from the point of view of the agent The set of possible actions that the agent can perform to change the state The goal is the state that has to be reached by the agent The initial state that the agent knows itself to be in at the beginning The path-cost is how much the solution costs

Level of abstraction Example of formalization of the driving problem: State: the town in which the agent is Only one possible action: drive to a neighbor town Initial state: “A” Goal: “E” Path-cost: the distance covered to reach “E” from “A”

More complex conditions State: the town in which the agent is, the weather, the fuel Action: Wait the weather gets better, drive to a neighbor town, stop at a petrol station Initial state: “A”, “cloudy”, “no fuel” Goal: “E”,”Sunny” Path-cost: the distance covered to reach “E” from “A” plus the amount of rain fallen on the car plus fuel consumed

The search tree The search tree is a description of the search process The root node corresponds to the initial state The leaf are states without successors They cannot be expanded: no action can be performed in the corresponding state They correspond to (one of) the goal(s) The nodes of the state space can be repeated in the search tree: Loc=A = Initial Loc= B Loc= C Loc= D Loc= F Loc= E = Goal Loc= B

How to explore the state space, i.e. How to build the search tree? Search Strategies How to explore the state space, i.e. How to build the search tree? Strategies are evaluated on: Completeness: it is guaranteed to find a solution (if there is one)? Time Complexity: How long does it take? Space complexity: How much memory does it need? Optimality: does it find the best solutions when there are more than one?

Informed and Uninformed search Uninformed search (blind search): no information about the “distance” from the current state to the goal is available. Every action is equally good Informed search (heuristic search): there are ways to estimate the “distance” from the current node to the goal, and they are used to drive the search

Breadth First Search 1 2 3 Time complexity: 1 2 3 Time complexity: If the goal has depth d, i.e. the goal has a path length of d, the number of steps is: Where b is the branching factor, i.e. the max number of “sons” of a node in the search tree Space complexity (size of the list nodes): Only the leaf nodes are stored in memory

Depth First Search 1 2 3 Time complexity: 1 2 3 Time complexity: Space complexity (size of the list nodes):

BFS vs DFS Completeness Space and Time Complexity: BFS is always complete DFS can fail to reach the goal when the search tree has infinite depth Space and Time Complexity: For problems that have many solutions, DFS can be faster than BFS For problems with high branching factor, BFS runs out memory

DFS: Depth Limited Search If the state-space contains cycles DFS can fail to found a solution (infinite depth tree) If we know a bound, say l, to the longest path from the initial state to a goal, we can explore only the paths shorter than l Example: how long can be the longest path in the driving problem?

Informed Search: Best-First Search An evaluation function applies to each node and returns a number representing the “desirability” of exapanding that node Best-First Search: always expand the node with the best evaluation The best first search strategies differ on the definitions of the evaluation function