A Rush Calculator

Joined
Dec 5, 2005
Messages
3,663

A Rush Calculator



How many axes do I really need?

The in-game combat calculator displays the probability of a kill, but does not offer any insights into the probabilities of the other possible outcomes.

This Excel 2007 spreadsheet will allow you to calculate the probability that you will inflict a specific amount of damage to a defending Archer in a single attack.

The spreadsheet calculation offers as parameters the strength of the attacking unit, the number of hit points for each unit, and any combat or attacking/defensive bonuses.

Some caveats:

This is a calculator, not a simulator. It reflects the probabilities of an idealized random number generator and indefinite precision in calculation.

The Archer's inherent first strike is included in the calculation, but there is not any additional support for additional first strikes or first strike chances. So it won't give correct results when there are drill promotions involved, nor when the attacking piece is first strike immune.

Likewise, it assumes that the attacker does not have any first strikes.

I've tested a few Axe vs Archer cases, and the results fit pretty well with the results that appear in the combat logs, and match the world builder experiments I have done.


The attacked zip file also includes 6 sample reports, covering axes and chariots, which may be useful to those of you without access to Excel.

Bibliography



Barracks during axe rush?
The Early Rush
 

Attachments

  • rushCalculator.v1.zip
    120.1 KB · Views: 241

Attacking with Stacks



Once you have the probabilities for wounding a defender, you can begin to calculate the outcomes of multiple attacks, against multiple defenders.

For example, suppose we expect to be attacking a stack of Archers, who are fortified with 115% defensive bonus. How many unpromoted axes do we need to kill all of the archers?

Nothing in life is certain, but a 95% success rate is probably good enough for a first approximation

Code:
           1       2       3       4       5       6
 1       18.50%
 2       76.99%   3.42%
 3       [color=blue][b]96.66%[/b][/color]  25.06%   0.63%
 4       99.63%  66.55%   6.64%   0.12%
 5       99.96%  90.66%  27.64%   1.60%   0.02%
 6      100.00%  [color=blue][b]98.13%[/b][/color]  60.72%   9.12%   0.36%   0.00%
 7      100.00%  99.70%  85.02%  28.72%   2.64%   0.08%
 8      100.00%  99.96%  [color=blue][b]95.73%[/b][/color]  56.88%  10.96%   0.71%
 9      100.00%  99.99%  99.03%  80.22%  29.16%   3.65%
10      100.00% 100.00%  99.82%  92.93%  54.03%  12.34%
11      100.00% 100.00%  99.97%  [color=blue][b]97.96%[/b][/color]  76.19%  29.29%
12      100.00% 100.00% 100.00%  99.50%  90.05%  51.77%
13      100.00% 100.00% 100.00%  99.90%  [color=blue][b]96.56%[/b][/color]  72.75%
14      100.00% 100.00% 100.00%  99.98%  99.00%  87.22%
15      100.00% 100.00% 100.00% 100.00%  99.75%  [color=blue][b]94.96%[/b][/color]
16      100.00% 100.00% 100.00% 100.00%  99.94%  98.30%
17      100.00% 100.00% 100.00% 100.00%  99.99%  99.50%
18      100.00% 100.00% 100.00% 100.00% 100.00%  99.87%
19      100.00% 100.00% 100.00% 100.00% 100.00%  99.97%
20      100.00% 100.00% 100.00% 100.00% 100.00%  99.99%
 

Got Barracks?



A barracks gives 3XP, which would most likely be used for a City Raider I promotion. That would bring the Defender's bonus down from 115% to 95%, so our odds improve a bit.

Code:
           1       2       3       4       5       6
 1       23.04%
 2       84.37%   5.31%
 3       [color=blue][b]98.36%[/b][/color]  33.57%   1.22%
 4       99.86%  77.63%  10.99%   0.28%
 5       99.99%  [color=blue][b]95.48%[/b][/color]  39.22%   3.28%   0.06%
 6      100.00%  99.34%  74.38%  15.95%   0.93%   0.01%
 7      100.00%  99.92%  92.82%  42.75%   5.73%   0.25%
 8      100.00%  99.99%  [color=blue][b]98.52%[/b][/color]  72.65%  20.09%   1.90%
 9      100.00% 100.00%  99.76%  90.63%  45.24%   8.27%
