This part is dedicated to creating a fully mobile game character, capable of reactive activities such as obstacle avoidance and wall following. The concepts of movement are explained, and two different solutions are proposed—one for each behavior. Our knowledge of rule-based systems will also be cultivated, and the first few stages of the AI development process are presented. Most importantly, by the end of this part, we'll have a basic AI to build upon.
Even the simplest living creatures can move; it's a fundamental skill for most of them. In games, the background cast pretty much only moves around, so after this chapter, we could have lots of "extras"—like in films!
Movement is an ability that can be re-created relatively simply. It takes much effort to improve on that, but it's a good place for us to start. The abundance of existing work on the subject will come in handy as guidance.
More elaborate behaviors (for instance, hunting and gathering) are almost always based on movement. So, before we get too ambitious, it seems wise to spend some time on this fundamental activity. By the time we develop more sophisticated AI, our experience will have grown enough to enable us to handle it without whimpering!
This part consists of eight chapters, providing an ideal blend of theory, practice, and concepts—at least partly related to movement or its development.
Chapter 5, "Movement in Game Worlds." First, the importance of the game environment is analyzed, because it can be a challenge even for human players. We also discuss the handling of movement by the engine.
Chapter 6, "Moving Abilities." The problem of navigation in computer games is understood by examining the human approach to movement, revealing how AI characters can copy their behavior. This chapter defines the ability in detail, and provides a set of criteria for evaluating the motion of the animats.
Chapter 7, "Analysis and Understanding." Next, we suspend our quest for movement to explain the importance of the analysis and understanding phases in AI development generally. These are crucial stages for creating artificial intelligence—and not only movement behaviors.
Chapter 8, "Formalizing Motion." Back to movement again, we build on the assumptions we identified by establishing a formal specification of the problem. This provides a set of interfaces with the environment and an empty code skeleton; this is a good base waiting for the right solution to be implemented.
Chapter 9, "Specifications and Knowledge Representation." This chapter discusses the importance of specifying the problem. Notably, this relies extensively on the subject of knowledge representation, which we explain in detail. Then, we show how to conduct the specification phase generally.
Chapter 10, "Steering Behaviors for Obstacle Avoidance." The development focuses on the problem of obstacle avoidance first. As a simple technique for this task, an approach from artificial life is explained; steering behaviors can be applied to create an animat that can prevent collisions. This simple implementation will reveal a few problems, so better alternatives are investigated.
Chapter 11, "Rule-Based Systems." Rule-based systems will come to the rescue, and the concepts are explained. Taking a game developer's approach to the technique, this chapter presents commonly used tricks.
Chapter 12, "Synthesizing Movement with Rule-Based Systems." Once described, an expert system is applied to another movement problem: wall following—with practical issues explained along the way. Then, a few exercises enable us to apply our recently acquired knowledge.
This is the first practical part, so there's little to rely on. We'll assume the following tools and software are available:
A game engine that is ready for AI characters. This will need to support movement with a simple physical model and animation system. This is a lucky position for us to be in, because the AI is often developed alongside the engine. However, the same critical analysis can be applied when the engine is being developed.
A variety of different environments that will be used to develop and test the animat's moving abilities. These can—and should—be game levels used by human players.
A development framework to support the development of the AI, namely FEAR—as described in Part I.
These basic requirements will serve as a basis for all the other parts, too. The remaining support facilities are explained as we go through the development process.