1 Chapter 4 Search Methodologies. 2 Chapter 4 Contents l Brute force search l Depth-first search l Breadth-first search l Properties of search methods.

Slides:



Advertisements
Similar presentations
Review: Search problem formulation
Advertisements

Heuristic Search techniques
Informed search algorithms
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.
Informed Search Methods How can we improve searching strategy by using intelligence? Map example: Heuristic: Expand those nodes closest in “as the crow.
CSCE 580 ANDREW SMITH JOHNNY FLOWERS IDA* and Memory-Bounded Search Algorithms.
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.
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,
Search Techniques MSc AI module. Search In order to build a system to solve a problem we need to: Define and analyse the problem Acquire the knowledge.
Search Strategies Reading: Russell’s Chapter 3 1.
CS 484 – Artificial Intelligence1 Announcements Department Picnic: today, after class Lab 0 due today Homework 2 due Tuesday, 9/18 Lab 1 due Thursday,
Chapter 4 Search Methodologies.
CSC 423 ARTIFICIAL INTELLIGENCE
Artificial Intelligence (CS 461D)
Mahgul Gulzai Moomal Umer Rabail Hafeez
Review: Search problem formulation
1 Using Search in Problem Solving Part II. 2 Basic Concepts Basic concepts: Initial state Goal/Target state Intermediate states Path from the initial.
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
Using Search in Problem Solving
Intelligent Agents What is the basic framework we use to construct intelligent programs?
Informed Search CSE 473 University of Washington.
Pathfinding Algorithms Josh Palmer Rachael Beers.
Informed Search Methods How can we make use of other knowledge about the problem to improve searching strategy? Map example: Heuristic: Expand those nodes.
Problem Solving and Search in AI Heuristic Search
Using Search in Problem Solving
CSC344: AI for Games Lecture 4: Informed search
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 561, Session 6 1 Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
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.
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.
Informed Search Strategies
Problem Solving and Search Andrea Danyluk September 11, 2013.
Graphs II Robin Burke GAM 376. Admin Skip the Lua topic.
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
Artificial Intelligence LECTURE 3 ARTIFICIAL INTELLIGENCE LECTURES BY ENGR. QAZI ZIA 1.
How are things going? Core AI Problem Mobile robot path planning: identifying a trajectory that, when executed, will enable the robot to reach the goal.
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.
A RTIFICIAL I NTELLIGENCE UNIT : 2 Search Techniques.
Artificial Intelligence LECTURE 4 ARTIFICIAL INTELLIGENCE LECTURES BY ENGR. QAZI ZIA.
Informed searching. Informed search Blind search algorithms do not consider any information about the states and the goals Often there is extra knowledge.
Informed Search Methods. Informed Search  Uninformed searches  easy  but very inefficient in most cases of huge search tree  Informed searches  uses.
Informed Search Include specific knowledge to efficiently conduct the search and find the solution.
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.
For Wednesday Read chapter 6, sections 1-3 Homework: –Chapter 4, exercise 1.
For Wednesday Read chapter 5, sections 1-4 Homework: –Chapter 3, exercise 23. Then do the exercise again, but use greedy heuristic search instead of A*
CSC3203: AI for Games Informed search (1) Patrick Olivier
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.
Heuristic Functions. A Heuristic is a function that, when applied to a state, returns a number that is an estimate of the merit of the state, with respect.
3.5 Informed (Heuristic) Searches This section show how an informed search strategy can find solution more efficiently than uninformed strategy. Best-first.
Search Methodologies Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
Best-first search is a search algorithm which explores a graph by expanding the most promising node chosen according to a specified rule.
For Monday Read chapter 4 exercise 1 No homework.
Example Search Problem A genetics professor – Wants to name her new baby boy – Using only the letters D,N & A Search through possible strings (states)
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Chapter 3.5 Heuristic Search. Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Lecture 3: Uninformed Search
For Monday Chapter 6 Homework: Chapter 3, exercise 7.
Artificial Intelligence Problem solving by searching CSC 361
Artificial Intelligence
Comp3710 Artificial Intelligence Thompson Rivers University
Chap 4: Searching Techniques
CMSC 471 Fall 2011 Class #4 Tue 9/13/11 Uninformed Search
Presentation transcript:

1 Chapter 4 Search Methodologies

2 Chapter 4 Contents l Brute force search l Depth-first search l Breadth-first search l Properties of search methods l Implementations l Depth first iterative deepening l Heuristics

3 Chapter 4 Contents Continued l Hill climbing l Best first search l Beam search l Optimal paths l A* algorithms l Uniform cost search l Greedy search

