Search Flashcards
What is a path of search?
Goal > Problem > Means > Solution > Sequence
What are all the states ?
Initial state, actions, transition model.
Goal test: path cost, solution
What is a state?
A state is a (representation of) a physical configuration.
What is a node?
A node is a data structure constituting part of a search tree that
includes state, parent node, ac on, path cost g(x), depth.
BFS?
- Guaranteed to reach sol if one exists
- Shortest/cheapest sol (in terms of no. of operations)
- Can take time to reach sol.
- b^d memory req (space complexity)
- b+b^2+b^3+….+b^d nodes expanded (time complexity)
DFS?
- Guaranteed to reach sol if one exists
- Sol not necessarily the best
- Time taken less than BFS
- Memory req. less than BFS: b*m (branching factor * max depth)
- May not terminate if wrong branch expanded
DLS ?
- Good space complexity
- Need ‘depth limit’ on branches
- Will then always terminate
- Sol guaranteed if one exists within that depth bound
IDS?
Same as DLS, but with iterative deepening by d=d+1, every time a solution is not found, until it is.
- Useful is the search space is large and the max depth d of solution isn’t known.
- Trade off time for memory
- Memory req: b*d (space complexity)
- Nodes expanded: converges to b^d (really its the ∑(d+1-i)*b^i, i=0) (time complexity)
- Longer than BFS but savings on memory are insane
- May repeat nodes!
3 ways to avoid repeated states in IDS?
- Do not return to the state you have just come from
- Do not create paths with cycles in them
- Do not generate any state that was ever generated before
Goal vs data driven?
- Data driven: initial state to the goal
- Goal driven: goal to the initial state
Usually more efficient, as few paths actually reach the goal. Often used in expert systems, and prolog.
Bi-Directional Search ?
- If unsure of branching factor, then can search from both ends for best results
Pros:
- Efficient: 2b^(d/2) time complexity
Cons:
- Must be able to generate predecessors of states
- Must be efficient way to check if each node appears in other search
- Impractical for large d
- Space complexity: b^(d/2) memory req.