Roland Johansen
Deity
I'm wondering if my original point on amphibious attacks has been slightly overlooked guys![]()
[snip]
As I said in an earlier post, if I DID have enough troops sitting around to completely disrupt the ais stack when it lands(troops that could reach the point of incursion in 1 or 2 turns), then there isn't a cat's chance in hell of it holding the city anyway. So why waste all those troops in the first place?
You think that the AI loses so many units because it attacks amphibiously. I say they lose so many units because they don't use their units correctly. I regularly attack well defended AI cities with a direct amphibious invasion and rarely do I lose more units than the defending party. Now, ok, I admit, I'm a little smarter than the AI (hey, no insults please, I know I'm asking for it), but it really isn't that hard (theoretically) to make the AI attack smarter when it attacks amphibiously.
Normally, when the AI attacks a city by land, then it will first bombard, then attack with siege units and then with normal units picking the best normal units for the job. However, when it attacks amphibiously, it doesn't see the stack of units inside the ships as one single stack. It attacks with the first transport cargo (or galleon cargo) and then with the next and the next. It might be that the 6-th ship contains all the siege units, but that doesn't mean it will use that cargo first. It might also use a ship loaded with knights against the riflemen before it uses the ship loaded with grenadiers.
If the AI would use the frigates that are guarding the galleons to first remove the cultural defence bonus and then use 6 city raider 2 cannons against your 4 riflemen defenders (it's not to hard to get city raider 2, but I won't assume city raider 3), then it will easily defeat the extremely wounded riflemen with any other units that are in the ships (preferably grenadiers of course). Of course, the AI may not promote its units so well, but I'm not assuming a stack of 12 galleons filled with units either. Just using the collateral damage first and seeing all the transported units as a single stack to select units from would make a huge difference. The amphibious penalty is quite easy to overcome.
(I just world buildered an example and in that example the defender lost 4 riflemen (unfortified, city garrison 2) and the attacker lost 3 cannons (city raider 2). 3 other cannons attacked and retreated and the extremely wounded riflemen were then slaughtered.)
It's actually implossible to do an exact calculation of victory between 2 large stacks. Combat results between 2 units has no outside factors. Combat between multiple units does. For example, if my Axeman stack attacks a city with 2 units in it, one possibility is that I beat the odds, and kill the first unit. Another is that I lose, but damage the unit heavily. Another that I damage it weakly, or don't damage it at all. Predicting any further combat would require knowing the results ahead of time, which is impossible.
Ok, you may know a lot more about programming, but I guess that I know more about mathematics (or at least about stochastics) if you're saying this.

Yes, you can calculate those odds exactly. I'm not saying that it's very easy or something like that. It has to do with conditional chances if you've had something like that at school. You can split the theoretical outcome in several paths and calculate the odds of each of these paths and then add the odds of the ones that give the result that you want (say: group A wins). The more units in both groups, the more theoretical outcomes, the more chances of these paths you will have to calculate and add. If the groups become fairly large, then even a modern computer will not be able to calculate the chances as the number of paths rises exponentially with the number of units in both groups.
As a comparison, it is similar to calculating the chances that if you roll 3 dices and add the eyes on the dices, that the outcome is more than say 14. There are several ways to get a result higher than 14 and you just have to add the chances on each of these results. The fact that throwing a one with the first die will make it impossible to get an outcome more than 14 doesn't make it impossible to calculate the odds of getting a combined result higher than 14 in general.
(If I sound condescending: I don't mean to.)
That's another way to do it, but I'm not sure that 10 times would be a sufficiently large sample size to determine the probability.
That depends on how accurate you want to get. I don't think you need to get very accurate in this case. With most attacks it is very clear which side will win so that you will mostly see one side win 10 out of 10 battles or lose 10 out of 10 battles. The problem that we're facing now is that the AI will still often attack (over land or sea) in cases where it would likely lose 10 out of 10 battles if this test were performed. The reason is that the testing algorithm used now to see whether it is smart to attack is pretty poor.
Example: Say we let the AI do an attack with a stack on another stack if it wins 6 out of 10 battles in the test case. What is the chance of this happening while the AI actually only had a 20% of victory in this battle?
Answer 0.657% (less than 1 %).
And I don't even think it is that bad if the AI were to attack while it only had a 20% chance of victory. Having only a 20% chance of victory in a battle between 2 stacks actually indicates a pretty close fight between these 2 stacks. Both stacks are very likely to incur serious losses. If a stack is likely to win without losses then the chances of victory in general are likely very close to 100%.
From the looks of it, it merely does a "plot strength" comparison. Plot strength seems to merely be the sum of the strength of all the units on a tile (modified based on promotions/terrain/etc). The combat odds are simply the ratio of strengths (attackter str x 100 / defender str).
Bh
That's a pretty bad comparison of the strength of stacks of units. I wonder how it calculates the specific bonuses against certain units as it is not inherently known whether these bonuses are applicable to the fight. That depends on a lot of factors.
Of course it also doesn't take into account collateral damage which is hugely important (as you already said).
Another example why this is a bad comparison: It values a strength 5 unit equal to 5 strength 1 units. However, a strength 5 unit has a 95.3% chance of emerging victorious in a battle with a stack of 5 strength 1 units. It has an 80.6% chance of emerging victorious form a battle with a stack of 7 strength 1 units.
Now, if I were to give the strength 5 units 3 first strikes, then it becomes even more ridiculous:
99.98% chance to emerge victorious from a battle with 5 strength 1 units
99.9% chance to emerge victorious from a battle with 7 strength 1 units.
There are many many cases which will actually regularly occur during a game where this estimate of the strength of a stack is really bad. (And I say that as someone who has a university degree in mathematics. I know what I'm talking about. Although I dislike using this as an argument as it really isn't.)