Game Development Reference
In-Depth Information
We start with the goal. The only action that transforms the world state to the goal
state is the ''use bucket'' action. The precondition for using the bucket is not met,
so we seek actions that will transform the world state to one where the pre-
conditions are met.
The mend the bucket action has the postcondition of the bucket being mended,
which meets the preconditions needed for using the bucket. This might not be the
first time that the bucket needed to be mended. If the world state had included
leftover straw from the last time the bucket was mended, all of the outstanding
preconditions would be met, and we would get a shorter plan that used the state
of the world instead of more actions. In our case, we do not have cut straw.
The cut straw to length action has that as a postcondition. To make use of this
action, we need to meet three preconditions. The state of the world provides us
with a knife and with straw meeting two of the preconditions, but the knife is
dull, giving our plan another outstanding precondition. If we cannot find a way
to meet this outstanding precondition, this particular plan will fail.
The sharpen knife action can meet the outstanding precondition, but it adds two
preconditions of its own. The world state provides both the knife and the stone,
meeting all of our outstanding preconditions. This leaves us with a workable plan;
the world state, when transformed by a string of actions, meets the goal state.
Our simple example illustrates chaining actions together into a plan but leaves
out dealing with alternatives and failures. We might also have scissors capable of
cutting the straw but lack a sharpening stone. As you might expect, an initial plan
to use the knife would fail to meet all of its outstanding preconditions, and the
planner would explore using the scissors instead. We will see these facets of
planning in the sections on GOAP and HTN planners.
The ideas behind STRIPS are reasonably easy to grasp. The complexities of
programming the system are not trivial. A great deal of effort needs to be applied
to the knowledge-representation problem presented by states, preconditions,
and postconditions. The knowledge-representation issues have implications
about the interface between the planning system and the game. STRIPS is not
widely used in games.
GOAP
If Damian Isla's presentation on behavior trees at the 2005 Game Developers
Conference put that method on the radar of game AI programmers, then Jeff
 
 
Search Nedrilad ::




Custom Search