Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Classical and FOND Planning for Pure-Past Linear Temporal Logic Goals

License

NotificationsYou must be signed in to change notification settings

whitemech/Plan4Past

Repository files navigation

Python VersionPyPIbuildcodecovGitHub


An award-winning tool for Classical and FOND Planning for Pure-Past Linear Temporal Logic (PPLTL) Goals.

Installation

  • from PyPI:
pip install plan4past
  • from source (main branch):
pip install git+https://github.com/whitemech/Plan4Past.git

or, clone the repository and install:

git clone https://github.com/whitemech/Plan4Past.gitcd Plan4Pastpip install .

Quickstart

You can use theplan4past package in two ways: as a library, and as a CLI tool.

As a library

This is an example of how you can encode a PPLTL goal formula into a PDDL domain and problem programmatically.

frompathlibimportPathfrompddl.formatterimportdomain_to_string,problem_to_stringfrompddl.parser.domainimportDomainParserfrompddl.parser.problemimportProblemParserfrompylogics.parsersimportparse_pltlfromplan4past.compilerimportCompilerdomain_path=Path("tests/benchmarks/deterministic/BF/blocksworld_ppltl/domain.pddl")problem_path=Path("tests/benchmarks/deterministic/BF/blocksworld_ppltl/p2.pddl")formula="on_b_a & O(ontable_c)"domain_parser=DomainParser()problem_parser=ProblemParser()domain=domain_parser(domain_path.read_text(encoding="utf-8"))problem=problem_parser(problem_path.read_text(encoding="utf-8"))goal=parse_pltl(formula)compiler=Compiler(domain,problem,goal)compiler.compile()compiled_domain,compiled_problem=compiler.resulttry:withopen("./new-domain.pddl","w+",encoding="utf-8")asd:d.write(domain_to_string(compiled_domain))withopen("./new-problem.pddl","w+",encoding="utf-8")asp:p.write(problem_to_string(compiled_problem))exceptExceptionase:raiseIOError("[ERROR]: Something wrong occurred while writing the compiled domain and problem."    )frome

By executing the code above, you will obtain anew-domain.pddl as well as anew-problem.pddl in output.

As a CLI tool

The package can also be used as a CLI tool. The supported command is:

plan4past -d DOMAIN_FILE -p PROBLEM_FILE -g "PPLTL_FORMULA" [-m MAPPING]

whereDOMAIN_FILE andPROBLEM_FILE are the PDDL domain and problem files, respectively, andPPLTL_FORMULA is thegoal formula expressed in Pure-Past Linear Temporal Logic.The optionalMAPPING file is a mapping between the PDDL objects and the PPLTL formula's atomic propositions.

For instance:

plan4past -d examples/pddl/domain.pddl -p examples/pddl/p-0.pddl -g "ontable_c & O(on_b_a)"

Docker & Apptainer images

A Docker image as well as an Apptainer image are available for Plan4Past.

  • To use Docker:docker build -t plan4past . anddocker run --rm -it plan4past

  • To use Apptainer:

apptainer build plan4past.sif plan4past.def# to launch the tool:./plan4past.sif -d examples/pddl/domain.pddl -p examples/pddl/p-0.pddl -g "ontable_c & O(on_b_a)"

Development

If you want to contribute, set up your development environment as follows:

  • IntallPoetry
  • Clone the repository:git clone https://github.com/whitemech/Plan4Past.git && cd Plan4Past
  • Install the dependencies:poetry shell && poetry install

Docs

To build the docs:mkdocs build

To view documentation in a browser:mkdocs serveand then go tohttp://localhost:8000

License

Plan4Past is released under the GNU Lesser General Public License v3.0 or later (LGPLv3+).

Copyright 2021 -- 2023 WhiteMech

Citing

If you use Plan4Past in your research, please consider citing the following papers.

  • For deterministic (classical) planning:
@inproceedings{icaps2023bdffgs,  author       = {Luigi Bonassi and                  Giuseppe {De Giacomo} and                  Marco Favorito and                  Francesco Fuggitti and                  {Alfonso Emilio} Gerevini and                  Enrico Scala},  title        = {{Planning for Temporally Extended Goals in Pure-Past Linear Temporal Logic}},  booktitle    = {{ICAPS}},  pages        = {61--69},  publisher    = {{AAAI} Press},  year         = {2023}}
  • For non-deterministic (FOND) planning:
@inproceedings{ecai2023bdffgs,  author       = {Luigi Bonassi and                  Giuseppe {De Giacomo} and                  Marco Favorito and                  Francesco Fuggitti and                  {Alfonso Emilio} Gerevini and                  Enrico Scala},  title        = {{{FOND} Planning for Pure-Past Linear Temporal Logic Goals}},  booktitle    = {{ECAI}},  year         = {2023},}

Awards 🏆

Plan4Past has been awarded theBest Student Paper Award at ICAPS 2023.

Acknowledgements

Plan4Past has been partially supported by the EU H2020 project AIPlan4EU (No. 101016442), the ERC-ADG WhiteMech(No. 834228), the EU ICT-48 2020 project TAILOR (No. 952215), the PRIN project RIPER (No. 20203FFYLK), and the PNRR MURproject FAIR (No. PE0000013).

About

Classical and FOND Planning for Pure-Past Linear Temporal Logic Goals

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp