Intelligence, Agency & Consciousness · Paper 0105

When a failed state remembers its budget

Zhou, Barták and Dovier turn tabling into a planner. Picat remembers explored states, failed resource limits and shared structure, so iterative search can reuse its past instead of repeatedly paying for it.

Intelligence, Agency & Consciousness · Paper 0105

When a failed state remembers its budget

Rajesh Ranjan Mahapatra

Zhou, Barták and Dovier turn tabling into a planner. Picat remembers explored states, failed resource limits and shared structure, so iterative search can reuse its past instead of repeatedly paying for it.

© 2026 Rajesh Ranjan Mahapatra. 25 min read

When a failed state remembers its budgetAll AI Research Library

TLDR

Five-point orientation
  1. A planning problem becomes path finding. Users define final states and state-changing actions; the Picat planner supplies reusable search procedures.
  2. Tabling turns revisits into lookups. Every encountered state is cached, preventing repeated expansion and supporting mode-directed optimal answers.
  3. A failed bound is useful information. A repeated state is pruned when its remaining resource is no better than a limit that already failed, and reopened only with more resource.
  4. Representation controls the table. Ordered structured states erase irrelevant names, break symmetries and expose shared list tails through hash-consing.
  5. Modelling still matters. Action order, deterministic commitment, domain rules and admissible heuristics changed the solved-instance counts in the reported IPC’14 experiments.
01 · Why table a planner?

Logic programming was natural for planning, but naïve Prolog forgets too much

Planning and logic programming share states, rules and search. Yet a depth-first interpreter can revisit the same state along many histories, repeat the same failed work and restart iterative deepening with no memory of earlier bounds.

The paper locates Picat in a long line from PLANNER and Prolog to tabled logic programming. A planner can be written recursively: if the current state is final, return an empty plan; otherwise choose an action, recurse from its successor and prepend the action. The specification is compact, but unrestricted backtracking may traverse cycles and re-expand converging paths indefinitely.

Tabling caches selected calls and answers. In a state-space search, the table is analogous to state marking: a call for a state can reuse an answer or failure computed earlier. This changes recursive logic programming from an unremembering tree walk into a search over an implicit graph. Cycles require fixed-point evaluation, but duplicate work becomes identifiable.

Picat combines logic variables, pattern matching and backtracking with arrays, maps, loops, functions, constraints and tabling. The planner module hides the table declarations from most users. A domain modeller supplies final/1 and action/4; built-ins perform unbounded, resource-bounded, iterative-deepening or branch-and-bound search.

The paper’s argument is not tabling alone. Planning performance depends on the identity of a state. Structured data can omit object names that make no difference, ordered lists can collapse permutations, hash-consing can share repeated subterms, action rules can commit when a choice is safe, and admissible estimates can reject paths whose remaining budget cannot cover the goal.

Worked example 1 · two roads converge

Suppose S reaches A and B, and each reaches C. A tree search expands C twice and repeats every continuation beneath it. A tabled search creates one call for C. The second arrival consults the stored result, provided state representation makes the two C terms equal.

Causal probe 1 · why can elegant recursion still perform badly?

Logical compactness does not imply operational sharing. Without a memory keyed by states, the same subproblem is recomputed for every path that reaches it. Tabling adds dynamic-programming structure to the recursive formulation.

Tree search duplicates a converging state while tabling shares itOn the left two branches contain separate copies of state C; on the right both branches point to one tabled C node and its shared continuation to the goal.UNTABLED TREESABCCTABLED GRAPHSABCG
Tabling changes the computational shape: paths may remain distinct, but an equal state denotes one cached subproblem.Reconstruction from §§1 and 3.
02 · The Picat substrate

Pattern matching chooses a rule; the arrow chooses whether choice remains

Picat’s syntax gives domain authors control over backtracking. Backtrackable rules preserve alternatives; non-backtrackable rules commit after head matching and condition success.

A predicate rule has a head, an optional condition and a body. With the backtrackable arrow, failure in the body returns control to the original call so another applicable rule can be tried. With the non-backtrackable arrow, the remaining rules are discarded for that call. Functions use non-backtrackable rules.

