Introduction to search Chapter 3. Why study search? §Search is a basis for all AI l search proposed as the basis of intelligence l all learning algorithms,

Slides:



Advertisements
Similar presentations
Review: Search problem formulation
Advertisements

Artificial Intelligence By Mr. Ejaz CIIT Sahiwal.
State Space Representation and Search
PROBLEM SOLVING AND SEARCH
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
Comp 307 Problem Solving and Search Formalize a problem as State Space Search Blind search strategies Heuristic search.
Problem Solving and Search Andrea Danyluk September 9, 2013.
Part2 AI as Representation and Search
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.
Solving Problems by Searching Currently at Chapter 3 in the book Will finish today/Monday, Chapter 4 next.
CMSC 471 Spring 2014 Class #4 Thu 2/6/14 Uninformed Search Professor Marie desJardins,
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.4) January, 14, 2009.
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
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 Jim Little UBC CS 322 – Search 2 September 12, 2014
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.
CPSC 322 Introduction to Artificial Intelligence October 27, 2004.
Review: Search problem formulation
Artificial Intelligence
UnInformed Search What to do when you don’t know anything.
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
Intelligent Agents What is the basic framework we use to construct intelligent programs?
Problem Solving and Search in AI Heuristic Search
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.
Using Search in Problem Solving
5-Nov-2003 Heuristic Search Techniques What do you do when the search space is very large or infinite? We’ll study three more AI search algorithms: Backtracking.
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.
Uninformed Search (cont.)
Search  Exhaustive/Blind Search Methods Depth First Search Breadth First Search  Heuristic Methods Hill Climbing Beam Search Best First Search…
State-Space Searches. 2 State spaces A state space consists of –A (possibly infinite) set of states The start state represents the initial problem Each.
For Friday Finish chapter 3 Homework: –Chapter 3, exercise 6 –May be done in groups. –Clarification on part d: an “action” must be running the program.
Solving Problems by Searching
State-Space Searches.
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.
Today’s Topics FREE Code that will Write Your PhD Thesis, a Best-Selling Novel, or Your Next Methods for Intelligently/Efficiently Searching a Space.
CS 415 – A.I. Slide Set 5. Chapter 3 Structures and Strategies for State Space Search – Predicate Calculus: provides a means of describing objects and.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 02 : Search.
Cost-based & Informed Search Chapter 4. Review §We’ve seen that one way of viewing search is generating a tree given a state-space graph (explicitly or.
Cost-based & Informed Search Chapter 4. Review §We’ve seen that one way of viewing search is as a graph with nodes & arcs §We’ve begun exploring various.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
Search with Costs and Heuristic Search 1 CPSC 322 – Search 3 January 17, 2011 Textbook §3.5.3, Taught by: Mike Chiang.
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.
Computer Science CPSC 322 Lecture 6 Iterative Deepening and Search with Costs (Ch: 3.7.3, 3.5.3)
For Friday Read chapter 4, sections 1 and 2 Homework –Chapter 3, exercise 7 –May be done in groups.
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;
Search (continued) CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information.
CPSC 322, Lecture 6Slide 1 Uniformed Search (cont.) Computer Science cpsc322, Lecture 6 (Textbook finish 3.5) Sept, 17, 2012.
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.
Artificial Intelligence Lecture No. 8 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Brian Williams, Fall 041 Analysis of Uninformed Search Methods Brian C. Williams Sep 21 st, 2004 Slides adapted from: Tomas Lozano Perez,
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
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.
CS Fall 2016 (Shavlik©), Lecture 8, Week 5
What to do when you don’t know anything know nothing
Artificial Intelligence
Artificial Intelligence Chapter 8 Uninformed Search
State-Space Searches.
State-Space Searches.
State-Space Searches.
Presentation transcript:

Introduction to search Chapter 3

Why study search? §Search is a basis for all AI l search proposed as the basis of intelligence l all learning algorithms, e.g., can be seen as searching some space of hypothesis

Newell & Simon: physical symbol hypothesis §“A physical-symbol system has the necessary & sufficient means for general intelligent action”

Physical-systems §“A physical-system consists of a set of entities, called symbols, which are physical patterns that can occur as components of another type of entity called an expression… Thus a symbol structure is composed of a number of instances (or tokens) of symbols related in some physical way (such as one token being next to another). At any instant of time, the system will contain a collection of these symbol structures. Besides these structures, the system also contains a collection of processes that operate on expressions to produce other expressions: processes of creation, modification, reproduction, & destruction. A physical-symbol system is a machine that produces through time an evolving collection of symbol structures.”

Intelligence as search §“The solutions to problems are represented as symbol structures. A physical-symbol system exercises its intelligence in problem- solving by search -- that is, by generating & progressively modifying symbol structures until it produces a solution structure.”

The search task §Given l a description of the initial state l list of legal actions preconditions effects l goal test -- tells you if a goal has been reached §Find l an ordered list of actions to perform in order to go from the initial state to the goal

Search as a graph §Nodes l search-space states §Directed arcs l legal actions from each state to another §Example §Rather than being given, however, we often build the graph (implicitly) as we go; we aren’t given the graph explicitly

Trip as search §State: geographical location (city, street, etc.) §Actions: following a road §Initial state: Madison §Goal state: Minneapolis

ID3 as search §Search space: space of all decision trees possible using feature set §Operator (action): add a node (expand the tree) §State (node): decision tree §Initial state: single leaf node §Goal state: tree that properly categorizes (separates) the training examples

ID3 heuristic §Problem: search space very large; given that we can’t look at all of the possibilities, what’s a good next state? -- info gain (heuristic) §Info gain can be seen as a scoring function that guides us through the space of possible decision trees

General search methods §Given a set of search-space nodes, which one should we consider next? l Youngest [depth-first search] most recently created/expanded node l Oldest [breadth-first search] least-recently created/expanded node l Best [best-first search] requires a scoring function l Random simulated annealing

Example of search strategies

“Considering” a node §If goal-state?(node) then done else expand(node) l expand = add previously unvisited children (states that be gotten to from node) to the OPEN list l if we want the cheapest path, we must check that we can’t find a cheaper route example

General search algorithm

Search algorithm explained §Task: find a route from the start node to the goal node §Desire: try all/many possible paths §OPEN list allows backtracking from a path that “dies out”; saves other possible ways l nodes under consideration (to be expanded) §CLOSED list prevents us from repeatedly trying a node & ending up in an infinite loop l nodes that have been processed

Search danger: infinite spaces §We must be careful that our search doesn’t go forever l the goal we are looking for may not be in the search space but because the space is infinite we might not know this l the goal may be in the search space but we go down an infinite branch l example

Implementing search strategies §Breadth l queue: first in, first out l put new nodes at the back of list §Depth l stack: last in, first out l put new nodes at the front of list §Best l priority queue l add new nodes then sort list §The next node to consider is popped off the front of the OPEN list

BFS tradeoffs §pros l guaranteed to find a solution if it exists l guaranteed to find the shortest solution (in terms of arcs) §cons l OPEN becomes too big [O(b d )] l example

DFS tradeoffs §pros l might find solution quickly l needs less space for OPEN [O(b * d)] l example §cons l can get stuck (run forever) in infinite spaces l might not find shortest solution

Best-first search tradeoffs §pro l can use domain specific knowledge §con l requires a good heuristic (scoring) function

Fixing DFS: iterative deepening §Combines the strengths of breadth- & depth-first search §do DFS but with depth limited to k l if find solution, done (return path, etc.) l else, increment k & start over §don’t save partial solutions from previous iterations; too much memory required §due to exponential growth, most work is at the bottom §guaranteed to find the shortest solution, but OPEN doesn’t get too big (as in BFS)

Iterative deepening idea §We do only a little more work overall, but our storage needs are much less l we get the good aspects of BFS -- shortest solution l without the negative aspects -- OPEN list too big

Search space examples §Water jug problem §Missionaries & cannibals §Define l state representation (k-rep) l initial state l goal state l operators §Then draw search space