Gamasutra: The Art & Business of Making Gamesspacer
A Modular Framework for Artificial Intelligence Based on Stimulus Response Directives
arrowPress Releases
May 27, 2017
Games Press
View All     RSS

If you enjoy reading this site, you might also want to check out these UBM Tech sites:

A Modular Framework for Artificial Intelligence Based on Stimulus Response Directives

November 10, 1999 Article Start Page 1 of 3 Next

There are three fundamental technologies used in modern computer games: graphics, physics, and artificial intelligence(AI). But while graphics and physics have shown great progress in the last five years, current AI still continues to display only simple repetitive behavior, which is of little replay value. This deficiency, unfortunately, is often sidestepped, and the emphasis switched to multi-player games, which take advantage of real human intelligence.

In this article, I have attempted to model AI based on the functional anatomy of the biological nervous system. In the pure sense of the word, a biological model of AI should use neural networks for all stimulus encoding and motor response signal processing. Unfortunately, neural networks are still difficult to control (for game design) and very computationally expensive. Therefore I have chosen a hybrid model, which uses a "biological" signal path framework in conjunction with more traditional heuristic methods for goal selection. The main features of this model are:


  1. Stimulus detection based on signal strength thresholds.
  2. Target goal selection based on directives, know goals and acquired goals.
  3. Target goals acquired by servo feedback loops that drive the body.
  4. Personalities constructed from sets of directives. Because the directives are modular, it is fairly straightforward to construct a wide range of distinctive personalities. These personalities can display stereotypical behavior while still retaining enough flexibility to exercise "judgment" and adapt to unique situations. The framework of this model should be useful to a wide range of applications because of its generic nature.

Some Background

Figure 1. Block diagram of the data flow between functional units for this brain model.

This AI model was developed for use in SpecOps II, a tactical infantry combat simulation of Green Beret covert missions. While the emphasis of the project has been on realism and squad level tactics, it still falls under the category of a first-person shooter. The original SpecOps project was based on the U.S. Army Ranger Corps. and was one of the first "photo-realistic" tactical combat simulators released for the computer gaming market. The combination of high quality motion capture data, photo digitized texture maps and sound effects recorded from authentic sources produce a rather compelling combat experience. Although the original game was fun to play, it was justifiably criticized for having poor AI. Therefore one of the major goals for SpecOps II was to improve the AI. The previous game logic and AI was based on procedural scripts; the new systems are based on data driven ANSI C code. (My experience has convinced me that data driven code is more reliable, flexible and extensible than procedural scripts.) When the data structures that drive the code are designed correctly, the code itself can become very simple.

Table 1. Parallels to Biological Nervous System
Functional Unit Biological System
Stimulus Detection Unit Visual / Auditory Cortices
Directives Reflex / Conditioned Response
Known / Acquired Goals Short-Term Memory
Goal Selector / Navigator Frontal Cortex
Direction / Position Goal Servos Motor Cortex / Cerebellum

Typical Behavior in SpecOps II

In the course of a normal game, a player can order one of his buddies to attack an enemy. If this enemy is blocked by the world, the path finder will navigate him until there is a clear path. Once the path is clear, the direction servo points the AI at the enemy and he begins firing his gun. If that enemy is taken out, the AI may engage other enemies that were aroused by the weapons fire. If all the known enemies have been taken out, the buddy returns to formation with his commander.

Another typical sequence might begin when a player issues a "demolish position" command to a squad member. The AI will then navigate to the position goal, place a satchel charge and yell out: "fire in the hole!" The "get away from explosive" directive will then cause him to move outside of the danger radius of the explosive. I have observed an interesting case where the initial evasive maneuver lead to a dead end, followed by backtracking towards the explosive object. Eventually the navigator got the AI a safe distance away from the explosive in time.

Article Start Page 1 of 3 Next

Related Jobs

Mindshow, Inc.
Mindshow, Inc. — Los Angeles, California, United States

Unity Engineer / VR Inverse Kinematics
Mindshow, Inc.
Mindshow, Inc. — Los Angeles, California, United States

Unity Engineer / VR Platform
Sony PlayStation
Sony PlayStation — Playa Vista, California, United States

AI Engineer
2K — Novato, California, United States


Loading Comments

loader image