PDDLSharp 1.0.25

There is a newer version of this package available.
See the version list below for details.
dotnet add package PDDLSharp --version 1.0.25
                    
NuGet\Install-Package PDDLSharp -Version 1.0.25
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PDDLSharp" Version="1.0.25" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PDDLSharp" Version="1.0.25" />
                    
Directory.Packages.props
<PackageReference Include="PDDLSharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PDDLSharp --version 1.0.25
                    
#r "nuget: PDDLSharp, 1.0.25"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PDDLSharp@1.0.25
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PDDLSharp&version=1.0.25
                    
Install as a Cake Addin
#tool nuget:?package=PDDLSharp&version=1.0.25
                    
Install as a Cake Tool

Build and Publish Nuget Nuget GitHub last commit (branch) GitHub commit activity (branch)

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");

Simulators

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)
  • Conditional Effects (:conditional-effects)
  • Domain Axioms (:domain-axioms)
    • Subgoals Through Axioms (:subgoals-through-axioms)
    • Expression Evaluation (:expression-evaluation)
  • ADL (:adl)
  • Fluents (:fluents)
  • Durative Actions (:durative-actions)
    • Durative Inequalities (:durative-inequalities)
    • Continuous Effects (:continuous-effects)
  • 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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 204 6/12/2024
1.6.14 131 6/12/2024
1.6.13 128 6/12/2024
1.6.12 193 6/9/2024
1.6.11 141 6/9/2024
1.6.10 149 6/9/2024
1.6.9 205 6/7/2024
1.6.8 187 6/6/2024
1.6.7 211 5/30/2024
1.6.6 152 5/29/2024
1.6.5 268 5/24/2024
1.6.4 179 5/24/2024
1.6.3 428 5/13/2024
1.6.2 137 5/13/2024
1.6.1 226 5/11/2024
1.6.0 156 5/10/2024
1.5.6 167 5/10/2024
1.5.5 394 5/10/2024
1.5.4 199 5/9/2024
1.5.3 215 5/9/2024
1.5.2 403 3/21/2024
1.5.1 201 2/5/2024
1.5.0 140 2/5/2024
1.4.7 158 1/26/2024
1.4.6 153 1/24/2024
1.4.5 146 1/24/2024
1.4.4 145 1/20/2024
1.4.3 165 1/19/2024
1.4.2 145 1/19/2024
1.4.1 161 1/18/2024
1.4.0 145 1/17/2024
1.3.18 148 1/17/2024
1.3.17 257 12/1/2023
1.3.16 140 12/1/2023
1.3.15 145 12/1/2023
1.3.14 187 11/29/2023
1.3.13 138 11/20/2023
1.3.12 159 11/19/2023
1.3.11 132 11/18/2023
1.3.10 181 11/17/2023
1.3.9 131 11/16/2023
1.3.8 191 11/10/2023
1.3.7 235 11/5/2023
1.3.6 166 11/4/2023
1.3.5 199 11/4/2023
1.3.4 154 11/3/2023
1.3.3 329 11/2/2023
1.3.2 144 11/1/2023
1.3.1 120 10/31/2023
1.3.0 144 10/31/2023
1.2.9 153 10/30/2023
1.2.8 133 10/30/2023
1.2.7 148 10/30/2023
1.2.6 158 10/29/2023
1.2.5 158 10/29/2023
1.2.4 153 10/29/2023
1.2.3 145 10/28/2023
1.2.2 169 10/28/2023
1.2.1 158 10/28/2023
1.2.0 167 10/27/2023
1.1.13 212 10/22/2023
1.1.12 161 10/21/2023
1.1.11 159 10/21/2023
1.1.10 149 10/21/2023
1.1.9 163 10/21/2023
1.1.8 344 10/20/2023
1.1.7 227 10/18/2023
1.1.6 162 10/18/2023
1.1.5 174 10/18/2023
1.1.4 149 10/18/2023
1.1.3 314 10/15/2023
1.1.2 169 10/15/2023
1.1.1 169 10/15/2023
1.1.0 176 10/15/2023
1.0.25 163 10/14/2023
1.0.24 154 10/14/2023
1.0.23 157 10/12/2023
1.0.22 150 10/11/2023
1.0.21 189 10/11/2023
1.0.20 161 10/10/2023
1.0.19 146 10/10/2023
1.0.18 224 10/9/2023
1.0.17 168 10/9/2023
1.0.16 189 10/8/2023
1.0.15 156 10/6/2023
1.0.14 151 10/6/2023
1.0.13 174 10/6/2023
1.0.12 145 10/4/2023
1.0.11 138 10/4/2023
1.0.10 162 10/2/2023
1.0.9 162 10/1/2023
1.0.8 179 10/1/2023
1.0.7 176 9/30/2023
1.0.6 149 9/28/2023
1.0.5 166 9/28/2023
1.0.4 138 9/27/2023
1.0.3 156 9/27/2023
1.0.2 166 9/27/2023
1.0.0 152 9/26/2023