Announcement

Collapse
No announcement yet.

Hit Points and Firepower

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

  • #31
    debeest,

    I don't think Xin Yu's formula

    strongUnit+(strongUnit-weakUnit) vs. weakUnit

    is accurate; it's just more accurate than a raw

    combatValue*hitpoints*firepower

    formula.


    Xin Yu's formula is going in the right direction in that the difference in the two units' strengths is more important than straight numbers would lead one to believe. However, according to Marquis de Sodaq's combinatorial equation as I understand it, the combat values are more important than hitpoint & firepower values. Any realistic simplification of the combinatorial formula has to treat combat value and firepower/hitpoints differently.

    My guess is that an approximation of strength would be more like

    (combatValue^2)*firepower*hitpoints

    where combatValue is the unit's natural attack or defense value times all the modifiers (vet, terrain, etc.). Warning!!! I'm not saying the particular formula above is a good or correct approximation, just that a good approximation needs to (like the above formula) treat combat value differently than it treats the other two traits.

    Comment


    • #32
      Strong+(Strong-Weak)/Weak is the odd for the strong unit to win one round. If we consider HP and FP then the full formula is:

      Strength Ratio=[Strong+(Strong-Weak)]*HP_Strong*FP_Strong/[Weak*HP_Weak*FP_Weak]

      Roughly speaking, if Strength Ratio>1, then the strong unit wins, if <1, then the weak unit wins.

      Example: 'a=8 hp=1 fp=3' unit attack 'd=3 hp=2 fp=1' unit behind city walls on forest:

      Strong=3*3*1.5=13.5, HP_strong=2, FP_strong=1 (defending unit);
      Weak=8, HP_weak=1, FP_weak=3 (attacking unit).

      Strength Ratio=[(13.5+5.5)*2*1]/(8*3*1)=38/24=19/12. Defense unit wins.

      Comment


      • #33
        Xin Yu, your ratio is correct in this case, the defender wins.

        Edward, DeBeest, et al, instead of squaring the attack or defense value, the real calculation multiplies by 8. This treats it differently than the HP and FP. For simplicity (who's going to sit a calculate the probability during game time, anyway?), the calculation of small p is a good indicator - it gives the odds of the attacker winning each combat round. Higher odds mean higher chance of winning. See the combat thread for other considerations - namely that more HP and FP and higher attack/defense values tend to favor the stronger unit.

        Stronger attacker: p = ((Attack * 8) - 1)/(2 * (Defend * 8)
        Stronger defender (or equal): p = 1 - ((Defend * 8) + 1)/(2 * (Attack * 8)

        The first President of the first Apolyton Democracy Game (CivII, that is)

        The gift of speech is given to many,
        intelligence to few.

        Comment


        • #34
          I don't think I was clear in my previous post.
          (combatValue^2)*firepower*hitpoints
          is a totally made-up, imaginary formula for the outcome of a whole battle. I posted it only to show an example of what a simplified formula for a whole battle might look like.


          quote:

          Originally posted by Xin Yu April 25
          Strength Ratio=[Strong+(Strong-Weak)]*HP_Strong*FP_Strong/[Weak*HP_Weak*FP_Weak]



          Ah, I see. Compare the combat value difference before multiplying in the hitpoints and firepower. This would give better answers. I misunderstood that when I read DaveV's April 20 post. So a catapult attacking a musketeer would be:
          catapult combat value = 6 att
          musketeer combat value = 3 def
          [catapultCV + (catapultCV - musketeerCV)] * 1 singleHP vs. musketeerCV * 2 doubleHP
          [6 + (3)] vs. 3 * 2
          9 vs. 6
          Not bad odds for the catapult (which I incorrectly chided East Street Trader for using a while back. I stand shamefully corrected.)

          Versus my favorite method - the easy to calculate debeest ratings:
          catapult = 6 att * 1 singleHP = 6
          musketeer = 3 def * 2 doubleHP = 6
          Equal ('though incorrect) odds.

          Comment


          • #35
            Um, ok. I finally made time to sit down and study the calculations a bit and I can see that the complicated single-round formula produces the same results as Xin Yu's simple single-round formula, although I haven't delved into it enough to see why the seemingly unrelated formulas equate.

            However, if I understand it correctly, Xin Yu's formula ignores the tie-to-the-defender advantage. For example, suppose a 3-strength unit attacks a 2-strength unit. Xin Yu's formula says that the exact probability per round is (3 + (3-2))/2, or 4/2. The two-dice method says (3*8) * (2*8) = 384 possible combinations. Of those, the weaker unit gets a higher score 15*(15+1)/2 = 120 times. The scores are equal 16 times. The stronger unit gets a higher score the other 248 times. If the tie scores were split evenly, the totals would be 256 and 128, Xin Yu's ratio. So, Xin Yu's formula (somehow) gives the exact probability of each unit's winning a single round, EXCEPT for a modest-to-negligible defender advantage. Is that right, Xin?

            And then, of course, the combinatorials formula kicks in and the stronger unit whups ass very disproportionately, because the randomness reduces toward zero the more hit points (divided by firepower) are involved in the battle.

            Comment


            • #36
              Debeest, in your example of 3 vs. 2, the small p (single round odds) is:

              Stronger attacker: p = ((Attack * 8) - 1)/(2 * (Defend * 8), or,
              p = 23/32, or almost 3/4. Xin Yu's 2/3 (4:2) is similar, but far from exactly the same.

              "So, Xin Yu's formula (somehow) gives the exact probability of each unit's winning a single round" - It looks like what Xin's formula does is not find the single round odds, but approximate the big P. In this case, at least, Xin Yu's formula gives the ratio of favorable possible outcomes of the battle.

              If this applies generally to any combat, it could be a good simplification to use. Obviously, testing Xin's number against P with a slew of different combat ratios would show if this is true. If so, small p and Xin's number would be opposite sides of the same coin.

              ------------------
              "There is no fortress impregnable to an ass laden with gold."
              -Philip of Macedon
              The first President of the first Apolyton Democracy Game (CivII, that is)

              The gift of speech is given to many,
              intelligence to few.

              Comment


              • #37
                quote:

                Originally posted by Marquis de Sodaq on 05-02-2001 10:31 AM
                Stronger attacker: p = ((Attack * 8) - 1)/(2 * (Defend * 8), or,
                p = 23/32, or almost 3/4. Xin Yu's 2/3 (4:2) is similar, but far from exactly the same.


                Actually, isn't the stronger attacker formula p = 1 - (Defend*8+1)/(Attack*8*2)?

                Then p = 1 - 17/48 = 31/48. Close enough to 2/3.

                Comment


                • #38
                  quote:

                  Originally posted by debeest on 05-02-2001 03:35 AM
                  So, Xin Yu's formula (somehow) gives the exact probability of each unit's winning a single round, EXCEPT for a modest-to-negligible defender advantage. Is that right, Xin?



                  Yes! The defense bonus diminishes as attack and defense (adjusted for terrain, etc.) factor increases. Roughly speaking, the chance for a tie is

                  minimum (attack, defense)/(8* attack * defense).

                  Which means, if the attack factor is weaker than the defense factor, then the chance for a tie is

                  1/(8 * defense);

                  if the attack factor is stronger than the defense factor, then the chance for a tie is

                  1/(8 * attack).

                  If you want an exact formula, the attack side should substract, and the defense side should add, half of this tie value, or minimum (attack, defense)/(16* attack * defense), from one-round odds (not the odds ratio given by my formula, but the odds. Odds ratio= win/lose, odds=win/(win+lose), they are different).

                  How big is the chance of a tie? A warrior against a warrior, both non-vet, the defender on grass unfortified will give 1/16, or 0.0625; if either of the two is a vet then the chance gets down to 1/24, or 0.0417. I think we can ignore it if the chance of tie is below 0.01 (happens when either the attack or defense (adjusted for bonus) is 7 or up), unless the attack factor and defense factor are equal.


                  Comment


                  • #39
                    quote:

                    Originally posted by Edward on 05-02-2001 12:27 PM
                    Yes. As Marquis de Sodaq pointed out...

                    Xin Yu's formula is an inexact ('though quite good) guess as the victor of a whole battle.


                    Arrrgh. No, it's the odds for a single round. A slight advantage in the Xin Yu formula will result in a much greater advantage in a battle.

                    quote:


                    It does NOT factor in the defender tie advantage.


                    If you're going for accuracy, subtract 1/8 from the attacker and add 1/8 to the defender. So in the example above, 3 strength unit attacking 2 strength unit, the odds are 3.875:2.125, or 31/48, exactly the same result as the other formula. I think it's easier to calculate without the fractions, and close enough if you bear in mind that the defender has the advantage in close contests (see your point below).

                    quote:


                    Yes, they give similar results, but then again, all of the proposed formulas give somewhat similar results. (A good reason for one to use a formula that's inaccurate but simple for one to calculate on-the-fly.)


                    For a long time I used a formula similar to debeest's, and was surprised when catapults beat musketeers and musketeers had trouble beating fortified pikemen on a river. The Xin Yu formula explains such results, and gives me a much better idea of what's going to happen in a battle. The math is no more demanding than the debeest formula, IMHO.

                    Comment


                    • #40
                      Yes. As Marquis de Sodaq pointed out...

                      Xin Yu's formula is an inexact ('though quite good) guess as the victor of a whole battle. It does NOT factor in the defender tie advantage.

                      Marquis de Sodaq's recently posted formula is exactly correct for the victor of a single mini-combat round. It does (as it must) factor in the defender tie advantage.

                      Yes, they give similar results, but then again, all of the proposed formulas give somewhat similar results. (A good reason for one to use a formula that's inaccurate but simple for one to calculate on-the-fly.)

                      Comment


                      • #41
                        Xin Yu's formula
                        quote:

                        Originally posted by Xin Yu April 25, 2001 19:15
                        Strength Ratio=[Strong+(Strong-Weak)]*HP_Strong*FP_Strong/[Weak*HP_Weak*FP_Weak]



                        quote:

                        Originally posted by Edward May 02, 2001 12:27
                        Xin Yu's formula is an inexact ('though quite good) guess as the victor of a whole battle.



                        quote:

                        Originally posted by DaveV on 05-02-2001 01:19 PM
                        Arrrgh. No, it's the odds for a single round. A slight advantage in the Xin Yu formula will result in a much greater advantage in a battle.



                        I still believe Xin Yu's formula is for a whole battle.
                        1) A formula for a mini-round should not include hitpoints or firepower (as Xin Yu's formula does) since these are used to deal damage in a mini-round after the mini-round's victor has been determined.
                        2) A mini-round's victor is determined solely by the units' respective combat values (including modifiers). In a mini-round there is no increased advantage for the stronger unit (as Xin Yu's formula has) beyond the simple ratio of combat values .

                        Xin Yu's formula factors in an increased advantage for the unit with the better combat value (via +(Strong-Weak)) in an attempt to account for that combat value advantage working over many mini-rounds. This increased advantage is accurately factored-in in Marquis de Sodaq's combinatorial formula. In this thread we're searching for a simplified formula for the whole battle that accounts, even if only approximately, for this.

                        Obviously Xin Yu's formula is only an approximation since it doesn't take into account the defender tie advantage (which is generally small and varies as the combat values and hitpoints involved vary); nor does it increase the combat advantage (from the base +(Strong-Weak)) when more hitpoints are involved (and therefore the combat advantage works over more mini-rounds and should be even more pronounced).

                        quote:

                        Originally posted by DaveV on 05-02-2001 01:19 PM
                        The Xin Yu formula ... gives me a much better idea of what's going to happen in a battle. The math is no more demanding than the debeest formula, IMHO.



                        Agreed. You all have persuaded me to use Xin Yu's formula when higher accuracy is needed or when unequal hitpoints or firepower are involved.

                        Comment


                        • #42
                          quote:

                          Originally posted by Edward on 05-03-2001 02:10 PM
                          I still believe Xin Yu's formula is for a whole battle.


                          OK, we were talking about two different formulae. The basic formula without the hitpoint and firepower factors gives the combat round odds; add in hitpoints and firepower and you get an indication of how the battle will go. Comparing the two numbers still doesn't give a good estimate of which unit is more likely to win, but it does give a pretty accurate estimate of how much damage will be done to the stronger unit.

                          Comment

                          Working...
                          X