Announcement

Collapse
No announcement yet.

Walls still work in cities

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

  • #16
    I'm not sure that that's enough of a test Hurricane. Firstly, how sure are you that the 5 tests are independent, or is there are a chance that each test also has the same random seed (so you are doing 20 sets of combats all with the same random seed)? Secondly, what is the defensive unit? Not that it makes much difference, but I'm curious.

    Thirdly, the presence or absence of walls in a city only makes a difference if the PRNG throws up a random number in the narrow(ish) range where it makes a difference. For swordsmen attacking spearmen in a city without walls (or as the game is supposed to work) the swordsman wins when the PRNG is < 0.4829 (if it returns values in the range 0...1), whereas with walls (if this bug is real) the swordsman wins when the PRNG is < 0.4167. So only PRNG values that fall in the range 0.4167...0.4829 are going to give different results in the two cases - the rest of the time the result of that round of combat is the same regardless. With a small number of rounds of combat - worst case scenario you have 2 combats, with around 8 random numbers - it is quite plausible (55%) that the PRNG never throws up a number in the relevant range, so the combat results should be the same. If you saw the same sequence in each case with 20 swordsmen in each attack against 20 spearmen (with around 80 rounds of combat) then the odds that none of them fall in the significant range are more like 0.3%, which would be a significant result. If you can do it with a greater number of combats I'd be interested to see what turns up (not in a position to do it myself right now).

    Comment


    • #17
      I wrote down the combat results from the different saves, and they were different. So the seed had changed.

      The defender was a spearman.

      Thirdly, the presence or absence of walls in a city only makes a difference if the PRNG throws up a random number in the narrow(ish) range where it makes a difference. For swordsmen attacking spearmen in a city without walls (or as the game is supposed to work) the swordsman wins when the PRNG is < 0.4829 (if it returns values in the range 0...1), whereas with walls (if this bug is real) the swordsman wins when the PRNG is < 0.4167. So only PRNG values that fall in the range 0.4167...0.4829 are going to give different results in the two cases - the rest of the time the result of that round of combat is the same regardless. With a small number of rounds of combat - worst case scenario you have 2 combats, with around 8 random numbers - it is quite plausible (55%) that the PRNG never throws up a number in the relevant range, so the combat results should be the same. If you saw the same sequence in each case with 20 swordsmen in each attack against 20 spearmen (with around 80 rounds of combat) then the odds that none of them fall in the significant range are more like 0.3%, which would be a significant result. If you can do it with a greater number of combats I'd be interested to see what turns up (not in a position to do it myself right now).
      This is a good comment, and I also thought about it. The 5 different games were unique, so I think it was enough. As you probably noted in Tacit_Exit's test, a city with both walls and the GW would give an even higher defence than a city with just walls, so the change should show up in more cases than you mention. But if anybody feels they need more confirmation, please try out the test map I made.

      Comment


      • #18
        It was actually 44 rounds of combat. I'm not statistics expert, but what is the chance that none of 44 rounds fall into the gap 0.4167...0.4829 ?

        Here is the actual combat results, BTW. H means that the attacker scored a hit, w that the defender scored a hit.
        Attached Files

        Comment


        • #19
          Assuming that inteval is out of a potential 1, the chance of no favourable results is nearly 5%. Not infinitesimal by any stretch, but still relatively unlikely. I think the key is that all your results were EXACTLY the same. That smells a bit fishy to me.
          Consul.

          Back to the ROOTS of addiction. My first missed poll!

          Comment


          • #20
            Originally posted by MrWhereItsAt
            Assuming that inteval is out of a potential 1, the chance of no favourable results is nearly 5%. Not infinitesimal by any stretch, but still relatively unlikely. I think the key is that all your results were EXACTLY the same. That smells a bit fishy to me.
            Yes, 5% for ONE roll. But now we have 44 rounds. So shouldn't it be 0,95^44, which is roughly 1%?

            And the point is that the expected result is that the results are exactly the same. That happens if the walls and GW work like they are supposed to. That is that they don't work at all in cities.

            Comment


            • #21
              You're right Hurricane - it's less than 1% for the 44 rounds.

              Assuming that both Hurricane and Tacit_Exit have done their calculations right (and I have no reson to doubt that), it means that this has been changed from civ 1.29 to ptw, and my guess is that it is a bug.
              If you cut off my head, what do I say?
              Me and my body, or me and my head?

              Comment


              • #22
                Actually MrWIA is right with the 5% value - the probability that you see no difference even though the odds are different, is the probability that none of the random numbers fall in the specified range 0.4167...0.4829, which is 0.9338^44 = 0.049, or pretty close to 5% (0.95^44 is around 10%, not 1%).

                For regular swordsmen attacking regular spearmen in a city with walls, great wall, and bug, the chance of the swordsman winning a round of combat is 0.3659. The odds in the other extreme (no walls) are 0.4839 (I mis-typed earlier). The 'sensitive' range is 0.118, and the odds that none of the 44 rounds of combat have a random number in this range is 0.0040, or 0.4%. So this is pretty strong evidence that the bug isn't present in Hurricane's version, which is 1.29f, not PtW (if I recall correctly).

                Comment


                • #23
                  Thanks vulture. Like I said, I suck at statistics. Maybe I'll run the test a few more times when I get home, just to make sure. And yes, it is v1.29f, not PTW.

                  Comment

                  Working...
                  X