This distinction matters in action generation. Most planning actions are nondeterministic choices: several moves may be applicable and must remain available to search. A rule that deterministically unloads a package already at its destination, however, can safely commit if domain knowledge proves that postponing it cannot improve an optimal plan.

Pattern matching can destructure a state directly. An as-pattern simultaneously binds the whole structure and its components. Loops and list comprehensions make conditions such as “every truck is empty” readable. Arrays support indexed configurations; ordered lists support canonical multisets. A dollar prefix ensures that a structure in an argument is treated as data rather than a function call.

Picat is dynamically typed and multi-paradigm. The paper focuses on the planner and tabling, not on a claim that one purity discipline governs every construct. Imperative updates, constraint modules and logic variables coexist. Operational choices are explicit enough for a modeller to affect search without writing a planner from scratch.

Worked example 2 · unload without a branch

If a truck is carrying a package whose destination equals its current location, a complete Transport model can put this action in a committed rule ahead of general choices. The condition proves applicability; the arrow says not to backtrack into alternatives at that call.

Causal probe 2 · when does commitment endanger optimality?

Whenever another applicable action could lead to a cheaper solution. The basic load rule must remain nondeterministic: forcing a truck to pick up every co-located package can consume capacity and destroy an optimal cooperative plan.

Backtrackable and committed Picat action rulesA matched call branches through several backtrackable actions on the left, while a satisfied commitment gate keeps one deterministic action on the right.MATCH STATEcondition succeedsaction 1action 2action 3?=> alternatives remainMATCH + SAFE RULEdomain condition proves commitmentONE ACTIONdiscard later rules=> commit
The arrow is operational knowledge. Backtracking explores genuine alternatives; commitment is justified only by domain structure that preserves the desired answer.Reconstruction from §§2, 4 and 6.1.
03 · Mode-directed tabling

Cache the subproblem, and keep the best answer for each input

A table declaration can distinguish inputs, outputs and optimised values. For the path predicate, Picat tables one minimum-cost answer for each starting state.

The declaration table (+,-,min) treats the state as input, the path as output and cost as a minimised answer. When a call repeats with the same input state, the table can supply or refine its stored result. An nt mode excludes an argument from variant checking and answer storage where the planner needs inherited data to flow without changing call identity.

The generic path relation has a final-state rule returning empty path and zero cost. Its recursive rule selects an action, obtains a path from the successor, prepends the action and adds costs. On an acyclic graph, a first answer may later be replaced by a cheaper one. With cycles, linear tabling reevaluates calls until a fixed point is reached.

The paper’s directed acyclic graph yields this replacement visibly. Search first follows a→b→c→d at cost eight and tables it for a. Backtracking later tries a→c→d at cost five. Because the cost argument uses min, the shorter answer replaces the longer one and becomes final.

The comparison with Dijkstra is precise but limited. For a single-source shortest-path problem, linear tabling resembles Dijkstra while storing shortest continuations from encountered states to the goal rather than distances from the source to every encountered state. It remains a logic-program evaluation strategy, not a textual implementation of Dijkstra.

table (+, -, min) path(S, [], 0) if final(S) path(S, [Action|Rest], C) if action(S,S1,Action,ACost), path(S1,Rest,C1), C = ACost + C1 one minimum-cost answer is retained per input state S

Worked example 3 · replace eight with five

The initial table entry for a records a three-edge route of cost eight. A later branch reaches c directly and reuses c’s stored continuation to d, producing cost five. Mode-directed tabling compares the answers and keeps the cheaper one.

Causal probe 3 · why table by state rather than path prefix?

The future subproblem is determined by the current state, not by how it was reached, provided cost accounting and domain dynamics satisfy that Markov-style assumption. Including the whole prefix in the key would make converging histories look different and destroy reuse.

A minimum table entry is replaced by a cheaper pathThe graph first records a to b to c to d at cost eight, then discovers a to c to d at cost five and overwrites the table entry for a.abcdcost 3cost 3cost 2cost 3table[a]: cost 8 → replace with cost 5minimum answer survives
Mode-directed tabling makes optimisation local to a call key: alternative derivations compete to improve one stored state-to-goal answer.Reconstruction from §3 and Figure 1.
04 · The planner interface

Two domain predicates sit above four search strategies

The planner module abstracts the table machinery. A model defines what counts as final and which action transforms a state, then chooses a built-in suited to bounded feasibility or optimality.

final(S) recognises a goal state. action(S,NextS,Action,ACost) enumerates legal transitions, returns a successor and a non-negative cost, and names the chosen action. If only length matters, each action costs one. Rule order affects the search order, while committed rules can suppress later alternatives.

best_plan_unbounded performs depth-unbounded tabled search and then compares the found optimum with a supplied limit. Once a state fails, it is not explored again. This is suitable where dead ends are useful and an external resource horizon is unnecessary.

plan performs resource-bounded search. best_plan repeatedly invokes it from an initial limit of zero, relaxing the limit until a plan is found. Unlike ordinary IDA*, tabled information can survive the iterations. best_plan_bb first finds a plan, then imposes successively stricter limits until no better plan exists.

The function current_resource() reveals the remaining bound of the latest planner call. A domain model can compare it with an admissible estimate and fail early when the estimate exceeds the remaining resource. The implementation walks the call stack to find the relevant planner frame; this is a pragmatic interface between generic search and a domain heuristic.

Worked example 4 · unit and weighted planning

For Parking, every move costs one, so optimisation minimises action count. For Transport, a road contributes its weight while load and unload each cost one. The same action/4 interface accommodates both by returning the appropriate ACost.

Causal probe 4 · why require non-negative action cost?

Resource bounds must decrease monotonically along a path, and minimum-cost tabling needs a well-behaved objective. Negative cycles would let a plan improve without limit and invalidate the pruning logic.

Domain predicates plug into four Picat planner searchesFinal and action predicates feed a planner module that branches to unbounded search, bounded search, iterative deepening and branch and bound.final(S)goal recogniseraction/4successor + costPLANNERtabled state searchbest_plan_unboundedplan · one boundbest_plan · iterativebest_plan_bb
A small modelling contract isolates domain dynamics from reusable search implementations while retaining explicit control over strategy and heuristics.Reconstruction from §4.
05 · Resource-bounded memory

Failure at R dominates every revisit with no more than R

Picat’s bounded planner tables the resource limit associated with a failed state without making that inherited limit part of ordinary variant identity. The table becomes a dominance certificate.

The internal call carries an array containing remaining limit, reversed partial plan and accumulated cost. These values are passed as a non-tabled argument. Reaching a final state throws the reversed plan and cost as an exception, caught by the outer planner call. Otherwise an action produces a successor, its cost is subtracted and search continues only if the new limit is non-negative.

Suppose state S previously failed with R′ resource. A revisit S with R≤R′ cannot uncover a path that the stronger earlier budget missed, so it fails immediately. A revisit with R>R′ must be expanded because extra resource might make a continuation feasible. This is the exact resource monotonicity exploited by the table.

The scheme avoids a dangerous overgeneralisation. Recording only “S failed” would be unsound because S may fail under a tight budget and succeed under a larger one. Conversely, treating every pair (S,R) as unrelated would miss dominance between budgets and weaken reuse. The special treatment stores the best failed limit for the state.

Iterative deepening benefits because early rounds are not discarded. Failed-state bounds from limit two can prune equal or weaker occurrences in later searches while still permitting a state reached with a genuinely larger remainder. This differs from ordinary IDA*, whose next iteration starts afresh.

failed[S] = largest resource R known to fail visit(S,R): if R < 0 → fail if final(S) → return plan if failed[S] exists and R ≤ it → prune otherwise expand actions if every continuation fails → failed[S] := max(failed[S],R)

Worked example 5 · reopen with one more unit

C is three cost units from the goal. A visit C with resource two fails and records two. Another route reaches C with one; it is pruned. In the next iteration C arrives with three, exceeds the failed limit, is expanded and reaches the goal exactly.

Causal probe 5 · what assumption makes dominance sound?

All action costs are non-negative and the future from a state is represented identically. More remaining resource cannot remove a path available with less. If hidden history changed available actions, that history would need to be included in the state key.

