Announcement

Collapse
No announcement yet.

The Pikeman's defense.

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

  • #31
    I have another possible explanation: The pikemen flag works (+50% defense) if the attacker has movement 2 and its hp and fp are equal.

    In 2194 days of wars. German SS stormtroopers has a/d/m/h/f=7/5/2/2/2, pikemen flag. So is the Soviet Red Guard. The attacker always lose to the defender, indicating that the flag works in this case.
    [This message has been edited by Xin Yu (edited April 07, 2000).]

    Comment


    • #32
      This was tested extensively several month ago and IIRC, the rationale as to why a barb leader or diplo sometimes wins goes like this:

      The odds of the attacker winning a round of battle are not A/(A+D) where A and D are the strength of the Attacker and Defender respectively. Since D=0 for barb leaders, even when you consider any other bonuses, the above formula from the manual must be incorrect.

      A hypothesis was put forth that a round of combat was won by the attacker if and only if rnd(A*k) > rnd(D*k), where A and D are the Attacker's and Defender's strength and k is some constant, later found to be 8, and rnd(X) is a function that returns an integer (pseudo) random value between 0 and X-1. Of particular note is the fact that when the two random values returned from rnd(X) are equal, the defender wins the round. That is, ties go to the defender.

      Someone with more time and skill than me worked through the odds and tested it extensively with 100(!) units. The hyposthesis held. Therefore, any unit with 0 defense will sometimes win a round of battle when attacked. If the unit also has high firepower and/or hitpoints, while its attacker has low fp, hp and attack strength, the 0D unit may sometimes even win.

      Comment


      • #33
        No wonder! And here I was all the time thinking it was just

        (log(A-(5A*(tan(Ax+Dx/D-Dx)+(x(D*cosAD))/(pi-a)/2)*(100-rnd(100))))+3


        -mindseye :-)
        Official Homepage of the HiRes Graphics Patch for Civ2

        Comment


        • #34
          Umm. Why dont u just say zero aint really zero.

          Comment


          • #35
            Because that's not what he's saying; it's not that a defender of strength zero rises to a higher strength, it's that a non-zero attacker can drop to zero (resulting in a tie that the defender wins)
            No, I did not steal that from somebody on Something Awful.

            Comment


            • #36
              Creates an interesting idea for a custom unit in a scenario. Imagine a unit with 0 defense, but very high FP and HP. Against units with 1 hp it should win, but against units with higher FP and HP values it should mostly use.

              ideas: pillbox, bunker, sea mines, other immobile units designed to kill only units of certain type (the low HP and FP ones).

              example, barbed wire could be made 0d, 8hp 8 fp, versus infantry with say 5 att, 1 hp 1 fp.
              "Wait a minute..this isn''t FAUX dive, it's just a DIVE!"
              "...Mangy dog staggering about, looking vainly for a place to die."
              "sauna stories? There are no 'sauna stories'.. I mean.. sauna is sauna. You do by the laws of sauna." -P.

              Comment


              • #37
                Ok im a little slow with zeros but I always thought 0+0 = 0 just as 0*0 = 0 and 0=0. Therefore u would have no formula at all. You are adding K to the mix making zero not zero. (0+K). Zero is not zero. Unless of course K is zero but then 0 would never win.
                Well back to the crash dummies.

                Comment


                • #38
                  Diplos (attack 0)vs. higher attack values
                  I was curious to see how diplos win a battle so i ran a little test.
                  First let me say this about HIT POINTS and FIRE POWER. A hit point is not 1 it is 10.
                  so a warior would actually have 10.Firepower is how many hps a unit will lose per round.
                  So a warior with 1fp would have to win 10 rounds to kill a fellow warior. A unit with 2fp would have to win 5 rounds. 5fp 2 rounds. etc etc.
                  The formula for combat is located in the combat section of the manual. In it it uses the example of an elephant attacking a phalanx with no modifiers. The percentage chance of an elephant beating the phalanx is 66.7% in one round of combat. A/(A+D) OR 4/(4+2).
                  I did at least 1000 rounds of combat per attack value. vs. the diplo.
                  .333af (1 af with 1/3movement) 47.01%
                  .667af (1 af with 2.3movement) 20.51%
                  1af 11.67%
                  2af 5.84%

                  The % on right indicates the diplos win %.
                  This test was performed with both attacker
                  and defender having 1fp.
                  Note: this does not mean that a horse will lose 6 times out of 100 to a diplo but that
                  a diplo has about a 6% chance of winning one
                  round of combat with the min. # of rounds being 10. The 62 Mets could win a game against the the 98 Yankees but could the Mets win 10 before they lost 10???
                  However, as u aproach 50 %, the combat rounds
                  will mirror the unit losses.
                  So MR. warior attacking at 1/3 strength could
                  end up in the morgue
                  PS: IF rnd(a*k) > rnd(d*k) then attacker wins combat except for a tie is true. Then it would not matter what your attack factor is vs. a zero. but it does. According to that formula a zero unit should never approach 50% vs a positve number much less have a different W/L % of different attack values. To say the attack value drops to zero is saying that the event is totaly random and should not adhere to a .333 unit
                  having more losses than a 2 unit or 1 unit or any number for that matter. Why because the right side of the equation is always 0.
                  (any number multiplied by zero is zero).
                  The left side can only be = to the right if the left rnd number is 0. this means the attack value is a mute point. If you say that the random number is never = zero then the left side is always more than the right cause the right is always 0 thus implying that the attacker always wins.

                  [This message has been edited by Neon Deon (edited April 12, 2000).]

                  Comment


                  • #39
                    quote:

                    A/(A+D) OR 4/(4+2)


                    Although this is the forumla stated in the book, it is not the correct one. See link below.


                    quote:

                    IF rnd(a*k) > rnd(d*k) then attacker wins combat except for a tie is true. Then it would not matter what your attack factor is vs. a zero. but it does.


                    Not exactly. Remember that there are two calls to rnd(X) in the above forumla, one for the attacker (X=A*k) and one for the defender (X=D*k). It is true that for a D=0 unit like a Diplo, rnd(D*k)=0 everytime. But note that rnd(A*k) will also return 0 approximately 1 out of every A*k calls. When both calls to rnd(X) return 0, the defender wins the round, just like the '62 Mets winning against the '98 Yankees.

                    For a (very) detailed look at CivII combat odds, see below:
                    http://apolyton.net/forums/Forum1/HTML/000624.html
                    [This message has been edited by Sieve Too (edited April 12, 2000).]

                    Comment


                    • #40
                      Does anybody know when will the AI be 'scared away' from your units? I got most AI units scared away from my fortifiec positions in Red Front. Must be that the AI calculated the odds and decided not to attack.

                      Comment


                      • #41
                        Sieve,
                        Thanks for the link.
                        However, I think you guyz are off.
                        1) The proof of a Probablility must = one.
                        2) There are no chances taken away IE: positive numbers only.
                        3) 0 is not a positive number
                        4) The larger the pool(test) the more accurate.
                        5) If it aint broke don't fix it
                        6) Lowest fraction used is 1/8 or .125
                        7) The proof of the manual formula is...

                        1=[a/(a+d)]+[d/(d+a)]

                        8) civ 2 design wanted some units that could not attack but at the same time have all units be attacked.
                        9)Units with defense 0 defend at .125!!!

                        Test 1 Diplo. vs war. d=.125 a=1
                        book formula Diplo wins 11.11% of rounds
                        crash dummies Diplo wins 11.67% of rounds
                        Total number of rounds 1,132 diplo wins 132

                        Test 2 Diplo. vs Hrs. d=.125 a=2
                        book formula Diplo wins 5.88% of rounds
                        crash dummies Diplo wins 5.84% of rounds
                        Total number of rounds 1,062 diplo wins 62

                        Test 3 Diplo. vs Cha. d=.125 a=3
                        book formula Diplo wins 4.00% of rounds
                        crash dummies Diplo wins 3.90% of rounds
                        Total number of rounds 999 diplo wins 39

                        Note i used the defender as win %
                        D/(a+d)

                        IF IT AINT BROKE DONT FIX IT!

                        Comment


                        • #42
                          1) The proof of a Probablility must = one.

                          And it is. It's just not as simple as the forumla in the manual. Both the odds for the attacker winning a round and the odds of defender winning a round are functions of the attacker's and defender's strength. And in every case, either the attacker or the defender wins. Thus, Awin(A,D)+ Dwin(A,D) = 1. The above link has another link to a spread sheet containing the exact forumlas for Awin(A,D) and Dwin(A,D)

                          2) There are no chances taken away IE: positive numbers only.
                          3) 0 is not a positive number


                          I'm not sure what you're getting at here.

                          4) The larger the pool(test) the more accurate.

                          There are well over 1000 tests with 10000's of rounds in the above link.

                          5) If it aint broke don't fix it

                          Unless it is broke Note that A/(A+D) is disproved in the above link, specifically it does not hold for Cavalry attacking Armor. The manual even states that A/(A+D) is just an approximation and that turns out to be the case here.

                          6) Lowest fraction used is 1/8 or .125

                          Actually, the lowest is 1/16 when you combine .5 bonuses from vets, terrain, fortifying and Pikeman bonus. In any case the fraction is just a modifier to defense strength, it doesn't necessarily provide a lower limit to D.

                          9)Units with defense 0 defend at .125!!!

                          Unless there is another formula that fits all cases better. Also see below:

                          Test 1 Diplo. vs war. d=.125 a=1
                          book formula Diplo wins 11.11% of rounds
                          crash dummies Diplo wins 11.67% of rounds
                          Total number of rounds 1,132 diplo wins 132


                          The difference between 11.11% and 11.67% is 0.56% or just 6.3 rounds. 6.3 rounds out of 1132 is too small to claim a statistical difference. Random chance could have produced the 6 round difference.

                          Test 2 Diplo. vs Hrs. d=.125 a=2 ...

                          Here the delta is just 0.04% of 1062 rounds or 0.42 rounds!

                          Test 3 Diplo. vs Cha. d=.125 a=3 ...

                          Delta is just 0.1% of 999 rounds or 0.999 rounds.

                          See the above link for an explanation on how a Diplomat can have D=0 and still sometimes win.

                          Comment


                          • #43
                            Sieve,
                            I looked at this link again.
                            In it i found this:
                            Eggman post 4/27/99
                            diplo vs warrior
                            Warrior wins 277 out of 351 78.9%
                            eggs k formula predicts 80.3%

                            My sample was almost 4 times larger than his!
                            warrior wins 1000 our of 1132 88.33%

                            Gee his formula is off by 8%.

                            Cant find that out of 10,000 sample. But im still looking.

                            Also my diplo test covers being attacked by a horse and a charriot. Ill get back to u
                            on some more exiting posts in that link.

                            Comment


                            • #44
                              Xin,
                              I tried to test for at what odds the AI wont
                              attack. However it would seem that the AI uses a number of if then statements to determine when and when not to attack.
                              One X unit will sometimes back off and sometimes it will attack. Also the AI will build its forces of x units up then attack all at once.
                              So I flipped the question around
                              The attack value must be more > or = to winning 33.3%chance of combat rounds for the ai to attack everytime.
                              This is a guess not fact. I am still trying to get the ai to behave so i can run a big enough sample;*
                              THE CRASH DUMMIES GET A BREAK

                              Comment


                              • #45
                                Pikeman unit protects against all units with a move factor of 2. How about a move factor of 2 but with partroopers (all squares treated as roads)?
                                Civfan (Warriorsoflight)

                                Comment

                                Working...
                                X