m4 heuristics1

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/30

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

31 Terms

1
New cards
Q: What is the idea behind best-first search?
Use an evaluation function f(n) to estimate a node’s desirability and always expand the most desirable node (fringe ordered by decreasing desirability).
2
New cards
Q: In greedy best-first search, what is f(n)?
f(n)=h(n), an estimate of the cost from n to a goal (e.g., straight-line distance to Bucharest in the Romania map on p.5).
3
New cards
Q: Intuition of greedy best-first?
Expand the node that appears closest to the goal.
4
New cards
Q: Properties of greedy best-first (completeness, time, space, optimality)?
Complete: No (can loop). Time: O(b^m) (often much better with good h). Space: O(b^m). Optimal: No.
5
New cards
Q: What is the A* evaluation function?
f(n)=g(n)+h(n), where g(n) is the path cost so far and h(n) estimates cost to goal.
6
New cards
Q: What does f(n) represent in A*?
Estimated total cost of a cheapest solution path through n.
7
New cards
Q: Define an admissible heuristic.
h(n)\le h^*(n) for all n; it never overestimates the true cost to a goal (i.e., optimistic).
h(n)\le h^*(n) for all n; it never overestimates the true cost to a goal (i.e., optimistic).
8
New cards
Q: With an admissible h, which A* variant is optimal?
A* with tree-search is optimal.
9
New cards
Q: Define a consistent (monotone) heuristic.
For every edge n \xrightarrow{a} n': h(n) \le c(n,a,n') + h(n'). Equivalently, f(n) is non-decreasing along any path.
For every edge n \xrightarrow{a} n': h(n) \le c(n,a,n') + h(n'). Equivalently, f(n) is non-decreasing along any path.
10
New cards
Q: With a consistent h, which A* variant is optimal?
A* with graph-search is optimal.
11
New cards
Q: How does A* expand nodes (geometric intuition)?
In increasing f “contours” (see the f-contour visualization on p.23).
12
New cards
Q: A* properties (completeness, time, space, optimality)?

Complete: Yes (unless infinitely many nodes have f ≤ f(G)). Time: exponential. Space: stores all nodes (large). Optimal: Yes.

13
New cards
Q: Define h_1 for 8-puzzle.
Number of misplaced tiles.
14
New cards
Q: Define h_2 for 8-puzzle.
Sum of Manhattan distances of tiles from their goal positions.
15
New cards
Q: Example values from the slides?
For state S: h_1(S)=8, h_2(S)=18.
16
New cards
Q: What does it mean when one heuristic dominates another?

If h_2(n) ≥ h_1(n) for all n and both are admissible, h_2 dominates h_1 and typically expands fewer nodes (e.g., 73 vs 227 at depth 12; 1,641 vs 39,135 at depth 24).

17
New cards
Q: When do we prefer local search?
When the path is irrelevant—only the goal state matters (e.g., n-queens). Keep a single current state and try to improve it.
18
New cards
Q: What is the n-queens problem (setup)?

Place n queens on an n x n board with no two attacking (rows, columns, diagonals).

19
New cards
Q: Hill-climbing in one line?
“Like climbing Everest in thick fog with amnesia” (choose the best neighbor; see pseudocode on p.30).
20
New cards
Q: Main failure mode of hill-climbing?
Can get stuck in local maxima/plateaus/shoulders (diagram p.31).
21
New cards
Q: Typical objective function for 8-queens in slides?
h = number of attacking queen pairs (example shows h=17; local minimum example with h=1).
22
New cards
Q: Core idea of simulated annealing?
Occasionally accept “bad” moves to escape local maxima, but decrease their probability over time via a temperature schedule T (pseudocode p.34).
23
New cards

Q: Theoretical guarantee of simulated annealing (given slow cooling)?

Finds a global optimum with probability approaching 1.
24
New cards

Q: Example real-world uses mentioned of simulated annealing?

VLSI layout, airline scheduling, etc.
25
New cards

Q: What does local beam search keep track of?

k states at once. From all successors of those k, select the best k for the next iteration; stop if any is a goal.

26
New cards
Q: How do genetic algorithms generate successors?
By combining two parent states (selection, crossover, mutation) over a population of size k.
27
New cards
Q: Typical representation and scoring in Genetic Algorithms?
Bit-string (or finite alphabet) representation with a fitness function to evaluate states.
28
New cards
Q: n-queens fitness used in slides?
Number of non-attacking queen pairs (min 0, max 8 x 7/2=28); slide shows selection percentages (e.g., 24/(24+23+20+11)=31%) and a crossover diagram (p.38).
29
New cards
Q: Greedy best-first vs A*—what’s the key difference?
Greedy uses only h(n) (goal distance) and can be fast but non-optimal; A* balances cost-so-far and goal distance via g+h and is optimal with admissible/consistent h.
30
New cards
Q: Why can A* be memory-hungry?
It keeps all generated nodes (frontier + explored) to ensure optimality.
31
New cards
Q: What’s the benefit of a more informed heuristic?
Fewer nodes expanded (dominance), often orders-of-magnitude savings.

Explore top flashcards

GEOG
Updated 76d ago
flashcards Flashcards (23)
Immuno Final
Updated 961d ago
flashcards Flashcards (142)
pe 2nd
Updated 418d ago
flashcards Flashcards (31)
AP japanese kanji
Updated 955d ago
flashcards Flashcards (410)
GEOG
Updated 76d ago
flashcards Flashcards (23)
Immuno Final
Updated 961d ago
flashcards Flashcards (142)
pe 2nd
Updated 418d ago
flashcards Flashcards (31)
AP japanese kanji
Updated 955d ago
flashcards Flashcards (410)