{"id":31939324,"url":"https://github.com/aig-upf/pgp-landmarks","last_synced_at":"2026-07-27T08:31:39.941Z","repository":{"id":79910974,"uuid":"489984733","full_name":"aig-upf/pgp-landmarks","owner":"aig-upf","description":"Progressive Generalized Planning with Landmarks","archived":false,"fork":false,"pushed_at":"2022-05-08T15:47:34.000Z","size":86,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-23T06:36:58.949Z","etag":null,"topics":["automated-planning","generalized-planning","program-synthesis"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aig-upf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-08T15:39:41.000Z","updated_at":"2024-09-24T11:07:47.000Z","dependencies_parsed_at":"2023-05-30T13:45:48.990Z","dependency_job_id":null,"html_url":"https://github.com/aig-upf/pgp-landmarks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aig-upf/pgp-landmarks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aig-upf%2Fpgp-landmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aig-upf%2Fpgp-landmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aig-upf%2Fpgp-landmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aig-upf%2Fpgp-landmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aig-upf","download_url":"https://codeload.github.com/aig-upf/pgp-landmarks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aig-upf%2Fpgp-landmarks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35945273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-27T02:00:06.776Z","response_time":101,"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":["automated-planning","generalized-planning","program-synthesis"],"created_at":"2025-10-14T08:25:47.536Z","updated_at":"2026-07-27T08:31:39.936Z","avatar_url":"https://github.com/aig-upf.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Progressive Generalized Planning\nThis code computes planning programs that progressively solve planning instances, which builds on top of the [Best First Generalized Planning](https://github.com/rleap-project/best-first-generalized-planning) engine.\nIt starts with a short tutorial, and later explains every step in more detail.\n\n## Short Tutorial\n\n1. Generate folders and compile the project.\n```shell\n./scripts/compile_all.sh\n```\n2. Generate synthesis and validation instances of Visitall domain.\n```shell\n./domain/generators/visitall.py 2 11 domain/synthesis/visitall/\n./domain/generators/visitall.py 12 61 domain/validation/visitall/\n```\n3. Search a program that solves Visitall\n```shell\n./main.bin PGP 7 domain/synthesis/visitall/\n```\nThe resulting program should looks like:\n```shell\n0. visit(i,j)\n1. inc(i)\n2. goto(0,!(( zf = 1 )))\n3. clear(i)\n4. inc(j)\n5. goto(0,!(( zf = 1 )))\n6. end\n```\n4. Validate the output program, with and without infinite detection.\n```shell\n./validator.bin experiments/synthesis/visitall_PGP_7_landmarks.prog domain/validation/visitall/ INF\n./validator.bin experiments/synthesis/visitall_PGP_7_landmarks.prog domain/validation/visitall/ NOINF\n```\nBoth validations should finish with an `[INFO] GOAL ACHIEVED!`\nGreat! You have computed your first planning program :-).\n\n## Long Tutorial\n### Required folders and project compilation\nThe next command is used to generate required folders and compile the whole project:\n\n```shell\n./scripts/compile_all.sh\n```\nThe compilation will generate a ```main.bin``` and ```validator.bin``` executables file in the root folder.\n\n### Generating random inputs\n\nThe inputs are randomly generated from a high-level specification, and some require to install the Tarski module, i.e. ```pip install tarski```.\nThe next are the examples used in the project to generate the original domains and instances:\n\n```shell\n./domain/generators/baking.py 1 10 0 domain/synthesis/baking/\n./domain/generators/ontable.py 10 15 1 domain/synthesis/ontable/\n./domain/generators/corridor-strips.py 5 14 domain/synthesis/corridor-strips/\n./domain/generators/gripper.py 2 11 domain/synthesis/gripper/\n./domain/generators/intrusion.py 1 10 0 domain/synthesis/intrusion/\n./domain/generators/lock.py 5 14 0 domain/synthesis/lock/\n./domain/generators/spanner.py 1 10 0 domain/synthesis/spanner/\n./domain/generators/visitall.py 2 11 domain/synthesis/visitall/\n```\n\n### Searching a planning program\nHere we show few examples which loads the landmarks heuristic by default:\n\n```shell\n./main.bin PGP 7 domain/synthesis/visitall/ \n./main.bin PGP 8 domain/synthesis/gripper/ \n./main.bin PGP 9 domain/synthesis/intrusion/ \n./main.bin PGP 11 domain/synthesis/corridor-strips/ \n./main.bin PGP 13 domain/synthesis/baking/ \n./main.bin PGP 12 domain/synthesis/lock/ \n./main.bin PGP 12 domain/synthesis/spanner/ \n./main.bin PGP 11 domain/synthesis/ontable/ \n```\n\n### Validating a program\n\nGenerating the original domains and validation instances:\n```shell\n./domain/generators/baking.py 11 60 0 domain/validation/baking/\n./domain/generators/ontable.py 16 65 1 domain/validation/ontable/\n./domain/generators/corridor-strips.py 12 61 domain/validation/corridor-strips/\n./domain/generators/gripper.py 12 61 domain/validation/gripper/\n./domain/generators/intrusion.py 11 60 0 domain/validation/intrusion/\n./domain/generators/lock.py 12 61 0 domain/validation/lock/\n./domain/generators/spanner.py 12 61 0 domain/validation/spanner/\n./domain/generators/visitall.py 12 61 domain/validation/visitall/\n```\n\nValidating a specific program with infinite program detection by default:\n```shell\n./validator.bin experiments/synthesis/visitall_PGP_7_landmarks.prog domain/validation/visitall/\n```\n\nExplicit validation with/out infinite program detection (after computing Visitall with landmarks heuristic):\n```shell\n./validator.bin experiments/synthesis/visitall_PGP_7_landmarks.prog domain/validation/visitall/ INF\n./validator.bin experiments/synthesis/visitall_PGP_7_landmarks.prog domain/validation/visitall/ NOINF\n```\n\n## Reproducing SoCS 2022 Experiments\n\n\u003e This is a remainder that some experiments, like validation with infinite detection, may exhaust your computer resources.\n\nIn order to reproduce SoCS 2022 experiments simply run:\n```shell\n./scripts/socs22_experiments.sh\n```\n\nThis will generate the results for PGP using the goal counting heuristic (a.k.a. h5) and the landmarks heuristic in the ```./experiments/synthesis/``` folder.\nEvery experiment has a \".out\" file, if it finds a solution also generates a \".prog\" file with the planning program, and landmarks heuristic also generates a \".lg\" file for each input planning instance with its landmark graph.\nIn case the user wants to compute BFS algorithm instead of PGP, set \nthe first synthesis argument to BFS, i.e. ```./main.bin BFS 7 domain/synthesis/visitall/```.\n\nThis script consists of the following commands which should succeed (given the paper settings):\n```shell\n./scripts/compile_all.sh\n./scripts/synthesis_generators.sh\n./scripts/synthesis_experiments.sh\n./scripts/synthesis_combined_pgp_landmarks_h1.sh\n./scripts/synthesis_combined_bfs_h5_h1.sh\n./scripts/validation_generators.sh\n./scripts/validation_experiments.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faig-upf%2Fpgp-landmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faig-upf%2Fpgp-landmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faig-upf%2Fpgp-landmarks/lists"}