Announcement

Collapse
No announcement yet.

More details on corruption

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

  • More details on corruption

    I've been investigating the corruption model under 1.29f, which is a lot easier to do these days thanks to the editor. I've come up with a few, possibly interesting results.

    So far, I've only really looked at the distance corruption. Mostly I agree with alexnm's results, so I'll only post the differences here. What I've found out is this:

    Distance corrupt tops out at 100% (although the maximum you can be affected by is 95% as always). With a courthouse it is never more than 50%, and with a courthouse and police station it is never more than 26% (a figure which I'll explain in a minute).

    Distance corruption is calculated to the nearest 2%, with odd number percentages rounded up. So if the corruption is calculated to be 74.8%, it is stored as 74%, while 75.0% is stored as 76%. 95% is left as 95%
    though.

    Distance from the capitol is calculated rather strangely. It's not quite the geometric distance from the capitol that counts. You follow the route that a unit would take from the capitol to the town of interest (ignoring terrain, water etc.). Each move NE, NW, SE, SW counts a distance of 1, and each move N, S, E, W counts 1.41... (sqrt(2)). So if the most direct route from your captiol to a town is to move 10 squares SE and then 3 S, the total distance would be 14.23 (more or less). This allows something close to the geometric distance to be calculated, without having to do any square root calculations.

    And actually, the distance along the diagonals isn't quite sqrt(2), it's a little larger. My best estimate is close to 1.5 (so cities buily on the NE, SW, NW, SE lines from the captiol have slightly lower corruption than you might expect). But there are complications in this that I don't understand fully yet. There may be some rounding off done to the distance before it is multiplied by the scaling factor to give the percentage. And the distances for very distant cities may not be as large as they ought to be. In practice, this only became noticable in for cities where corruption would be 95% in a real game (with optimal number of cities corruption at its normal level).

    To calculate final corruption: the distance corruption percentage is multipled by the total gold production of the city to give a value which is not rounded off (30 gold, with 34% corruption, would give 10.2 gold lost to corruption). The number of cities based corruption is added to this, also as an unrounded number, to give the final total lost to corruption (which *is* then rounded to the nearest integer). In my tests, I set the optimal number of cities to 1000, which gave some very small number. E.g. is the distance based corruption gives 10.2 gold lost (as above), and the OCN corruption is 0.25, then the final corruption is 10.45, i.e. 10. If the OCN corruption is 0.35, then the final corruption is 10.55, which becomes 11. In real games, the OCN corruption is going to be higher than the distance corruption in almost all circumstances.

    The capitol (or forbidden palace) has corruption of 4% without a courthouse and 2% with a courthouse.

    I would tentatively say that being connected to the palace via road, harbour or whatever multiplies the distance corruption factor by 0.8 (although it can still go to 100% in the absence of a courthouse). The OCN corruption is unaffected by connection to the capitol. I got the factor 0.8 by guessing - the limits I had fixed it between 0.796 and 0.823 (I think), so 0.8 seemed the most sensible value. This may change slightly if I ever figure out just how the distance is really calculated.

    Cities at the same distance have the same OCN corruption (as though they were all the nearest out of that group). There is some rounding of distances involved here as well, since I had a group if 5 cities all at slightly different distances, and they all showed the same level of OCN corruption.


    I think that that's all I've worked out so far. I doubt any of this is going to affect how we play the game in the slightest, but you never know.

  • #2
    That was some good reading. Thanks for that.

    BTW: what effect does WLTKD have on distance corruption? Or does it only reduce number of cities corruption?

    Comment


    • #3
      Originally posted by Bambul
      That was some good reading. Thanks for that.

      BTW: what effect does WLTKD have on distance corruption? Or does it only reduce number of cities corruption?
      What I found was the same as is in Alexnm's (or is it Alexman's) corruption FAQ - WLTKD doesn't affect corruption regarding gold production, but it does affect waste (reduction of shield production due to corruption). It counts as a courthouse as far as distance corruption is concerned, so it reduces the amount of waste by half. I don't know if it has any effect on OCN corruption, since I haven't really looked at that part of the equation yet.

      Comment


      • #4
        Commerical civs

        How much does the commercial civ trait affect corruption? A signifigant difference could make this a strong trait while a negligible difference could make the trait useless. Any information you have on it would be appreciated.

        Comment


        • #5
          Vulture, I have done much of this work before here.

          A couple of comments:

          Connection to your empire reduces corruption by 15%, not 20%.

          Courthouses and the commercial trait affect the OCN in the same way. They both increase it by 25%.

          My tests didn't include a thorough investigation on Communism. Perhaps you could focus your next tests there.

          Comment


          • #6
            Alexman: I was already aware of that thread (and would have posted a link to it if I'd ever bothered to find out how to do so). I posted this because I'd found some stuff which explained some of the small discrepancies I'd found using your formula (due to the odd distance calculation and the rounding to 2% for distance corruption) and because I'd found some things to work differently, possibly due to changes in 1.29.

            Something else that I suspected, and have now checked, is that connection to your trade network doesn't affect OCN corruption, only distance corruption. And I more or less stand by the value of 0.8 for that - I've got some data which doesn't work with 0.85.

            For example: A city has distance corruption of 70% when connected and 86% when unconnected. No matter what scheme is used to round off to the nearest 2% (which is certainly something that is done) this is inconsistent with 0.85 (the maximum value that works is 0.837). Using all my data, I narrowed the value down to the range 0.795-0.827. Anything outside that range gave an incorrect result for at least one city. Anything within that range works for all cities. So I went with 0.8 as the most obvious value, although there is no reason that it couldn't be 0.812567291 (although that's not as neat).

            Another possible explanation for discrepancies is that are some bugs lurking in the editor such that corruption isn't calculated properly for scenarios with pre-placed cities, until after the first turn is finished. I've not noticed any differences between the first and second turns, but I've no really looked for any (aside from one - WLTKD doesn't start until the end of the first turn).

            Comment


            • #7
              I have always wondered about the optimal placement of the FP and Palace. Has anyone tested it? If yes, I'd like to know the answer for standard and huge maps.

              Comment


              • #8
                If you go over the number of optimal cities, do these calculations still persist?
                "Everything for the State, nothing against the State, nothing outside the State" - Benito Mussolini

                Comment


                • #9
                  These questions, and many more, answered in the FAQ

                  Comment


                  • #10
                    If "distance corruption" was logical, then Hawaii and Alaska would be the most corrupt states in the U.S., while New Jersey would be perhaps the least corrupt.

                    We of course know Firaxis got it backwards!

                    Comment


                    • #11
                      ...and if Coracle were logical, Apolyton would be a boring place!

                      Comment


                      • #12
                        Originally posted by Coracle
                        If "distance corruption" was logical, then Hawaii and Alaska would be the most corrupt states in the U.S., while New Jersey would be perhaps the least corrupt.

                        We of course know Firaxis got it backwards!
                        Given the amount of complaints you posted, I'm wondering why you are still playing the game and care about the Forum.

                        Comment


                        • #13
                          Originally posted by Coracle
                          If "distance corruption" was logical, then Hawaii and Alaska would be the most corrupt states in the U.S., while New Jersey would be perhaps the least corrupt.

                          We of course know Firaxis got it backwards!
                          It was logical, but before invention of Telegraph.

                          Comment


                          • #14
                            I had a brief look at at corruption under communism (but since my laptop is busy doing lots of number-crunching for work, I haven't had much civ-time recently). I get something prettey different from what alexman saw, and I have no idea why.

                            Bacially, I saw exactly the same level of corruption in every city. The OCN corruption was 0.1 x no. of cities / OCN, as per alexman's formula. Distance corruption was 30% for unconnected cities, 24% for connected ones (halved by the presence of courthouses). This was the same in the captial, the cities immediately next to it, and the ones as far away as possible (on a standard map - haven't looked at other map sizes). Since I was doing this with the editor I wasn't using a large number of cities (10 or 15), but I'm pretty certain that for the conditions I tested under there was no variation with distance.

                            I think it's fairly obvious that I couldn't get something as different as that from what Alexman found unless the behaviour is genuinely different. The difference is too pronounced to be able to be written off as different interpretation of the same data. So, Alexman, have you checked communism in 1.29? If you have (and found your results unchanged) then perhaps we need to compare notes on methodology to see what we're doing differently.

                            (Although the question of whether trade connection affect OCN corruption is also an unmistakable difference - in my tests it made no difference, which couldn't really be confused with the 0.85 factor Alexman reports).

                            Comment


                            • #15
                              Vulture, thanks for all your research.

                              Perhaps you're right that connection doesn't affect number of cities corruption.

                              Other than that, our results agree for communism. Exactly, I might add.

                              If you see the formula, distance from the capital doesn't come into play for communism. You replace the entire distance calculation by 1.0. The government factor is 0.3, so we get the same result of 30% for unconnected cities with no improvements/WLTK. It's encouraging that my limited tests for communism (I think I tried only one map size), agree with yours.



                              Other things I have not tested:
                              • Firaxis' claim that the FP doubles the OCN under communism.
                              • The increased effect of the commercial trait under 1.29
                              • Why sometimes there is a very small difference in corruption between Monarchy and Republic. Does government have a small effect on OCN?

                              Comment

                              Working...
                              X