Psyringe
Scout
In another thread, the question arose how the AI picks the order of its attackers. Specifically: Does the AI choose the unit which has the best chance to win first, or does it simply choose the unit with the highest strength first?
To answer that question, I tried to set up a test:
AIAttackOrder.zip
In this test, your city (Cuzco) is defended by two spearmen. The spearmen have the "Formation" promotion, which gives 25% against mounted units. The AI waits outside with two horse archers and two axemen. The horse arcgers have no promotion. The axemen are monsters, they have all five strength promotions, all three city raider promotions, and the "Shock" promotion against melee units.
So, the horse archers have a higher base strength than the axemen (6 vs. 5), but when they attack the city, they only have a small chance to win, because the spearmen have a +125% bonus against them. Conversely, the axemen have a lower base strength, but - because of their promotions - could mop the ground with the spearmen while blind, handcuffed and having breakfast.
Now load the savegame and hit "end turn". You will see how the AI, totally unnecessarily, wastes the two horse archers in a senseless attack, before the axemen charge in and win the battle.
The same attack order can be observed when no unit has any promotions (in this case, the axemen would still be a better choice, albeit by a much smaller margin).
I'm surprised. So far, the AI has made a pretty good impession on me, and I did not expect such behaviour.
Now, I don't want to start one of these "the AI suxx0rz" vs. "the AI rulez" debates. These aren't helpful. However, I'd like to know whether the AI really behaves that dumb as in my test. The test may be flawed, here are possible reasons:
a) In the game, the AI may combine units in stacks. The player can do this too. When the player attacks a spearmen-defended city with a stack of axemen and horse archers, then the game picks an axeman as first attacker (I tested this with my save game). However, in the test, the attacking units are not grouped in a stack (there's no way to do this in the world builder). Thus the test situation is not representing a real game situation.
b) The AI assigns scripts to its units. These can be selected in the world builder. The AI in the game may set its scripts in a way that the test situation can not occur in the real game. (Note: I tested various scripts in the test situation and found no effect, but I wasn't very thorough and may have missed something).
c) The AI may move its units in a specific order. The world builder orders all units after strength. Since the AI in the test situation didn't have the opportunity to make a "plan", it falls back to moving one unit after the other in the order the units are represented in memory, which is the order given by the world builder.
Unfortunately I see no way to test for these possibilities. So I'm relying on you to answer two questions:
1. In your games, do you see the AI choosing its attack order like on the test situation?
2. Is the test flawed? If yes, can you improve it?
Okay ... it's your turn now.
To answer that question, I tried to set up a test:
AIAttackOrder.zip
In this test, your city (Cuzco) is defended by two spearmen. The spearmen have the "Formation" promotion, which gives 25% against mounted units. The AI waits outside with two horse archers and two axemen. The horse arcgers have no promotion. The axemen are monsters, they have all five strength promotions, all three city raider promotions, and the "Shock" promotion against melee units.
So, the horse archers have a higher base strength than the axemen (6 vs. 5), but when they attack the city, they only have a small chance to win, because the spearmen have a +125% bonus against them. Conversely, the axemen have a lower base strength, but - because of their promotions - could mop the ground with the spearmen while blind, handcuffed and having breakfast.
Now load the savegame and hit "end turn". You will see how the AI, totally unnecessarily, wastes the two horse archers in a senseless attack, before the axemen charge in and win the battle.
The same attack order can be observed when no unit has any promotions (in this case, the axemen would still be a better choice, albeit by a much smaller margin).
I'm surprised. So far, the AI has made a pretty good impession on me, and I did not expect such behaviour.
Now, I don't want to start one of these "the AI suxx0rz" vs. "the AI rulez" debates. These aren't helpful. However, I'd like to know whether the AI really behaves that dumb as in my test. The test may be flawed, here are possible reasons:
a) In the game, the AI may combine units in stacks. The player can do this too. When the player attacks a spearmen-defended city with a stack of axemen and horse archers, then the game picks an axeman as first attacker (I tested this with my save game). However, in the test, the attacking units are not grouped in a stack (there's no way to do this in the world builder). Thus the test situation is not representing a real game situation.
b) The AI assigns scripts to its units. These can be selected in the world builder. The AI in the game may set its scripts in a way that the test situation can not occur in the real game. (Note: I tested various scripts in the test situation and found no effect, but I wasn't very thorough and may have missed something).
c) The AI may move its units in a specific order. The world builder orders all units after strength. Since the AI in the test situation didn't have the opportunity to make a "plan", it falls back to moving one unit after the other in the order the units are represented in memory, which is the order given by the world builder.
Unfortunately I see no way to test for these possibilities. So I'm relying on you to answer two questions:
1. In your games, do you see the AI choosing its attack order like on the test situation?
2. Is the test flawed? If yes, can you improve it?
Okay ... it's your turn now.
