Despite the wide variety of styles, gameplay and game mechanics in the strategy genre, all strategy games are founded on similar principles and they all share common problems, issues and resolutions for those problems, especially when developing AI to oppose the player. For example, StarCraft is entirely tactical, with the gameplay focused on creating and commanding units in a 3-d, close-quarters environment. Rome – Total War, on the other hand has both the strategic ‘world map’ level where the player focuses on territory control, resource management, diplomacy and high-level strategic decisions and the low-level tactical play where all attention is focused on commanding units in combat. Civilization III, at the other end of the spectrum from StarCraft, is focused entirely upon the strategic ‘empire-building’, and combat is reduced to highly abstracted and representative animations. Despite the vast differences in these three games, all share similar problems and pursue similar solutions.
The first and, in many ways, most critical issue that plagues developers when creating strategy AI is the balance between performance and play experience. Large, complex AI’s may contribute to a much more satisfying play experience, but the CPU run-time necessary to process such AI’s can severely reduce processing power available to run the game, causing slowdown issues, especially during multiplayer games. However, runtime cannot be sacrificed to too much, or else gameplay suffers. While realistic, ‘thinking’ AI is a large part of any game, it is most critical in strategy games, where the player spends most of the play time fighting the AI and where games are frequently so long that any deficiencies in AI quickly become glaring evident. Indeed, that is the most frequent complaint against strategy games, and the cries of ‘moronic AI’ echo across the internet against even long-standing and popular franchises like Total War. Given that, finding a balance between the two ends of the spectrum is of utmost importance. Of course, other factors can mitigate or change the balance point. If a game is designed primarily for multiplayer against other humans, then the AI is less of an issue. If a game is focuses on low-level tactical play, like StarCraft or Total Annihilation, then the AI can be much more focused, as the resource management and ‘Sim City’ elements are either not present or so abstracted as to be of little issue. On the other hand, an all-single player game, like Rome – Total War, requires a rock-solid and highly intelligent AI, but it can be aided by not needing to balance the game for human vs human play.
One common feature of all games, regardless of genre, is scaling difficulty levels. In most games, like FPS or racing games, this has little to no effect on the AI, and higher difficult levels can simply be achieved by increasing the enemy NPCs’ health points, accuracy and numbers. However, in a strategy game, this is not a possibility, and so as difficulty is ramped up, the AI must increase in craftiness and give the player a greater challenge, because re-balancing the game ruins one of the core mechanics of strategy games. Achieving this scaling difficulty is challenging, as simply writing whole new AI’s for higher difficulty levels is not feasible. The AI must be programmed in such a way that it makes more mistakes and does not pursue complicated or unusual tactics at low settings, while still being adaptive, cunning and complex at higher levels. This issue is especially an issue in tactical-level games where the action is fast and one mistake on either the AI or the player’s part can spell disaster. Without time to retreat, regroup and recover from defeats or errors, an AI must be able to react quickly and even be able to calculate what would be such a game-losing mistake. At the larger, strategic level, an AI can afford to be much more thoughtful and careful, both in combat and in the complicated realm of resource management and ‘empire building’. If an AI is fantastic on the battlefield, but can’t build cities worth a damn, then the game falls apart, especially in a game like Rome – Total War or Civilization III.
A major feature in most, if not all, strategy games is a diversity of ‘factions’ or army types that all players to utilize a variety of battlefield units and playing styles, like in StarCraft where you have the Protoss, who are slow to expand but individually powerful, to the Zerg, who are quick to expand and grow, but are individually weak and rely on numbers and speed to overwhelm the enemy. When constructing an AI to oppose players in this kind of game, the AI must be able to recognize the strengths and weaknesses of the faction it controls and then act accordingly, especially as frequently, simply building the mathematically ‘best’ unit available is not a good path to victory, but recognizing and utilizing effective combinations of units and tactics and applying them against an enemy’s weaknesses. For example, in Rome – Total War, the Roman faction has a number of individually strong and advanced units, while the Germanic faction relies on numbers and an all-out charge. To defeat the Germans, a Roman must rely on punishing the enemy at range, where the Germanics have little power or defense, and then being able to absorb and turn aside their fearsome charge. However, against the Scythians, who are powerful at range and highly maneuverable, the Romans must be able to resist the ranged fire and then catch and destroy the faster, but weaker, Scythian troops. While a human player is capable of learning and executing these tactics, a non-dynamic AI will attempt the same troop combinations and tactics against both enemies, and be crushed, especially against a savvy human player, which would thus ruin the play experience.
As Sun-Tzu would doubtless say, you cannot win at war by operating on simple mathematical probabilities alone. That said, a strategy game AI that does nothing but take the course with the highest probability of success will quickly be outmaneuvered and destroyed, as any predictable course of action will be guarded against by a savvy player, and any enjoyment of the game will be lost. Thus, a certain level of dynamism in strategy game AI is necessary, especially when operating in a static environment, like in Rome – Total War. If a level of dynamism, or at least randomness, is not introduced, gameplay will become repetitive and unenjoyable the subsequent plays through. While this is standard and acceptable practice for console-based FPS like Halo, it spells death for a computer strategy game. For example, the game Medieval – Total War, when played as a ‘sandbox’, reveals it is quite good at insuring that no two games, even given the exact same variables, including player actions. While in one game of Medieval, the Hungarians might defeat their neighbours and become the eastern European superpowers, thus forcing Byzantium into a corner between Hungary and the Turks and leading to its destruction and shifting the balance of power in the Mediterranean, the next game, even with the player assuming command of the same faction and pursuing the same goals, the Hungarians might be crushed by the Germans, allowing the Byzantines to expand their empire and subdue the Turks, which would then allow the Almohads to expand their holdings in North Africa, thusly giving them the resources to defeat the Spanish for control of the Iberian peninsula. Of course, in a game like Civilization III, where the world map is randomly generated every time, this is less of an issue, as relative positions and relations between factions are not the same at the beginning of each game. That level of randomness permits are more static AI, as it doesn’t have to be able to produce radically different results all on its own.
In most strategy games, especially the strategic-level games like Rome – Total War and Civilization III, the player, and the AI, must be not just a cunning general, but a savvy governor and even a banker. Like the player, the AI absolutely must be able look not only to crushing the player and other AI’s on the battlefield, but look to its defenses and play with an eye to investing in future development and expansion, so that it is not defeated by a more synergistic player or even AI. Creating an AI that is able to achieve this is difficult, as it introduces a huge number of highly subjective variables that must be calculated and considered beyond the typical “Unit A defeats Unit B, but is weak against Unit C” calculations. While in large-scale games like Civilization III, this need is alleviated by the AI’s ability to spend time (and processor power) thinking about these variables in depth, it becomes much more difficult in games like StarCraft, Age of Empires or Empire Earth, where everything is in real-time and decisions must be made quickly and efficiently. Strangely, this truly critical area is where many strategy games fall apart. It is not an uncommon occurrence to encounter an AI, only to find it technologically retarded and the AI’s army so backward and underequipped as to be laughable, all because the AI was incapable of acting intelligently and with the future in mind.
As I hope I have demonstrated here, there are many issues that plague the development of strategy game AI. While each of these factors is largely mitigated or exacerbated by the style of strategy game in question, every game has commonality in its issues, and so is there a common solution to these problems that is used in many, if not almost all, strategy games. Simply put, this solution is giving the AI the ability the ability to ‘cheat’. Because so much of an AI’s behaviour is hidden from the player, an AI only has to be able to ‘fake it’ to insure the experience is a good one. For example, Rome – Total War deals with the problem of scaling difficulty levels by borrowing from the FPS solution. While the AI, on a strategic level, gets more aggressive and unforgiving on higher difficulty levels, it is in the tactical game that the solution is really evident, as AI-controlled units gain bonuses to their abilities and resolve as the difficulty level is ramped up. Another common symptom of this AI ‘cheating’ is some degree of omniscience on the part of the AI. This all-seeing power lets them simply directly calculate the player’s behaviour, rather than needing to operate on guesswork and extrapolation. However, because the player doesn’t see this ‘cheating’, it looks like the AI is simply outthinking the player, which is always a good thing. Another common way of making the AI look smarter and more efficient is to give the AI an increased supply of resources, which makes the player, who isn’t given the handicap, work a great deal harder for victory. This is most commonly seen in games like StarCraft, where the player must start each game from scratch, while the computer is given a larger, more developed starting base and a good store of resources. Also, in Rome – Total War, AI factions have, to some extent, an unlimited bank account, which allows them to be consistently competitive, regardless of their ability (or inability) to manage their resources and expand their empire.
Laird, Prof. John E, “Bridging The Gap”, Gamasutra.com, http://www.gamasutra.com/features/20001108/laird_03.htm
Isla, Damian, “Handling Complexity in the Halo 2 AI”, Gamasutra.com, http://www.gamasutra.com/gdc2005/features/20050311/isla_01.shtml
Woodcock, Steve, “Game AI: The State of the Industry”, Gamasutra.com, http://www.gamasutra.com/features/19981120/gameai_01.htm
Node Your Homework, Pipe For The Ages