One of the more promising conferences at this year's GDC had the title of "Three States and a Plan: The AI of F.E.A.R." Ostensibly, the panel had the goal of showing how Monolith crafted the outstanding AI for its horror-themed shooter. And while Monolith's Jeff Orkin spent a lot of time discussing the benefits and risks of Finite State Machine and A* and other techno babble, some rather enlightening facts came out.

First of all, the AI powering F.E.A.R. was based around the idea of giving the AI a need. As illustrated by Orkin, this need could take the form of Alma (the creepy little girl in F.E.A.R.) being hungry and wanting to eat, but in terms of the game, this means something like "see player, attack player, find cover." The actions that the AI could take to satisfy its need are strung together and happen based on the player's actions; each action the AI can take is assigned a "cost" and the AI goes for the least expensive action.

As demoed by Orkin, the AI sees the player and wants to kill the player. The AI then runs through its possible actions, like take cover, attack, or melee-attack. The player fires on the AI and the AI looks for cover; once behind cover, the AI will take note that the player is aiming his weapon at it, so the AI will try to suppress the player by firing blindly.


This is fairly cool, but the additional revelations made by Orkin were definite "gotcha" moments. Monolith fully integrated this system with the enemy's dialogue and game environments in an effort to create the illusion that the AI was smarter than it actually is. F.E.A.R. was widely lauded for the ability of its soldiers (both singly and in squads) to flank the player. In reality, the AI wasn't flanking at all -- it was moving from one cover area to another cover area. Because of the skill exhibited by the level designers, that next cover area was to the side of the player's location (or where the designers assumed the player would be), so when the AI moved to that location, it created a seamless illusion of the enemy flanking you.

Adding a final layer to the illusion was the notion that the AI called for reinforcements. As the player slugged it out with the game's bad guys, one of them would call out for reinforcements. Then, when the player moved forward, they would come across an enemy squad rushing toward them. The squad was always there, regardless of whether or not reinforcements were actually "summoned," but because of the dialogue, the player creates a connection that really isn't there.

It was truly fascinating to have the curtain pulled back and be given a peek at how F.E.A.R.'s AI really worked.