Chapter7.gif (951 bytes) Designing Computer Games

Artificial Intelligence (AI)

These are the routines that enable the computer to operate as a worthy opponent for a human player. These AI routines are not as complicated as they might appear.

AI routines need not take up a lot of space in the program. It is possible to get powerful AI routines into as little as 2,000 bytes ("characters," or "2K" in computerspeak).

Doctrine is what drives AI, doctrine is the standard procedures that armed forces use when in combat. Every armed force has a doctrine. Some doctrines are more efficient than others, but that's something you have to dig up in your research.

There's also the problems of "Theory versus Practice" in doctrine. What the doctrine says is not always what the troops do. You have to do more research to find out how the troops deviated from their doctrine, to what extent and how often.

For the commander, combat is a rather simple process: at least as far as decision making goes. There is often imperfect information. That is, the commander is often not sure of the status of his own troops and is even less well informed about the enemy. Thus the commander usually makes simple decisions. To mix things up and keep the human player on his toes, you should also use a random selection from two or more possible moves by the AI led side.

Where AI becomes complex is when you have AI measure its sides situation against the human players. This routine is driven by the victory conditions. The measurement is a combination of the combat strength of friendly and enemy units, the "value" of their current position and the "value" of enemy positions. Normally, the AI would select the highest value enemy positions to go after, but not always. By randomly selecting one of the most valuable enemy positions, the AI player gives the human player the impression that some real thought is going on. If nothing else, it makes the AI side unpredictable, and thus dangerous.

Creating the AI routines is a game in itself. You'll simply have to practice. It's not so hard. I did many successful manual AI systems (for paper wargames) before I did my first computerized systems. With the experience gained on the paper games, I had no trouble at all with the computerized AI. Your mileage may differ.

  Quality Control

  The Computer Wargame Development Team


  Table of Contents

Chapter7.gif (951 bytes)  Chapter 7 Contents