Game Development Reference
In-Depth Information
Table 10.1 Hole-in-the-Bucket States
Kitchen has no water.
Bucket has a hole.
Have straw.
Straw is too long.
Have a knife.
Knife is dull.
Have a stone.
Kitchen has water.
A plan is a sequence of actions leading to a goal. Every precondition of every
action that is not forced to be true by a prior action in the plan must be true in the
initial state that is used to develop the plan. If those conditions are true and the
plan is successfully executed, then the world state will match the goal state at the
Let us revisit our example of Henry and the bucket. Our states are given in
Table 10.1. We have two states of interest: the state of the world and our goal
state. The goal state only has one condition: showing that most states are far
simpler than the world state.
To transform the world state so that it also matches the goal state, we have the
actions listed in Table 10.2. The column order shows how the action transforms
the state of the world; start with the preconditions and perform the action to get
the postconditions.
Table 10.2 Hole-in-the-Bucket Actions
Bucket is mended
Use bucket
Water is delivered.
Cut straw is available
Mend bucket with straw
Bucket is mended.
Have a knife
Have straw
Knife is sharp
Cut straw to length
Cut straw is available.
Have a stone
Have a knife
Sharpen knife
Knife is sharp.
Search Nedrilad ::

Custom Search