FEAR has been cited as one of the most influential A.I. games. FEAR’s claim to fame was its implementation of NPC A.I. using a system called Goal Oriented Action Planning.
Since I have some experience with planning in games, I wanted to have a look at the techniques used. After some digging I thought I’d put together a brief summary of what I learnt.
- FEAR’s A.I. created a system that was dynamic, coordinated, interesting and challenging. This was done with a system called Goal Oriented Action Planning which was built in conjunction with two major techniques A*Search and Finite State Machines.
- Sets of goals were assigned to NPC’s by the designer, then during play, the A.I. would utilize the planner to achieve a highest priority goal.
- FEAR’s planner was most similar to STRIPS, and had a list of actions including what parameters and state it required to perform that action, the defined list of goals, and what was required to satisfy the goal. Plans generated traversed the FSM.
- A highly optimized A* Search was used to search these plans, and for unit path finding.
- FEAR’s FSM was made of up three states Goto, Animate, Use Smart Object.
- Groups of NPCs were managed to an extent by a Squad Managers which created groups based on proximity.
- The implementation of the Squad Manager was inspired by Evans’ and Barnet’s 2002 GDC paper, “Social Activities: Implementing Wittgenstein”.
- The Squad Manager gave an NPC a squad level goal, thereby coordinating NPC efforts to ensure complementary and not identical goals.
- Since an agents primary function was ultimately to minimize threat to itself, an NPC’s basic instincts could override the directive of the Squad Manager if for example being told to charge the player with 1 hp was too threatening to its life. This interplay of squad level and NPC level goals created interesting behavior.
- Audio cues are intelligently orchestrated by the Squad manager to create an illusion of coordination among the NPC’s, though the actual coordination is being done by the Squad manager.
- Audio cues are based off of the goal being performed either from the instinct of the NPC or the goal set by the Squad Manager.
- One advantage of this implementation was the ability to abstract the behaviors away from the character performing them. Enemies could be made more sophisticated by simply enriching their set of goals and actions.
For a real analysis check out Jeff Orkins paper on FEAR’s A.I. In addition find below a collection of additional materials:
- Jeff Orkins website.
- Article at AIGameDev.
- Recording of Jeff Orkins GDC talk, and the slides to accompany the talk.
- A lecture on FEAR uploaded to YouTube from this channel.