Search Flashcards

1
Q

What defines a search problem?

A
  1. initial state (e.g. London)
  2. sccuessor function (e.g. London->{Berlin, Rome})
  3. goal test (e.g. ex: are we in Paris? or impl: are we near a big tower?)
  4. path cost (e.g. km traveled)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a solution to a search problem?

A

A sequance of actions that leads us from the initial state to a goal state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do “Tree search algorithms” work?

A
  • generating successors of already-explored states (expanding states)
  • maintaining a list of states available for expansion (no closed list)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Implementation: sates vs. nodes what’s the difference?

A
  • A state is a representation of a phisical configuration
  • A node is a data structure constituting part of a search tree
    it includes parent, children, depth, path cost

States do not have parents, children, depth, or path cost!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do “Graph search algorithms” work?

A
  • generating successors of already-explored states (expanding states)
  • maintaining a list of states available for expansion and a list of already explored states (frontiet + closed list)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Search strategies…

A
  • define the order of node expansion
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Types of search strategies are…

A
  • uninformed search: basic algorithms
  • informed search: further information about solution costs (heuristics)
  • local search: “historyless”, one-step change
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Search strategies are evaluated by…

A
  • completeness: does it always find a solution if one exists?
  • time complexity: number of nodes generated/expanded
  • space complexity maximum number of nodes in memory
  • optimality: does it always find a least-cost solution?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

BFS

A

Breadth-first search

  • expand shallowest unexpanded node
  • frontier is a FIFO queue
  • goal test at generation

complete? Yes (if b is finite)
time? O(b^d)
space? O(b^d) every node is kept in memory
optimality? Yes (if cost = 1 per step); not optimal in general

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

UCS

A

Uniform-cost search

  • expand least-cost unexpanded node
  • frontier = queue ordered by cost, lowest first
  • goal test at expansion => otherwise might miss better solution

complete? Yes, if step cost has a lower bound
time? O(b^(1+x))
space? O(b^(1+x))
optimal? Yes, goal test at expansion time ensures optimality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

DFS

A

Depth-first search

  • expand deepest unexpanded node
  • frontier is a LIFO queue

complete? No, fails in infinte-depth spaces, spaces with loops
time? O(b^m) m … max depth
space? O(b*m), linear space!
optimality? No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

DLS

A

Depth-limited search

  • Depth-first search (DFS) with depth limitation, when reaching it report a cutoff
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

IDS

A

Iterative deepening search

  • Depth-limited search + systematically increase depth limit => gain completeness

complete? Yes
time? O(b^d)
space? O(b*m), linear space!
optimality? Yes, if step cost = 1, modifiable to explore uniform-cost tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Why IDS?

A

Iterative deepening search uses only linear space and not much more time than other uninformed algorithms.

Time: b/(b-1) * BFS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly