Search Flashcards

1
Q

What’s the difference between a reflex and a planning agent?

A

Reflex agents consider the present and, maybe, the past, but not the future. Planning agents, on the other hand, ask, “What if?” and consider potential consequences of their actions.

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

What does a search problem consist of?

A

A state space, a successor function, a start state, and a goal test.

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

What is the solution of a search problem?

A

A sequence of actions that transforms the start state to a goal state.

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

Describe state space graphs

A

Mathematical representations of a search problem. Nodes are abstracted configurations of the world, and arcs from nodes lead to their successors.

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

Describe state space trees

A

Similar to graphs, each node is a world configuration. The start is at the root; each child is a successor. A trail to a leaf corresponds to a plan to achieve that leaf state from the start.

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

What goes in a search tree’s “fringe”?

A

Partial plans under consideration

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

What kind of data structure does a DFS use for its fringe?

A

A LIFO stack

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

What’s the DFS time complexity?

A

O(b^m), where b is branching factor and m is the number of tiers in the tree

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

What’s the DFS space complexity?

A

O(bm), where b is branching factor and m is the number of tiers in the tree

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

Is DFS complete or optimal?

A

It’s only complete if it’s not an infinite tree. It isn’t optimal because it looks for the “leftmost” solution regardless of the depth of that solution. What if the solution can also exist on the shallow right side of the tree?

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

What kind of data structure does a BFS use for its fringe?

A

A FIFO queue

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

What’s the BFS time complexity?

A

O(b^s), where b is branching factor and s is the depth of the solution

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

What’s the BFS space complexity?

A

O(b^s) (more than DFS)

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

Is BFS complete or optimal?

A

It’s complete if a solution exists, and optimal if all costs are 1.

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

What kind of data structure does UCS use for its fringe?

A

A priority queue, where the priority is based on cumulative cost

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

What’s the UCS time complexity?

A

O(b^(C/epsilon)), where b is branching factor, C is the solution cost, and episolon is the minimum arc cost

17
Q

What’s the UCS space complexity?

A

O(b^(C/epsilon)), where b is branching factor, C is the solution cost, and episolon is the minimum arc cost

18
Q

Is UCS complete or optimal?

A

Yes on both counts; conditions of completeness are that it has a finite cost and minimum arc cost (epsilon) is positive

19
Q

What’s a heuristic?

A

A purpose-made function that estimates how close a state is to a given goal.

20
Q

What does A* search combine?

A

The backward (path) cost of UCS (g(n)) and the forward cost of greedy search (h(n)) to produce f(n)

21
Q

When should A* search stop? When SHOULDN’T it?

A

Stop when it dequeues a goal; don’t when it enqueues a goal.

22
Q

What’s an admissible heuristic?

A

A heuristic with cost >=0 and <= the actual path cost

23
Q

Contrast UCS and A*

A

UCS expands equally in all directions, whereas A* expands mainly towards its goal

24
Q

What defines a consistent heuristic?

A

The arc cost according to the heuristic is less than the actual arc cost for each arc.