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.
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
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.
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.
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.
Articles by others on the same topic
There are currently no matching articles.