Announcement

Collapse
No announcement yet.

great people mechanics

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

  • great people mechanics

    I need a clarification on how the diminishing returns of GPP work, are they per city or per civilization?

    I can reliably set up my super science city with academy + great library, and then pump out the great scientists with one or more of pacifism / parthenon / heroic epic. Now, as this stream begins to taper off, can I work libraries in other cities to yield more great sceintists, or have the scientists I've generated in the super city made it harder to generate great people elsewhere?

    Also, does the great artist I get for free with music count among the number of great people I've generated for the purpose of determining how costly the next one is?

  • #2
    Each generated great people makes the next one more expensive
    everywhere.

    Free ones don't.

    Best regards,

    Comment


    • #3
      In the long run, it doesn't matter where you generate GPP. Even a city with only 2 GPP/turn will eventually produce a GP. Example: Two cities, one with 2 GPP/turn, the other with 10 GPP/turn. Both have (for some reason) 990 GPP. The faster will produce the GP, going to 0. If the next GP is produced with 1200 GPP, the slower city will get it (105 turns), because the faster one would need 120 turns. (I hope I remember correctly that the cost increases linearly with the number of produced GPs.)

      The problem is, the game is far too short to realise "the long run". I is simply that all GPP which cities have accumulated and not yet converted to a GP are basically wasted. Therefore it is better to concentrate on one or a few cities to produce GPP: less waste.
      Why doing it the easy way if it is possible to do it complicated?

      Comment


      • #4
        GP points accumulate on a per-city basis, but the spawning is global. At default game speed, you get your first GP at 100 points. The first city to reach 100 points is where it's created. The next one happens when a city reaches 200 points, but each city drops to 0 points when it creates a great person. If I remember correctly, the base numbers are increments of 100 points up until it hits the 1000 mark, then 200 points until 2000, then 300 points until 3000, and so on. These are modified by game speed, so on epic speed they are all times 1.5 and tripled on marathon.
        Age and treachery will defeat youth and skill every time.

        Comment


        • #5
          Quillan is right except there's no "and so on". It always takes 300 points per GP after your first 15 (modified by the appropriate multipliers).

          This actually makes it easier to produce great people at the end of the game. A Philo leader with 3 GPP pump cities can still be producing a reasonable number of GPs even after already producing 20. Sometimes I'll even convert a food-intense capital I capture into a GP pump in this case. With US you can rush buy all the buildings necessary to run the specialists (I usually focus on Engineers and Scientists at this point), and then it can usually keep up with your well established GP cities. Late game GS and GE are still very valuable for researching big techs and rushing a few late wonders.

          Comment


          • #6
            Originally posted by zeace
            Quillan is right except there's no "and so on". It always takes 300 points per GP after your first 15 (modified by the appropriate multipliers).
            I don't think that is accurate. In my big science city game the number of GPP for my 40th GS was on the order of 30000. The decade increase makes it somewhat difficult to come up with a close form expression for GPP(n), the number of GPP necessary to generate your nth GP. The easiest way to do so is to break the formula up into two parts, one part to cover the current decade term, and another part to account for the previous decades.

            The current decade term is fairly simple it is simply ceil(n/10)*C*(n%10), where C is the number of points required to generate the first GP (l100 for Normal, 150 for Epic, 300 for Marathon). The term ceil(n/10)*C simply reflects the multiplier for the current decade (at Normal speed it would be 100 for the 1st, 200 for the 2nd, etc.) while the term n%10 (where % is the modulo operator) accounts for the fact that the number increases linearly with the current decade multiplier. The previous decades term is a bit trickier, but can be handled if you recognize that the total can be written as a series. The simplest way to show this is to write out several decades for GPP(n):

            GPP(n) = n*C, ------------------------- n <= 10
            GPP(n) = 10*C + n*2*C, ------------------ 11 <= n <= 20
            GPP(n) = 10*C + 20*C + n*3*C, ----------- 21 <= n <= 30
            GPP(n) = 10*C + 20*C + 30*C + n*4*C --- 41 <= n <= 40

            The series for the decade term is 0, 10*C, 10*C + 20*C, 10*C + 20*C + 30*C, …

            This can be expressed as a difference equation d(k) = d(k-1) + 10*C*k= where k is the decade index and equals floor(n/10) and d(0) = 0. If we take the z-transform of this equation we find D(z) = D(z)*z^-1 + 10*C*z/(z-1)^2. Solving for D(z) gives 10*C*z^2/(z-1)^3. This can be re-written as 5*C*z/(z-1)^2 + 5*C*z*(z+1)/(z-1)^3 at which point the inverse z-transform is easy to take, giving 5*C*k + 5*C*k^2.

            We can now combine the two terms to form an analytical expression for GPP(n):

            GPP(n) = C*5*floor(n/10) + C*5*floor(n/10)^2 + ceil(n/10)*C*(n%10)

            I tested this against several points calculated via spreadsheet (I went through 50 I believe) and it seems to be correct.

            Darrell

            Comment


            • #7
              Originally posted by darrelljs

              We can now combine the two terms to form an analytical expression for GPP(n):

              GPP(n) = C*5*floor(n/10) + C*5*floor(n/10)^2 + ceil(n/10)*C*(n%10)

              I tested this against several points calculated via spreadsheet (I went through 50 I believe) and it seems to be correct.

              Darrell
              Any chance of a literal translation of this

              Comment


              • #8
                Originally posted by couerdelion


                Any chance of a literal translation of this
                Heh...sorry for geeking out, but it is rare I get to apply this crap to something I actually care about . Basically the equation you quoted is the important part. Let's simplify it and assume we are playing normal speed, so C=100. The equation is:

                GPP(n) = 500*floor(n/10) + 500*floor(n/10)^2 + ceil(n/10)*100*(n%10)

                The formula gives you the number of great person points needed to generate your nth great person. So for example GPP(1) you get 500*0 + 500*0^2 + 100*1 = 100. All floor() means is you round towards 0, so 1/10...9/10 will give you 0, and 10/10...19/10 will give you 1, etc. ceil(n/10) is the opposite, you round up so that 1/10...9/10 will give you 1, 10/10...19/10 will give you 2, etc. The term n%10 means you divide n by 10 and take the remainder. So 3/10 would give you 3 and so would 13/10. If you want to do GPP(36) you get floor(36/10) = 3, ceil(36/10) = 4, and 36%10 = 6, so it is 500*3 + 500*3^2 + 4*100*6 = 8400.

                You might ask, what's the point ? Well...normally you would have to do some kind of recursive expression to figure the answer out and even then with the decade term constantly changing it isn't so straightforward. This is a "closed form" solution so you have an explicit formula to calculate the answer. I'm sure Firaxis could integrate this in and get a 0.000000001% performance improvement, but it is really more useful if you want to do some simulations on how to best optimize GP generation.

                Darrell

                Comment


                • #9
                  I'm also pretty certain that when you get a GP, all your other cities retain their accumulated GPPs... only the one that produced a GP resets to 0.

                  Comment


                  • #10
                    If my memory serves me right, then the GPP costs did change more frequently than every 10 GP. This calculation has a standard 100 increase for the first 10 GP, 200 increase for the next 10, 300 increase for the next 10,….. I can certainly recall GP number 15 costing me 2000 and GP 16 costing 2300 which is more in line with Quillan’s suggestion.

                    Comment


                    • #11
                      I can't say, really. I have never produced enough great people in a game that I've gotten past (and rarely enough even gotten to) the 300 GPP per great person increase. 10-20 great people through the entire game is my norm.
                      Age and treachery will defeat youth and skill every time.

                      Comment


                      • #12
                        Originally posted by docfrance
                        I'm also pretty certain that when you get a GP, all your other cities retain their accumulated GPPs... only the one that produced a GP resets to 0.
                        This is entirely correct. The source of the Great Person Points is reset in every city when you generate a Great Person, however. This is pretty handy.

                        Let's say that you're close to generating a great person in two cities. If you generate generate a ton of points in the one city with whatever method you choose (polluting the pool of points with yucky artists and priests, etc), when the Great Person is created in the other city causes those polluting points' sources to be erased. You can now just run Engineers in that city that is now 1-200 points away and be guaranteed a Great Engineer (unless you have wonders to pollute the pool).

                        Comment


                        • #13
                          I did not know that. I wonder if that's a bug, or intentional?

                          Comment


                          • #14
                            popejubal
                            The source of the Great Person Points is reset in every city when you generate a Great Person
                            docfrance
                            I did not know that. I wonder if that's a bug, or intentional?
                            Neither - it's wrong.

                            demonstration

                            Here, Delhi is running three merchants, and will generate a great merchant on the next turn. Bombay during the same time has been running two merchants.

                            After your next turn, you'll observe in the cities that Delhi has 8 GP points, but no percentages for the next GP type, and that Bombay has 72 points, and 100% merchant flavored. You can now shift all of the specialists to artists, and you'll see on the subsequent turns that Delhi is pure for artists, but Bombay's odds are mixed.

                            Still not convinced? Try switching Bombay's merchants to artists before the GP is spawned, and on the next turn you'll find that the probability is still mixed. Bombay has not forgotten that it was running Merchants.

                            Delhi, however, has forgotten that it was running merchants. Those 8 points of overflow are unflavored - they contribute to when the next GP will be produced in Delhi, without influencing the odds.

                            So if you want a scientist, then an engineer, you can make the engineer show up sooner (without risking that it turns into something else) by making sure that you have a lot of overflow when you generate the scientist.


                            To confirm the game mechanics, you can examine the code in CvCity::doGreatPeople, where you will see the confirmation that the great people unit progress counters are cleared only in the city that generates the great person.


                            As for the question about the increase in the threshold - I haven't tried the experiment, but my reading of the code is that the gaps increase without limit.

                            Code:
                            	changeGreatPeopleThresholdModifier(GC.getDefineINT("GREAT_PEOPLE_THRESHOLD_INCREASE") * [color=blue]((getGreatPeopleCreated() / 10) + 1))[/color];
                            Remember, that's an integer division; the factor in blue only goes up after you've generated 10 great people - and from my reading it goes up every time you generate 10 more great people. So I would expect the cost of a GP to be 400 more than the previous after you have generated 30 GP. But I haven't seen it for myself, and have absolutely no interest in sitting around hitting next turn to verify it.

                            Comment


                            • #15
                              Originally posted by darrelljs


                              I don't think that is accurate. In my big science city game the number of GPP for my 40th GS was on the order of 30000. The decade increase makes it somewhat difficult to come up with a close form expression for GPP(n), the number of GPP necessary to generate your nth GP. The easiest way to do so is to break the formula up into two parts, one part to cover the current decade term, and another part to account for the previous decades.

                              The current decade term is fairly simple it is simply ceil(n/10)*C*(n%10), where C is the number of points required to generate the first GP (l100 for Normal, 150 for Epic, 300 for Marathon). The term ceil(n/10)*C simply reflects the multiplier for the current decade (at Normal speed it would be 100 for the 1st, 200 for the 2nd, etc.) while the term n%10 (where % is the modulo operator) accounts for the fact that the number increases linearly with the current decade multiplier. The previous decades term is a bit trickier, but can be handled if you recognize that the total can be written as a series. The simplest way to show this is to write out several decades for GPP(n):

                              GPP(n) = n*C, ------------------------- n <= 10
                              GPP(n) = 10*C + n*2*C, ------------------ 11 <= n <= 20
                              GPP(n) = 10*C + 20*C + n*3*C, ----------- 21 <= n <= 30
                              GPP(n) = 10*C + 20*C + 30*C + n*4*C --- 41 <= n <= 40

                              The series for the decade term is 0, 10*C, 10*C + 20*C, 10*C + 20*C + 30*C, …

                              This can be expressed as a difference equation d(k) = d(k-1) + 10*C*k= where k is the decade index and equals floor(n/10) and d(0) = 0. If we take the z-transform of this equation we find D(z) = D(z)*z^-1 + 10*C*z/(z-1)^2. Solving for D(z) gives 10*C*z^2/(z-1)^3. This can be re-written as 5*C*z/(z-1)^2 + 5*C*z*(z+1)/(z-1)^3 at which point the inverse z-transform is easy to take, giving 5*C*k + 5*C*k^2.

                              We can now combine the two terms to form an analytical expression for GPP(n):

                              GPP(n) = C*5*floor(n/10) + C*5*floor(n/10)^2 + ceil(n/10)*C*(n%10)

                              I tested this against several points calculated via spreadsheet (I went through 50 I believe) and it seems to be correct.

                              Darrell
                              Very nice.

                              Comment

                              Working...
                              X