PDDLSharp 1.0.14

There is a newer version of this package available.
See the version list below for details.
dotnet add package PDDLSharp --version 1.0.14
                    
NuGet\Install-Package PDDLSharp -Version 1.0.14
                    
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.14" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PDDLSharp" Version="1.0.14" />
                    
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.14
                    
#r "nuget: PDDLSharp, 1.0.14"
                    
#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.14
                    
#: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.14
                    
Install as a Cake Addin
#tool nuget:?package=PDDLSharp&version=1.0.14
                    
Install as a Cake Tool

Build and Publish Nuget Nuget

PDDLSharp

This is a project to make a PDDL parser, contextualiser, analyser, code generator and much more for C#. The parser is fully PDDL 2.2 compatible.

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

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

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(...);
// If you want a "pretty" output, use:
// generator.Readable = true;
generator.Generate(plan, "planFile");

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

You can also give it the output of the Plan Parser to step through:

IErrorListener listener = new ErrorListener();
IParser<ActionPlan> parser = new FastDownwardPlanParser(listener);
ActionPlan plan = parser.Parse("planFile");

PDDLDecl declaration = new PDDLDecl(...);
IStateSpaceSimulator simulator = new StateSpaceSimulator(declaration);
simulator.ExecutePlan(plan);

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)
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 224 6/12/2024
1.6.14 142 6/12/2024
1.6.13 138 6/12/2024
1.6.12 214 6/9/2024
1.6.11 151 6/9/2024
1.6.10 175 6/9/2024
1.6.9 228 6/7/2024
1.6.8 209 6/6/2024
1.6.7 233 5/30/2024
1.6.6 176 5/29/2024
1.6.5 299 5/24/2024
1.6.4 200 5/24/2024
1.6.3 519 5/13/2024
1.6.2 147 5/13/2024
1.6.1 255 5/11/2024
1.6.0 156 5/10/2024
1.5.6 177 5/10/2024
1.5.5 447 5/10/2024
1.5.4 231 5/9/2024
1.5.3 237 5/9/2024
1.5.2 455 3/21/2024
1.5.1 211 2/5/2024
1.5.0 160 2/5/2024
1.4.7 170 1/26/2024
1.4.6 163 1/24/2024
1.4.5 166 1/24/2024
1.4.4 165 1/20/2024
1.4.3 177 1/19/2024
1.4.2 145 1/19/2024
1.4.1 171 1/18/2024
1.4.0 155 1/17/2024
1.3.18 158 1/17/2024
1.3.17 277 12/1/2023
1.3.16 150 12/1/2023
1.3.15 155 12/1/2023
1.3.14 197 11/29/2023
1.3.13 148 11/20/2023
1.3.12 183 11/19/2023
1.3.11 132 11/18/2023
1.3.10 191 11/17/2023
1.3.9 141 11/16/2023
1.3.8 201 11/10/2023
1.3.7 245 11/5/2023
1.3.6 177 11/4/2023
1.3.5 209 11/4/2023
1.3.4 155 11/3/2023
1.3.3 340 11/2/2023
1.3.2 154 11/1/2023
1.3.1 131 10/31/2023
1.3.0 163 10/31/2023
1.2.9 163 10/30/2023
1.2.8 143 10/30/2023
1.2.7 158 10/30/2023
1.2.6 178 10/29/2023
1.2.5 168 10/29/2023
1.2.4 163 10/29/2023
1.2.3 155 10/28/2023
1.2.2 179 10/28/2023
1.2.1 170 10/28/2023
1.2.0 178 10/27/2023
1.1.13 223 10/22/2023
1.1.12 171 10/21/2023
1.1.11 169 10/21/2023
1.1.10 169 10/21/2023
1.1.9 182 10/21/2023
1.1.8 354 10/20/2023
1.1.7 237 10/18/2023
1.1.6 175 10/18/2023
1.1.5 194 10/18/2023
1.1.4 169 10/18/2023
1.1.3 324 10/15/2023
1.1.2 179 10/15/2023
1.1.1 182 10/15/2023
1.1.0 176 10/15/2023
1.0.25 173 10/14/2023
1.0.24 164 10/14/2023
1.0.23 167 10/12/2023
1.0.22 170 10/11/2023
1.0.21 199 10/11/2023
1.0.20 171 10/10/2023
1.0.19 156 10/10/2023
1.0.18 244 10/9/2023
1.0.17 178 10/9/2023
1.0.16 201 10/8/2023
1.0.15 166 10/6/2023
1.0.14 161 10/6/2023
1.0.13 174 10/6/2023
1.0.12 155 10/4/2023
1.0.11 148 10/4/2023
1.0.10 172 10/2/2023
1.0.9 172 10/1/2023
1.0.8 191 10/1/2023
1.0.7 188 9/30/2023
1.0.6 159 9/28/2023
1.0.5 187 9/28/2023
1.0.4 160 9/27/2023
1.0.3 166 9/27/2023
1.0.2 176 9/27/2023
1.0.0 172 9/26/2023