Solution

ID: past-exam-of-the-computer-science-course-of-the-university-of-oxford/2021/artificial-intelligence/3/d/solution

A sufficient sequential bound is for any physically valid initial and goal states, assuming every bucket is directly reachable. A goal must be consistent with the stated one-hand and one-location invariants. No bound can guarantee a satisfying plan for an inconsistent goal, such as requiring the same ball in two buckets simultaneously.
Here is a constructive bound independent of the number of buckets. If the hand initially holds a ball, drop it in the current bucket, costing at most one action. For each ball that should end in a bucket, move to its current bucket, pick it up, move to its target bucket, and drop it: at most four actions per ball, omitting unnecessary actions. If the final state requires a held ball, reserve it for last, move to its current bucket and pick it up, costing at most two more actions. Finally move the arm to its prescribed final location, costing at most one action.
If the final hand is empty, this costs at most . If it holds a ball, only balls need bucket placement, giving at most for . Thus the common bound is valid. A partially specified, physically consistent goal can first be completed to a valid target state. For the special goal of putting all balls in one bucket with no specified final arm location, is already a sufficient bound.
A separate finite-state check is available: physically valid configurations number
counting an empty hand or the choice of a held ball, and the arm's location. A shortest plan never repeats a state, so also bounds a shortest solution whenever one exists. The constructive bound is much smaller.
For an encoding requiring a fixed horizon, permit idle layers, or run SATPlan through all horizons up to the bound. A plan shorter than need not be padded by arbitrary physical actions. The sequential bound also suffices for a parallel encoding, since a serial plan is a permitted special case.

New to topics? Read the docs here!