Announcement

Collapse
No announcement yet.

Combat mechanics

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

  • Combat mechanics

    I've performed an exhausting survey of the probabilities involved in combat in Alpha Centauri. Most important is the chance the attacker will win a single portion of combat, an exchange, where a point of damage is assigned to either the attacker or defender. Prior to these tests, I had believed that the odds the attacker would win an exchange were simply the ratio of the attacker's strength to the defender's strength (after all modifiers). From this, and the number of hit points each unit has, the odds of winning the combat can easily be calculated, and the mean damage to the expected victor is also at hand. My tests have shown that the odds of winning an exchange are definitely not a simple ratio of strengths.

    Here is a plot of exchanges won / total exchanges against attacker's strength / (attacker's strength + defender's strength). The error bounds are each two sample standard deviations away from the sample mean.
    Attached Files
    "Cutlery confused Stalin"
    -BBC news

  • #2
    The data used for that graph is as follows:

    Code:
    Ratio         	Prob           	stddev
    0.022624434	0.012040753	0.001916421
    0.044247788	0.028831563	0.002915101
    0.076923077	0.041916168	0.003467523
    0.100000000	0.06020558	0.004076395
    0.166666667	0.100346021	0.005589062
    0.225739849	0.133473096	0.008990174
    0.250000000	0.172699069	0.012155239
    0.333333333	0.24906015	0.013258179
    0.333333333	0.245994345	0.013221848
    0.368421053	0.299239222	0.013313792
    0.400000000	0.341176471	0.013743603
    0.406779661	0.327620303	0.012050357
    0.421686747	0.356759976	0.011690935
    0.480000000	0.460965224	0.00663983
    0.500000000	0.517477204	0.013774524
    0.500000000	0.482522796	0.013774524
    0.520000000	0.539034776	0.00663983
    0.578313253	0.643240024	0.011690935
    0.593220339	0.672379697	0.012050357
    0.600000000	0.658823529	0.013743603
    0.631578947	0.700760778	0.013313792
    0.666666667	0.754005655	0.013221848
    0.666666667	0.75093985	0.013258179
    0.750000000	0.827300931	0.012155239
    0.774260151	0.866526904	0.008990174
    0.833333333	0.899653979	0.005589062
    0.900000000	0.93979442	0.004076395
    0.923076923	0.958083832	0.003467523
    0.955752212	0.971168437	0.002915101
    0.977375566	0.987959247	0.001916421
    Half of these points are from the attacker's perspective, and half are from the defender's perspective, which is why .5, 1/3, and 2/3 have two values each.

    I have been unable to identify a simple mapping from expected odds to measured odds, or expected probability to measured probability, but a useful estimate would be that the measured odds equal the expected odds raised to the 4/3 power. Thus, to calculate the true estimated probability of winning an exchange, raise both the attacker's and defender's strengths to the 4/3, and then calculate the ratio of your side's strength to the sum of the strengths.
    Last edited by Chaos Theory; July 6, 2005, 20:17.
    "Cutlery confused Stalin"
    -BBC news

    Comment


    • #3
      The raw tests I used to generate this information are available in the attached zipped XLS file.
      Attached Files
      "Cutlery confused Stalin"
      -BBC news

      Comment


      • #4
        raise both the attacker's and defender's strengths to the 4/3
        Raise both?

        x*a / y*a = x / y
        -- What history has taught us is that people do not learn from history.
        -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

        Comment


        • #5
          Re: Combat mechanics

          Originally posted by Chaos Theory
          I've performed an exhausting survey of the probabilities involved in combat in Alpha Centauri.
          You know what they say about some analyses - it mightn't have exhausted the space to be analysed, but it sure did exhaust the analyser .
          This is Shireroth, and Giant Squid will brutally murder me if I ever remove this link from my signature | In the end it won't be love that saves us, it will be mathematics | So many people have this concept of God the Avenger. I see God as the ultimate sense of humor -- SlowwHand

          Comment


          • #6
            Originally posted by binTravkin
            Raise both?

            x*a / y*a = x / y
            (x*a) / (y*a) = x / y, yes.
            x**a / y**a = x / y, no.
            x*a / y*a = x / y, actually not either
            This is Shireroth, and Giant Squid will brutally murder me if I ever remove this link from my signature | In the end it won't be love that saves us, it will be mathematics | So many people have this concept of God the Avenger. I see God as the ultimate sense of humor -- SlowwHand

            Comment


            • #7
              Ok, I mistaked, it just seem obvious to me that one of the values need to be raised not both as it makes no diff to raise both:

              (x*a) / (y*a) = x / y
              -- What history has taught us is that people do not learn from history.
              -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

              Comment


              • #8
                (x^a)/(y^a) = (x/y)^a
                "Cutlery confused Stalin"
                -BBC news

                Comment


                • #9
                  Aha!

                  I have misread it probably.

                  So if odds are 2:1 then they actually are (2:1)^1.(3)



                  /me rushes to his Command Nexus..
                  -- What history has taught us is that people do not learn from history.
                  -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

                  Comment


                  • #10
                    Note that this is per exchange. If two healthy units with those strengths go at it, it's even more likely the stronger unit will win, and its expected damage would be (1/2)^(4/3) * 10 (assume fission reactor on defender) = 4.
                    "Cutlery confused Stalin"
                    -BBC news

                    Comment


                    • #11
                      somebody has way too much time on his hands this summer...
                      Truly great madness cannot be achieved without significant intelligence.
                      -Henrik Tikkanen

                      Comment


                      • #12
                        Actually, obtaining the raw data was pretty easy and fun. For some of the tests, I started an accelerated game and gave myself battle ogres and other units to destroy opposing factions. It was quite entertaining to hear Yang's and Miriam's screams of punishment sphere agony, repeatedly.

                        The exhausting part was making sense of the data, trying to fit it to a simple equation.
                        "Cutlery confused Stalin"
                        -BBC news

                        Comment


                        • #13
                          How did you keep track of the battle progress?

                          Draw lines for each fire-exchange ( on the side of the "winner" ) ? Then count them ?

                          Is the damage during each fire-exchange equal to the attack-strength (if the attack wins) or the defense-strength (if the defender wins) ?

                          If so, when you are attacking with a 2-1-1 against an other 2-1-1 (of the same health etc), the attacker gets (2/3)^(4/3) chances to inflict 2 points of damage, and defender gets (1/3)^(4/3) chances to inflict 1 point of damage ?

                          BTW: how do you get to this (odds)^(4/3) ? If you do (2/3)^(4/3) you get a number LOWER than 2/3, this should be HIGHER than 2/3 right ?
                          no sig

                          Comment


                          • #14
                            Originally posted by Chaos Theory
                            Actually, obtaining the raw data was pretty easy and fun. For some of the tests, I started an accelerated game and gave myself battle ogres and other units to destroy opposing factions. It was quite entertaining to hear Yang's and Miriam's screams of punishment sphere agony, repeatedly.
                            Good work (i'm happy you found it to be funny)
                            Your data keeps me thinking it's a very good game - it doesn't happen here what happens in civ2 where simple warrior (1-1-1) can stand against much stronger units and beat them or survive their attacks (sometimes i called those warrior units Rambos )
                            of course we cannot be sure of the odds of the battle, but the probability is strongly supporting us and this is what i really like in this game

                            The exhausting part was making sense of the data, trying to fit it to a simple equation.

                            Comment


                            • #15
                              Originally posted by PJayTycy
                              How did you keep track of the battle progress?

                              Draw lines for each fire-exchange ( on the side of the "winner" ) ? Then count them ?

                              Is the damage during each fire-exchange equal to the attack-strength (if the attack wins) or the defense-strength (if the defender wins) ?
                              I don't understand your suggestion, but what I did was pit two units against each other, and note how much damage each took. The losing unit received damage equal to its hit points prior to the battle, and the winning unit received damage equal to its pre-battle hit points minus its post-battle hit points. Each point received by one side is a point inflicted by the other.

                              If so, when you are attacking with a 2-1-1 against an other 2-1-1 (of the same health etc), the attacker gets (2/3)^(4/3) chances to inflict 2 points of damage, and defender gets (1/3)^(4/3) chances to inflict 1 point of damage ?
                              No, the ratio of hits scored by the attacker to the hits scored by the defender would be about (2/1)^4/3 ~= 2.54:1. Then, the probability the attacker scores a hit each time a hit is inflicted equals 2.54 / (2.54+1) ~= .72. Tests indicate the probability is closer to .75, but it certainly isn't the 2/(2+1) ~= .667 I would have expected.

                              BTW: how do you get to this (odds)^(4/3) ? If you do (2/3)^(4/3) you get a number LOWER than 2/3, this should be HIGHER than 2/3 right ?
                              Which is why you need to use odds (such as 10:1), which can be both greater than and less than 1. For a probability, use attacker^4/3 / (attacker^4/3 + defender^4/3) for the chance the attacker will score a hit.
                              "Cutlery confused Stalin"
                              -BBC news

                              Comment

                              Working...
                              X