Week 2: From Simple Search to Informed Search Flashcards
Problem types
- Deterministic, fully observable → single-state problem
- Agent knows exactly which state it will be in; solution is a sequence
- Non-observable → conformant problem
- Agent may have no idea where it is; solution (if any) is a sequence
- Nondeterministic and/or partially observable → contingency problem
- percepts provide new information about current state
- solution is a contingent plan or a policy
- often interleave search, execution
- Unknown state space → exploration problem (“online”)
Single-state problem formulation
A problem is defined by four items:
* initial state
* successor function
* goal test, can be
* path cost
Implementation:
states vs. nodes
- A state is a (representation of) a physical configuration
- A node is a data structure constituting part of a search tree and includes parent,
children, depth, path cost g(x)
Measuring problem-solving
performance
Completeness: Is the algorithm guaranteed to find a solution when there is one?
* Optimality: Does the strategy find the optimal solution?
* Time complexity: How long does it take to find a solution?
* Space complexity: How much memory is needed to perform the search?
- Time and space complexity are measured in terms of
- b — maximum branching factor of the search tree
- d — depth of the least-cost solution
- m — maximum depth of the state space (may be ∞)
Search Strategies
A strategy is defined by picking the order of node expansion
Uninformed strategies use only the information available in the problem definition
- Breadth-first search
- Uniform-cost search
- Depth-first search
- Depth-limited search
- Iterative deepening search
Properties of breadth-first search
- Completeness - Yes (if b is finite)
- Time complexity - O(bd+1 ), i.e., exponential in d
- Space complexity - O(bd+1 ) (keeps every node in memory)
- Optimal - Yes (if cost = 1 per step); not optimal
in general
Uniform-cost search
- Complete - Yes, if step cost ≥ ε
- Time - g ≤ cost of optimal solution
- Space - of nodes with g ≤ cost of optimal solution
- Optimal - Yes—nodes expanded in increasing order of g(n)
Depth-first
search
- Complete - No: fails in infinite-depth spaces
- Time - terrible if m is much larger than d, but if solutions
are dense, may be much faster than breadth-first - Space - linear space
- Optimal - No
Iterative
deepening
search
- Complete - Yes
- Time- O(b^d)
- Space - O(bd)
- Optimal - Yes, if step cost = 1