10      100.00% 100.00%  99.97%  [color=blue][b]97.56%[/b][/color]  71.66%  23.56%
11      100.00% 100.00% 100.00%  99.49%  88.89%  47.15%
12      100.00% 100.00% 100.00%  99.91%  [color=blue][b]96.58%[/b][/color]  71.07%
13      100.00% 100.00% 100.00%  99.99%  99.14%  87.50%
14      100.00% 100.00% 100.00% 100.00%  99.82%  [color=blue][b]95.65%[/b][/color]
15      100.00% 100.00% 100.00% 100.00%  99.97%  98.74%
16      100.00% 100.00% 100.00% 100.00%  99.99%  99.69%
17      100.00% 100.00% 100.00% 100.00% 100.00%  99.93%
18      100.00% 100.00% 100.00% 100.00% 100.00%  99.99%
19      100.00% 100.00% 100.00% 100.00% 100.00% 100.00%
20      100.00% 100.00% 100.00% 100.00% 100.00% 100.00%

Of course, you might reasonably decide that you prefer promoting level 2 units to level 3, rather than level 1 to level 2.
 

Chariots



The bad news for Chariots is that they are weaker, and can't get a City Raider promotion. The good news is that you can reach your target before too many defenders get whipped, and with reduced travel times, maybe the cultural bonuses will be lower.

Remember, the calculator is designed for Archers, not Spears.

Chariots vs Archers at 115% Defense.

Code:
           1       2       3       4       5       6
 1        2.85%
 2       39.72%   0.08%
 3       80.30%   2.18%   0.00%
 4       [color=blue][b]95.06%[/b][/color]  18.09%   0.09%
 5       98.90%  48.86%   1.35%   0.00%
 6       99.77%  76.42%   8.96%   0.07%   0.00%
 7       99.95%  91.28%  27.86%   0.79%   0.00%
 8       99.99%  [color=blue][b]97.23%[/b][/color]  53.36%   4.66%   0.05%   0.00%
 9      100.00%  99.21%  75.36%  15.63%   0.45%   0.00%
10      100.00%  99.79%  89.03%  34.50%   2.49%   0.03%
11      100.00%  99.94%  [color=blue][b]95.74%[/b][/color]  56.44%   8.75%   0.26%
12      100.00%  99.98%  98.51%  75.16%  21.39%   1.36%
13      100.00%  99.99%  99.52%  87.67%  39.45%   4.92%
14      100.00%  99.99%  99.85%  94.56%  58.85%  12.95%
15      100.00%  99.99%  99.95%  [color=blue][b]97.83%[/b][/color]  75.32%  26.29%
16      100.00%  99.99%  99.97%  99.20%  86.82%  43.37%
17      100.00%  99.99%  99.98%  99.71%  93.65%  60.85%
18      100.00%  99.99%  99.98%  99.89%  [color=blue][b]97.21%[/b][/color]  75.65%
19      100.00%  99.99%  99.98%  99.95%  98.86%  86.29%
20      100.00%  99.99%  99.98%  99.97%  99.55%  92.96%
 

Ordering



One archer at 115%, and two Axes - one with City Raider 1, and the other without. If your goal is to kill the archer, which order gives you the best chance of success?

Code:
		CR1				CR1		
100	8.13%	23.04%	1.87%		100	6.65%	18.50%	1.23%
83	15.29%	45.14%	6.90%		82	13.22%	39.99%	5.29%
66	17.88%	81.77%	14.62%		64	16.35%	67.84%	11.09%
49	16.66%	95.71%	15.95%		46	16.11%	95.23%	15.34%
32	13.53%	99.65%	13.48%		28	13.82%	99.71%	13.78%
15	10.01%	100.00%	10.01%		10	10.81%	100.00%	10.81%
XX	18.50%	100.00%	18.50%		XX	23.04%	100.00%	23.04%
			[b]81.34%[/b]					[b]80.58%[/b]

So saving the CR I Axe for last gives slightly better odds over all, and probably puts the XP on the better unit, but gives away 4.5% extra chance of walking away with 2 units. So I would recommend attacking with the stronger Axe in this case.

XP



I decided to work through the XP calculation.

If you attack with the weak unit first, you have

Code:
 1.87%   7xp
21.52%   6xp
15.95%   5xp
23.49%   4xp
18.50%   5xp + 3xp

Attacking strong unit first

Code:
 1.23%   5xp
 5.29%   4xp
11.09%   3xp
15.34%   2xp
24.59%   1xp
23.04%   7xp + 0xp
 
Interesting - nice work :)

EDIT: If VoU turns out to have not finished this article, can a mod delete this?
 
In the spirit of trampling all over any potential future additions by VoU...

That was interesting to check through. In my experience typical rushes use somewhere between 8 and 12 axes, and it looks like in that range of axes adding the CR1 promotion is roughly equivalent to adding 1 more axe to your stack (except you don't have to pay upkeep for that unit!). So glancing at this, it suggests three things to me...
1. Don't build a barracks unless you happen to have at least 10 spare hammers before copper is hooked up, and certainly don't build two 'rax.
2. 3-1 advantage against the first 3 archers, and another 2 axes for each archer after that; subtract 1 axe if your axes have CR1 or C1.
3. As you say, unpromoted axes go first against tough defenders.
 
Good read, very easy to understand and apply.

Thanks!
 
It's interesting how ineffective a barracks is. It takes the likelihood of 8 axes beating 3 archers from 95% to 98% and adds 20-40 hammers per city building them, which is an axe or two.

it does reduce the number of axes you need for some numbers of archers, but looking at this, it seems like it's a really, really bad idea to build barracks for early rushes.
 
Hmm, yeah that is interesting that the barracks mean so little for the early rush. It also seems like chariots are the more cost-effective unit, too, assuming you keep the enemy from building one more archer.
How reasonable is that 115% defenses? Walls: +50, city archer bonus: 50%. Isn't CG I 20%? Culture might be at 60%, but that's only 10% more, not 15%. Or is that extra bit from 1st strike? I could be wrong. Either way, I'm going to take a look at that calculator when I have a chance. It'd be nice to know what the enemies' odds are when fighting me :)
 
How reasonable is that 115% defenses? Walls: +50, city archer bonus: 50%. Isn't CG I 20%? Culture might be at 60%, but that's only 10% more, not 15%. Or is that extra bit from 1st strike?

115% was proposed in the original discussion by Ben-jammin:

50% Unit bonus for defending in a city
25% Fortification Bonus
20% Cultural Bonus
20% City Garrison I promotion.


How reasonable is that? Probably not too bad for a secondary city; but I don't think you will often reach the capital before the culture kicks up to at least 40%.

If you don't get there before it hits 60%, are you sure you're rushing?
 
Oops, forgot the fortify bonus. The 60% thing was just me trying to fit a square peg into a round hole ;)
 
115% is a likely number for a timely rush against one of the secondary cities...so long as it's not on a hill.

This information is quite interesting, but ignores anything other than a single pure massed attack.

Remember that good strategy can allow you to attack a city with fewer defenders and/or defenders that are not fully fortified (if at all). Fewer units means better advantage to the promoted axes, thus good strategy benefits promoted axes more. The increased odds of killing the first defender outright with just 2 promoted axes lends itself to certain situations. Surviving attackers get CR2, which alters the odds breakdown of the next attack and makes it more likely to get some attackers to CR3, etc.

Also remember that for an aggressive leader, the barracks are half price and the combat 1 in addition to CR1 further alters the odds, leading to more survivals->promotions->snowball effect. Which is more effective when the later target cities have a higher defense multiplier, which they generally will.

Also remember that 2-pop whipping axes is tricky and will generally involve micro that has you working lesser tiles. I could hardly think of a more efficient sort of micromanagement than a 2-pop whip of a barracks the turn bronze gets hooked up iwt hthe overflow going into the first axe where this allows you to avoid working poor tiles just to stay under the happy cap.

Anyway, this is nothing that wasnt brought up in the thread that led to this little experiment.
 

Aggressive Trait Comparison



Combat I Axe vs 115% Archer



Code:
           1       2       3       4       5       6
 1       23.04%
 2       84.34%   5.31%
 3       [color=blue][b]98.35%[/b][/color]  33.56%   1.22%
 4       99.86%  77.59%  10.99%   0.28%
 5       99.99%  [color=blue][b]95.47%[/b][/color]  39.19%   3.28%   0.06%
 6      100.00%  99.34%  74.34%  15.94%   0.93%   0.01%
 7      100.00%  99.92%  92.80%  42.71%   5.72%   0.25%
 8      100.00%  99.99%  [color=blue][b]98.51%[/b][/color]  72.61%  20.08%   1.90%
 9      100.00% 100.00%  99.75%  90.60%  45.20%   8.27%
