Finite State Machine (FSM)

What is a Finite State Machine?


An FSM is an AI system which consists of states and transitions. An Agent is in a state and then checks to see if they should transistion to any other states.

Total AI's FSM System


In TAI an Action is the State and a transition simply occurs when a Mapping Types ICs all pass.

TAI comes with a Finite State Machine planning system which is easy to add to any agent. It uses the BaseDT (same one GOAP uses) and the FiniteStateMachinePT. There is no Mapping chaining is this Planner, so all Plans consist of one Mapping.

The FiniteStateMachinePT requires a CurrentActionTypeICT to be set on it in its inspector. This is the key ICT for telling the system to check the Agent's current state (Action). The Mapping Types should use this ICT to only allow certain state transitions.

The other features of TAI, such as Drive Type and Utility considerations, can still be used so its easy to add functionality to an FSM based AI.