I’m missing something:
(in progress plans $Plans) (collect $Plan) *(plan $Plan) *($Plan requires $Item) ($Item is handled) (into $Plans)
Each plan requires two items, and is in progress if either of the two items is handled.
However, I’m getting the backtracking wrong here, because a plan that has both items handled accumulates twice.
(with some logging)
> (in progress plans $) plan: #fixing-the-truck, item: #duct-tape plan: #fixing-the-truck, item: #gas-can Query succeeded: (in progress plans [#fixing-the-truck #fixing-the-truck])
Usually, this resolves by adding a new rule, and thus a new choice point. Let’s see.