I just learned about Goal-Oriented Action Planning (GOAP, sources below) as used in AI programming. I'm making a state machine for a player-controlled character and was wondering if it can be replaced by a GOAP model? Does this make sense? Or is GOAP only for AI?


  • \$\begingroup\$ I wouldn't recommend an AI planning algorithm for a play character, since you don't have automated decision-making (everything is decided by the player). Just change state based on player input - do you really have anything affecting the player character involving a decision that needs to be made but won't be made by the player? \$\endgroup\$ – yoozer8 Feb 28 '12 at 2:34

I assume that you mean a character whose every action is controlled by the player (e.g. the style commonly seen in everything from FPS, platforming, action-adventure, etc). This is in contrast to characters in say, an RTS game, where something like GOAP may be completely appropriate.

Planning systems are commonly bundled with a goal-selection system (e.g. agents ask "What is my most important priority?"), which typically boils down to goals individually emitting real-valued "activation levels" and the system planning to achieve the goal with the highest activation level.

This makes it particularly difficult to apply to player-controlled characters. When you press the left key, for instance, you want him to move left now, rather than having the "move left" goal's activation level increase in value, hoping that is beats out whatever the currently active goal is, and then having the planner eventually find a sequence of actions that will lead to moving left.

At some point, all of your planning systems have to resolve to something that "does the right thing" (see the famous paper: http://people.csail.mit.edu/brooks/papers/Planning%20is%20Just.pdf). In the case of player controls, you always want to do the right thing, which makes planning seem inappropriate.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.