During this session, Soren Johnson provided a retrospective look at the AI in Civilization IV, as well as several of the design decisions that went into calibrating the game's difficulty.
A centeral theme of the presentation was the distinction between so-called "good AI" and "fun AI." Good AI has the sole goal of defeating the player by any means available (within the context of the game's rules). Ideally, good AI should be indistinguishable from a competent human player. Measuring the success of a good AI is an objective process; for example, a chess AI can be ranked using the standard international chess ranking system.
Good AIs tend to correlate highly with fixed, unchanging rulesets, such as those found in chess or card games. They also tend to be most appropriate when all players - human or otherwise - have symmetrical goals, such as capturing all of the other player's pieces or winning a hand of cards.
By contrast, fun AI is designed solely to provide a good experience to the player. This may require the AI to deliberately cripple itself in certain ways in order to allow players victory. When designing a fun AI, the algorithms used will be the primary determinant of the AI's success at being enjoyable. Unfortunately, measuring that success is a highly subjective process; there is no way to predict ahead of time what will be fun and what will not.
It is not unusual when designing a "fun AI" to end up with the player and computer actually playing different games. Johnson brought up the popular example of Desktop Tower Defense, where the AI's goals (to survive the player's deadly maze) are precisely the opposite of the player's goals. This has two interesting consequences. First, the tactical options available to a "fun AI" tend to be more limited, since the computer player essentially exists to be conquered, and therefore cannot be too difficult to overcome, lest the player stop having fun - against a fun AI, players must win, or at least understand why they have lost. Secondly, games revolving around "fun AIs" generally are single player rather than multiplayer, because the asymmetrical goals would not fit well in a multiplayer competitive environment.
One particularly interesting question is whether or not the AI should "cheat" to accomplish its goals. For a "good AI", the answer is definitely no - breaking the rules violates the spirit of the game. In a fun AI, defining "cheating" is essentially meaningless; the right thing to do is anything which is fun for the player. Johnson places Civ IV roughly in the middle of the scale between "good AI" and "fun AI" requirements; in this scenario, carefully managed cheating can be beneficial, provided it is consistent and does not seem arbitrary or overtly unfair to the player. In some cases, cheating may be essential to solving difficult technical issues that may not otherwise be practical to address - such as inferring the location of enemy troops just after they duck into the "fog of war."
Another similar question is whether or not multiple computer players should gang up on the human player. In general, this is a bad phenomenon, since it will tend to make the player feel unfairly persecuted. However, in extreme cases where the player's strength severely outweighs that of the AIs, such ganging up can actually add a layer of believability, challenge, and entertainment to the game. This is clearly a scenario where careful tuning and good instincts are critical to designing a solid, fun AI.
In addition to discussing the overall principles behind AI design, Johnson covered some technical details of the Civilization IV AI code. For anyone interested in the technology behind the game, we highly recommend downloading the Civ 4 SDK.