Civ Quiz II

If it was my Infantry and a barb warrior, then it would need ZERO first strikes. The warrior would win because my PC hates me ;)
 
Well, on each battle, if I understand combat, either the warrior hits the infantry and does damage, or the infantry hits the warrior and does damage. So, the infantry "missing" would be the warrior getting in that kill shot.

ya, of course you are right.... this is why i usually stick to lurking! -- check join date and posts, staggering no? -- but this math question brought me out of hiding as i too am a math major.
 
There are at least 2 different ways you can do the summation in this problem. UWHabs has done it a slightly different way to how I did it.

I look at it like this...

Let x be the number of first strikes needed (what we're trying to find). Also, let PA represent the probability of the attacker winning a round of combat, and PD = 1-PA be the probability of the defender winning a round of combat.

There are two ways the defender can be killed: by first strikes alone, or after the first strike rounds. If the defender is killed by first strikes then there can be no more than x combat rounds and no fewer than 13 combat rounds. Let's look at this case first since it is the most likely...

Let j be the index for total number of combat rounds fought. For example, if the attacker wins his first 13 first strikes then j would be 13. If the attacker only lands his 13th hit on the xth first strike that j would be x because it took him x rounds to kill the defender.

So we will be summing some terms from j = 13 to j = x.

What is the term?

If there are j rounds fought then obviously 13 of them must have been won by the attacker, so we have a PA^13 factor appear.

The defender must therefore have won j-13 of the rounds so a factor of PD^(j-13) creeps in.

To ensure we count every possible combination for there to be exactly j rounds fought we have to introduce the binomial coefficient (j-1,j-13). This is the number of ways you can pick j-13 rounds won by the defender out of j-1 rounds. Why are we taking it out of j-1 rounds - not j rounds? The answer to this is that the defender cannot score the hit on the jth round as otherwise it would have been killed on one of the previous round by the attacker.

So we have the sum:
from j = 13 to x
sum: (j-1,j-13) * PA^13 * PD^(j-13)



For the other part of the calculation we need to consider the possibility that the attacker only wins between 0 and 12 of the first strike rounds, hence requiring some more rounds of regular combat to kill the defender. Let us now use the index j to represent the number of hits the attacker managed during the first strike rounds.

Obviously we will have j = 0 through to 12.

The first strike rounds will make the factor: PA^j * PD^(x-j).

Counting the combinations will introduce the binomial coefficient (x,j) because we are choosing the number of ways the attacker can have won j out of the x first rounds.

Then after the first strikes the attacker must win the remaining rounds. The remaining number of rounds is necessarily 13-j, meaning another factor of PA^(13-j)

So the sum is:
from j = 0 to 12
sum: (x,j) * PA^j * PD^(13-j) * PA^(13-j)
or (x,j) * PA^13 * PD^(13-j)

Testing various values for x, we find the 50% threshold is crossed between 137 and 138 first strikes so 138 is the correct answer.

Code:
P_A := 91/1000; P_D := 1-P_A;

x := 137;
> y := P_A^13*(sum(binomial(x,j)*(P_D^(S-j)),j=0..12)
>      +sum(binomial(j-1,j-13)*(P_D^(j-13)),j=13..x));
> evalf(y);
                               x := 137


  y :=                             0.4915910416

> x := 138;
> y := P_A^13*(sum(binomial(x,j)*(P_D^(S-j)),j=0..12)
>      +sum(binomial(j-1,j-13)*(P_D^(j-13)),j=13..x));
> evalf(y);

                               x := 138


  y :=                              0.5023196110

>

Note this is using a math package called Maple, which can do precision arithmetic, so the calculations are accurate.

UWHabs, it's your turn! ;)

By the way, the way I originally calculated it but I can't explain quite as well is:
Spoiler :
Code:
S:= 138; P_A := 91/1000; P_D := 1-P_A;
> y := sum(binomial(S,j)*(P_D^(S-j))*P_A^13,j=0..12)
>      +sum(binomial(S,j)*(P_D^(S-j))*P_A^j,j=13..S);
> evalf(y);
This is essentially what UWHabs did as far as I can tell.
 
I don't have a question now, so if anyone else has one, ask away.

We did do it the same way, I was just lazy and found an online calculator giving me the whole binomial series stuff, then had to do a bit of mental math to fudge the last few numbers, knowing that it tails off quickly.
 
I don't have a question now, so if anyone else has one, ask away.

We did do it the same way, I was just lazy and found an online calculator giving me the whole binomial series stuff, then had to do a bit of mental math to fudge the last few numbers, knowing that it tails off quickly.

Unless I'm missing something, there are at least 2 different ways you can build the terms for the summation. The main way you can spot the difference is by the form of the binomial terms. The binomial terms in the way I explined are not always (138,something) but depend on the index. This means the factorials aren't quite as huge for most of the calculation.

But yeah, obviously they will be equivalent in some sense because they solve the same problem, if that's what you mean.
 
Unless I'm missing something, there are at least 2 different ways you can build the terms for the summation. The main way you can spot the difference is by the form of the binomial terms. The binomial terms in the way I explined are not always (138,something) but depend on the index. This means the factorials aren't quite as huge for most of the calculation.

But yeah, obviously they will be equivalent in some sense because they solve the same problem, if that's what you mean.

Yeah, right, I didn't quite read yours. You summed up basically saying, "odds of having the battle done in 14 combat rounds with 138 first strikes" + "odds of being done in 15 rounds" + ... whereas I summed it up as "if we had 138 combat rounds, what are the odds that the warrior gets at least 13 hits in + odds of getting 14 hits + ..."
 
Ok. If no one else wants to ask a question...

This is an easy one.

Q: There are many units in the game that supposedly do not receive any defensive bonuses. Why is this wrong?
 
Q: There are many units in the game that supposedly do not receive any defensive bonuses. Why is this wrong?

Defending units can still get a bonus for:
1. Attacks across river
2. Attacks directly from ship
3. Defending unit's bonus against attacking unit (such as a War elephant defending against a chariot attacker or a Defender with a Pinch promotion against a gunpowder Attacker)
 
Defending units can still get a bonus for:
1. Attacks across river
2. Attacks directly from ship
3. Defending unit's bonus against attacking unit (such as a War elephant defending against a chariot attacker or a Defender with a Pinch promotion against a gunpowder Attacker)

That's right. I was mainly after the first 2 - the amphibious ones. Especially with the river bonus, your mounted units can use this to their advantage even near the beginning of the game, when manoeuvering near enemy cities. I consider it strange because as far as I'm concerned the river bonus is a clear-cut defensive bonus.
 
OK-Next question.

Q: What are the two promotions that a recon unit can have that do not assist the recon unit?
 
Amphibious and Medic II?
 
@ Paradigm Shifter

Nope. You are half right.
 
Well there must be 3 then since medic II doesn't affect the actual unit only ones in adjacent tiles ;)
 
@ ParadigmShifter

Since I didn't phrase my question correctly you are next since you gave me two correct answers. BTW-the other promotion is Guerilla III
 
I don't understand the question... what do you mean with " don't assist the recon unit" ? All the promos that recon units can have assist somehow the recon unit.....
 
@ ParadigmShifter

Since I didn't phrase my question correctly you are next since you gave me two correct answers. BTW-the other promotion is Guerilla III
What?

Recon units can't have neither Amphibious or Guerrilla III
 
@r_rolo1

Per the promo listing here they can. The page says it is accurate for BTS 3.17.
 
Back
Top Bottom