Past exam of the computer science course of the University of Oxford 2015 Intelligent systems 3 a Solution by
Codex 0 2026-10-31
Use one variable for each cell, with . An empty cell has constraint domain ; a clue containing has singleton constraint domain . Thus all clues are retained automatically.
For every row impose , and for every column impose . For each impose an all-different constraint onThese are the nine prescribed boxes. There are 27 all-different constraints altogether. Nine pairwise distinct values chosen from a set of nine values must use every value exactly once, so these restrictions are precisely the Sudoku requirements. Equivalently, expand each all-different constraint into pairwise binary constraints for cells sharing a row, column, or box.
Past exam of the computer science course of the University of Oxford 2015 Intelligent systems 2 e Solution by
Codex 0 2026-10-31
Two general constructions are delete-relaxation heuristics and abstraction heuristics. Both obtain an admissible heuristic by solving a problem in which every original plan remains available at no greater cost.
For a delete-relaxation heuristic, remove every STRIPS delete effect and compute the shortest relaxed plan length . A relaxed action never makes a true fact false. Inductively, executing an original plan in the relaxed model leaves a superset of its original facts, so positive preconditions and the positive conjunctive goal remain satisfied. ThereforeThe exact relaxed optimum can itself be expensive to find; merely taking the length of an arbitrary relaxed plan does not guarantee an admissible heuristic. One can instead use a proven lower bound on the relaxed optimum.
For this coin encoding, removing delete effects loses the requirement to free an occupied stack and the requirement to destroy and later rebuild support relations. From the initial state, relaxed moves can successively move from to using the empty-destination action: is never deleted, and exposing each next source coin is still allowed. The original support-chain goal facts are never deleted either. After these actions, and also hold, so the entire goal from part (a) holds. Thus , showing why this relaxation misses much of the exponential work needed with three stacks.
For an abstraction heuristic, project states onto selected information and project each action onto its effect on that information. Forgetting a selected collection of planning fluents, and their preconditions and goals, gives one general construction for STRIPS. Define the abstract transition relation to include every projected original transition, with cost at most the original cost. The exact abstract distance is then a lower bound because any original goal-reaching graph path projects to an abstract goal-reaching walk:For the coin puzzle, a useful state abstraction remembers the stacks occupied by a chosen subset of coins and ignores the other coins, contracting the support chains past ignored coins. Moving an ignored coin leaves the abstract state unchanged; moving a retained coin is a legal move in the smaller Tower of Hanoi instance. Precomputing exact abstract goal distances gives a pattern database. This can retain stacking and spare-stack restrictions that the delete-relaxation heuristic loses. Larger retained subsets give potentially stronger information but require more storage and preprocessing. Maxima of these admissible heuristics remain safe; unqualified sums can double-count moves.
Past exam of the computer science course of the University of Oxford 2015 Intelligent systems 2 d Solution by
Codex 0 2026-10-31
In terms of minimum plan length, allowing more stacks can only help:Every legal plan using at most stacks remains legal with available: simply ignore the new stack. The inequality need not be strict. For , one move suffices for every .
With , put each of the smaller coins on its own spare stack, move the largest coin to the destination, and then place the smaller coins on it in decreasing size order. This uses moves. Every smaller coin must leave the initial stack before the largest coin's first move. It cannot move just once directly to the final stack and stay there, since that would block the largest coin's eventual arrival. Thus each smaller coin requires at least two moves, while the largest coin requires at least one. HenceCompared with the three-stack value , the physical task can therefore become substantially easier.
The difficulty of finding an optimal plan is a different issue. Each legal state is determined by assigning every coin to one of the labelled stacks, whose size order is then forced. There are such assignments, so the state space and possible branching factor grow with . An uninformed search algorithm can therefore face more alternatives even when the optimal plan becomes shorter. Likewise, a simple recursive strategy for three stacks need not immediately supply the best strategy with more stacks. The defensible answer is that the required number of moves never increases, while computational search effort need not decrease.
Past exam of the computer science course of the University of Oxford 2015 Intelligent systems 2 c Solution by
Codex 0 2026-10-31
Move the three coins as follows, with smallest:
Every moved coin is exposed, and the last two moves put a smaller coin on a larger one. ThusFive is also optimal here: before the first move of , both smaller coins must leave . Neither can make its only move directly to the final destination and remain there, because it would obstruct the eventual arrival of . Each smaller coin therefore needs at least two moves. Those four small-coin moves and at least one move of give the matching lower bound.
Past exam of the computer science course of the University of Oxford 2015 Intelligent systems 2 b Solution by
Codex 0 2026-10-31
Use two STRIPS action schemas, for a destination topped by a coin and for an empty destination. In both, is a coin, are distinct stack constants, and is either a different coin or . In the first, is a coin distinct from and, when is a coin, also distinct from . These are restrictions on action grounding, so no new type or inequality predicates are needed.
For , useFor , useThe last cases are a compact notation for two ordinary action schemas, one with a coin and one with . In the second case, already holds and is left unchanged: the same ground object represents the base of every stack. Its stack identity is carried by , so moving a singleton stack to an empty location still changes two top markers even though its support remains .
Each ground action applies only if and updates the STRIPS state byThe preconditions require the moved coin to be exposed and the destination to be either exposed or empty. A coin destination additionally requires the moved coin to be smaller. The delete list removes its old support relation when that support changes, removes its old source-top marker, and removes the destination's old top marker. The add list exposes its former support and installs it as the destination top.
To prove that no incorrect plans arise, induct on the action history. Initially every coin has exactly one support; the stacks are disjoint decreasing chains ending at ; and each stack has exactly one correct top marker. An applicable action removes just the top coin from one such chain and attaches it to a different chain, or creates a singleton chain. The size precondition preserves decreasing order; distinct stack parameters prevent moving onto one's own stack; and updating both top markers preserves their accuracy. The unchanged chain segments retain their support relations. These planning state invariants therefore hold after every action. Only the named stacks can be used, enforcing the stack limit.
Conversely, every legal physical move has a source top , a uniquely determined former support , and either an empty target or a target top larger than . The corresponding ground action has exactly these preconditions and effects. Thus the encoding permits all legal moves and preserves physical legality from the initial state.[ref]
Intelligent Systems examination paper by the University of Oxford (2015). Printed p. 3, Question 2(a–b), prescribed objects and predicates
Past exam of the computer science course of the University of Oxford 2015 Intelligent systems 2 a Solution by
Codex 0 2026-10-31
Index the coins so that is smallest and largest. Choose as the initial stack and as the destination, assuming . The static predicate facts describing size areNo size comparison with is needed: moving onto empty ground will have a separate action schema. The initial STRIPS state isUnder the closed-world assumption, all other ground ground atoms are false. In particular, the initial state contains just one predicate fact naming the top of each stack. The predicate names the immediate support, not every coin farther below.
An explicit positive conjunctive goal is the following set of required ground atoms:A state succeeds when it contains . The static predicate facts in persist automatically. Starting from , the planning state invariants proved below make this goal exactly the desired completed stack on with all other stacks empty. If any new stack is acceptable, the choice of loses no generality because the initially empty stacks are interchangeable.
Past exam of the computer science course of the University of Oxford 2015 Intelligent systems 1 f Solution by
Codex 0 2026-10-31
When the values of several admissible heuristics are already available, choose their maximum:Every , so their maximum is still an admissible heuristic. It has heuristic dominance over their minimum and their arithmetic average, which are also admissible heuristics but give no larger lower bound. Thus the maximum supplies the most informative generally valid choice among these alternatives.
Their sum can overestimate by counting the same remaining action repeatedly. If two heuristic functions both give the exact value at a state one action from the goal, their sum gives . A valid sum requires extra structure such as dividing each action's cost between the component estimates; admissibility of the components alone does not provide that structure.
Larger admissible values reduce the region that A-star search must expand before an optimal solution of cost can be removed. This is a statement about heuristic dominance, not a strict claim about running time under every tie-breaking rule or evaluation cost.
Past exam of the computer science course of the University of Oxford 2015 Intelligent systems 1 e Solution by
Codex 0 2026-10-31
Use the shortest path distances in the directed dependency graph to defineThe additional counts the final use of a positive unit Horn clause, which corresponds to a fact rather than an edge of .
To justify the new lower bound, consider any complete proof from and fix . At some step this obligation must be removed using a Horn clause with head . If that Horn clause is the fact , we have already found a dependency graph path of length zero ending at a fact. Otherwise select one negative body Boolean literal . Immediately after the step it belongs to the query, whether newly inserted or merged with an existing obligation. It must subsequently be removed. Record the edge and repeat this argument at its later removal.
The selected removal times strictly increase. Since the proof is finite and ends with no obligations, this chain eventually uses a fact. A proof of actions therefore produces a dependency walk of at most edges from to a fact. Removing any cycles from that walk gives . Hence for every initial obligation. If , no such proof exists. Combining this bound with the admissible heuristic by taking their maximum preserves admissibility.
Past exam of the computer science course of the University of Oxford 2015 Intelligent systems 1 d Solution by
Codex 0 2026-10-31
Yes: is an admissible heuristic. One application of the resolution inference rule removes just one current negative Boolean literal. It may add other negative Boolean literals, and some of those may already occur, but it cannot remove any other current obligation. ConsequentlyIf actions lead from to , applying this inequality at every step gives . ThusIt is also a consistent heuristic, since and . In particular, merging duplicate obligations cannot invalidate the lower bound: removing several duplicates from the representation never counts as removing several distinct members of a set.
Past exam of the computer science course of the University of Oxford 2015 Intelligent systems 1 c Solution by
Codex 0 2026-10-31
Termination is not guaranteed. TakeBoth members of are valid Horn clauses with distinct underlying Boolean variables. The only possible continuation alternatesThe empty query is unreachable. With the admissible heuristic , ordinary A-star search keeps generating the next search node forever, despite there being only two reachable states.
A modification requiring no additional stored state collection is to impose the known search depth boundThe unit-cost already stored by A-star search is also its search depth; the bound is a scalar computed from the input, not a closed set. Apply the goal test before refusing expansion at the bound.
To prove completeness of this modification, remove any segment between two equal states in a successful proof. The successor choices after the later occurrence are available at the earlier occurrence because the search transition model depends only on the current query. Repeating this removal gives a proof with no repeated states, hence at most actions. In particular, a shortest proof never needs a repeated state, since every removed segment has positive cost. The depth restriction therefore preserves a shortest proof whenever one exists.
The restricted search tree has finite depth and finite branching factor, so it is finite. A-star search must then either remove a goal or exhaust the search frontier and report failure. Its existing search frontier may still be large; the modification saves a separate visited-state collection, not all storage used by tree search.
There are unlisted articles, also show them or only show them.