Strategic Command Blog 2: Artificial Intelligence

Read the Blog Entry #1 New Features and Scope here



In 2002, the original Strategic Command game was a relatively simple construct. With a limited rule set and a much smaller 62x37 map of approximately 2300 hexes, the requirements for the AI were not necessarily trivial, but in general terms, they were straightforward.

Fast forward to today, and Strategic Command WWII: War in Europe has been expanded into a modifiable hexagonal game engine allowing map sizes of up to 512x512 or 262,144 hexes!

Inevitably, with an equivalent increase in game complexity and detail, the requirements and expectations of the computer opponent had to grow as well.

As a result, the primary challenges for the AI, with the player’s point of view in mind, was to not only ensure it continued to play well, but also to complete its turns within a reasonable amount of time.  

Quality vs. Speed  



While it is simpler to have the AI identify targets, calculate optimal results and movement paths on smaller maps, any inefficient AI algorithms can unfortunately reveal themselves to be serious time wasting problems once the map grows up to 100 times larger. Often, the only solution to these problems is a sacrifice in AI quality in order to improve the duration or calculation speed of each AI turn.


While some sacrifices invariably need to be made, a significant reduction in AI quality was never on our acceptable radar.  This ultimately led to an overhaul and rethink of the Strategic Command WWII: War in Europe AI in order to address the issue of quality vs. speed.  

Basic Design

The AI in Strategic Command WWII: War in Europe has what we internally refer to as a “3 level design approach”.

The top level, or strategic level, manages the big picture and overall long term strategic thinking/planning.  Planning categories such as Purchases, Research and Development, and Declarations of War would all fall under this level.  As these are no longer hard coded, they can be customized per campaign (or scenario) via AI text scripts, and then compiled into the campaign via the Editor, for complete flexibility.

The middle or tactical level, handles the identification of targets and ideal combat combinations and decisions with no scripting needed on the part of the campaign designer.  The game engine achieves this through the interpretation of values derived from the lower, fuzzy level of the AI, which handles all the numbers behind the game.

The fuzzy level is probably the most important level of our AI design, as it keeps track of the entire tactical threat or protective status of all units and resources on the map. By breaking down the game into a system of weighted numbers, derived from an average of the offensive and defensive values of units versus their distance to a target on the map, we can quickly determine whether a pool of units are in an ideal offensive situation, or if it is time to turn around and go on the defensive.  It also allows us to weigh the various combat fronts in game, at the land, air and sea tactical levels, and determine if we have an excess of offensive capability in one front that could possibly be transferred to another front. These excess units can either be used to rebalance the fronts in general or in particular to help out a defensive front in another part of the map. 

The system is now robust and running well enough, that any custom tactical level designed scenario (i.e. a land only map with preset objectives for each side) can be run through the game engine without the need of any further AI scripting or guides from the designer.  The AI will identify the applicable objectives and dynamically assign itself to either offensive or defensive planning on a per turn basis as it will fully reassess after each turn.  Tactical combat, as noted above, will also be fully handled by the AI with no further guide necessary from the designer as well.

Strategic Level Requirements

Each of these requirements is achieved through AI scripts with the exception of Reorganization and Defensive planning as these are handled automatically via the game engine.  Land, Air and Naval combat are also handled automatically via the tactical level of the game engine but can be fine tuned if Offensive scripts are written for specific planning needed on the part of the campaign designer.

Basic Script Structure

AI Overhaul and Rethink Challenges

o   Simple fixes and refinements

o   What would a human player do?

After spending quite a bit of our development time on the challenge of improving AI calculation speed, it soon became apparent that there would be one other significant benefit to resolving many of the bottlenecks: the ability to improve the overall AI in general if speed was no longer our biggest issue.

Not only could we continue to have the AI play well, but we were now able to pursue the holy grail of AI development, which was to have it play more like a human player through precise behavioral algorithmic improvements.

The Fury Software AI Advantage

One advantage that the AI in Strategic Command WWII: War in Europe currently has is that has been derived from a gaming system that has been in development since 2001.  Fury Software’s only product to market has been the Strategic Command grand strategy system of games, so essentially this is an AI that has been in development for nearly 15 years!

While the inevitable odd behavior crops up and is in need of correction, we were now comfortably at the point where we no longer simply needed to have the AI do what we wanted it to do, but to refine the behavior and bring its game play to a whole new level.

Some examples of this can be seen below:


We feel that this is by far the best Strategic Command AI yet, and that players will be pleasantly surprised not only from how much the game design and playability have improved, but also from how much the AI has improved as well.  Happy Gaming :-)

Written by Hubert Cater on behalf of the Fury Software Development Team.