miniplan-0.1.0 has been yanked.
A PDDL planner library built around the pddl crate.
miniplan is primarily a planner — it takes a parsed PDDL domain and problem,
grounds them into a state-space representation, and solves them using a collection
of search algorithms (planners) and heuristic functions. PDDL parsing and loading
utilities are re-exported from the pddl crate for convenience.
Architecture
- Parse — use
pddl::Parser(re-exported via [pddl_io]) to load PDDL. - Ground — call [
ground::ground] to convert the parsed domain and problem into a [task::Task] with grounded facts and operators. - Solve — use the [
search::Solver] and [search::Registry] to pick a planner and search for a plan.
Modules
- [
search] — search algorithms (BFS, A*, GBFS, bidirectional variants) and the planner registry. - [
heuristic] — heuristic functions (hadd, hmax, h^FF, etc.). - [
ground] — grounding functions that convert PDDL to a state-space representation. - [
task] — grounded task representation (facts, operators, states). - [
plan] — plan representation and formatting. - [
pddl_io] — convenience wrappers aroundpddl::Parserfor loading PDDL from strings, files, or multiple files. - [
error] — error types for parsing, grounding, and search.
Getting started
The simplest way to solve a planning task is to use the Solver
with the built-in registry:
use ;
use ;
use ground;
const DOMAIN: &str = r#"
(define (domain test)
(:requirements :strips)
(:predicates (a) (b))
(:action go
:parameters ()
:precondition (a)
:effect (and (b) (not (a))))
)
"#;
const PROBLEM: &str = r#"
(define (problem test-1)
(:domain test)
(:init (a))
(:goal (b)))
"#;
let domain = load_domain_str.expect;
let problem = load_problem_str.expect;
let task = ground.expect;
let solver = new;
let choice = new;
let limits = default;
match solver.solve_task.expect