4 Brute Force Search l Search methods that examine every node in the search tree – also called exhaustive. l Generate and test is the simplest brute force search method: nGenerate possible solutions to the problem. nTest each one in turn to see if it is a valid solution. nStop when a valid solution is found. l The method used to generate possible solutions must be carefully chosen.

5 Depth-First Search l An exhaustive search method. l Follows each path to its deepest node, before backtracking to try the next path.

6 Breadth-First Search l An exhaustive search method. l Follows each path to a given depth before moving on to the next depth.

7 Comparison of Depth-First and Breadth-First Search l It is important to choose the correct search method for a given problem. l In some situations, for example, depth first search will never find a solution, even though one exists.

8 Properties of Search Methods l Complexity nHow much time and memory the method uses. l Completeness nA complete method is one that is guaranteed to find a goal if one exists. l Optimality & Admissibility nA method is optimal (or admissible) if it is guaranteed to find the best path to the goal. l Irrevocability nA method is irrevocable if, like hill climbing, it does not ever back-track.

9 Implementations l Depth-first search can be implemented using a queue to store states nBut a stack makes more sense nAnd enables us to create a recursive depth-first search function l Breadth-first search implementations are almost identical to depth-first nExcept that they place states on the back of the queue instead of on the front.

10 Depth-First Iterative Deepening l An exhaustive search method based on both depth-first and breadth-first search. l Carries out depth-first search to depth of 1, then to depth of 2, 3, and so on until a goal node is found. l Efficient in memory use, and can cope with infinitely long branches. l Not as inefficient in time as it might appear, particularly for very large trees, in which it only needs to examine the largest row (the last one) once.

11 Heuristics l Heuristic: a rule or other piece of information that is used to make methods such as search more efficient or effective. l In search, often use a heuristic evaluation function, f(n): nf(n) tells you the approximate distance of a node, n, from a goal node. l f(n) may not be 100% accurate, but it should give better results than pure guesswork.

12 Heuristics – how informed? l The more informed a heuristic is, the better it will perform. l Heuristic h is more informed than j, if: h(n)  j(n) for all nodes n. l A search method using h will search more efficiently than one using j. l A heuristic should reduce the number of nodes that need to be examined.

13 Hill Climbing l An informed, irrevocable search method. l Easiest to understand when considered as a method for finding the highest point in a three dimensional search space: l Check the height one foot away from your current location in each direction; North, South, East and West. l As soon as you find a position whose height is higher than your current position, move to that location, and restart the algorithm.

14 Foothills nCause difficulties for hill-climbing methods. nA foothill is a local maximum.

15 Plateaus nCause difficulties for hill-climbing methods. nFlat areas that make it hard to find where to go next.

16 Ridges nCause difficulties for hill-climbing methods nB is higher than A. n At C, the hill- climber can’t find a higher point North, South, East or West, so it stops.

17 Best-First Search l Works rather like hill-climbing: l Picks the most likely path (based on heuristic value) from the partially expanded tree at each stage. l Tends to find a shorter path than depth- first or breadth-first search, but does not guarantee to find the best path.

18 Beam Search l Breadth-first method. l Only expands the best few paths at each level. l Thus has the memory advantages of depth-first search. l Not exhaustive, and so may not find the best solution. l May not find a solution at all.

19 Optimal Paths l An optimal path through a tree is one that is the shortest possible path from root to goal. l In other words, an optimal path has the lowest cost (not necessarily at the shallowest depth, if edges have costs associated with them). l The British Museum procedure finds an optimal path by examining every possible path, and selecting the one with the least cost. l There are more efficient ways.

20 A* Algorithms l Uses the cost function: nf(node) = g(node) + h(node). l g(node) is the cost of the path so far leading to the node. l h(node) is an underestimate of how far node is from a goal state. l f is a path-based evaluation function. l An A* algorithm expands paths from nodes that have the lowest f value.

21 A* Algorithms (continued) l A* algorithms are optimal: nThey are guaranteed to find the shortest path to a goal node. l Provided h(node) is always an underestimate. (h is an admissible heuristic). l A* methods are also optimally efficient – they expand the fewest possible paths to find the right one. l If h is not admissible, the method is called A, rather than A*.

22 Uniform Cost Search l Also known as branch and bound. l Like A*, but uses: nf(node) = g(node). ng(node) is the cost of the path leading up to node. l Once a goal node is found, the method needs to continue to run in case a preferable solution is found.

23 Greedy Search l Like A*, but uses: nf(node) = h(node). l Hence, always expands the node that appears to be closest to a goal, regardless of what has gone before. l Not optimal, and not guaranteed to find a solution at all. l Can easily be fooled into taking poor paths.