2026 Term 1 · Afternoon — Worked Solutions

Every question solved from scratch: the reasoning, the algorithm trace, and the shortcuts that get you to the answer fast.

Q1SEARCH

Q1 — Search: Water Jug BFS

Three move types on the 5-3-2 jug set: BFS level-counting finds 212 to 131 in three pours and proves nothing shorter exists.

SEARCHWater jugBFSState space
Q2SEARCH FOR OPTIMAL SOLUTION

Q2 — Search Algorithms Theory

Three guarantee questions: DFID's closed-list secret, which algorithms survive an unknown heuristic, and why wA* at infinity forgets g entirely.

SEARCH FOR OPTIMAL SOLUTIONDFIDOptimalityWA*
Q3GAMES

Q3 — Games: Alpha-Beta Pruning Puzzle

Design the leaf values yourself: with window (1,3) the best you can do is kill B and D, and four assignments achieve it.

GAMESAlpha-BetaCutoffs
Q4GAMES

Q4 — Games: SSS* Algorithm

Ten leaves, three subtrees: SSS* crowns seven leaves SOLVED, and the four first-born witnesses get purged the moment their MAX ancestors fall.

GAMESSSS*Game tree search
Q5PROBLEM DECOMPOSITION

Q4 — AO* Problem Decomposition

Edge cost 2, shared primitive H feeding three parents, and a marker that tours C-A-B-F before every keyed value clicks into place.

PROBLEM DECOMPOSITIONAO*AND-OR graphs
Q5RULE BASED EXPERT SYSTEMS

Q5 — Rule Based Expert Systems

Nine mushroom WMEs, four joins, four surviving tuples - and one fresh timestamp (107) hands recency straight to R1.

RULE BASED EXPERT SYSTEMSReteConflict resolution
Q7AUTOMATED PLANNING

Q7 — Automated Planning Theory

GraphPlan's fine print: when two orderings are twins, exactly which precondition/effect overlaps make actions mutex, and the monotonicity of NON-mutex.

AUTOMATED PLANNINGGraphPlanMutex
Q8AUTOMATED PLANNING

Q8 — Automated Planning: GraphPlan

FSSP forward, BSSP backward, then a full GraphPlan run: three actions fire, two writers matter, and the 5-step plan pops out of the mutual-exclusion maze.

AUTOMATED PLANNINGGraphPlanSTRIPSMutex
Q9CONSTRAINT SATISFACTION

Q8 — Constraint Satisfaction: AC and PC

Three mod-relations over {1..4}: compute the tables, watch arc-consistency shave value 3 off every domain, then hunt the unique solution 2,4,1.

CONSTRAINT SATISFACTIONArc consistencyPath consistency