Lecture 3 - Blind Search Strategies Flashcards
What is the objective of a search strategy?
To systematically explore the state space using a search tree
When a node is added to the tree, it is ______.
Generated
When a node’s children are added to the tree, the node is _______
Expanded
What is breadth first search?
Where all nodes at depth n are expanded before moving on to nodes at depth n+1.
I.e. doing rows of the tree before columns
What is a search strategy?
A rule for determining which node to expand next
What is depth first search?
Most recently generated nodes are expanded first.
i.e. going down the tree before going sideways
What does a search strategy determine?
The order in which the tree will be constructed/traversed
When the least recently generated node is expanded next, the search strategy is
________ search
breadth first
When the most recently generated node is chosen to be expanded next, the search strategy is _________
depth first
In depth first search, if a node cannot be expanded and is not the goal state, the search strategy will ____________
backtrack
Before a search strategy backtracks, it
a) must remove the just expanded nodes from the unexpanded list
b) must not remove the just expanded nodes from the unexpanded list
a) must remove them
Why are depth/breadth first known as blind search strategies?
They do not use any extra information when deciding which node to expand next
Blind search is also known as
uninformed search
What is the completeness of breadth first search?
Why?
Complete
The program will eventually get to any depth d
What is the completeness of depth first search?
Why?
Incomplete
If a search space is infinite the program may never get to the branch with the solution
In terms of the number of moves in the solution, which blind search strategy is better and why?
Breadth first is optimal because clearly the first solution encountered has the minimum depth and hence number of moves.
Depth first might find a solution really deep down a branch - not optimal
With
branching factor b
Solution depth d from the root
Maximum depth m
What is the time complexity of Breadth First and Depth First searches?
Breadth first:
Max. number of nodes expanded: 1 + b1 + b2 + … + bd
So worst case time complexity = O(bd)
Depth first:
Worst case: Solution is last node reached
So worst case time complexity = O(bm)
With
branching factor b
Solution depth d from the root
Maximum depth m
What is the space complexity of Breadth First and Depth First searches?
Breadth first:
All nodes at depth n must be kept in memory prior to expanding n+1
So space complexity = O(bd)
Depth first:
When backtracking old nodes are not needed so can be discarded
Space complexity: O(bm)
What is depth limited search?
A limit is placed on the depth that can be explored before backtracking occurs
What is iterative deepening search?
Depth limited search but iterates with increasing limit. So if solution not found with limit m, try m+1
What is bidirectional search?
Search from start state to goal state and at the same time, search backwards from goal to start
When the meet, found a solution.
What is the time complexity of bidirectional search?
O(bd/2)
Because each path is going to be half the length (they will meet halfway)
What are some possible issues with bidirectional search?
Must be able to easily work backwards
May be many goal states
Must be easy to test whether the searches have met
What is uniform cost search based on?
Breadth first
What is uniform cost search?
A search where each node has an associated cost
Always expand the cheapest node next
How is the cost of a node calculated in uniform cost search?
The sum of the costs of the nodes leading to it