Chapter 41. Hierarchical State Machines
Complex behaviors are difficult to create as regular finite-state machines. Tasks can generally be decomposed into increasingly detailed subtasks. (For instance, playing deathmatch relies on the capability to gather items, attack, and defend.) This approach is reminiscent of AI architectures in general—as discussed throughout this book. In the case of finite-state machines, individual finite-state machines are designed in the normal fashion, but these are accumulated in layers by nesting finite-state machines within each other. Thanks to abstraction and modularity, hierarchical finite-state machines (HFSMs) significantly reduce the complexity of the asset development pipeline. Hierarchies, however, do not increase the computational power of the system.
This chapter covers the following topics:
The technology presented in this chapter is used in the next chapter to improve the model of animat emotions.