Getting Started
Entities
Levels
Goal Oriented Action Planning (GOAP)
What is GOAP?
GOAP is a planning architecture created by
Jeff Orkin
at the MIT Media Lab. It is a simplified STRIPS-like planning architecture. STRIPS was invented (along with A* Planning)
at SRI in the early 70s. For more information on the history of STRIPS and A* check out
this video
by Nils Nilsson.
The three key concepts in GOAP are Actions, Preconditions, and Effects. An Action can only be performed if
all of its Preconditions are met. Effects are the changes that occur from the Action being performed. In TAI
Actions are Mappings, Preconditions are InputConditions, and Effects are OutputChanges.
The other key concept in GOAP is that planning starts with a Goal and plans backwards until it finds a plan the
Agent can perform. Actions can chain together as an Effect can cause a Precondition to become satisfied.
In TAI Goals are to reduce the highest priority Drive Level and Mappings can chain together to create Plan Trees.
For more info check out this great talk on GOAP:
Goal-Oriented Action Planning: Ten Years of AI Programming
Total AI's GOAP-like System
TAI comes with a GOAP-like planning system which is easy to add to any agent. It relies on Mappings
to create planning trees where a childs's Output Change can link to a parents's failed Input Condition.
It uses the BaseDT which should have the GOAPPT set as it's one and only one Planner Type. In GOAPPT
you can set the max levels of chaining. This defaults to 5 and should be kept low for perforance reasons.
Most plans are 2-3 levels deep but will depend on Mapping Type design.
GOAP Planner Manager Component
The GOAP Planner Manager component should be attached to an empty GameObject in any scene where at least one agent is using TAI's GOAP-like System. The planner manager contains all of the logic for generating plan trees and also caches information on which Input Conditions are fixed by which Output Changes in order to increase planning perforance.