Search - PowerPoint PPT Presentation

About This Presentation
Title:

Search

Description:

Search Exhaustive/Blind Search Methods Depth First Search Breadth First Search Heuristic Methods Hill Climbing Beam Search Best First Search Goal You should be ... – PowerPoint PPT presentation

Number of Views:114
Avg rating:3.0/5.0
Slides: 13
Provided by: cseUnrEd8
Learn more at: https://www.cse.unr.edu
Category:
Tags: depth | first | search

less

Transcript and Presenter's Notes

Title: Search


1
Search
  • Exhaustive/Blind Search Methods
  • Depth First Search
  • Breadth First Search
  • Heuristic Methods
  • Hill Climbing
  • Beam Search
  • Best First Search

2
Goal
  • You should be able to tell if search is the best
    way to solve a problem and
  • If so, which search method is most suitable

3
Find a Path
4
A
B
C
4
3
5
5
s
G
4
3
F
D
E
2
4
4
Find a Path
  • Shortest Path
  • Any Path
  • Blind Search
  • BFS
  • DFS

5
Search Tree
  • List all possible paths
  • Eliminate cycles from paths
  • Result A search tree
  • A special kind of semantic tree where each node
    denotes a path

6
Search Tree Terminology
  • Root Node
  • Leaf Node
  • Ancestor/Descendant
  • Branching factor
  • Complete path/Partial path
  • Expanding open nodes results in closed nodes

7
Search Trees - Analysis
  • Exponential explosion of possible paths
  • Branching factor b, Depth d, how many possible
    paths?

8
Depth First Search (DFS)
  • Form a one element queue consisting of a
    zero-length path that only contains root
  • Until the first path in the queue terminates at
    the goal node or the queue is empty
  • Remove the first path from the queue create new
    paths by extending the first path to all
    neighbors of the terminal node
  • Reject all new paths with loops
  • Add the new paths if any to the FRONT of the
    queue
  • If the goal node is found?success else failure

9
Breadth First Search (BFS)
  • Form a one element queue consisting of a
    zero-length path that only contains root
  • Until the first path in the queue terminates at
    the goal node or the queue is empty
  • Remove the first path from the queue create new
    paths by extending the first path to all
    neighbors of the terminal node
  • Reject all new paths with loops
  • Add the new paths if any to the BACK of the queue
  • If the goal node is found?success else failure

10
BFS or DFS
  • DFS is good when partial paths quickly reach dead
    ends or become complete paths. DFS is bad when
    there are long paths (infinite)
  • BFS works on trees that are effectively
    infinitely deep, bad when all paths lead to the
    goal node at more or less the same depth. BFS is
    not good when b is large

11
NonDeterministic Search
  • Form a one element queue consisting of a
    zero-length path that only contains root
  • Until the first path in the queue terminates at
    the goal node or the queue is empty
  • Remove the first path from the queue create new
    paths by extending the first path to all
    neighbors of the terminal node
  • Reject all new paths with loops
  • Add the new paths at RANDOM places in the queue
  • If the goal node is found?success else failure

12
NDFS
  • When you do not have enough information to choose
    between BFS and DFS
Write a Comment
User Comments (0)
About PowerShow.com