Many classic board and card games have had their strategy studied, formalized, and "digitized," for lack of a better word. For instance, there are a plethora of computer programs that can analyze or play a game of Chess, Backgammon, Connect 4, various games of poker, and so on.

Is there any computer AI program for Axis and Allies? Ideally, I'd like to be able to setup certain scenarios and then watch the computer play against itself to learn new strategies. Also, a single player mode would be nice.

There is a (now serious outdated) Axis and Allies computer game, which I owned several years ago. This game had a single player option, meaning you could play against the computer, but the AI was very scripted and weak and the game lacked the ability to setup a scenario and let the computer play it out (from what I remember).

4 Answers 4


At the tactical level, the AI for A&A is a minmax on a zero-sum game tree with some fuzziness. We have a structure that represents game state (board and pieces), the relative score of each player for that state (value of troops and land income), and a set of transitions (i.e. moves) from that state to new states. Transitions can weighted by probability of outcome (this is what the simulators in other answers supply). The relative values of starting state and ending states can be compared to determine which moves seem good or bad. These results are scaled by the weight (likely outcome). More sophisticated implementations would go deeper into "promising" branches to check opponent payoff (i.e. whether this move give an opponent an even better counterattack opportunity).

This is a very, very big game tree. Pruning will be essential, and there are some obvious things to try ignoring (attacking with less than all your troops, for example). But it's relatively straightforward AI problem and there is a lot of info about solving it on the web. Maybe it's a bit harder because of the 5 players, 2 teams mechanic.

In addition to picking battles, there's the purchase, non-combat move, and deployment phases. The interesting problem with these choices is their impact will be felt 2-4 steps down the game tree. It might be possible to model this into the tactics tree, or its own separate tree, but the breadth intimidates me. 2-4 turns, 5 actors, 1-11 (on average) new pieces, 12 or so possible pieces, multiple possible deployments... If I had to try this, I'd tackle it in separate stages. Movement can be handled as first minimizing opponent payoff in one transition. If payoff is minimized without movement, stack to strongest front. If no strongest front, go to front of preference. I'd probably hardcode deployment, and placement of any additional factories, until everything else was working and I had lots of free time. I'd try purchasing as a kind of lookup table based on current troop IPC value, or if playing with infantry defends on 1, try purchasing with troop ratios (that is, try to have 6 infantry to 2 artillery to 2 tanks to 1 plane, etc.)

At the "grand strategy" level (i.e. if no strongest front), fronts of preference are defined per standard strategy--Axis prefer to attack Russia, then Britain, then US and Allies prefer to attack Germany, then Japan.

Of course, there are other ways to do it and mine is just one step removed from brainstormed. There's surely better.


Not that I am aware of, but you could try using the popular Combat Simulator calculator as a starting point. It's html & javascript, so it's all visible. It's not in the format you are looking for, exactly, but has a logical starting point & it's been maintained by someone who clearly loves the game.

With that in hand, I would try looking under the hood of your old PC game to see if the AI is customizable. The Age of Empires series had a really excellent AI system, all based on relatively simple text files. It wasn't documented in the game, if I recall correctly (it's been a few years), but a really rich community of AI developers grew up around it. You may find that there is some way to customize the clunky AI in the game to get it to do what you want.

Another option is to check out TripleA. It's a free Java-based turn based strategy game based on Axis and Allies. Exactly how close it's AI is to the real Axis & Allies rule set, I don't know. Sadly, documentation is spotty, but there is a fan site with a newbie guide.

  • Thanks for the suggestions. I'm familiar with the Combat Simulator and use that often. I'm not interested so much in battle odds, but rather overarching strategy. Like if a competent AI has amassed an army in territory X and that borders two enemy territories Y and Z with varying troops levels, which territory will the AI attack (if it will attack at all) and with how much firepower. Commented Oct 28, 2010 at 15:46
  • The 2nd edition implementation of TripleA is fully faithful to the real rule set as far as I know.
    – Adam Wuerl
    Commented Jan 4, 2011 at 5:31

There used to be an A&A odds calculator that was unique because instead of the typical results of % chance of victory and perhaps the average number of units left, this program generated a plot. The x-axis was the number of units remaining at the end of combat. The far left was all attackers survive, the center mutual annihilation, and the far right defensive domination. The y-axis was the probability of any given outcome.

The reason this method of visualizing the results was so critical is because it opened my eyes to a key observation about combat in Axis and Allies. Given an even battle (where the vanilla calculator will predict a 50/50 chance of winning, one might suppose that they are therefore likely to win the combat with almost no surviving units. However, what the plot shows is that this is not what the laws of probability dictate actually occurs. In practice, even even if the chance of winning is 50/50, the number of units likely to survive is going to be surprising large for the victor. This happens because a good first round has a positive feedback effect, making that side more likely to win round 2, and so on.

Armed with this knowledge your game play can improve dramatically. You realize the importance of re-assessing any attack after each round of combat.

I'll keep looking for this calculator and post the link if I can find it. I first used it about 7 years ago. It wasn't online, it was a compiled program written in VisualBasic.


There is an open-source implementation of Axis and Allies with a couple of AIs, though I also don't think it allows you to set up scenarios. However since it is open source you can always modify it to suit your needs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .