{"id":26844294,"url":"https://github.com/apla-toolbox/pythonpddl","last_synced_at":"2025-10-07T11:07:58.013Z","repository":{"id":37030233,"uuid":"322720803","full_name":"APLA-Toolbox/PythonPDDL","owner":"APLA-Toolbox","description":"🧭🔍 A PDDL Planner in Python partially wrapping PDDL.jl using JuliaPy","archived":false,"fork":false,"pushed_at":"2025-06-11T13:35:20.000Z","size":1672,"stargazers_count":32,"open_issues_count":13,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-11T16:51:04.323Z","etag":null,"topics":["artificial-intelligence","astar","automated-planning","dijsktra","julia","juliapy","pddl","planner","planners","pyjulia","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/APLA-Toolbox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-18T22:45:06.000Z","updated_at":"2025-06-20T10:28:55.000Z","dependencies_parsed_at":"2023-01-20T10:49:15.266Z","dependency_job_id":"dcb789e3-e888-40da-9c82-8f964a3cc757","html_url":"https://github.com/APLA-Toolbox/PythonPDDL","commit_stats":{"total_commits":260,"total_committers":6,"mean_commits":"43.333333333333336","dds":0.2615384615384615,"last_synced_commit":"589a476f3186cee90ec867921588940cfaf6091c"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/APLA-Toolbox/PythonPDDL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APLA-Toolbox%2FPythonPDDL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APLA-Toolbox%2FPythonPDDL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APLA-Toolbox%2FPythonPDDL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APLA-Toolbox%2FPythonPDDL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/APLA-Toolbox","download_url":"https://codeload.github.com/APLA-Toolbox/PythonPDDL/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APLA-Toolbox%2FPythonPDDL/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268348670,"owners_count":24236299,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","astar","automated-planning","dijsktra","julia","juliapy","pddl","planner","planners","pyjulia","python"],"created_at":"2025-03-30T19:19:25.099Z","updated_at":"2025-10-07T11:07:52.968Z","avatar_url":"https://github.com/APLA-Toolbox.png","language":"Python","funding_links":["https://www.buymeacoffee.com/dq01aOE"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \n\u003cimg src=\"https://svgshare.com/i/TGq.svg\" alt=\"Logo\" width=\"200\"\u003e     \n    \n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# Python PDDL\n\n✨ A Python wrapper using JuliaPy for the PDDL.jl parser package and implementing its own planners. ✨\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \n![tests](https://github.com/APLA-Toolbox/PythonPDDL/workflows/tests/badge.svg?branch=main)\n![build](https://github.com/APLA-Toolbox/PythonPDDL/workflows/build/badge.svg?branch=main)\n[![codecov](https://codecov.io/gh/APLA-Toolbox/PythonPDDL/branch/main/graph/badge.svg?token=63GHA9JUND)](https://codecov.io/gh/APLA-Toolbox/PythonPDDL)\n[![CodeFactor](https://www.codefactor.io/repository/github/apla-toolbox/pythonpddl/badge)](https://www.codefactor.io/repository/github/apla-toolbox/pythonpddl)\n[![Percentage of issues still open](http://isitmaintained.com/badge/open/APLA-Toolbox/PythonPDDL.svg)](http://isitmaintained.com/project/APLA-Toolbox/PythonPDDL \"Percentage of issues still open\")\n[![GitHub license](https://img.shields.io/github/license/Apla-Toolbox/PythonPDDL.svg)](https://github.com/Apla-Toolbox/PythonPDDL/blob/master/LICENSE)\n[![GitHub contributors](https://img.shields.io/github/contributors/Apla-Toolbox/PythonPDDL.svg)](https://GitHub.com/Apla-Toolbox/PythonPDDL/graphs/contributors/)\n![PipPerMonths](https://img.shields.io/pypi/dm/jupyddl.svg)\n[![Pip version fury.io](https://badge.fury.io/py/jupyddl.svg)](https://pypi.python.org/pypi/jupyddl/)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \n[Report Bug](https://github.com/APLA-Toolbox/PythonPDDL/issues) · [Request Feature](https://github.com/APLA-Toolbox/PythonPDDL/issues)\n\nLoved the project? Please consider [donating](https://www.buymeacoffee.com/dq01aOE) to help it improve!\n\n\u003c/div\u003e\n\n## Features 🌱\n\n- ✨ Built to be expanded: easy to add new planners\n- 🖥️ Supported on MacOS and Ubuntu\n- 🎌 Built with Julia and Python\n- 🔎 Uninformed Planners (DFS, BFS)\n- 🧭 Informed Planners (Dijkstra, A*, Greedy Best First)\n- 📊 Several general purpose heuristics (Goal Count, Delete Relaxation [Hmax, Hadd], Critical Path [H1, H2, H3], Relaxed Critical Path [H1, H2, H3])\n- 🍻 Maintained (Incoming: Landmarks Heuristics...)\n\n## Docker 🐋\n\nYou can also use the project in a docker container using [docker-pythonpddl](https://github.com/APLA-Toolbox/docker-pythonpddl)\n\n## Install 💾\n\n- Install Python (3.7.5 is the tested version)\n\n- Install Julia\n\n```bash\n$ wget https://julialang-s3.julialang.org/bin/linux/x64/1.5/julia-1.5.2-linux-x86_64.tar.gz\n$ tar -xvzf julia-1.5.2-linux-x86_64.tar.gz\n$ sudo cp -r julia-1.5.2 /opt/\n$ sudo ln -s /opt/julia-1.5.2/bin/julia /usr/local/bin/julia\n```\n\n- Install Julia dependencies\n\n```bash\n$ julia --color=yes -e 'using Pkg; Pkg.add(Pkg.PackageSpec(path=\"https://github.com/APLA-Toolbox/PDDL.jl\"))'\n$ julia --color=yes -e 'using Pkg; Pkg.add(Pkg.PackageSpec(path=\"https://github.com/JuliaPy/PyCall.jl\"))'\n```\n\n- Package installation (only if used as library, not needed to run the scripts)\n\n```bash\n$ python3 -m pip install --upgrade pip\n$ python3 -m pip install jupyddl\n```\n\n## IPC Script ⚔️\n\n- Clone the project :\n```shell\n$ git clone https://github.com/APLA-Toolbox/PythonPDDL\n$ cd PythonPDDL\n$ python3 -m pip install -r requirements.txt\n$ git submodule update --init // Only if you need PDDL files for testing\n```\n\n- Run the script :\n```shell\n$ cd scripts/\n$ python ipc.py \"path_to_domain.pddl\" \"path_to_problem.pddl\" \"path_to_desired_output_file\"\n```\n\nThe output file will show the path with a list of state, the path with a list of action and the metrics proposed by IPC2018.\n\n## Basic Usage 📑\n\nIf using the jupyddl pip package:\n\n- If you want to use the data analysis tool, create a pddl-examples folder with pddl instances subfolders containing \"problem.pddl\" and \"domain.pddl\". (refer to APLA-Toolbox/pddl-examples)\n\nIf you want to use it by cloning the project:\n\n```shell\n$ git clone https://github.com/APLA-Toolbox/PythonPDDL\n$ cd PythonPDDL\n$ python3 -m pip install -r requirements.txt\n$ git submodule update --init\n```\n\nYou should have a `pddl-examples` folder containing PDDL instances.\n\n### AutomatedPlanner Class 🗺️\n\n```python\nfrom jupyddl import AutomatedPlanner # takes some time because it has to instantiate the Julia interface\napl = AutomatedPlanner(\"pddl-examples/dinner/domain.pddl\", \"pddl-examples/dinner/problem.pddl)\n\napl.available_heuristics\n[\"basic/zero\", \"basic/goal_count\", \"delete_relaxation/h_max\", \"delete_relaxation/h_add\"]\n\napl.initial_state\n\u003cPyCall.jlwrap PDDL.State(Set(Julog.Term[row(r1), column(c3), row(r3), row(r2), column(c2), column(c1)]), Set(Julog.Term[white(r2, c1), white(r1, c2), white(r3, c2), white(r2, c3)]), Dict{Symbol,Any}())\u003e\n\nactions = apl.available_actions(apl.initial_state)\n[\u003cPyCall.jlwrap flip_row(r1)\u003e, \u003cPyCall.jlwrap flip_row(r3)\u003e, \u003cPyCall.jlwrap flip_row(r2)\u003e, \u003cPyCall.jlwrap flip_column(c3)\u003e, \u003cPyCall.jlwrap flip_column(c2)\u003e, \u003cPyCall.jlwrap flip_column(c1)\u003e]\n\napl.satisfies(apl.problem.goal, apl.initial_state)\nFalse\n\napl.transition(apl.initial_state, actions[0])\n\u003cPyCall.jlwrap PDDL.State(Set(Julog.Term[row(r1), column(c3), row(r3), row(r2), column(c2), column(c1)]), Set(Julog.Term[white(r2, c1), white(r1, c1), white(r3, c2), white(r2, c3), white(r1, c3)]), Dict{Symbol,Any}())\u003e\n\npath = apl.breadth_first_search() # computes path ([]State) with BFS\n\nprint(apl.get_state_def_from_path(path))\n[\u003cPyCall.jlwrap PDDL.State(Set(Julog.Term[row(r1), column(c3), row(r3), row(r2), column(c2), column(c1)]), Set(Julog.Term[white(r2, c1), white(r1, c1), white(r3, c2), white(r2, c3), white(r1, c3)]), Dict{Symbol,Any}())\u003e, \u003cPyCall.jlwrap PDDL.State(Set(Julog.Term[row(r1), column(c3), row(r3), row(r2), column(c2), column(c1)]), Set(Julog.Term[white(r2, c1), white(r1, c1), white(r2, c3), white(r1, c3), white(r3, c3), white(r3, c1)]), Dict{Symbol,Any}())\u003e, \u003cPyCall.jlwrap PDDL.State(Set(Julog.Term[row(r1), column(c3), row(r3), row(r2), column(c2), column(c1)]), Set(Julog.Term[white(r2, c1), white(r1, c1), white(r1, c2), white(r3, c2), white(r2, c3), white(r1, c3), white(r3, c3), white(r3, c1), white(r2, c2)]), Dict{Symbol,Any}())\u003e]\n\nprint(apl.get_actions_from_path(path))\n[\u003cPyCall.jlwrap flip_row(r1)\u003e, \u003cPyCall.jlwrap flip_row(r3)\u003e, \u003cPyCall.jlwrap flip_column(c2)\u003e]\n```\n\n### DataAnalyst (more like Viz) Class 📈\n\nMake sure you have a pddl-examples folder where you run your environment that contains independent folders with \"domain.pddl\" and \"problem.pddl\" files, with those standard names. ( if you didn't generate with git submodule update )\n\n```python\nfrom jupyddl import DataAnalyst\n\nda = DataAnalyst()\nda.plot_astar() # plots complexity statistics for all the problem.pddl/domain.pddl couples in the pddl-examples/ folder\n\nda.plot_astar(problem=\"pddl-examples/dinner/problem.pddl\", domain=\"pddl-examples/dinner/domain.pddl\") # scatter complexity statistics for the provided pddl\n\nda.plot_astar(heuristic_key=\"basic/zero\") # use h=0 instead of goal_count for your computation\n\nda.plot_dfs() # same as astar\n\nda.comparative_data_plot() # Run all planners on the pddl-examples folder and plots them on the same figure, data is stored in a data.json file \n\nda.comparative_data_plot(astar=False) # Exclude astar from the comparative plot\n\nda.comparative_data_plot(heuristic_key=\"basic/zero\") # use zero heuristic for h based planners\n\nda.comparative_data_plot(collect_new_data=False) # uses data.json to plot the data\n\nda.comparative_astar_heuristic_plot() # compare results of astar with all available heuristics\n```\n\n## Cite 📰\n\nIf you use the project in your work, please consider citing it with:\n```\n@misc{https://doi.org/10.13140/rg.2.2.22418.89282,\n  doi = {10.13140/RG.2.2.22418.89282},\n  url = {http://rgdoi.net/10.13140/RG.2.2.22418.89282},\n  author = {Erwin Lejeune},\n  language = {en},\n  title = {Jupyddl,  an extensible python library for PDDL planning and parsing},\n  publisher = {Unpublished},\n  year = {2021}\n}\n```\n\nList of publications \u0026 preprints using `jupyddl` (please open a pull request to add missing entries):\n\n* [name](link) (month year)\n\n## Contribute 🆘\n\nPlease see `docs/CONTRIBUTING.md` for more details on contributing!\n \n## Maintainers Ⓜ️\n\n- Erwin Lejeune\n- Sampreet Sarkar\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapla-toolbox%2Fpythonpddl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapla-toolbox%2Fpythonpddl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapla-toolbox%2Fpythonpddl/lists"}