Announcement

Collapse
No announcement yet.

Combat math question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Combat math question

    I'm using the combat spreadsheet found here on Apolyton to get numbers, but I'm missing something -

    An 18 versus 2 unit, 3 HP each, according to this spreadsheet, gives the defender a 1% chance of winning.

    But in order to win, the defender must win 3 rounds, at 10% chance of winning each. Shouldn't that mean the chance is actually .1^3, or .1% instead? This of course makes the chances of 3 hits in a row the same as 3 out of 5, which doesn't make logical sense, but I cannot find the function to factor that into the mix. Then again, should it matter how many rounds it is, three in a row or three out of 10?

    What am I leaving out of the equation? Or is the spreadsheet wrong?

    Venger

  • #2
    The defender has a 1/1000 chance of winning 3 times in a row. But it doesn't have to win 3 times in a row. It only has to win 3 times before the attacker does. There's a number of ways this can happen:

    Defender wins 3 times in a row (WWW) - 1/1000
    Defender record is LWWW - 1/1000 * 9/10 = 9/10000
    Defender record is WLWW - 1/1000 * 9/10 = 9/10000
    Defender record is WWLW - 1/1000 * 9/10 = 9/10000
    Defender record is LLWWW - 1/1000 * 81/100 = 81/100000
    Defender record is LWLWW - 1/1000 * 81/100 = 81/100000
    Defender record is LWWLW - 1/1000 * 81/100 = 81/100000
    Defender record is WLLWW - 1/1000 * 81/100 = 81/100000
    Defender record is WLWLW - 1/1000 * 81/100 = 81/100000
    Defender record is WWLLW - 1/1000 * 81/100 = 81/100000

    Now add them up. 1/1000 + 27/10000 + 486/100000 = 856/100000 or about 0.85% chance of the defender winning. Does the sheet round to the nearest percent?
    gamma, aka BuddyPharaoh

    Comment


    • #3
      The chance of the defender winning is actually higher than that. Don't forget that the defender never has a bonus less than +10%.

      Xerxes

      Comment


      • #4
        1. I think the defender wins ties.

        2. There's a good discussion on this in the Civ2strat forum. (Going through the math to determine these kinds of outcomes.)

        Comment


        • #5
          Xerxes314: You're right; I hadn't thought of that. Or rather, I had, but that 10% or more is a terrain bonus, which I assumed the spreadsheet wouldn't have figured into the "base" chance.

          But maybe it did. If so, the defender has a 11/100 chance, instead of 10/100.

          no losses - 1331/1000000
          one loss - 89/100 * 1331/1000000 * 3
          two losses - 89*89/10000 * 1331/1000000 * 6

          That comes to (13310000 + 35537700 + 63257106)/10000000000 = 1.12104806 percent.
          gamma, aka BuddyPharaoh

          Comment


          • #6
            I don't see how there could ever be a tie, since only one random value determines each round. The attacker's attack value and the defender's defense value are added together. A random floating-point value is generated between 0.0 and this sum. If that random value is greater than the defender's defense, the attacker wins that round; otherwise, the defender wins. A hit point is deducted from the losing side and the generator goes again until one side dies or retreats.
            gamma, aka BuddyPharaoh

            Comment


            • #7
              In Civ2 you could have ties on individual rounds. If the mechanics are the same here, you could still have ties. I've actually lost a weak horse when attacking a diplomat because of this. (happens very rarely.) If you want details on how the ties occur go the Civ2Strat combat thread. (Essantially a large die is rolled and sometimes you get a result of having the die roll equal the defend value.)

              Comment

              Working...
              X