lookithat.blogg.se

Block world problem concept in prolog
Block world problem concept in prolog






block world problem concept in prolog

The preconditions are highlighted with red and the actions are marked with Bold. Now again push the precondition of the action Stack(B,D) into the stack. So the next step is to push the relevant action which could achieve the subgoal ON(B,D) in to the stack. The element is ON(B,D) which is a predicate and it is not true in our current world. The popped element is indicated with a strike-through in the above diagram. Next push the individual predicates of the goal into the stack. The following list of actions can be applied to the various situation in our problem.įirst step is to push the goal into the stack. The Goal state is what we have to achieve.

block world problem concept in prolog

Lets start here with the example above, the initial state is our current description of our world. The below example is from block world domain. For that, the preconditions are pushed into the stack once after an action is pushed. In other words the present situation of the world should be suitable enough to apply an operation. In order to apply an operation its precondition has to be satisfied. So after pushing the relevant action into the stack its precondition should also has to be pushed into the stack. Then compares it with the description of the current world, if it is satisfied or is already present in our current situation then there is nothing to do because already its true.On the contrary if the Predicate is not true then we have to select and push relevant action satisfying the predicate to the Stack. So based on the kind of element we are popping out from the stack a decision has to be made. When popping an element out of the stack the element could be either a predicate describing a situation about our world or it could be an action that can be applied to our world under consideration. Then it pushes the individual subgoals into the stack and its pops an element out of the stack. It starts by pushing the unsatisfied goals into the stack. The Goal Stack Planning Algorithms works will the stack. Push the individual predicates of the Precondition of the action into the Stack Push the individual Predicates of the Goal State into the Stack

block world problem concept in prolog

The Sub-goals can be solved one by one in any order. The stack can contain Sub-goal and actions described using predicates. This approach uses a Stack for plan generation. And it utilizes STRIP as a formal language for specifying and manipulating the world with which it is working. Goal Stack Planning (in short GSP) is the one of the simplest planning algorithm that is designed to handle problems having compound goals. Planning is useful for non-decomposable problems where subgoals often interact. Planning is process of determining various actions that often lead to a solution.








Block world problem concept in prolog