There are two different subtypes of finite state techniques:
The essence of finite-state models is the transition function. There are different ways to represent and simulate it in practice:
The graph-based implementation scales better with the number of states, and tends to perform more efficiently. Simple declarative models of the theory can be used as decision-making components, but procedural approaches are more convenient for control problems:
Occasionally, there are problems with the procedural approach, notably loss of information and ambiguity in the transitions—which can result in unforeseen bugs in the behaviors. These can be resolved with a simple priority queue of messages if necessary.
Finite-state machines are one of the most suitable AI techniques for game AI development. That said, they have some conceptual problems that cannot be resolved by clever implementation. Chapters 40 and 41 discuss nondeterministic machines, probabilistic finite-state machines, fuzzy-state machines, and hierarchical-state machines. These remedy most of the other problems associated with finite-state machines.
The next chapter applies finite-state machines to modeling emotions, and provides a few examples of how to use finite-state machines in practice.