 |
|  |
 |
|  |
 |
|
Excelsior84
|
|
Alabama
Jun 2002 time: 23:21
|
|
quote: Originally posted by vondrack
Of course, this is theory, as every single type of terrain gives the defender at least a small defense bonus, as others correctly pointed out.
This is exactly what The Civilization Calculator says (see http://www.columbia.edu/~sdc2002/civulator.html).
|
Yes, the approximation of 1 in 8 was with the 10% defense bonus for flat terrain. 
quote: Originally posted by vondrack
I tried to show how the calculation is done (it could be expressed in a more elegant way using combinatorics, but that would be difficult to understand for those that do not do much math), but if it is not as self-explanatory as it seems to me, just tell me and I will explain the formulas in more detail. You can figure out any combat result probability in this way.
|
Explain away, please. I think I figured out calculate it a while back from an old stat book, but I've now forgotten how it was determined, and further, where the stat book is. 
|
|
|  |
 |
|  |
 |
|
vondrack

|
 |
Praha, Czech Republic
Jan 2002 time: 06:21
|
|
quote: Originally posted by Excelsior84
Explain away, please. I think I figured out calculate it a while back from an old stat book, but I've now forgotten how it was determined, and further, where the stat book is. |
Well, it is like this:
A regular swordsman (attack 3) attacks a regular archer (defense 1). The probability that the archer wins one combat round, is 1:3. or 1 out of 4 (1/4). OTOH, the probability of the archer losing one combat round is 3:1, or 3 out of 4 (3/4).
Now, the archer has to win three different rounds, while letting the swordsman win no more than two. The formulas describe exactly that:
Should the archer win without a scratch, he has to win three consecutive rounds, not losing a single one (you multiply the elementary probabilities, that is the only thing I do not know how to explain - but I believe there is no need to, in your post above, you seem to understand that).
prob_no_scratch = 1/4 * 1/4 * 1/4 = (1/4)^3 = 1/64
However, the archer is allowed to lose one round, which means you can insert one lost round (probability 3/4) anywhere, but at the end (archer must win the last round to win the whole combat). There are three different ways of archer winning with losing one round, as he can lose in the first, second, or third round:
3/4 * 1/4 * 1/4 * 1/4 (prob of winning, but losing the 1st round)
1/4 * 3/4 * 1/4 * 1/4 (prob of winning, but losing the 2nd round)
1/4 * 1/4 * 3/4 * 1/4 (prob of winning, but losing the 3rd round)
The total probability of winning, but losing one round is a sum of the above three probabilities, that is:
prob_2hp_left = 3 * 3/4 * (1/4)^3 = 9/4 * 1/64.
You apply the same logic for the case when archers barely survives, losing two hitpooints:
1/4 * 1/4 * 3/4 * 3/4 * 1/4 (wins rounds 1,2,5, loses 3&4)
1/4 * 3/4 * 1/4 * 3/4 * 1/4 (wins rounds 1,3,5, loses 2&4)
3/4 * 1/4 * 1/4 * 3/4 * 1/4 (wins rounds 2,3,5, loses 1&4)
1/4 * 3/4 * 3/4 * 1/4 * 1/4 (wins rounds 1,4,5, loses 2&3)
3/4 * 1/4 * 3/4 * 1/4 * 1/4 (wins rounds 2,4,5, loses 1&3)
3/4 * 3/4 * 1/4 * 1/4 * 1/4 (wins rounds 3,4,5, loses 1&2)
Again, sum these partial possibilities up to get the total possibility that the archer will win the combat with just 1hp left:
prob_1hp_left = 6 * (3/4 * 3/4) * (1/4)^3 = 54/16 * 1/64
As there is no other way that would make the archer win over the swordsman, but winning with taking no, 1hp, or 2hp damage (taking an hp of damage twice at most, in any one, but the last round), summing up all the partial probabilities gives us the total probability of the archer killing the attacking swordsman:
1/64 + 9/4 * 1/64 + 54/16 * 1/64 =
1/64 * (1 + 9/4 + 54/16) =
1/64 * (16/16 + 36/16 + 54/16) = 1/64 * 106/16 = 10,35%
The trick is that you have to figure out all the possible combinations of lost and won rounds. This can be done in quite an elegant way using combinatorics, but I have to admit that I would have to look for a book, too... 
The above mentioned method is pretty much using the elementary math and common sense (while doing exactly what the fancy combinatoric formulas do, just expressing it in a primitive way. Hence, I am able to think it up every time without the book... 
quote: Originally posted by Trip
Vondrack, you have too much time.  |
After reading Excelsior's post, I thought... oh, my, it so easy... but then, I realized I was not able to put the formula together off the cuff... which sorta pissed me off, as I used to be good at math... I took a piece of paper and the remains of my brains, knowing I must be able to figure it out... and I was, which soothed me a bit... well, the rest was just that I wanted to show the world how smart I am... 
Last edited by vondrack on 19-07-2002 at 01:32
|
|
|  |
 |
|
Excelsior84
|
|
Alabama
Jun 2002 time: 23:21
|
|
quote: Originally posted by vondrack
Adding hitpoints does increase the probability that the unit with the higher combat-effective value will win. A veteran swordsman is more likely to kill a veteran archer than a regular swordsman is to kill a regular archer. And an elite swordsmen has even greater chance of defeating an elite archer. By increasing hitpoints to, say, 50, the unit with the higher combat-effective value will (for all practical purposes) ALWAYS win. |
Yup, exactly right. It's just that the really low numbers like 3 make it far random than is human nature to accept. I *like* the more powerful unit to win more often than it does, others don't. Civ2 was far less random than Civ3 with regards to combat outcomes because the *minimum* HP of a unit in Civ2 was 10.
|
|
|  |
 |
|
Coracle
|
|
quote: Originally posted by CyberShy
Dom Pedro, it's a game. |
It's more than that. It's a buggy disappointment. A BIG one.
|
|
|  |
 |
|
Excelsior84
|
|
Alabama
Jun 2002 time: 23:21
|
|
quote: Originally posted by Theseus
Is what Nic saying correct? Are there others defense factors when in cities that are not included by the Civulator?
|
I don't *know* that this is not the case, but I've never heard of it. I think he may be mis-interpreting the "citizen" and "building" fields under "Defensive Bonuses" (under "General Settings") as being a per-citizen/building bonus to unit defense. According to the help, however, this value is used to determine population and building resistance to bombardment. i.e., 4 defensive bonus means a bombardment with 4 damage has a 50% chance of killing a citizen.
|
|
|  |
 |
|
F18fett
|
|
I miss the days when an army of tanks could wipe out a stupid civ that didn't know to build defense units better than musketeers.
|
|
|  |
 |
|
Excelsior84
|
|
Alabama
Jun 2002 time: 23:21
|
|
This is it:
Attachment: equation.jpg
This has been downloaded 145 time(s).
|
|
|  |
 |
|
vondrack

|
 |
Praha, Czech Republic
Jan 2002 time: 06:21
|
|
quote: Originally posted by Excelsior84
Urm...no, I think that formula isn't right. Mine, at least gives the right answer. Hold on, I'll write mine up where it can actually be read. |
Well, it is interesting... your formula actually does produce the right result, although I have no idea what the numbers in it represent... especially having (1/4)^5 puzzles me - what does that stand for? It would be the probability of the archer winning five consecutive rounds...?! Even the 5!/(5!(5-5)!) would correspond to that... but then, there is no such situation possible...
BTW - try enumerating my formula. You will get the same result! Math is fun, isn't it? 
Wait... I am looking into your formula and... I begin to understand it. Your formula expresses the probability that the archer will win at least three out of five consecutive rounds. But that is something a bit different from what we are trying to express... the combat will end after his third victorious round, so considering five victorious rounds is incorrect. I find it interesting that the result is exactly the same, even if the formula expresses something different... is that a coincidence?
So, I still insist on that my formula is correct, even though yours gives the same result... 
|
|
|  |
 |
|  |
 |
|
The_Aussie_Lurker
|
|
Adelaide, South Australia, Australia
May 2001 time: 05:21
|
|
For my part, I'd say that Dom Pedro is NOT a whiner, because he makes realistic, constructive criticisms!! Coracle, on the other hand, is a Whiner-not only because his criticisms are NOT constructive, but because they are REPETATIVE!!! If he hates this game so much, he should just go back, play Civ2 and leave the rest of us ALONE!!
I'd agree with DP that the editor patch, though excellent overall, does leave some vital elements out. For me the absence of events scripting, pooled editor flags for units and buildings and the ongoing presence of Hardcoded values for things like movement on enemy roads/Railroads and points for Cultural Victory are major issues, but ones which I hope Firaxis will deal with in time (and I believe they will, as well)!!
I also hope that, one day, they will re-examine the issues of trade routes (perhaps making them visible, like those in CtP!) and resource disappearance ratios! It seems to me that it would fairly easy to code for a "Disappearance Ratio/city" value, based on the resources "Rarity" and "Deposit Size", so that the chance of your resource actually disappearing would be connected to the size of your empire. I also feel that all units which require a resource as fuel (such as coal or oil) should start to suffer 1hp damage every turn they are cut off from that resource (eg. as in an embargo). I do feel, though, that just the presence of strategic resources in the game, and their importance in building units and improvements, shows how the game has evolved from it's Civ1/2 roots! As for bringing back spies and caravans-yech!!! All that did was provide opportunities for tedium, and was the major thing that put me off playing Civ2 on a regular basis! The trade and espionage systems do need to be improved, but I prefer the abstracted method!
Anyway, I'm sure this will simply get me a "Fanboy" label from Coracle but...WHO CARES!!!
Yours,
The_Aussie_Lurker.
|
|
|  |
 |
|
Excelsior84
|
|
Alabama
Jun 2002 time: 23:21
|
|
quote: Originally posted by vondrack
Wait... I am looking into your formula and... I begin to understand it. Your formula expresses the probability that the archer will win at least three out of five consecutive rounds. But that is something a bit different from what we are trying to express... the combat will end after his third victorious round, so considering five victorious rounds is incorrect. I find it interesting that the result is exactly the same, even if the formula expresses something different... is that a coincidence?
So, I still insist on that my formula is correct, even though yours gives the same result... |
That's correct, it is the odds that it will win exactly 3 rounds + the odds that it will win exactly 4 rounds + the odds it will win exactly 5 rounds. The reason we have to include the odds for 4 and 5 rounds, even though the combat stops after 3 rounds, is that you can't simply throw away the cases where it wins all 5 (or 4) rounds. If it wins all 5, it will show up as 3 consecutive wins in combat, same as winning the first three and losing 1 of the next 2, and the same as winning the first 3 rounds, and losing the next two. These cases make up the probability of winning the first three rounds without a scratch.
i.e.,
odds of Vic-Vic-Vic-Fail-Fail = 9/1024
odds of Vic-Vic-Vic-Vic-Fail = 3/1024
odds of Vic-Vic-Vic-Fail-Vic = 3/1024
odds of Vic-Vic-Vic-Vic-Vic = 1/1024
The sum of those probabilities is 16/1024 = 1/64, the same as a simple Vic-Vic-Vic (because that's what it is)
EDIT: And to clarify, this same reasoning can be applied to instances such Vic-Vic-Fail-Vic-Vic, where it wins 4 of 5, yet it stops after the 4th.
Does that make sense?
|
|
|  |
 |
|
vondrack

|
 |
Praha, Czech Republic
Jan 2002 time: 06:21
|
|
quote: Originally posted by Excelsior84
That's correct, it is the odds that it will win exactly 3 rounds + the odds that it will win exactly 4 rounds + the odds it will win exactly 5 rounds. The reason we have to include the odds for 4 and 5 rounds, even though the combat stops after 3 rounds, is that you can't simply throw away the cases where it wins all 5 (or 4) rounds. If it wins all 5, it will show up as 3 consecutive wins in combat, same as winning the first three and losing 1 of the next 2, and the same as winning the first 3 rounds, and losing the next two. These cases make up the probability of winning the first three rounds without a scratch.
i.e.,
odds of Vic-Vic-Vic-Fail-Fail = 9/1024
odds of Vic-Vic-Vic-Vic-Fail = 3/1024
odds of Vic-Vic-Vic-Fail-Vic = 3/1024
odds of Vic-Vic-Vic-Vic-Vic = 1/1024
The sum of those probabilities is 16/1024 = 1/64, the same as a simple Vic-Vic-Vic (because that's what it is)
EDIT: And to clarify, this same reasoning can be applied to instances such Vic-Vic-Fail-Vic-Vic, where it wins 4 of 5, yet it stops after the 4th.
Does that make sense? |
Yep, it does. I have realized that, too, only after submitting my last post. The difference between our formulas is that mine is a very close rewrite of the simple formulas I wrote in the very beginning, expressing exactly what happens (=is possible) in Civ3, while yours uses a smart trick of considering even "impossible" cases (which do not affect the result we seek) to get rid of the variable "length" of the combinations. Both are mathematically correct and provable (is there a word like that?), that is right. Just two ways to the same end.
|
|
|  |
 |
|
IthacaMike
|
|
Upstate New York
Feb 2002 time: 00:21
|
|
quote: Originally posted by DrFell
Sorry to be nitpicky, but this is actually wrong... it should be 1/64 (1/4*1/4*1/4) for two regular units. 1 in 64 losses for the swordsman doesn't exactly seem like an unrealistic value for a swordsman attacking an archer. Maybe next time you should bring along more units, no? |
No, he is close to right. The swordsman could win the first two rounds and then lose three in a row (3/4*3/4*1/4*1/4*1/4) or the swordsman could lose win one and then lose the next three, or...
I just ran a sim and it looks like the defending archer should win about 1 time in 10 (swordsman won 90.8% of the time in my sim).
Mike
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:21. Apolyton Time is 00:21. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|