Q4 — AO* on an AND–OR Decomposition
Trace AO* expansion by expansion — marked arcs, cost revision, and why S finally settles at 44.
The Question
An AND–OR graph: problem S decomposed into subproblems. Numbers = heuristic cost estimates; double circles are primitive (actual costs, born SOLVED, never expanded). Every edge costs 2. Tie-breakers: node labels; for AND nodes expand the highest-cost unsolved branch first.
The AND arcs (from the figure): at S, the pair (S→B, S→C) is joined by an arc — S is solved by B and C together, or by A alone. At A: (A→D, A→E) AND. At F: (F→H, F→I) AND. B is an OR node over E and F; C has the single child F; E has the single child G.
| # | Question | Official answer |
|---|---|---|
| 4.1 | First three nodes expanded (incl. S) | S,C,F (also accepted: C,F,B) |
| 4.2 | Value of S after the 1st, 2nd, 3rd expansions | 30,26,38 (also accepted: 26,38,40) |
| 4.3 | Final value of S | 44 |
The Topic in 60 Seconds
AO* alternates two phases:
- Expand: walk down from the root along marked arcs only (the currently-believed-best decomposition) to an unexpanded (live) node; expand it.
- Revise: for every node whose children changed (deepest first), recompute each option —
- OR option: child cost + edge cost (take the best one)
- AND option: (all needed) mark the cheapest, and propagate the new cost up to the root.
Primitive nodes enter the graph already SOLVED; a node becomes SOLVED when all children of its marked option are SOLVED.
Deep-dive: AO* and Goal Trees.
The Trace — five expansions to a solved root
Initial costs: S=40, A=50, B=8, C=18, E=8, F=12; primitives D, G, H, I born SOLVED at 10 each.
Expansion 1 — S. Options:
AND(B, C):OR(A):
Mark AND(B, C) → S = 30 ✓ (value after 1st expansion).
Expansion 2 — C (marked path hits B and C; tie-breaker 2: C is the costlier branch, 18 > 8). C's only option: → C = 14. Propagate: ✓
Expansion 3 — F (marked path: B(8), F(14→ via C); F costlier than B).
F's AND(H, I): , both primitive → F = 24, SOLVED. Propagate:
- , SOLVED (its only child F is solved)
- ✓
Expansion 4 — B (only unsolved node left on the marked path). B is OR:
- via E: ← cheaper
- via F:
Mark E → B = 10. Propagate: .
Expansion 5 — E (marked path S→B→E). E's child: , G primitive → E = 12, SOLVED. Propagate:
- via E → B SOLVED
- — and since B, C are solved, S is SOLVED. Stop.
Final value of S = 44 ✓. Solution subtree: S → B→E→G and C→F→H,I.
The heuristic here is a mix: expanding C and F raised estimates (children cost more than the parent's optimistic guess), while B's cheap E branch lowered S. AO* simply keeps revising until the root is solved — monotonic increase is not guaranteed unless every underestimates.
Interactive AO* trace — watch the marked arcs (green) and S's value evolve, with the scrap-paper working under each step:
Answers, decoded
- 4.1 — expansions in order: S, C, F (the accepted
C,F,Bvariant counts S's own expansion as step 0 and lists the next three: C, F, B). - 4.2 — S after each: 30, 26, 38 (the accepted
26,38,40variant reports after C, F, B instead). - 4.3 — final: 44.
Tricks & Tips for This Question Family
Answers: 4.1 S,C,F · 4.2 30,26,38 · 4.3 44