Having written a completely new AI for the Decisive Campaigns engine I can restate with confidence that writing an AI (artificial intelligence) for a wargame is without doubt the hardest part of making a complex strategy game.
Not only is it incredibly time intensive but also incredibly difficult. While designing the AI I stumbled over almost philosophical questions like “how does the human brain work when it is plotting its moves?” Questions that are hard to answer.
The new AI that I designed was radically different from the AI that I did for Advanced Tactics. Instead of letting the AI follow a number of complex fuzzy rules I split up the AI in a “move planning” part and a “move analysis” part. Instead of coming up with a move for the AI and executing it immediately I would let the AI make a prognosis of how well that move would probably do and assign a score to it. Then it would come up with more new “move plans” partly based on the highest scoring move plan so far and eventually after X iterations it would execute the best scoring move plan.
The result of this new approach was much better then the old approach but required me to do a lot of code speed optimizations and scoring rules balancing for the AIs “move analyzer”.
The “move analyzer” scores each move for hexes held, hexes conquered, entrenchment gained, enemy units attacked, encircled, etc… and the cool thing about this method is that it is very hard to predict the exact AI reaction to any given situation since numerous rule based rewards and penalties compete with each other to guide the AIs behavior. This makes it possible for the AI to come up with moves that make compromises or trade-offs between conflicting goals.
Granted the AI could still do better and it is still no good match in an equal situation when facing a good human player, but in that respect AI designing for wargames will always remain a mission impossible. Consider chess computers after dozens of years of research still have difficulty winning from top players while chess is a game with only 32 pieces and 64 fields where 1 piece moves per turn, while for example the Case Yellow scenario in DC:Blitzkrieg has 600 pieces and 15.000 fields where all pieces move every turn. Do you see the different level of complexity and permutations?
All in all I have to say I am very happy with the AI that I shipped with DC:Blitzkrieg. Release will come soon and I hope the players will agree with me.

