G5: When Pandemic started Full Spectrum Warrior (FSW), how important was the AI to the project?
These responses are given by Quinn Dunki – the AI programmer on Full Spectrum Warrior.
We always considered AI to be very important to the project. The nature of the game is such that the player’s own units are AI agents carrying out requested commands. That divorcing of direct control from the characters requires that their AI be top notch in order for the game experience to be fun and satisfying. AI bugs would be potentially very frustrating, since the player is relying on the AI agents to do the right thing with minimal input.
G5: How much of the AI in FSW is scripted, and how much of it is dynamic??
The enemy units are entirely scripted. We wanted the game play to be tightly controlled so that the Designers could present a specific experience to the player at each moment in the game. The best way to do that is to have carefully scripted enemies with minimal autonomy. The player’s soldiers, on the other hand, exhibit a lot of dynamic decision making and self sufficiency. They have no scripting at all. Because they are placed in dangerous situations, and the player is relying on them to protect themselves, they need to act independently much of the time. However, they have to balance that with carrying out player orders in a timely fashion.
G5: There are quite a large number of scenarios in FSW that the AI would need to account for. Could you explain how some of the dynamic enemy AI works??
The enemy units are completely scripted. We found this was the best way to present a precise tactical series of encounters. They do exhibit some minor dynamic behaviours through the use of hierarchical state machines and branching scripts within their given encounter situation. We experimented with more dynamic and autonomous enemies, but the game play just didn’t feel right.
G5: The friendly AI in FSW is fantastic — you never need to worry about your squad doing something stupid. Could you explain how some of the friendly squad-based AI works??
I could go on for hours about the US Soldier AI, as it was without a doubt the biggest AI challenge on the project. Their decision making is based on a set of layered state machines. They take stimuli from various sources in the environment, and select their states based on a voting architecture. The members of the squad are always aware of each other, and they perform prediction of each other’s motions and states in order to coordinate activities. They also communicate directly at a low level to keep from stepping on each other, and getting in each other’s lines of fire. We use a combination of top-down authoritative control (for things like Bounding Overwatch) and bottom-up agent cooperation (for things like self preservation). The path finding system is based on a marked-up cell map from which path data is generated. There are static and dynamic cell layers to handle static and moving objects as efficiently as possible. The path system is also tightly linked to the cover mechanism, and the game rules. In order to eliminate foot sliding, all paths are computed completely ahead of time, so that animations can be precisely pre-calculated and strung together. This required some complex multi-agent planning and prediction systems for movement, since no dynamic avoidance mechanisms such as repellers could be used. The animation sequence for following a path is completely atomic once it is started. This was a challenging approach, but it really helped make our character motion look as smooth and natural as possible.
G5: Any amusing stories you can tell us that occurred during the development of the FSW AI??
The funniest parts of the AI development were certainly the bugs. The AI bugs were rarely dull. They invariably involved soldiers mowing each other down in hails of friendly fire, running each over, hurling obscenities at the wrong moments, and so forth. Bugs also frequently involved animated being strung together incorrectly, which tended to create spontaneous synchronized dance numbers. The next FSW game ought to have a Broadway Musical mode.