Git Product home page Git Product logo

goal-stack-planning's Introduction

Goal Stack Planning

GSP is combination of both the Backward chaining and Forward chaining. GSP considers actions by reasoning in the backward manner, but commits itself to actions only in the forward manner.It pushes sub goals onto the stack, and picks up action only if the preconditions are satisfied

Algorithm

while stack is not empty:
    if top of stack is predicate:
        if predicate is true:
            pop it
  
    else:
        pop it
        push corresponding action that will satisfy that predicate onto stack
        push preconditions of that action

    if top of stack is action:
        pop it
        perform the action i.e add and delete it's effects from current state.
        add that action to the actual plan
 

Example

Consider below stacks


-----                   -----  -----
| B |                   | C |  | B |
-----  -----  -----     -----  -----
| A |  | C |  | D |     | A |  | D |
-----  -----  -----     -----  -----
___________________     ____________
      Start                Goal     


Plan :: 

stack B D
unstack B A
stack C A

-----------------------------------------------
                  
                  -----
                  | A |
-----             -----
| C |             | B |
-----  -----      -----
| A |  | B |      | C |
-----  -----      ----- 
____________      ______
   Start           Goal


Plan:

unstack C A
putdown C
stack B C
stack A B

goal-stack-planning's People

Contributors

ap-atul avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ridhya483

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.