Heurisitics Flashcards

(19 cards)

1
Q

Front

A

Back

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

What is a heuristic function in search algorithms?

A

A function that estimates the cost to reach the goal from a given state.

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

What are the two main properties of an admissible heuristic?

A
  1. It never overestimates the true cost to reach the goal.\n2. It is optimistic, meaning h(n) ≤ h*(n) for all nodes.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does it mean for a heuristic to be consistent (monotonic)?

A

For all nodes n and successors n’:
h(n) ≤ c(n, n’) + h(n’)
It ensures that the estimated cost always decreases along a path.

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

Can a heuristic be consistent but not admissible?

A

No. Consistency implies admissibility, but not vice versa.

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

What is the impact of a heuristic being inadmissible?

A

It can cause A* to find non-optimal paths or even miss the goal if not handled carefully.

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

What happens if a heuristic is zero everywhere?

A

A* becomes equivalent to uniform-cost search (Dijkstra’s algorithm).

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

What happens if a heuristic overestimates the cost?

A

The algorithm may become greedy and miss the optimal path.

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

Define the Manhattan distance heuristic. When is it admissible?

A

h(n) = |x₁ - x₂| + |y₁ - y₂| \nAdmissible in grid environments with only horizontal/vertical movement and uniform cost.

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

Define the Euclidean distance heuristic. When is it admissible?

A

h(n) = sqrt((x₁ - x₂)² + (y₁ - y₂)²)\nAdmissible if diagonal movement is allowed and cost corresponds to Euclidean distance.

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

What is the effect of scaling a heuristic by a constant factor >1?

A

It can make the heuristic inadmissible and cause non-optimal paths in A*.

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

What is the effect of scaling a heuristic by a constant factor <1?

A

The heuristic remains admissible, but A* behaves more like uniform-cost search (slower, more exploration).

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

What is the role of heuristics in A* search?

A

They guide the search towards the goal more efficiently by estimating remaining cost.

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

What is the function used by A* to rank nodes?

A

f(n) = g(n) + h(n)\nWhere g(n) is the cost to reach n, and h(n) is the estimated cost to goal.

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

What’s the danger of a heuristic that returns negative values?

A

It can cause incorrect prioritization and violate A*’s optimality guarantees.

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

What is a perfect heuristic?

A

A heuristic that returns the exact cost to the goal from any node. Denoted h*(n).

17
Q

Is a more accurate heuristic always better?

A

Not necessarily — more accurate heuristics can be more expensive to compute, which may offset the gain.

18
Q

What is a dominant heuristic?

A

Given two admissible heuristics h₁ and h₂, if h₁(n) ≥ h₂(n) for all n, then h₁ dominates h₂, and A* using h₁ will expand no more nodes than with h₂.

19
Q

What does informed search mean?

A

A search that uses heuristics to guide decision-making (e.g., A*, greedy search).