A failed resource bound prunes weaker revisits and permits stronger onesState C stores failed budget two; revisits with one and two are rejected, while a revisit with three passes the table gate and reaches the goal.STATE Cfailed[C] = 2R = 1prune: weakerR = 2prune: equalR = 3expand: strongerGOALcost 3
The table stores a failed budget, not an unconditional dead-end label. Resource-sensitive reopening is what preserves completeness under relaxed bounds.Reconstruction from §5 and Figures 2–3.
Executable demonstration

Resource-bounded table laboratory

The laboratory runs a cyclic weighted graph with converging paths. It implements the paper’s dominance rule, records the largest failed budget per state and compares one bounded search with iterative rounds that retain their table.

Plan result
State expansions
Dominance prunes
Largest failed budgets

    The graph’s cheapest plan costs five. Bounds below five must fail; a bound of five permits S→A→C→G. The cyclic edges back to S expose why revisits need pruning. The displayed counts belong only to this deterministic teaching graph and action order; the regression tests focus on semantic invariants rather than treating an expansion count as a published benchmark.

    06 · State representation

    The table can share only what the model makes equal

    Picat states are structured terms rather than flat PDDL fact sets. The modeller can canonicalise interchangeable objects, omit irrelevant identities and arrange list tails for physical sharing.

    Transport represents a state as an array of ordered truck and waiting-package lists. A waiting package is a source–destination pair, not a named object. A truck is represented by location, an ordered list of carried destinations and capacity, not by its name. Packages with the same endpoints and trucks with the same operational attributes become indistinguishable.

    This is symmetry breaking by representation. Two arrangements differing only by arbitrary labels map to one table key, so the planner explores them once. Ordered insertion keeps multisets canonical. The choice must preserve every feature that affects actions, costs or the goal; otherwise distinct planning states would be merged unsafely.

    Hash-consing interns equal ground terms. Lists [1,2,3], [2,3] and [3] can share suffix nodes rather than duplicate them. Transport places a truck’s capacity last so trucks with the same capacity can share that tail. Term equality can then exploit pointer identity for shared structures, accelerating table lookup.

    The memory trade-off is explicit. Picat avoids a prior global grounding that might explode, but it tables every encountered state. A poor representation can still consume substantial search memory. Canonical form, structural sharing and domain pruning are therefore not cosmetic coding preferences; they determine how much the table retains.

    Worked example 6 · remove package names

    Packages p7 and p9 both wait at depot X for depot Y. If actions and goals depend only on location and destination, swapping their names changes nothing. Representing both as identical (X,Y) entries collapses the permutation while preserving multiplicity in the ordered list.

    Causal probe 6 · when is name removal wrong?

    If packages have different deadlines, weights or destinations, identity carries causal information. The state must retain whatever distinguishes future transitions and costs. Symmetry breaking is valid only for truly interchangeable objects.

    Canonical structured states collapse permutations and share list tailsNamed package permutations on the left map to one ordered source-destination list; three truck lists on the right share a capacity tail through hash-consing.SYMMETRY COLLAPSEp7:(X,Y), p9:(X,Y)p9:(X,Y), p7:(X,Y)[(X,Y),(X,Y)]one canonical keyTERM SHARING[loc₁,dests | tail][loc₂,dests | tail][loc₃,dests | tail][Cap]shared
    Logical equality and physical sharing reinforce one another: canonical content reduces the number of table keys, and hash-consing reduces repeated storage inside those keys.Reconstruction from §§1, 3 and 6.1.
    07 · Actions, knowledge and heuristics

    Translate operators, then exploit what the domain makes safe

    The four detailed IPC models demonstrate a progression from faithful action encoding to structural representation, safe commitment, macro actions and lower-bound heuristics.

    Transport translates load, unload and move operators into list selection and ordered insertion. A basic load remains nondeterministic. A complete model commits to unloading at a package’s destination. Its admissible estimate combines remaining load/unload operations with the maximum, over remaining packages, of a lower bound on transport cost using any truck.

    Tetris represents squares, rectangles and L-shaped pieces in separate sorted lists. Actions update one selected piece and check occupancy. Its heuristic ignores interactions: estimate each piece’s shortest distance to the target region as if it were alone, then sum. Because ignoring obstacles cannot increase the true required work, the estimate is admissible, though conservative when pieces compete for target cells.

    Floortile represents robot positions and painted white and black tiles. Changing colour can be joined to painting as a macro action. Generator-specific knowledge can make certain paint choices deterministic. The model uses depth-unbounded search: unreachable unpainted tiles naturally produce tabled dead ends, so no extra heuristic is required.

    Parking stores each curb as a list of at most two cars, with the roadside car first because it can move without disturbing the curbside car. It includes the goal configuration in the state so action rules can detect correct placements. Domain rules commit moves into final positions and avoid moving a correctly placed car. Its heuristic counts incorrect cars, with stronger costs for reversed two-car configurations.

    Worked example 7 · why four for a reversed curb?

    If a curb currently holds [A,B] but the goal is [B,A], neither car can simply swap in place. The roadside car must move away, the curbside car must move, B must return curbside and A must return roadside: at least four actions. The heuristic encodes this local lower bound.

    Causal probe 7 · why must a heuristic be admissible here?

    Resource pruning compares the estimate with remaining budget. An overestimate could reject a state that has a feasible plan within the bound and thereby lose optimality. Conservative lower bounds may explore more, but they preserve correctness.

    Four modelling levers across IPC domainsTransport, Tetris, Floortile and Parking cards align structured state, domain knowledge and heuristic choices.TRANSPORTordered trucksunnamed packagescommit unloadmax delivery boundresource searchTETRISpiece listsoccupancy updatespiecewise distancesum lower boundresource searchFLOORTILErobot + tile listsmacro colour actiontabled dead endsno heuristicunbounded searchPARKINGcurb arraysgoal in stateprotect correct carsmisplacement boundresource search
    “The planner” is only half the system. State identity, rule commitment and lower bounds are domain-specific levers that determine which search the generic engine performs.Reconstruction from §6.
    08 · Experimental evidence

    Tabling and heuristics are tested by ablation, not inferred from one headline

    The paper compares Picat with a non-tabled variant, a no-heuristic variant and Symba on nine IPC’14 optimal sequential domains under one reported machine and time limit.

    Picat-nt uses Prolog-style non-tabled iterative deepening with the same state representation. Picat-nh removes heuristics from the five domains that use them. Symba is the domain-independent bidirectional A* winner of the IPC’14 optimal sequential track. All compared solutions had the same plan quality where both planners solved the instance.

    Across 171 listed instances, the table reports Picat solving 147, Picat-nt 73, Picat-nh 118 and Symba 87. Picat solved more instances than Picat-nt in every domain except Childsnack and Tetris; the non-tabled variant solved none in Barman, Cave, Floortile or Transport. In Parking, the heuristic-free version solved none compared with eleven for Picat.

    Picat solved more listed instances than Symba in every domain except Floortile, where both solved twenty. The runs used a 2.4 GHz Intel i5 notebook with 4 GB RAM, g++ 4.8.3 and a 30-minute limit per instance. Total Picat runs finished within 24 hours; Symba’s took more than 72. The paper does not provide per-instance runtimes in this table.

    The ablations support causal interpretation better than a bare cross-system comparison. Holding state representations similar while removing tabling isolates some effect of state memory. Removing heuristics from the relevant models isolates some effect of the lower bounds. Yet code paths and control details may still differ, and the nine domains do not constitute a timeless league table.

    Worked example 8 · Transport’s sharp ablation

    Of twenty Transport instances, Picat solved nine optimally, Picat-nh four, Picat-nt none and Symba eight. Within this setup, both tabled reuse and the admissible estimate contribute. The single row does not identify how performance would scale under other instances or current planners.

    Causal probe 8 · why is Picat versus Symba not a pure language test?

    It changes representation, search, domain knowledge, heuristics and implementation simultaneously. The result establishes performance of complete systems on this benchmark setup, not the isolated superiority of structured terms over PDDL.

    DomainInstancesPicatNo tablingNo heuristicSymba
    Barman14140146
    Cave20200203
    Childsnack202020203
    Citycar2020171817
    Floortile202002020
    GED2020191319
    Parking2011401
    Tetris171313910
    Transport209048
    Total solved instances across the reported nine-domain tableFour labelled bars show Picat 147, Picat without tabling 73, Picat without heuristics 118, and Symba 87 solved instances out of 171.SOLVED OPTIMALLY · REPORTED TABLE TOTAL147Picat73Picat-nt118Picat-nh87Symba171 listed instances · 30-minute limit · historical setup
    Aggregating the table makes the ablation gap visible, but the unit remains “instances solved under this 2015 experimental setup”, not general planner quality.Calculated directly from Table 1 in §7.
    09 · Modelling principles

    Search power is multiplied: or squandered: by the state key

    The paper argues that recent domain-independent planning progress should not make modelling invisible. Picat’s results rely on problem structure expressed deliberately.

    A state should contain enough information to determine legal successors, remaining costs and the goal, but no irrelevant labels or redundant permutations. Ordered collections create canonical keys. The placement of fields can improve suffix sharing. Arrays are used when indexed updates matter and list-tail sharing is unavailable.

    Action definitions should make precondition checks and updates efficient. Standard list operations such as select, nth and ordered insertion simultaneously express and execute changes. Action order puts promising or forced moves first. Commitment should encode a proven dominance rule, not an intuition.

    Domain knowledge can prune useless transitions, combine actions into macros and protect achieved subgoals. A lower-bound heuristic should be cheap enough to repay its cost and admissible enough to preserve optimum. The paper’s examples use simple knowledge intentionally, prioritising readability and avoiding a specialised solver disguised as a model.

    Tabling makes these choices cumulative. If symmetric states remain distinct, each occupies memory and receives separate expansions. If an unsafe abstraction merges states with different futures, table reuse becomes unsound. If a heuristic is weak, many states survive each bound. The table does not repair a bad model; it amplifies the state equivalence the model declares.

    Worked example 9 · keep the Parking goal in the key

    Two searches may have the same current curb configuration but different target configurations. Domain rules that protect a “correct” car depend on the target. Pairing current and goal configurations in the state prevents the table from sharing a continuation across incompatible goals.

    Causal probe 9 · can extra domain knowledge slow the planner?

    Yes. Computing it may cost more than the search it removes, and an incorrect commitment or inadmissible estimate can damage correctness. Even sound rules can interact poorly with action order. Modelling knowledge is an engineering hypothesis to validate, not free acceleration.

    The quality of a state representation controls table size and reuseA wide redundant state stream produces many table keys, while a canonicalising filter produces fewer shared keys; an over-compressing filter merges causally distinct states and is marked unsafe.RAW CONFIGURATIONSname permutation 1name permutation 2same future 3distinct goal Adistinct goal BCANONICALISEremove symmetryretain causal fieldsorder collectionsshared future keygoal A keygoal B keycompress symmetry, never compress a difference that changes the future
    Effective tabling begins before search: the state representation defines which histories are safely identified as the same subproblem.Synthesis from §§1, 3, 6 and 8.
    10 · Scope and future work

    Competitive evidence, bounded claims and an open translation problem

    The paper demonstrates that tabled logic programming can compete on its selected IPC’14 suite. It also names the costs: table memory, manual representation decisions and domain-specific knowledge.

    Picat does not perform the prior grounding typical of many state-space planners, avoiding one source of memory explosion. Search can nevertheless be memory demanding because encountered states are tabled. The authors identify compact, efficient, shareable state structures as future work. Avoiding one bottleneck does not abolish space complexity.

    The experiments cover deterministic sequential optimal domains with hand-written Picat models. They are strong evidence that tabling plus modelling was viable in the reported environment, not evidence about all planning formalisms, uncertain action models or modern systems. The comparative claims stay attached to nine domains, a 30-minute limit and specified hardware and compiler.

    The authors suggest Picat as an implementation language for action languages such as A, Golog and K. Those languages conventionally use flat fact states and emphasise expressive modelling. An efficient translation would need to recover structural representation, symmetries, control knowledge and heuristics automatically. The paper presents this as a research direction, not a completed compiler.

    The most durable idea is selective memory. A tabled state is a claim that every path arriving there shares the same remaining problem. A failed resource record adds a second claim: failure under a stronger budget dominates failure under weaker ones. Both claims are powerful because they are semantic assertions about equivalence and monotonicity, not merely caching tricks.

    Evidence boundary

    The primary is arXiv:1507.03979v1 and the 2015 Theory and Practice of Logic Programming paper. Experimental totals are transcribed from Table 1 and not extrapolated. The browser laboratory uses a bespoke teaching graph to test the stated failed-bound rule; it is not Picat, does not reproduce IPC models and makes no runtime claim.

    Worked example 10 · a history-dependent action

    If a rule says a door may be opened only on the agent’s first visit, location alone is not a sufficient state. Two paths reaching the same location have different futures. Add the visit flag to the state or reformulate the rule; otherwise tabling will incorrectly reuse one continuation for both histories.

    Causal probe 10 · is tabling always better than recomputation?

    No. Tables consume memory and incur hashing and lookup costs. In a near-tree state space with few revisits, reuse may be small. The paper’s evidence shows large benefits in many tested domains and explicitly reports demanding table memory as the counterweight.

    The planner’s three-way trade-off between repeated work, table memory and modelling effortA triangle places no-table search at repeated work, full tabling at memory, and canonical domain-informed representation at modelling effort, with a balanced centre marked reusable search.TABLEMEMORYREPEATEDWORKMODELLINGEFFORTREUSABLESEARCHcanonical states + sound pruning decide where the balance lands
    Tabling trades recomputation for retained state. Representation and domain knowledge determine whether the stored information is compact and reusable enough to justify that trade.Synthesis from §§1, 6–8.
    Memory studio

    Twelve retrieval hooks

    TablingCache calls and answers so an equal state subproblem can be reused rather than expanded again.
    Mode-directed tableDeclare inputs, outputs and min/max arguments; retain an optimal answer per input key.
    final/1The domain predicate recognising whether the current state satisfies the goal.
    action/4The domain relation from state to successor, action name and non-negative cost.
    Failed budgetThe greatest resource limit under which a state has been proved unable to finish.
    Dominance pruneReject a repeated state when its current resource is no greater than a recorded failure.
    nt argumentInherited data passed through recursion without participating in table variant checking.
    Hash-consingIntern equal ground terms so repeated substructures occupy and compare by shared identity.
    Canonical stateAn ordered, identity-free representation that maps interchangeable configurations to one key.
    CommitmentA non-backtrackable rule discards alternatives only when domain knowledge makes that safe.
    Admissible estimateA lower bound on remaining cost, safe for resource pruning and optimal search.
    AblationRemove tabling or heuristics while holding much else fixed to expose their contribution.
    Two comprehensive reviews

    Scholarly and publication gates

    Review A · fidelity, teaching and evidential fairness

    The companion was checked against all 27 pages of arXiv:1507.03979v1: motivation and prior tabling work; Picat syntax, rule arrows, as-patterns and loops; linear and mode-directed tabling; hash-consing; the path/3 framework and DAG example; every planner built-in; plan/4 implementation and inherited argument; the failed-resource dominance rule; Transport, Tetris, Floortile and Parking representations, actions, domain rules, search modes and heuristics; the nine-domain appendix summary; Table 1 hardware and limits; tabling and heuristic ablations; conclusion, memory boundary and proposed action-language translation.

    Fidelity review passed. Tabling is not reduced to memoising successful paths: failed state/budget information and cyclic fixed points remain. The limit is excluded from ordinary variant checking but stored specially on failure. Reopening with a strictly higher resource is retained. Committed rules are never described as automatically safe. Structured representation, term sharing, domain pruning and heuristics remain separate mechanisms. Experiment totals are calculated from the published table and scoped to the reported setup.

    Teaching review passed. Ten worked examples and ten causal probes distinguish recursive formulation, operational commitment, answer replacement, planner contracts, budget dominance, state equivalence, heuristic admissibility, ablation interpretation, goal-dependent state and memory trade-offs. Ten figures reconstruct distinct mechanisms. The laboratory implements the resource monotonicity rule, cyclic revisits, iterative table reuse and an exact cost-five witness.

    Review B · language, accessibility, responsive layout and execution

    The prose was reviewed for benchmark hype, vague authority, solver anthropomorphism, overgeneralised causality, retrospective terminology and repetitive AI-telltale language. British English is consistent. Each SVG has a unique title, description, caption and source note. Labels, geometry and order carry meaning beyond colour. Motion is optional and disabled with reduced-motion preferences. A skip link, ordered headings, labelled native controls, live trace region and explicit table headers support navigation.

    Responsive review covers 1440, 768 and 390 pixels. The hero, exactly five orientation cards, prose columns, ten diagrams, three-control laboratory, experiment table, memory studio and sequence navigation collapse without viewport overflow; the data table can scroll independently. Executable review checks four resource bounds under single, reuse and restart policies. Three regression gates must pass: no plan below cost five and an exact cost-five plan at the threshold; every table prune satisfies current resource ≤ recorded failed resource; and retained iterative tables never increase expansions relative to restarting while exercising at least one dominance prune.

    Place in the canon

    From reusable inference to reusable failed search

    Paper 0104 separated one declarative theory from the several inferences that can be applied to it. Paper 0105 narrows again to planning but makes a related reuse claim operational. A table turns a state into a named subproblem whose answer, optimum or failed budget can serve every converging path and later bound.

    Paper 0106 turns to Balduccini, Magazzeni and Maratea on PDDL+ planning through constraint answer-set programming. Where Picat uses tabling and procedural action order to search an implicit graph, their system translates hybrid processes, events and numeric change into CASP. The canon moves from a reusable discrete search engine to a modelling language for mixed logical and continuous dynamics.

    Verified references

    Sources and audit trail

    1. Zhou, N.-F., Barták, R., & Dovier, A. (2015). “Planning as Tabled Logic Programming.” Theory and Practice of Logic Programming, 15, 543–558. arXiv:1507.03979. Primary source, including appendices.
    2. Zhou, N.-F. (2014). “Combinatorial Search with Picat.” AAAI, 4230–4231. Picat planner and tabled-search context cited by the primary.
    3. Zhou, N.-F., Sato, T., & Shen, Y.-D. (2008). “Linear Tabling Strategies and Optimizations.” Theory and Practice of Logic Programming, 8(1), 81–109. Linear tabling foundation.
    4. Guo, H.-F., & Gupta, G. (2008). “Simplifying Dynamic Programming via Mode-Directed Tabling.” Software: Practice & Experience, 38(1), 75–94. Table-mode context used by Picat.
    5. Korf, R. E. (1985). “Depth-First Iterative-Deepening: An Optimal Admissible Tree Search.” Artificial Intelligence, 27, 97–109. Baseline iterative-deepening comparison.
    6. Torralba, Á., Alcázar, V., Kissmann, P., & Edelkamp, S. (2014). “SymBA*: A Symbolic Bidirectional A* Planner.” IPC’14 planner context for the reported comparison.
    7. Bacchus, F., & Kabanza, F. (2000). “Using Temporal Logics to Express Search Control Knowledge for Planning.” Artificial Intelligence, 116, 123–191. Domain-control knowledge context cited in the conclusion.
    Website publication brief

    What ships with Paper 0105

    Title: When a failed state remembers its budget: Zhou, Barták and Dovier’s Picat planner. Standfirst: A visual and executable reconstruction of mode-directed tabling, state-to-goal dynamic programming, failed-resource dominance, iterative reuse, structured state keys, hash-consing, domain commitment, admissible heuristics and the IPC’14 ablations. Search terms: Picat planner, tabled logic programming, mode-directed tabling, resource-bounded search, iterative deepening, planning, hash-consing, admissible heuristic. Demonstration: a cyclic weighted-graph laboratory comparing one bounded run, iterative reuse and restart across four budgets. Accessibility promise: ten titled and described SVG figures, reduced-motion support, labelled controls, keyboard operation and responsive layouts.