A grounded numeric planner written in Rust. Accepts PDDL or pre-translated SAS+ input and produces a sequential plan when one exists within the configured resource budget.
Website: https://mrlab.ai/PlanForge/ (source in docs/)
Production-quality on the admissible search and heuristic paths (A* with blind, lmcutnumeric, pattern databases, canonical and SCP-based domain abstractions). Greedy best-first search and an FF-style relaxed-plan heuristic with Metric-FF monotonic numeric relaxation are also available. Greedy best-first search expands the successors reached by FF's preferred operators (helpful actions) first.
- PDDL — domain and problem files. The translator and preprocessor are invoked internally; intermediate SAS+ output is not exposed unless requested.
- SAS+ — pre-translated tasks (one positional argument). Useful for benchmarking, where the translator is run once and the search is run repeatedly.
- Pattern databases — projection-based goal-distance tables over selected variable subsets.
- Domain abstractions — CEGAR-built abstractions with comparison-axiom-aware refinement. Multiple combination strategies are available:
- Canonical (max over compatible additive subsets).
- Saturated cost partitioning (SCP), including a fill-SCP variant that combines per-label SCP with LM-cut over residual costs.
- Cartesian abstractions — numeric Cartesian CEGAR abstractions usable through
the same canonical, label-SCP, and regional-SCP combinators. The separate
icaps26_cartesian(...)source implements the full-task, first-flaw, desired-region split policies from Schindler, Speck, and Helmert (ICAPS 2026). - LM-cut — numeric landmark-cut heuristic, usable standalone or as a residual-cost component inside SCP.
- Numeric potentials — admissible CPLEX-backed numeric and propositional
potential functions with initial-state, all-states, sampled, and diverse
portfolio objectives. The implementation also supports reachable bounds,
goal-conditioned functions and cost partitions, exact dead-end rays,
online enrichment with
mpd=true, duality validation, and joint potential/domain-abstraction OCP. - Posthoc optimization — Pommerening/Röger/Helmert AAAI 2013 LP heuristic over a CEGAR-built domain-abstraction collection. The dual LP
max Σ h_i(s)·X_i s.t. Σ_{i : o relevant for i} X_i ≤ 1 for each positive-cost operator ois solved per state by CPLEX. The model remains resident and only its objective changes between states. It dominates canonical (max-over-additive) but pays per-state LP cost; useful when the abstractions overlap heavily and a strict max underuses them. - FF — Hoffmann/Nebel relaxed-plan heuristic with Metric-FF style monotonic numeric relaxation. Each numeric variable tracks a
(max_reachable, min_reachable)envelope through the relaxed planning graph; comparison-axiom facts become available when the envelope makes them satisfiable. Non-admissible in general; useful as a fast guide for greedy search and competitive with blind on small numeric instances.
- A* — admissible best-first search (
f = g + h). The production path for guaranteed-optimal planning under an admissible heuristic. - Greedy best-first search (GBFS) — non-admissible best-first search (
f = h). Often finds plans far faster than A* with the same heuristic, at the cost of optimality. - Preferred operators —
gbfsexpands the successors reached by the operators its heuristic prefers (FF's helpful actions) first (open_list=preferred_first(), the default).
Both take open_list=... (tiebreaking(): smallest key first, ties first in,
first out; preferred_first()) and successor_generator=...
(standard_grounded_tree(), the default). A binary that adds its own open lists,
successor generators, search algorithms or heuristics to its features names them the same way;
see ARCHITECTURE.md.
Stable Rust, no nightly features:
cargo build --release
target/release/planforge is the planner. Every search configuration is reachable from it; there is no second entry point with a different set of capabilities. target/release/planforge-translator is built alongside it and stops after translation, for inspecting SAS+ output.
LP-backed heuristics use the native IBM ILOG CPLEX 22.2 C API. Build them with:
CPLEX_ROOT=/path/to/CPLEX_Studio/cplex cargo build --release --features cplex
CPLEX_ROOT must contain include/ilcplex/cplex.h and
lib/x86-64_linux/static_pic/libcplex.a. PlanForge links the provided
position-independent static library, uses one solver thread, and checks at
heuristic startup that the active license accepts and solves a 1001-column
model. Community Edition and any other size-restricted license are rejected.
A build without cplex can run non-LP heuristics, but requesting an LP-backed
heuristic is an explicit configuration error.
Single-call PDDL pipeline:
planforge --search 'astar(canonical([domain(max_states=1000)]))' \
--max-time 30m --max-memory 8G \
domain.pddl problem.pddl
A* accepts an optional lazy heuristic: astar(blind(),lazy=lmcutnumeric()).
This is Lazy A*: a state is evaluated by the second heuristic when popped and
reinserted with the combined priority before expansion. Evaluation
statistics include calls to both heuristics. Dynamic heuristic re-evaluation
is enabled separately with mpd=true on A*.
max([ff(),lmcutnumeric(),domain(max_states=1000)]) takes the maximum over
any heuristics. Abstraction sources among its children share one abstraction
evaluator; other heuristics are evaluated alongside it.
Hierarchical abstraction sources make collection generation and combination independent. For example:
planforge --transform restrict --search \
'astar(canonical([cartesian_collection(max_states=1000,max_collection_size=100000)],construction_max_time=900))' \
domain.pddl problem.pddl
planforge --transform restrict --search \
'astar(scp([domain_collection(max_states=1000,max_collection_size=100000)],partitioning=region,construction_max_time=900))' \
domain.pddl problem.pddl
planforge --transform icaps26_restrict --search \
'astar(canonical([icaps26_cartesian(pick=min_unwanted,max_time=900)]))' \
domain.pddl problem.pddl
max, canonical, scp and posthoc_optimization take their children as
their first argument: one list [a, b], or a single child without brackets.
Every abstraction source is also a heuristic on its own, the maximum over its
abstractions: astar(domain(...)), astar(pdb(...)). A PDB source selects its
pattern generator with patterns=systematic(...) (the default) or
patterns=greedy(...); exploration_heuristic, frontier_heuristic and
failed_lookup_heuristic are options of pdb(...) itself and apply to both.
Configuration values are calls, identifiers, nested lists, numbers or single- or
double-quoted strings; anything else, such as a path, must be quoted, for example
ray_certificate_file="Results/Run 1,certificate.txt". String case is preserved;
option names, heuristic names and enum values match without regard to case.
Configuration errors are reported before PDDL translation, with the nested
option path.
Domain and Cartesian abstractions take the same CEGAR options, by name:
max_states, max_iterations, max_time (seconds, or infinity),
combine_labels, random_seed, flaw_kind=progression|regression,
flaw_scope=first|whole_plan, split_kind=concrete|wanted,
split_selection=min_growth|random, split_selection_rank and debug;
domain(...) also takes use_wildcard_plans. Both default to
max_states=100000, combine_labels=true, random_seed=2011,
flaw_kind=progression, flaw_scope=first, split_kind=concrete and
split_selection=random, and start from the trivial abstraction. domain_collection(...) and cartesian_collection(...) take
the options of their members, where max_states and max_time bound each
member, and the collection options collection_strategy=standard|per_goal|goal_focused,
variants_per_goal, max_collection_size, total_max_time, progress_states,
alternate_split_kinds, single_goal_tasks, split_kind (the members' fixed
split kind), random_seed (the seed members derive theirs from),
stagnation_limit, blacklist_trigger_percentage and
enable_blacklist_on_stagnation.
icaps26_cartesian accepts pick=random|min_unwanted|max_unwanted and requires
its own restriction, --transform icaps26_restrict. It reproduces the artifact semantics on integer restricted
tasks; the dedicated affine restriction and continuous-split extensions cover
the full supported SNP benchmark set without changing other heuristics.
construction_max_time is one shared budget
for source generation and offline SCP table construction.
Pre-translated SAS+:
planforge --search 'astar(lmcutnumeric())' \
--max-time 30m --max-memory 8G \
task.sas
Common options:
--search SPEC— search algorithm with a heuristic configuration. Examples:astar(blind())astar(lmcutnumeric())astar(canonical(domain(...)))astar(numeric_potential(opt=initial_state,max_potential=1e8))astar(numeric_potential(opt=diverse_samples,num_heuristics=4,num_samples=100,max_potential=1e8,cache_estimates=true,invalidate_online_cache_on_growth=true),mpd=true)astar(posthoc_optimization(domain_collection(...)))— LP-based dominator of canonical over the same abstraction sourcesastar(ff())gbfs(ff())— fast non-admissible searchgbfs(lmcutnumeric())
--max-time DURATION— CPU-time budget from process start, including translation and heuristic construction (30m,1h,45s).--max-memory SIZE— address-space cap (8G,4096M).--max-ground-actions COUNT— stop translation before it materializes more than this many reachable ground actions (default: no limit).--max-ground-atoms COUNT— stop translation before its reachability model derives more than this many ground atoms (default: no limit).--max-grounding-memory SIZE— approximate memory budget for the ground atoms, join tables, reachable facts and ground actions materialized by the translator (default: no limit;--max-memorystill bounds the run).--transform SPEC— transform the task before the search, repeatable and applied in order:restrictconverts an SNP task to its restricted representation (already restricted tasks are retained unchanged),icaps26_restrictto the oneicaps26_cartesianneeds. A binary adds further transformations like heuristics.--portfolio— two sequential stages instead of one search:astar(lmcutnumeric())under a tight budget (--lmcut-time,--lmcut-memory), thenastar(canonical([domain(max_states=1000)]))(--canonical-construction-time,--canonical-memory,--canonical-time). Each stage is a childplanforgeprocess, so stage 1's limits are enforced and stage 2 starts clean.
ARCHITECTURE.md explains how the crates fit together and where each extension point lives. Workspace crates:
planforge— both binaries: the planner (planforge) and the translate-only staging tool (planforge-translator), plus the CLI, the reporting allocator, the resource limits, the portfolio and the plan output.planforge-sas— the task: variables, operators, axioms, states and the state registry, and the SAS format.planforge-translate— PDDL to task translation.planforge-search— the search core: the building blocks of a search (SearchSpace,SearchProgress), best-first search with its node orderings and open lists, theHeuristictrait, successor generation, the exact state space, task transformations, the registries and the--searchlanguage. It knows no heuristic but blind search. Its crate documentation lists every extension point.planforge-heuristics— the heuristics, one module per technique: abstractions (with cost partitioning), landmarks (numeric LM-cut), relaxation (FF), potentials and combinations. It depends on the core only. Adding a heuristic is a change to this crate alone: its own module, and one entry infeatures(), whichplanforgeparses its command line with.requirementsholds what its heuristics need of the task and of the build (CPLEX).planforge-config-derive—#[derive(ApplyOptions)], which cannot be merged: aproc-macrocrate is its own compilation unit. Fields marked#[option(positional)]also take positional arguments, in field order; a#[option(flatten)]field takes the named options the config does not know, such as the CEGAR options domain and Cartesian abstractions share.planforge-cplex— small checked native CPLEX ownership and sparse-LP layer.tests— integration tests.
cargo test
Integration tests cover translator output, preprocessor invariants, state-registry deduplication, heuristic admissibility, and end-to-end planning on representative tasks.
On Linux, --max-memory is enforced against resident memory by the parent
process. A larger RLIMIT_AS remains as an emergency ceiling because mimalloc
reserves address space ahead of committed pages. Heuristic construction and
search also release their fixed memory padding as the resident limit is
approached, leaving room for a controlled planner exit before an external
Slurm or cgroup limit fires.
Grounding has separate structural limits because a task may be too large to
ground well before search starts. The translator checks those limits in
batches, reports actions, atoms and estimated grounding memory every five
seconds on long runs, and returns an error naming the limit and current phase.
It never hands a truncated task to search. The same three grounding flags are
accepted by planforge-translator translate; that command creates its output
file only after grounding has completed, so a limit error cannot leave a
partial SAS+ task. These memory figures estimate the owned grounding data
structures, not whole-process RSS; --max-memory remains the process-wide
resident-memory limit.
Binary crates are licensed under GPLv3; library crates under LGPLv3; integration tests under GPLv3; lab files under MIT. See individual Cargo.toml files and LICENSE for details.