Intelligent Agents in Computer Games

Michael van Lent, John E. Laird, Josh Buckman, Joe Hartford, Steve Houchard, Kurt Steinkraus, Russ TedrakeAAAI 1999

Abstract

This paper explores the integration of the Soar cognitive architecture into commercial computer games to overcome the limitations of traditional hard-coded AI. By separating the inference engine from the game environment, we create a framework where agents can possess explicit goals and hierarchical decision-making capabilities. This architecture provides a foundation for agents to learn their environments and improve performance over time, moving beyond reactive "if-then" logic.

Introduction

In the late 1990s, game AI reached a bottleneck. As virtual environments grew in complexity, developers relied on increasingly convoluted nested if and switch statements. This approach resulted in "spaghetti code" that was difficult to maintain, lacked long-term strategic intent, and offered zero reusability between titles. To address these challenges, we propose a decoupled architecture that utilizes a dedicated cognitive engine to handle high-level reasoning.

System Architecture

The core of our approach is the separation of "thinking" from "doing." We developed a bridge between the Soar inference engine and commercial game engines like Quake II and Descent 3.

High-level architecture of the Soar-based game agent system showing the interface between the game and the Soar inference engine.

The system consists of three primary components:

  1. The Interface Layer: C-based software hooks extract symbolic data (e.g., entity coordinates) directly from game memory, bypassing the need for complex computer vision.
  2. The Soar Inference Engine: Acting as the agent's brain, Soar operates on a Perceive-Think-Act cycle. It uses hierarchical operators to decompose broad goals (like "Attack") into atomic actions (like "Shoot").
  3. Socket Connection: Communication occurs via a socket, allowing the AI to run as a separate process. This decoupling ensures that the AI logic can be updated without recompiling the game engine.

Implementation and Environments

We tested this architecture in two distinct 3D environments:

  • Quake II: A ground-based first-person shooter requiring 4 degrees of freedom.
  • Descent 3: A zero-gravity spaceship shooter requiring 6 degrees of freedom, presenting a significantly higher spatial reasoning challenge.

Key Insights

  • Explicit Goal Representation: By maintaining internal state and goals, agents appear more purposeful and human-like to players.
  • Knowledge Reusability: High-level tactical knowledge (e.g., "Attack" strategies) proved portable between different games in the same genre, even when low-level movement mechanics differed.
  • Symbolic Perception: Extracting "ground truth" symbols from the game state is computationally efficient, allowing the inference engine to focus on complex decision-making rather than image processing.

Results

The implementation in Quake II featured a five-level operator hierarchy with 57 distinct operators and over 400 production rules. Despite this complexity, the system maintained real-time performance in high-speed combat scenarios. The resulting agents provided a more dynamic and human-like challenge compared to traditional scripted bots.

Conclusion and Future Work

While the current implementation relies on hand-coded rules, the architecture is designed to support Soar's inherent learning capabilities. Future work will focus on automating the creation of game interfaces and utilizing machine learning to allow agents to refine their tactics through experience. Navigation in complex 3D spaces remains a primary area for further optimization.

Summary updated

BibTeX
@inproceedings{lent1999intelligent,
  author = {Michael van Lent and John E. Laird and Josh Buckman and Joe Hartford and Steve Houchard and Kurt Steinkraus and Russ Tedrake},
  title = {{Intelligent Agents in Computer Games}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {1999},
  url = {https://openreview.net/forum?id=H1VPnRgO-S},
}
Figure