top of page

"Goal Oriented Action Planning(aka GOAP, rhymes with soap) refers to a STRIPS-like planning architecture specifically designed for real-time control of autonomous character behavior in games" - Jeff Orkin

First used in 2005 in the game F.E.A.R, GOAP uses a set of actions, kind of like a Finite State Machine, but by disconnecting this actions, scaling up systems become much easier.

So this

FSM.png

Becomes this

GOAP.png

And actions can be connected by the planner, which makes adding new actions a lot easier.

As you can see here, each AI agent has an overall goal, and the current state (usually referred as world state) and the Planner can switch actions based on the world space.

Synthwave-Themed-Runner-FLUVORE.gif
Actions.PNG

Each enemy holds a set of possible actions he can do

Data.PNG
Effects and preconditions.PNG

And each action had its data, and the data holds 3 things, the preconditions for the effect (or what the world state needs to be in order to do the action)

The effects this action has on the world state, and the cost of the action (if two actions have the same effect, the action with the lower cost will be done).

The planner script is responsible for checking what actions are currently available and if they achieve the goal we need.

freemind[1].png

Picture taken from "Goal Oriented Action Planning For Smarter AI" by Brent Owens showing how the Planner works

Once the planner has found a path, it queues up the actions, and that pretty much it, now this example is pretty small scale and a Finite State Machine would have worked just as well, but now these scripts can be dropped into any project and adapted to the needs of that project.

Seen.gif
HereticAi.gif

Two examples of this system on two of my games

bottom of page