JavaScript EditorFree JavaScript Editor     Ajax Editor 

Main Page
  Previous Section Next Section

Chapter 15. Shooting, Formally

Key Topics

Taking a gun out of a wooden box, turning one's back to the opponent, walking 20 paces before turning and opening fire can be seen as a formalization of the shooting process. However, this is not quite what's in store for this chapter, which focuses on a mathematical definition of shooting upon which to build the AI. Then, the animats could handle duels if so desired!

The preceding chapter investigated some of the principles behind combat—notably prediction, aiming, and firing. The main concern is not directly to satisfy the requirements given, but to make a solution possible by extending the framework. A flexible interface is ideal, supporting a wide variety of possible solutions.

This chapter covers the following topics:

  • The general task at hand and ideas about how to formalize interfaces

  • Possible specifications for the inputs and outputs of the problem

  • Rationalization of these options, notably with criteria for the decision

  • A formal specification using C++ data structures

At the end of this chapter, we'll have an understanding of what information the shooting behavior has to deal with. A code skeleton will also be ready for our first prototype.

      Previous Section Next Section

    JavaScript EditorAjax Editor     JavaScript Editor