ABSTRACT

When discussing game AI, developers often get hyper-focused on advocating for a particular approach or a particular architecture, but many of the problems that make AI programming so hard appear regardless of the architecture you use, and many of the most common solutions have been reinvented time after time in architecture after architecture. For example, we can use hierarchy to divide up the AI logic, simplifying both configuration and execution. We can use option stacks to allow one option to temporarily suspend another, without changing the overall plan of attack. We can use a blackboard to share information and ideas between AI components or between characters. We can move the intelligence into the objects, the terrain, the abilities, or the events in order to more logically divide the code and data, and to improve our ability to extend the game. (Some games, such as The Sims franchise, have used this approach to ship downloadable content or even entire expansion packs without a change to the executable.) Finally, we can use modularity to extract reusable pieces of AI logic, thus simultaneously eliminating duplicate code and enabling the AI’s author to think at a coarser level of granularity.