CS/IMGD 4100 (C 16)

Homework Assignment #3

Tank States

Due by Web Turn-In: 11:59pm, Sunday, January 24

(See general homework instructions for turn-in details.)

The purpose of this assignment is to gain experience formalizing a modestly complicated AI behavior as a finite state machine. Imagine that you are an AI developer in a game company and one of the designers has given you the textual tank behavior specification below. Your job is to formalize the behavior as a state machine clearly enough so that your documentation could be handed off to a low-level programmer to implement (who may be you!).

Here are the basic steps and work products you should go through:

  1. Create a table that describes each state, the game properties it references, and the actions that occur in that state. (Buckland does not have an example of this kind of table.)

  2. Create a table of conditions (boolean functions) that will be used to control transition between states. (See example of Table 2.1 on page 47 in Buckland.)

  3. Draw a "bubble and arrow" diagram for the finite state machine.
If you decide to use a hierarchical state state machine (which is optional), then you will have "bubbles inside of bubbles" in your diagram and there will be a separate pair of tables (for part 1 and part 2 above) for each nested state machine.

Remember, this is a detailed design document, not an implementation. At this level of design, don't worry about variable names, which information is stored in state instances vs. game entities (singleton state implementation), etc.

Finally, don't be surprised if you discover during the formalization process that the textual behavior specification below is incomplete (that's typical and part of the goal of formalization). Make reasonable decisions on the incomplete cases and document them.

Tank Behavior Specification

(NB: Do not make a state machine with just three states!)

Initialization

Combat Termination

What to Turn In

Grading

Please post any questions to the myWPI forum for the course.

Acknowledgement: I would like to thank Robin Burke for allowing the reuse of this assignment.