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.

Slides:



Advertisements
Similar presentations
Review: Search problem formulation
Advertisements

Uninformed search strategies
A* Search. 2 Tree search algorithms Basic idea: Exploration of state space by generating successors of already-explored states (a.k.a.~expanding states).
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
Problem Solving and Search Andrea Danyluk September 9, 2013.
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)
CMSC 471 Spring 2014 Class #4 Thu 2/6/14 Uninformed Search Professor Marie desJardins,
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.
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
Lets remember about Goal formulation, Problem formulation and Types of Problem. OBJECTIVE OF TODAY’S LECTURE Today we will discus how to find a solution.
1 Lecture 3: 18/4/1435 Uninformed search strategies Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
Implementation and Evaluation of Search Methods. Use a stack data structure. 1. Push root node of tree on the stack. 2. Pop the top node off the stack.
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 (CS 461D)
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.
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.
Artificial Intelligence
UnInformed Search What to do when you don’t know anything.
Search I Tuomas Sandholm Carnegie Mellon University Computer Science Department [Read Russell & Norvig Chapter 3]
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.
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?
Blind Search-Part 2 Ref: Chapter 2. Search Trees The search for a solution can be described by a tree - each node represents one state. The path from.
Introduction to Artificial Intelligence Blind Search Ruth Bergman Fall 2002.
CS 188: Artificial Intelligence Spring 2006 Lecture 2: Queue-Based Search 8/31/2006 Dan Klein – UC Berkeley Many slides over the course adapted from either.
Solving problems by searching
1 Lecture 3 Uninformed Search
Solving Problems by Searching
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.
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.
Problem Solving and Search Andrea Danyluk September 11, 2013.
Introduction to search Chapter 3. Why study search? §Search is a basis for all AI l search proposed as the basis of intelligence l inference l all learning.
Search Tamara Berg CS 560 Artificial Intelligence Many slides throughout the course adapted from Dan Klein, Stuart Russell, Andrew Moore, Svetlana Lazebnik,
Artificial Intelligence
Informed Search Methods. Informed Search  Uninformed searches  easy  but very inefficient in most cases of huge search tree  Informed searches  uses.
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..
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
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
An Introduction to Artificial Intelligence Lecture 3: Solving Problems by Sorting Ramin Halavati In which we look at how an agent.
Problem solving by search Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
Computer Science CPSC 322 Lecture 6 Iterative Deepening and Search with Costs (Ch: 3.7.3, 3.5.3)
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;
Uninformed Search ECE457 Applied Artificial Intelligence Spring 2007 Lecture #2.
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.
Solving problems by searching A I C h a p t e r 3.
Blind Search Russell and Norvig: Chapter 3, Sections 3.4 – 3.6 CS121 – Winter 2003.
Search Part I Introduction Solutions and Performance Uninformed Search Strategies Avoiding Repeated States Partial Information Summary.
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.
Artificial Intelligence Solving problems by searching.
Lecture 3: Uninformed Search
Uninformed Search Chapter 3.4.
Problem Solving by Searching
Artificial Intelligence (CS 370D)
Problem Solving and Searching
Problem Solving and Searching
Search Strategies CMPT 420 / CMPG 720.
Presentation transcript:

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 path from one city to another 8-puzzle

Problem Solving Agents 8-Puzzle Action: Move blank square up, down, left, or right State: arrangement of squares including blank Goal Test: Is it in correct order? Cost: 1 for each move it took

Problem Statement How do I get from initial state to goal? Use a search algorithm From initial state, generate more states Choose one of the adjacent states, and expand the state from there Continue until you find solution Search strategy: Which states do you expand first? Picture of 8-puzzle search tree

Distinction between state and node State: configuration of the world What is the arrangement of tiles in the puzzle? Node: data structure within the search tree. # nodes > # states Much of the time, the tree is “virtual”.

Uninformed Search Strategies Uninformed: No knowledge of whether one state is better than another, except for goal How could knowledge help? (Rubik’s cube?) Informed search uses heuristics Interested in following: Completeness: Solution guaranteed if it exists Time complexity: How long? Space complexity: How much memory? Optimality: Does it find best solution (lowest cost)? Does it find it first?

Breadth-first search Overview Expand root node Expand all children of root node Expand all grandchildren, etc. In general Expand all nodes at depth d before expanding nodes at depth d+1

Breadth First

Breadth-First Analysis Completeness? Optimality? Time and space? Let b =branching factor: maximum number of branches a given node can yield What is branching factor for 8-puzzle?

Breadth-First Search Time complexity: How many nodes do I expand? If solution at depth d, approx Space complexity: O(b d ) Same thing: Need to maintain all prior nodes so you know path Usually implemented with a queue

Uniform Cost Search Similar to Breadth-First search, but expand cheapest path so far Example: Finding shortest distance to a city

Uniform Cost Search Completeness: Complexity: Optimality:

Depth-First Search Expand root node Expand node at deepest level of tree Repeat

Depth First

Depth-First Search Space complexity: Must store all nodes on current path Must store all unexplored sibling nodes on path At depth m, required to store 1+bm nodes (1+m if can each node remembers what to expand next) O(bd): Much better than O(b d ) Time complexity: Still need to explore all nodes: O(b d ) Depth-first can get lucky and find long path quickly Depth-first can get “lost” down a really long path

Depth-First Search Complete No – if tree is infinite, could spend forever exploring one branch even if there is a finite solution somewhere Optimality Might never find any solutions Usually implemented via recursion

Depth-Limited Search Depth-First search, but limit maximum depth allowed Complete: Optimality: Time complexity: Space complexity:

Iterative Deepening Search Depth-limited search, with depth = 0 then again with depth = 1 then again with depth = 2... until you find a solution

Iterative Deepening Depth = 0 Depth Limit = 0

Iterative Deepening Depth = 0 Depth Limit = 1

Iterative Deepening Depth = 0 Depth = 1 Depth = 2 Depth Limit = 2

Iterative Deepening Depth = 0 Depth = 1 Depth = 2 Depth = 3 Depth Limit = 3

Iterative Deepening Seach Why iterative deepening search? Complete: eventually will find solution Why not use BFS? BFS traverses in same order, apart from repeats. Aren’t repeats inefficient?

Iterative Deepening Search Memory requirements are same as those as DFS: O(bd) instead of O(b d ) Can think of it as BFS where store less info, and rediscover it when you need it Completeness and optimality the same as for BFS How much time do you lose due to repeats? It’s not so bad, since you don’t repeat the bottom levels as much (the big ones) See book or CS 227 (Alg II) for details

Bidirectional Search Start searching forward from initial state and backwards from goal, and try to meet in the middle Should reduce from O(b d ) to O(2b d/2 )= O(b d/2 ) Hash table to track where you’ve been Can you search backwards? Depends on goal (is goal unique?)

Avoiding Repeated States How do you make sure you don’t cycle? Need to store all the states you have already been to: lots of memory! O(b d ) Checking would only pay off if space has lots of cycles Hash table usually used to make lookup efficient

Searching in Partially Observable Environments What if I have no sensors at all, apart from “at goal”? I have a belief state, which is a set of all states I might be in. {at home, on dirt, etc.} Search through all possible belief states, until you reach one that contains only goals