Announcement

Collapse
No announcement yet.

Can anyone explain the combat %?

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

  • Can anyone explain the combat %?

    OK. Is it just my machine for some reason or are the probabilities totally screwed up for combat? I lose fights all the time when I should be winning 98% of the time. I am playing on Noble. What gives? Is this just a clever cheat? Or are the percentages reported by the alt key totally wrong? Why include them if a 98% victory results in a loss about 30% of the time? Just curious.

  • #2
    The probabilities given are supposedly accurate. I haven't tested them myslef but other people have and confirm this. The problem is that you'll think nothing about winning a 98% battle but you'll notice when you lose and so it seems to happen more than you think.

    Also, the random seed is preserved by default so if you reload after losing a battle you'll lose it again and it's not just really bad luck.

    Comment


    • #3
      In one of my recent games I lost 10-12 fights in a row where combat odds where 70-80% (and I believe a few of them even was in the 90'es)... I believe the enemy has a secret weapon
      This space is empty... or is it?

      Comment


      • #4
        Not on my machine. I'll start keeping track. But the combat is off.

        Comment


        • #5
          Yes, I think it's that time of the month again for another extended debate about whether the computer cheats or not, but I must plead of you all to please wait until at least page 2 before conducting elaborate Worldbuilder-facilitated statistical experiments, page 4 to argue about the fundamentals of statistical analysis, and at least page 6 before making the inevitable threadjack into whether Chess AIs are easier to program.
          THEY!!111 OMG WTF LOL LET DA NOMADS AND TEH S3D3NTARY PEOPLA BOTH MAEK BITER AXP3REINCES
          AND TEH GRAAT SINS OF THERE [DOCTRINAL] INOVATIONS BQU3ATH3D SMAL
          AND!!1!11!!! LOL JUST IN CAES A DISPUTANT CALS U 2 DISPUT3 ABOUT THEYRE CLAMES
          DO NOT THAN DISPUT3 ON THEM 3XCAPT BY WAY OF AN 3XTARNAL DISPUTA!!!!11!! WTF

          Comment


          • #6
            I've had bad luck streaks like that, too. I had six cannons attack a city and each had better than 50% odds of winning and five lost in a row. The odds should have gone UP since each one would have weakened the defending units, too. Even if you assume each cannon had a flat 50/50 shot, there's only a 2^5 = 1 in 32 chance of this sequence happening. But it did. And if I repeated the test 100 times, it should happen about 3 times. I'm sure I've attacked cities with stacks of catapults at least 100 times while playing Civ IV over the years and once only do I recall something this dramatic happening. If anything, I'm overdue for some bad luck.

            Going back to the cannon example ....

            The odds of 4 losing in a row ... 1/16
            The odds of 3 losing in a row ... 1/8.

            Out of 100 trials, I can expect to lose 3 cannons in a row about 12 times, 4 in a row about 6 times, and 5 in a row 3 times. That's about 20% of the time (or 1 in 5) I'm going to lose at least 3 units in a row that, statistically, all should have won. So it's going to happen. Thems is breaks.

            Note to stats people: this math is (obviously) not 100% correct, please don't feel compelled to correct me, I've taken stats too and understand where the argument is oversimplified and incorrect. The point is not to get the math exactly right, but to demonstrate that even though it looks like, on paper, these chains of events shouldn't happen, they're going to more often than you probably expect.

            Comment


            • #7
              Originally posted by ColdPhoenix
              The probabilities given are supposedly accurate.
              This is assuming that they take everything into consideration, right? (terrain, unit strength, unit health, first strike(s), modifiers, yadda yadda)

              Comment


              • #8
                Originally posted by Kepler63


                This is assuming that they take everything into consideration, right? (terrain, unit strength, unit health, first strike(s), modifiers, yadda yadda)
                I believe they do but as I've said, I've never tested this.

                Comment


                • #9
                  Yeah the calcs used to get some things wrong a while back (attacking across rivers for instance) but now it is all fixed. That is, unless the newest patch introduced problems which no one has picked up, which is unlikely.

                  Comment


                  • #10
                    From what I recall first strikes aren't correctly taken into account.

                    Anyway, I strongly suggest not using 'feelings' in this sort of thing. You remember the times you lost more than you expected, and not usually the times you won more than you expected. Trust me, it's psychological. Losing five 50/50 attacks in a row should happen from time to time
                    <Reverend> IRC is just multiplayer notepad.
                    I like your SNOOPY POSTER! - While you Wait quote.

                    Comment


                    • #11
                      Originally posted by snoopy369
                      From what I recall first strikes aren't correctly taken into account.
                      On release yeah, but I thought it was in now.

                      Comment


                      • #12
                        OK. The past 21 attacks made at 75% odds: 10 wins and 11 losses. 90% odds, I'm 1 for 5.

                        If it just gave the correct odds this wouldn't be an issue. The odds given are obviously not correct on my computer. Do I have a bugged version?

                        Comment


                        • #13
                          Well computers are not truly random, so ... there's some built in bias, the most common type is "streaking." Computers do not produce genuinely random numbers (very few things are REALLY random in nature), but they can produce pseudorandom numbers. If the software that is using the computer's random number generator does not reseed or shift the numbers properly to eliminate low-bit entropy and whatnot, you can get streaks. Anybody who has done game programming has seen this - you'll run the math for a dozen random numbers between 1 and 100, and they look random until you notice that ALL of them above 50. If you're doing a coin flip, you end up with 12 straight heads in a row, which should only happen about once in every 4,000 tests.

                          I doubt a game like Civ IV is so unsophisticated, but sometimes these considerations slip by lazy programmers. There was a somewhat famous case of a poker site that used a regular seed for the stock random number generator on the computer. In plain English, there only about 2 billion possible seed values, meaning only 2 billion possible different shuffles of the card deck. That may seem like a huge number, but the number of different ways to shuffle a card deck is 52 * 51 * 50 * 49 * 48 ... * 3 * 2 * 1. It's 52! (factorial), which is the number 8 followed by about 67 zeros. In comparison, 2 billion is a TINY set, so tiny that a computer, given 5 values from a sample set, could come up with the rest of the set within a few seconds.

                          Programmers used this to look at their pocket cards and community cards, and have a program spit out what everybody else was most likely holding. Generally there were 5-10 possible card distributions, and based on bets it was easy to tell who had which one and bet accordingly. If a public casino can make so silly an error, Civ's programmers can, too.

                          Regardless, it sounds to me more like you're just noticing abnormalities. It's like when people say, "how come the news is always about tragedies." Well, it's not news when 250 million people get to work safely in their car and back home again. It's news when there's a 12-car collision because that's not the expected behavior and we don't notice any of it.

                          There's a fine human psychology graduate paper lurking in here somewhere. Psychology and Probability.

                          Get the latest patch. If that doesn't fix it, I suggest that you're misunderstanding the odds. Assume that we do a trial run of 3 tests at 75% odds. How often are you going to win vs lose?

                          You'll win all three battles less than half of the time (42%).
                          You'll win 2 out of 3 also about 42% of the time, and you'll lose 2 (or all) about 15% of the time. That means that about 1 out of 6 trials, you're going to lose more than you win.

                          If you think more trials should even it out, you're right, but not the way you think. Let's try 4 battles in a row with 75% odds. You'll win all four about 32% o the time. You'll win 3 about 42% of the time. You'll lose 2 or more 26% of the time. That means that in better than 1 out of 4 trials, you'll only win half the battles (or less!) when you have 75% odds to win them all.

                          So basically I'd say stop griping about it, it's probably nothing you can control. Patch up and if you still don't like it, get a new CPU. Beyond that ... dunno what to tell you. The odds calculations could be broken but in my experience they're close enough for government work.

                          Comment


                          • #14
                            Are you patched?

                            Apologies to LordShiva for not complying with his request.

                            50 combat I swordsmen attacking 50 hill-city-defending, city garrison I, drill I archers with a 56% chance of winning:

                            23 wins out of 50 = 46%

                            50 combat I axemen attacking 50 combat I swordsmen across a river with a 65.7% chance of winning:

                            32 wins out of 50 = 64%

                            50 combat I axemen attacking 50 combat I swordsmen with a 76.5% chance of winning:

                            41 wins out of 50 = 82%

                            50 combat I axemen attacking 50 combat I spearmen across a river with a 95.5% chance of winning:

                            48 wins out of 50 = 96%
                            Last edited by Thedrin; December 13, 2006, 02:44.
                            LandMasses Version 3 Now Available since 18/05/2008.

                            Comment


                            • #15
                              The problem with the % are simple, people generally do not understand statistics. Simply put, someone looks at 75% and thinks that should win. Where that means 25% it will lose. Also, it means that 75% over a long period it will win. Thus you will have streaks accordingly. It is human nature to notice the streaks that run against them, but never notice the streaks that favor them. I ran a test of 100 combats under the original vanilla. The attached excel file is the results. You will see that over time the percentages were very close. I was calling withdrawls a push so my figures are a little off. If there is any interest, I'll do it again for 2.08. I do remember I had 3 < 5% in a row win while I was doing this. Everyone should try to remember to use the stats as a guideline, not a rule.

                              The % of survivial for an attacking unit is the Win % + the withdrawl %. Since they now give us the full numbers, I'd bet they are pretty accurate.

                              Mike
                              Attached Files

                              Comment

                              Working...
                              X