PDDLSharp 1.1.1
See the version list below for details.
dotnet add package PDDLSharp --version 1.1.1
NuGet\Install-Package PDDLSharp -Version 1.1.1
<PackageReference Include="PDDLSharp" Version="1.1.1" />
<PackageVersion Include="PDDLSharp" Version="1.1.1" />
<PackageReference Include="PDDLSharp" />
paket add PDDLSharp --version 1.1.1
#r "nuget: PDDLSharp, 1.1.1"
#addin nuget:?package=PDDLSharp&version=1.1.1
#tool nuget:?package=PDDLSharp&version=1.1.1
<p align="center"> <img src="https://github.com/kris701/PDDLSharp/assets/22596587/6c7c3516-bb1e-4713-ad17-e2eaff67107b" width="200" height="200" /> </p>
PDDLSharp
This is a package to make a PDDL parser, contextualiser, analyser, code generator and much more for C#. The parser is fully PDDL 2.2 compatible. The package can be found through Nuget or the Git package manager.
Parsers
There is a few parsers included in PDDLSharp, each of them will be explained in the subsections.
PDDL Parser
The PDDL Parser is the main part of PDDLSharp. Its a fully fledged parser that can parser up to PDDL 2.2 files.
A usage example of how to use the PDDL parser:
IErrorListener listener = new ErrorListener();
IParser<INode> parser = new PDDLParser(listener);
PDDLDecl decl = new PDDLDecl(
parser.ParseAs<DomainDecl>("domain.pddl"),
parser.ParseAs<ProblemDecl>("problem.pddl")
)
To parse a file as a specific PDDL object:
IErrorListener listener = new ErrorListener();
IParser<INode> parser = new PDDLParser(listener);
ActionDecl decl = parser.ParseAs<ActionDecl>("action-file.pddl");
To contextualise a domain/problem:
IErrorListener listener = new ErrorListener();
IParser<INode> parser = new PDDLParser(listener);
PDDLDecl decl = new PDDLDecl(
parser.ParseAs<DomainDecl>("domain.pddl"),
parser.ParseAs<ProblemDecl>("problem.pddl")
)
contextualiser.Contexturalise(decl);
To analyse a domain/problem (Note, the analyser will also contextualise the PDDL declaration, if it have not been contextualised):
IErrorListener listener = new ErrorListener();
IParser<INode> parser = new PDDLParser(listener);
IAnalyser analyser = new PDDLAnalyser(listener);
PDDLDecl decl = new PDDLDecl(
parser.ParseAs<DomainDecl>("domain.pddl"),
parser.ParseAs<ProblemDecl>("problem.pddl")
)
analyser.Analyse(decl);
Plan Parser
There is also a plan parser that can parse Fast Downward output plans.
IErrorListener listener = new ErrorListener();
IParser<ActionPlan> parser = new FastDownwardPlanParser(listener);
ActionPlan plan = parser.Parse("planFile");
Code Generators
PDDL Code Generator
To generate PDDL code from a PDDL declaration:
IErrorListener listener = new ErrorListener();
ICodeGenerator<INode> generator = new PDDLCodeGenerator(listener);
PDDLDecl decl = new PDDLDecl(...);
// If you want a "pretty" output, use:
// generator.Readable = true;
generator.Generate(decl.Domain, "domain.pddl");
generator.Generate(decl.Problem, "problem.pddl");
Plan Code Generator
To generate a Fast Downward plan from a ActionPlan
declaration:
IErrorListener listener = new ErrorListener();
ICodeGenerator<ActionPlan> generator = new FastDownwardPlanGenerator(listener);
ActionPlan plan = new ActionPlan(...);
generator.Generate(plan, "planFile");
Toolkit
PDDLSharp includes a few tools, that can be found in the namespace PDDLSharp.Toolkit
.
State Space Simulator
There is a State Space Simulator included with PDDLSharp. This is a simulator that is capable of simulating the state changes for each action execution. If there are invalid arguments or type issues, the simulator will throw an exception.
PDDLDecl declaration = new PDDLDecl(...);
IStateSpaceSimulator simulator = new StateSpaceSimulator(declaration);
simulator.Step("actionName", "obj1", "obj2");
Plan Validator
There is a simple plan validator included in PDDLSharp.
It is capable of taking in a ActionPlan
and a PDDLDecl
and verify if the given plan is even possible or not.
IErrorListener listener = new ErrorListener();
IParser<ActionPlan> parser = new FastDownwardPlanParser(listener);
ActionPlan plan = parser.Parse("planFile");
PDDLDecl declaration = new PDDLDecl(...);
IPlanValidator validator = new PlanValidator();
validator.Validate(plan, declaration);
The Validate(...)
method returns true if the plan is valid, false otherwise.
Mutex Detector
There is a simple predicate mutex detector included in PDDLSharp.
It is able to find simple action predicate mutexes.
You just give it a PDDLDecl
and it will try and find mutex predicates in it:
IErrorListener listener = new ErrorListener();
IParser<INode> parser = new PDDLParser(listener);
PDDLDecl decl = new PDDLDecl(...)
IMutexDetectors detector = new SimpleMutexDetector();
var mutexes = detector.FindMutexes(decl);
Supported Requirements
PDDLSharp supports a large set of requirements, all the way up to PDDL 2.2:
- STRIPS (
:strips
) - Typing (
:typing
) - Disjunctive Preconditions (
:disjunctive-preconditions
) - Equality (
:equality
) - Quantified Preconditions (
:quantified-preconditions
)- Existential Preconditions (
:existential-preconditions
) - Universal Preconditions (
:universal-preconditions
)
- Existential Preconditions (
- Conditional Effects (
:conditional-effects
) - Domain Axioms (
:domain-axioms
)- Subgoals Through Axioms (
:subgoals-through-axioms
) - Expression Evaluation (
:expression-evaluation
)
- Subgoals Through Axioms (
- ADL (
:adl
) - Fluents (
:fluents
) - Durative Actions (
:durative-actions
)- Durative Inequalities (
:durative-inequalities
) - Continuous Effects (
:continuous-effects
)
- Durative Inequalities (
- Negative Preconditions (
:negative-preconditions
) - Derived Predicates (
:derived-predicates
) - Timed Initial Literals (
:timed-initial-literals
) - Action Expansions (
:action-expansions
) - Foreach Expansions (
:forach-expansions
) - DAG Expansions (
:dag-expansions
) - Safety Constraints (
:safety-constraints
) - Open World (
:open-world
) - True Negation (
:true-negation
) - UCPOP (
:ucpop
) - Constraints (
:constraints
) - Preferences (
:preferences
)
Notes
The system tests uses the Downward Benchmark Set to test on. A repository with solved instances of the benchmarks are also used for the plan parsing and verification.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net7.0
- No dependencies.
NuGet packages (5)
Showing the top 5 NuGet packages that depend on PDDLSharp:
Package | Downloads |
---|---|
MetaActionGenerators
A package to generate meta action candidates. |
|
Stackelberg.MetaAction.Compiler
A package to compile meta actions into Stackelberg Planning variants to be used for verification. |
|
PlanVal
A plan validator for PDDL+Plan files. |
|
MacroGenerators
A collection of macro generators. |
|
MutexDetectors
A collection of mutex detectors for PDDL. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.6.15 | 153 | 6/12/2024 |
1.6.14 | 106 | 6/12/2024 |
1.6.13 | 108 | 6/12/2024 |
1.6.12 | 167 | 6/9/2024 |
1.6.11 | 117 | 6/9/2024 |
1.6.10 | 124 | 6/9/2024 |
1.6.9 | 153 | 6/7/2024 |
1.6.8 | 155 | 6/6/2024 |
1.6.7 | 174 | 5/30/2024 |
1.6.6 | 131 | 5/29/2024 |
1.6.5 | 217 | 5/24/2024 |
1.6.4 | 143 | 5/24/2024 |
1.6.3 | 346 | 5/13/2024 |
1.6.2 | 111 | 5/13/2024 |
1.6.1 | 185 | 5/11/2024 |
1.6.0 | 135 | 5/10/2024 |
1.5.6 | 142 | 5/10/2024 |
1.5.5 | 350 | 5/10/2024 |
1.5.4 | 175 | 5/9/2024 |
1.5.3 | 182 | 5/9/2024 |
1.5.2 | 354 | 3/21/2024 |
1.5.1 | 176 | 2/5/2024 |
1.5.0 | 119 | 2/5/2024 |
1.4.7 | 126 | 1/26/2024 |
1.4.6 | 129 | 1/24/2024 |
1.4.5 | 123 | 1/24/2024 |
1.4.4 | 125 | 1/20/2024 |
1.4.3 | 125 | 1/19/2024 |
1.4.2 | 125 | 1/19/2024 |
1.4.1 | 125 | 1/18/2024 |
1.4.0 | 126 | 1/17/2024 |
1.3.18 | 129 | 1/17/2024 |
1.3.17 | 236 | 12/1/2023 |
1.3.16 | 127 | 12/1/2023 |
1.3.15 | 133 | 12/1/2023 |
1.3.14 | 172 | 11/29/2023 |
1.3.13 | 126 | 11/20/2023 |
1.3.12 | 129 | 11/19/2023 |
1.3.11 | 120 | 11/18/2023 |
1.3.10 | 169 | 11/17/2023 |
1.3.9 | 119 | 11/16/2023 |
1.3.8 | 178 | 11/10/2023 |
1.3.7 | 204 | 11/5/2023 |
1.3.6 | 135 | 11/4/2023 |
1.3.5 | 172 | 11/4/2023 |
1.3.4 | 132 | 11/3/2023 |
1.3.3 | 268 | 11/2/2023 |
1.3.2 | 129 | 11/1/2023 |
1.3.1 | 106 | 10/31/2023 |
1.3.0 | 130 | 10/31/2023 |
1.2.9 | 140 | 10/30/2023 |
1.2.8 | 119 | 10/30/2023 |
1.2.7 | 135 | 10/30/2023 |
1.2.6 | 143 | 10/29/2023 |
1.2.5 | 136 | 10/29/2023 |
1.2.4 | 138 | 10/29/2023 |
1.2.3 | 130 | 10/28/2023 |
1.2.2 | 141 | 10/28/2023 |
1.2.1 | 130 | 10/28/2023 |
1.2.0 | 131 | 10/27/2023 |
1.1.13 | 180 | 10/22/2023 |
1.1.12 | 145 | 10/21/2023 |
1.1.11 | 143 | 10/21/2023 |
1.1.10 | 132 | 10/21/2023 |
1.1.9 | 145 | 10/21/2023 |
1.1.8 | 278 | 10/20/2023 |
1.1.7 | 204 | 10/18/2023 |
1.1.6 | 132 | 10/18/2023 |
1.1.5 | 150 | 10/18/2023 |
1.1.4 | 130 | 10/18/2023 |
1.1.3 | 269 | 10/15/2023 |
1.1.2 | 151 | 10/15/2023 |
1.1.1 | 133 | 10/15/2023 |
1.1.0 | 157 | 10/15/2023 |
1.0.25 | 142 | 10/14/2023 |
1.0.24 | 135 | 10/14/2023 |
1.0.23 | 137 | 10/12/2023 |
1.0.22 | 131 | 10/11/2023 |
1.0.21 | 168 | 10/11/2023 |
1.0.20 | 142 | 10/10/2023 |
1.0.19 | 128 | 10/10/2023 |
1.0.18 | 178 | 10/9/2023 |
1.0.17 | 149 | 10/9/2023 |
1.0.16 | 148 | 10/8/2023 |
1.0.15 | 137 | 10/6/2023 |
1.0.14 | 132 | 10/6/2023 |
1.0.13 | 156 | 10/6/2023 |
1.0.12 | 127 | 10/4/2023 |
1.0.11 | 118 | 10/4/2023 |
1.0.10 | 142 | 10/2/2023 |
1.0.9 | 143 | 10/1/2023 |
1.0.8 | 144 | 10/1/2023 |
1.0.7 | 147 | 9/30/2023 |
1.0.6 | 131 | 9/28/2023 |
1.0.5 | 135 | 9/28/2023 |
1.0.4 | 119 | 9/27/2023 |
1.0.3 | 137 | 9/27/2023 |
1.0.2 | 146 | 9/27/2023 |
1.0.0 | 133 | 9/26/2023 |