10      100.00% 100.00%  99.97%  [color=blue][b]97.55%[/b][/color]  71.62%  23.54%
11      100.00% 100.00% 100.00%  99.48%  88.86%  47.11%
12      100.00% 100.00% 100.00%  99.91%  [color=blue][b]96.57%[/b][/color]  71.02%
13      100.00% 100.00% 100.00%  99.99%  99.14%  87.46%
14      100.00% 100.00% 100.00% 100.00%  99.82%  [color=blue][b]95.63%[/b][/color]
15      100.00% 100.00% 100.00% 100.00%  99.97%  98.74%
16      100.00% 100.00% 100.00% 100.00%  99.99%  99.69%
17      100.00% 100.00% 100.00% 100.00% 100.00%  99.93%
18      100.00% 100.00% 100.00% 100.00% 100.00%  99.99%
19      100.00% 100.00% 100.00% 100.00% 100.00% 100.00%
20      100.00% 100.00% 100.00% 100.00% 100.00% 100.00%

Those numbers look suspiciously like the numbers for the City Raider I Axe above. Close enough to be worth further discussion.

It's been reported several times that the cutoff between City Raider I and Combat 1 occurs when the archer has 120% bonus. Algebraically, that 20% additive bonus on top of a 200% base is equivalent to a 10% multiplicative bonus on a 200% base. So City Raider 1 essentially removes the that 10% bonus (so both units have none), where Combat I applies a 10% bonus to your attacker, but leaves the 10% bonus on the defender - since the combat probabilities are based on ratios, the shared 10%s cancel out.

BUT the combat engine doesn't use numbers, it uses integers, and fixed point arithmetic. That means you actually have to be some measurable distance away from 120% to produce a change in the numbers used in the calculation. How far is that?

Back of the envelope? About 6%.

In other words, in the range from 114% to 126% or so, City Raider I and Combat I are nearly equivalent. And our particular sample case happens to fall at the end of that range.

They aren't quite exactly the same - the accumulated rounding errors do pop up at various hp levels. However, that's only going to affect affect the combat odds when the differences appear at a hit point level you can actually achieve through a succession of combats.

I haven't yet done a walk through to try to discover precisely where that happens. I believe that the difference will only appear as a .1% difference in the odds of winning an attack round, never in damage.

Note: everything above really needs independent verification.

Combat I Axe vs 95% Archer



Here, our attacker has his inherent combat promotion, and also his level one city raider promotion.

Code:
           1       2       3       4       5       6
 1       28.12%
 2       91.19%   7.91%
 3       [color=blue][b]99.42%[/b][/color]  43.38%   2.22%
 4       99.97%  87.78%  17.19%   0.63%
 5      100.00%  [color=blue][b]98.48%[/b][/color]  52.70%   6.24%   0.18%
 6      100.00%  99.86%  86.67%  25.84%   2.15%   0.05%
 7      100.00%  99.99%  [color=blue][b]97.66%[/b][/color]  59.04%  11.25%   0.72%
 8      100.00% 100.00%  99.70%  86.56%  33.42%   4.53%
 9      100.00% 100.00%  99.97%  [color=blue][b]97.06%[/b][/color]  63.74%  16.67%
10      100.00% 100.00% 100.00%  99.52%  86.89%  39.94%
11      100.00% 100.00% 100.00%  99.94%  [color=blue][b]96.65%[/b][/color]  67.44%
12      100.00% 100.00% 100.00%  99.99%  99.35%  87.41%
13      100.00% 100.00% 100.00% 100.00%  99.90%  [color=blue][b]96.41%[/b][/color]
14      100.00% 100.00% 100.00% 100.00%  99.99%  99.20%
15      100.00% 100.00% 100.00% 100.00% 100.00%  99.86%
16      100.00% 100.00% 100.00% 100.00% 100.00%  99.98%
17      100.00% 100.00% 100.00% 100.00% 100.00% 100.00%
18      100.00% 100.00% 100.00% 100.00% 100.00% 100.00%
19      100.00% 100.00% 100.00% 100.00% 100.00% 100.00%
20      100.00% 100.00% 100.00% 100.00% 100.00% 100.00%

Doesn't appear that it takes many defenders for a half price Barracks to pay for itself.
 
Eye opening for sure. Would it be possible to find out how many axemen would survive?
 
Eye opening for sure. Would it be possible to find out how many axemen would survive?

Yes, depending on how much work you are willing to do.

That information is (sort of) accessible during the intermediate step between the calculator and the tables I've produced since.

Sketching things out - you take the calculator, and use the numbers there to determine a function X(n), which is the probability that you need exactly n axes to kill an archer, and start working through the combinations.


For cases where you succeed, you can work out the probability of axes left over by subtracting the various probabilities.

