Solution

ID: past-exam-of-the-computer-science-course-of-the-university-of-oxford/2015/intelligent-systems/2/b/solution

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 , use
For , use
The 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 by
The 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]

New to topics? Read the docs here!