{"id":27024357,"url":"https://github.com/ap-atul/goal-stack-planning","last_synced_at":"2026-05-18T00:01:55.345Z","repository":{"id":130732686,"uuid":"302430895","full_name":"ap-atul/Goal-Stack-Planning","owner":"ap-atul","description":"Goal Stack Planning implementation","archived":false,"fork":false,"pushed_at":"2021-01-30T14:28:14.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-10T10:36:25.667Z","etag":null,"topics":["actions","artificial-intelligence","goal-stack-planner","predicates"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ap-atul.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}},"created_at":"2020-10-08T18:37:43.000Z","updated_at":"2021-04-18T19:51:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9181ed6-b544-43e8-9ff8-7237536ff4fd","html_url":"https://github.com/ap-atul/Goal-Stack-Planning","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ap-atul/Goal-Stack-Planning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ap-atul%2FGoal-Stack-Planning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ap-atul%2FGoal-Stack-Planning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ap-atul%2FGoal-Stack-Planning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ap-atul%2FGoal-Stack-Planning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ap-atul","download_url":"https://codeload.github.com/ap-atul/Goal-Stack-Planning/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ap-atul%2FGoal-Stack-Planning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33160167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"ssl_error","status_checked_at":"2026-05-17T22:39:10.741Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["actions","artificial-intelligence","goal-stack-planner","predicates"],"created_at":"2025-04-04T21:19:20.550Z","updated_at":"2026-05-18T00:01:55.338Z","avatar_url":"https://github.com/ap-atul.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Goal Stack Planning\nGSP is combination of both the Backward chaining and Forward chaining. GSP considers actions by reasoning in the\nbackward manner, but commits itself to actions only in the forward manner.It pushes sub goals onto the stack, and \npicks up action only if the preconditions are satisfied\n\n## Algorithm\n```console\n\nwhile stack is not empty:\n    if top of stack is predicate:\n        if predicate is true:\n            pop it\n  \n    else:\n        pop it\n        push corresponding action that will satisfy that predicate onto stack\n        push preconditions of that action\n\n    if top of stack is action:\n        pop it\n        perform the action i.e add and delete it's effects from current state.\n        add that action to the actual plan\n \n```\n\n## Example\nConsider below stacks\n\n```\n\n-----                   -----  -----\n| B |                   | C |  | B |\n-----  -----  -----     -----  -----\n| A |  | C |  | D |     | A |  | D |\n-----  -----  -----     -----  -----\n___________________     ____________\n      Start                Goal     \n\n\nPlan :: \n\nstack B D\nunstack B A\nstack C A\n\n-----------------------------------------------\n                  \n                  -----\n                  | A |\n-----             -----\n| C |             | B |\n-----  -----      -----\n| A |  | B |      | C |\n-----  -----      ----- \n____________      ______\n   Start           Goal\n\n\nPlan:\n\nunstack C A\nputdown C\nstack B C\nstack A B\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fap-atul%2Fgoal-stack-planning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fap-atul%2Fgoal-stack-planning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fap-atul%2Fgoal-stack-planning/lists"}