Combat I vs 155% Example: For 8 vs 3, you have a 98.51% chance of having at least three axes left. What that number really represents is the 92.8% chance that you could get the job done with 7 axes, plus an additional 5.mumble percent chance that you needed exactly one more - in practice, that latter case means that all but two of the first 7 axes are dead, plus the one that wins the final round. So there's a 5.mumble percent chance that you succeed with exactly 3 axes remaining.

The odds of succeeding with exactly 4 axes remaining? Same game, but using 74.34% and 92.8%. And so on up the column, until you get to the 1% chance that you get the job done without any losses (therefore 8 axes remaining).


For the case where you don't succeed... yeah, it's doable. It's not necessarily worth it to try to go backwards. With one archer, its trivial to work backwards. When the number of axes equals the number of archers, it's still trivial, because you know that every axe is attacking a healthy archer.

But if you have three axes attacking two archers, and you want to know how likely it is that exactly one axe survives, I think you have to work the problem forwards again. The odds can't be worse than the 1 vs 1 case, and can't be better than the 2v1 case, but there's an awfully big gap between the two.

So you have to go back to the calculator, and work through each of the different landing points for 2v2 combat.
 
I wonder what the differences between a sword and a jaguar rush would be. With the extra move through forest you can get with woody II, a jag rush might be better than a regular sword rush.
 
combat 1 and CR1 have a break-even point, but the combat promotions are linear until the fourth promotion and only get really good at the sixth. These calculations are quite interesting, but would be more applicable if you also showed odds that would be relevant for attacking a second and even a third city, for which you could assume that all the attackers that survived move up one level (and maybe a handful of additional promos based on the open field kills you normally end up getting), and that the next city probably has walls and/or much higher cultural defense.
 
Instant 5 star. Not only does this give an instant boost to players considering an axe rush, the spreadsheet can be tweaked for other situations for those who care to do it....a rather large breakthrough in this game. Could you imagine if people knew this in like 2006?
 
Yes, depending on how much work you are willing to do.

That information is (sort of) accessible during the intermediate step between the calculator and the tables I've produced since.

Sketching things out - you take the calculator, and use the numbers there to determine a function X(n), which is the probability that you need exactly n axes to kill an archer, and start working through the combinations.


For cases where you succeed, you can work out the probability of axes left over by subtracting the various probabilities.

Combat I vs 115% Example: For 8 vs 3, you have a 98.51% chance of having at least three axes left. What that number really represents is the 92.8% chance that you could get the job done with 7 axes, plus an additional 5.mumble percent chance that you needed exactly one more - in practice, that latter case means that all but two of the first 7 axes are dead, plus the one that wins the final round. So there's a 5.mumble percent chance that you succeed with exactly 3 axes remaining.

The odds of succeeding with exactly 4 axes remaining? Same game, but using 74.34% and 92.8%. And so on up the column, until you get to the 1% chance that you get the job done without any losses (therefore 8 axes remaining).


For the case where you don't succeed... yeah, it's doable. It's not necessarily worth it to try to go backwards. With one archer, its trivial to work backwards. When the number of axes equals the number of archers, it's still trivial, because you know that every axe is attacking a healthy archer.

But if you have three axes attacking two archers, and you want to know how likely it is that exactly one axe survives [and you don't win with either of your first axemen], I think you have to work the problem forwards again. The odds can't be worse than the 1 vs 1 case, and can't be better than the 2v1 case, but there's an awfully big gap between the two.

So you have to go back to the calculator, and work through each of the different landing points for 2v2 combat.

Ok, nice. I think I've got it now. I don't mean to offend you, but I made a couple of corrections to your post. Am I understanding you right?

If I understand correctly, that means that if you want to know how many axemen would survive, given that you want to have at least Y axemen left, you would just sum up the "exactly X" odds, right? So, in general, you would go Y=SUM(Xi-Xi-1) in the case where you plan on winning, anyway.

I'm not even sure why you would want to attack with your third axe if the first two failed :lol:

Edit: Oops, I get it now; you'd look for the odds that one of your first two axemen win, but that the other two fail. So, you would have to look at the odds that:
  1. both of the first two axemen win
  2. both of the first two axemen lose
  3. the third axemen loses
Since your first two axemen will be fighting different archers, you'd look at the odds of winning, times two. One is the inverse of the other. Ok, got that far. What about the odds of the third axeman? Man, that seems like a pain to figure out, am I right? Then again, you must've already done that to make this calculator :eek::goodjob:
 
Top Bottom