AI architectures allow focused techniques to be assembled together to produce behaviors and capabilities. As levels of intelligence need to scale up, architectures will play an increasingly important role in the development of commercial game AI systems.
The idea behind patterns is to provide guidance for custom architectures using proven designs (reminiscent of software engineering). This book presents a variety of different AI architectures, but most are based on the same pattern. This pattern results from a modular approach that abstracts the common functionality as reusable capabilities, and provides behaviors that are convenient to experiment with.
At the lowest level, AI techniques are encapsulated modules. By abstracting out the implementation behind common interfaces, the techniques themselves become transparent and interchangeable. Therefore, the AI engineer can design the architecture first, and afterward decide which technique is used to provide the functionality.
Many of the AI techniques discussed in this book can in fact provide very similar functionality, such as pattern recognition, regression, or prediction. This includes neural networks, finite-state machines, or rule-based systems, each of which can provide control or problem-solving facilities interchangeably. Because of the tremendous flexibility of such technology, it can be easily reused in many parts of the architecture.
A common set of practical capabilities provides tremendous assistance when creating the illusion of intelligence. For example, movement, shooting, and weapon selection are capabilities. Each of them is a component built upon the AI techniques—generally only one.
There are two different ways to implement the capabilities to make them readily available for nonplayer character (NPC) development:
Because game AI is based on the appearance of intelligence, visible behaviors are the essence of the problem. Therefore, behavior-based design provides many advantages for game developers, allowing them to use techniques from nouvelle AI such as incremental development and extensive testing.
Compared to lower-level tasks, the arbitration is relatively simple because all the details are abstracted out by the behavioral components. This makes them simple to handle from every point of view:
The flexibility in the implementation of the arbitration is an incredible advantage for game AI developers, because they can opt for the simplest solution first—using adaptive techniques to provide interesting behaviors within the game.