MacroGenerators 1.0.1
dotnet add package MacroGenerators --version 1.0.1
NuGet\Install-Package MacroGenerators -Version 1.0.1
<PackageReference Include="MacroGenerators" Version="1.0.1" />
<PackageVersion Include="MacroGenerators" Version="1.0.1" />
<PackageReference Include="MacroGenerators" />
paket add MacroGenerators --version 1.0.1
#r "nuget: MacroGenerators, 1.0.1"
#addin nuget:?package=MacroGenerators&version=1.0.1
#tool nuget:?package=MacroGenerators&version=1.0.1
<p align="center"> <img src="https://github.com/kris701/MacroGenerators/assets/22596587/4f77844a-36e8-4ab2-8cf7-5e50d5fd2f12" width="200" height="200" /> </p>
MacroGenerators
This project is a collection of different macro generators. You can run the different macro generators by calling the CLI tool:
dotnet run --domain domain.pddl --problem problem.pddl --plans plan1.plan plan2.plan ... --generator Sequential
You can also find this project as a package on the NuGet Package Manager.
Sequential Macro Generator
The sequential macro generactor can generate lifted macros based on reoccuring sequences in plans. It works as follows
- Find all the possible sequence combinations possible across all the given plans.
- Sort all sequences by occurence.
- Remove all sequences where there is no inner-entanglements (e.g.
pick ball1 rooma left
,pick ball2 rooma right
). - Foreach remaining sequence, combine the actions into a macro.
- Return found macros.
This results in macros that can look like this (for the gripper domain):
(:action pick-pick-move-drop-drop
:parameters (?ball1 ?ball2 ?rooma ?roomb ?left ?right)
:precondition
(and
(free ?left) (free ?right)
(ball ?ball1) (ball ?ball2)
(room ?rooma) (room ?roomb)
(gripper ?left) (gripper ?right)
(at-robby ?rooma)
(at ?ball1 ?rooma)
(at ?ball2 ?rooma)
)
:effect
(and
(at-robby ?roomb)
(not (at-robby ?rooma))
(not (at ?ball1 ?rooma))
(not (at ?ball2 ?rooma))
(at ?ball1 ?roomb)
(at ?ball2 ?roomb)
)
)
That effectively takes two balls, moves to the other room and drops them both, consisting of 5 actions in total.
Examples
To find all macros for a given set plans and a domain:
PDDLDecl decl = new PDDLDecl(...)
IMacroGenerator<List<ActionPlan>> generator = new SequentialMacroGenerator(decl);
List<ActionPlan> plans = new List<ActionPlan>(...);
List<ActionDecl> macros = generator.FindMacros(plans);
To find top 10 macros for a given set of plans and a domain:
PDDLDecl decl = new PDDLDecl(...)
IMacroGenerator<List<ActionPlan>> generator = new SequentialMacroGenerator(decl);
List<ActionPlan> plans = new List<ActionPlan>(...);
List<ActionDecl> macros = generator.FindMacros(plans, 10);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- PDDLSharp (>= 1.5.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on MacroGenerators:
Package | Downloads |
---|---|
MetaActionGenerators
A package to generate meta action candidates. |
GitHub repositories
This package is not used by any popular GitHub repositories.