Announcement

Collapse
No announcement yet.

DESIGN: Modeling population

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

  • DESIGN: Modeling population

    The history discussion thread in the unit movement thread got me thinking about something that's been nagging me ever since Civ1: population in Civ games isn't modeled very accurately. In Civ1 it's very abstract and not much of an issue, but in CtP2 the exact population of a city is actually a crucial statistic for city growth. Population can be visible in two places: cities and units.

    Cities are inhabited by people and it takes a certain amount of people to make a city 'grow'. How much resources a city produces depends on how the population is distributed over various tasks, etc. The main problem with the CtP2 population system is that 1 pop = 10,000 units, always. That's more or less accurate sense in the earliest age, but for the rest of the game it's not. For Classical and post-Medieval times it's too small, for Medieval Europe it's too large (see below for a more detailed breakdown if you're interested).

    Though not modeled in current Civ-games, units are people who are removed from your city population to work in the army: if you build a Warrior, you don't actually build a single warrior person, but rather it represents a unit (division, battalion, squad, band, whatever you want to call it) of numerous Warriors. In the other thread there was/is quite a bit of discussion about the size of these units, but it's safe to say it's significant. For example, conservative estimates place the total size of the Roman army around 300 AD at some 600,000 men, which is more than the population of even the largest cities in the Empire (except for Rome itself) and about 1% of the total population. This 1% is about accurate for modern times as well, at least until the cold war ended (now many countries have dropped to about 0,5%). During WWII for the most important nations the percentage of military (wo)men on the total population was even about 10-20%. With such large numbers, one could make a strong case for somehow modeling this in Civ as well.

    I can think of two implementations for a more accurate population model: a simple one and a more complex one.

    In the simple model the city population would simply be a more accurate reflection of real history: ancient cities would have roughly 5-50k citizens (as is true now), classical ones 30-300k, medieval ones up to 600k, renaissance cities up to 800/900k and industrial, modern and future ones could range into the millions. There are basically two ways of doing this: either make cities bigger in terms of pop-points (medieval cities would be size 10-60 rather than 10-16) or by making the number of people per pop-point non-linear. In that case, if a large classical age city is about size 10, we should make sure 10 poppoints equals 200-300k people. Maybe a combination of those two solutions would be best. Anyway, this doesn't model super-metropoli like Rome and some Chinese cities, or the tiny towns of medieval Europe, but those were rather exceptional situations. Any model will have its imperfections...

    The simple unit model would be that every unit costs a certain amount of population to produce, just like it has a production cost. A legion historically represents 6-10,000 people (though that number can be tweaked for game balance), so once you've built the unit, your unit will appear in the city but the population of that city will be decreased by 6,000. If you don't have enough people, you're simply not allowed to complete the unit until you do (same as building units in a city that already has 12). This is actually a very good thing for gameplay, as it hinders very aggressive expanionsism especially in the early going, thus preventing the human from running away with the game too soon. It should be fairly easy to make the AI deal with this: the only change compared to the current situation is that it shouldn't build too many units in very small or low-growth cities.

    The complex system would be an expansion from the simple system, but with the added option to control everything more: instead of a Legion just costing 6,000 pop, you could assign up to 6,000 people to your unit. The more people, the more expensive the unit would be to build (more weapons, equipment, housing, etc would be needed) but the stronger it would be on the battlefield. For cities too you could specify exactly how many units should be entertainers, how many farmers, etc. You could even add sectors to the economy: assign people to the courthouse to fight crime, to the city walls to increase defense, to the granary to increase growth, etc. This system could get rather complex though and involve quite a bit of micromanagement, especially if you add the economic sectors part.


    Well, those are some ideas to play with, I'm curious to hear what others think and what other ideas they have. The poll isn't necessarily final but I'd like to know where people currently stand. Personally, I'm not sure yet what I want, though I'm strongly leaning towards favouring a simple model for both units and cities. The added gameplay value of adding a population cost for units would be most useful and the simple city model is a nice and fairly painless correction in terms of historic accuracy (and it would help make the unit model work as well: it would be a bit silly to fight WWII with infantry divisions of a mere 3,000 men )



    Some additional information about city-sizes, for those with an interest in history:

    Most cities of Egypt, Mesopotamia, Persia, India and China in ancient times (up to ~1500 BC) had a population of somewhere between 5,000 and 20,000 inhabitants, with spikes to about 50,000 for the really big ones. This is more or less reflected in CtP2. In the 500-800 years after that cities could grow even larger, cities of 50-80,000 inhabitants becoming more common and there were even a handful of cities with 100-150,000 inhabitants. From about 500-400 BC onwards, the really big metropoli of the day could grow as large as 1 million inhabitants, though 'standard' cities still ranged from about 10,000 to 30,000 (Europe) or 50,000 (North Africa, Near Asia) and even up 100,000 inhabitants (Far Asia). Similar numbers apply to Mayan cities and Teotihuacan as well. All this isn't really modelled in CtP2: the largest cities up until the Medieval Age will typically be size 12 or so, or 120,000 inhabitants (and that's already fairly exceptional) - for the smaller cities CtP2 isn't far off but it doesn't come close for the big ones.

    In Medieval times, Europe's city population declines sharply. E.g. London, despite being the capital and one of the economic powerhouses of England, is little more than a small town with 10-15,000 inhabitants around the time of the Norman invasions. But that actually made it the largest city in Christian Europe AFAIK (not counting Constantinople; keep in mind Spain was Muslim in those days). Outside Europe though, the largest cities remained of about the same size, where regular cities grew steadily. Badgdad had 1+ million inhabitants in 850 AD, Cairo 0.5 million (that's size 100 and 50 by CtP2 standard ) and smaller cities ranged from 50-300,000. Chinese cities were even larger, housing up to several million people in their capitals. In late Medieval times (>1300 AD), Europe starts to urbanise again, with the largest cities (Milan, Venice, Paris) housing several hundred thousand and other major cities up to 50,000. These small European numbers shouldn't be modeled in CtP2 but it's good to be aware of them.

    Needless to say, in Renaissance times Europe boomed further (in 1700 London and Paris both have some 600,000 inhabitants) to catch up with the rest of the world (which more or less stabilized) and past the Industrial times the sky was the limit for the biggest cities (in 1900 London had some 6.5 million inhabitants, Paris 2.7 and New York 3.5).

    Some links:

    Cities worldwide throughout history: http://hypo.geneve.ch/www/cliotexte/.../pop_vill.html
    Cities in Europe/Middle East in Medieval times: http://scholar.chem.nyu.edu/tekpages/urbanpop.html
    Ancient cities worldwide: http://faculty.washington.edu/modelski/WCITI2.html
    Ancient Sumerian cities: http://www.jameswbell.com/geog004sum...?1033472396940
    Ancient East Asian cities: http://www.ancienteastasia.org/speci...rldcities2.htm
    Egytptian and Mesopotamian cities: http://irows.ucr.edu/research/citemp.../mesegptth.xls (XLS file)
    London: http://www.kcl.ac.uk/humanities/cch/...pop-table.html
    Paris: http://www.demographia.com/dm-par90.htm
    28
    No, the current system is fine as it is
    14.29%
    4
    Yes, but only a simple model for cities; leave units as they are
    0.00%
    0
    Yes, but only a complex model for cities; leave units are they are
    3.57%
    1
    Yes, but only a simple model for units; leave cities as they are
    0.00%
    0
    Yes, but only a complex model for units; leave cities as they are
    0.00%
    0
    Yes, a simple model for units and cities
    39.29%
    11
    Yes, a simple model for cities and a complex one for units
    0.00%
    0
    Yes, a complex model for cities and a simple one for units
    14.29%
    4
    Yes, a complex model for both cities and units
    10.71%
    3
    Something different (please explain)
    7.14%
    2
    Undecided
    0.00%
    0
    Banana
    10.71%
    3
    Last edited by Locutus; March 26, 2004, 14:25.
    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

  • #2
    Thinking....

    ....... I was going to vote Undecided, but then I thought that was not helpful. So then I was going to vote for complex city/economy simple unit, but then I wondered if I really wanted to commit to that option. I have not voted yet, still thinking…
    ·Circuit·Boi·wannabe·
    "Evil reptilian kitten-eater from another planet."
    Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

    Comment


    • #3
      two points


      one I never liked how ctp modelled the number of people in a city always thought you started out with to many.

      I used to play ctp1 scenarios which were off the wall ( 50% the time to accelerate the tech tree because i like the future). The one I really liked was to limit the pop of my city and then make the biggest one I could with slaves .(note it may be good to have a means to repeat special attacks)



      2nd point

      lets ban all post over 4 paragraphs there taking to long to read
      "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
      The BIG MC making ctp2 a much unsafer place.
      Visit the big mc’s website

      Comment


      • #4
        First of all I think we should adopt a convention to avoid confusion between the two concepts of population here - how about we call the numbers shown on the map (1,2,3,...,60) the number of citizens, and call the people that they represent the population, so in present CTP2 a city might have 5 citizens and a population of 52,457.

        I'm not certain in Locutus was suggesting this, but if we have the population per citizen varying with time, then please can we not have it depend just on the age like in CTP, where your population would suddenly explode by a factor of 10 when you moved from one age to the next, which was silly. It would be better if it increased slightly with each tech discovery. (In fact, then, population would provide quite a neat encapsulation of how well your civ is doing).

        I think that a nonlinear progression of population with citizens would be sensible - the main impact of the number of citizens is how much of the city radius is worked, and it seems to me that as cities grow, a smaller and smaller fraction of the population works in the fields around... (Of course, in reality almost none of that work is being done by the city's inhabitants really, but that's not the point...).

        The problem with faster-than-linear growth is that it makes the model of feeding and paying your citizens (as a fixed rate per citizen) rather nonsensical, but we're going to have some aspect of the model nonsensical either way, so that's not too big a deal.

        As for specific models, I think exponential might be a bit extreme. How about a quadratic model, e.g. if we take c=number of citizens, p=population we could use:

        p = 10,000*c + 1,000*c^2

        Then for small cities it looks roughly the same as it does in the present model, but at the maximum c=60, we get
        p = 600,000 + 3,600,000
        = 4,200,000

        That's not quite Mexico City, but it's a lot bigger than what we see at present.

        Comment


        • #5
          Originally posted by J Bytheway
          First of all I think we should adopt a convention to avoid confusion between the two concepts of population here - how about we call the numbers shown on the map (1,2,3,...,60) the number of citizens, and call the people that they represent the population, so in present CTP2 a city might have 5 citizens and a population of 52,457.
          I'm not sure if I was consistent in my post, but that's how I have it in my head as well

          I'm not certain in Locutus was suggesting this, but if we have the population per citizen varying with time, then please can we not have it depend just on the age like in CTP, where your population would suddenly explode by a factor of 10 when you moved from one age to the next, which was silly. It would be better if it increased slightly with each tech discovery. (In fact, then, population would provide quite a neat encapsulation of how well your civ is doing).
          No, I agree the CtP1 system is silly, I was thinking the same thing as you.

          The problem with faster-than-linear growth is that it makes the model of feeding and paying your citizens (as a fixed rate per citizen) rather nonsensical, but we're going to have some aspect of the model nonsensical either way, so that's not too big a deal.
          Good point, hadn't considered that yet. In theory we could of course adapt the food and payment models to use population rather than citizens, but that would probably be rather unintuitive to play with. Plus, we'd might need to boost the effect of city and tile improvements to make sure players could still 'pay their bills'. Leaving it as it is would probably be better.

          As for specific models, I think exponential might be a bit extreme. How about a quadratic model, e.g. if we take c=number of citizens, p=population we could use:
          I was thinking quadratic myself, though maybe use 2,000 as quadratic coefficient rather than 1,000. Assuming the current citizen cap system remains the same, that generates somewhat more historically accurate numbers (except maybe for the first 3-4, those could be a tad smaller).

          Code:
          # of 	  10,000*c + 	  10,000*c + 	  10,000*c + 
          citizs	  1,000*c^2	  2,000*c^2	  3,000*c^2
          -----------------------------------------------------
           1	    11,000	    12,000	    13,000
           2	    24,000	    28,000	    32,000
           3	    39,000	    48,000	    57,000
           4	    56,000	    72,000	    88,000
           5	    75,000	   100,000	   125,000
           6	    96,000	   132,000	   168,000
           7	   119,000	   168,000	   217,000	<- Jump (unmodded)
           8	   144,000	   208,000	   272,000
           9	   171,000	   252,000	   333,000	<- Jump (modded)
          10	   200,000	   300,000	   400,000
          .
          12	   264,000	   408,000	   552,000
          .
          15	   375,000	   600,000	   825,000
          .	
          18	   504,000	   828,000	 1,152,000
          19	   551,000	   912,000	 1,273,000	<- Jump (unmodded)
          20	   600,000	 1,000,000	 1,400,000
          21	   651,000	 1,092,000	 1,533,000	<- Jump (modded)
          .
          25	   875,000	 1,500,000	 2,125,000
          .
          30	 1,200,000	 2,100,000	 3,000,000
          50	 3,000,000	 5,500,000	 8,000,000
          60	 4,200,000	 7,600,000	11,400,000
          .
          75	 6,375,000	12,000,000	17,625,000
          100	11,000,000	21,000,000	31,000,000
          But it would probably be a good idea to expose the coefficients in a text file, so modders can tweak it.
          Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

          Comment


          • #6
            Originally posted by Locutus
            (except maybe for the first 3-4, those could be a tad smaller).
            Of course, one could even compensate for that by adjusting the formula with a constant:

            p = 1,000*c^2 + 10,000*c - 10,000

            or use 7,000 or 5,000 if 10,000 is too strong -- the initial size of a city would then be very low: 2,000. Which I kind of like myself, it would be very accurate historically (Jericho, probably the first city in the history of mankind, had about 2,000 inhabitants). Though 3,000 or 5,000 might work out better, but that can be tweaked -- also depending on if and how a population cost for units is introduced).
            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

            Comment


            • #7
              Re: Modeling population

              As usual, I enjoy reading Locutus' proposals just for the history report...

              Question - Are you proposing maintaining the use of the numerical representation of citizens as it stands now, and then tweaking how that number translates into population based on the year? So a city with 5 citizens in the Ancient Age may have 5,000 people and a city with 5 citizens in the Modern age may have 50,000 people? (Sometimes, I have a hard time thinking in mathematical terms)

              Originally posted by Locutus
              The complex system would be an expansion from the simple system, but with the added option to control everything more: instead of a Legion just costing 6,000 pop, you could assign up to 6,000 people to your unit. The more people, the more expensive the unit would be to build (more weapons, equipment, housing, etc would be needed) but the stronger it would be on the battlefield. For cities too you could specify exactly how many units should be entertainers, how many farmers, etc. You could even add sectors to the economy: assign people to the courthouse to fight crime, to the city walls to increase defense, to the granary to increase growth, etc. This system could get rather complex though and involve quite a bit of micromanagement, especially if you add the economic sectors part.
              Not to mention that getting the AI to work with this kind of system is going to be a very tall order...(I would love to have some sort of population requirement for the construction of units though.)

              A partial system is already in place for designating specialists, although from what I can read from your post, you want the use of buildings/tile improvements to come into play. (i.e. you can build a factory, but get nothing from it until you assign workers to it.)

              And if that is the case, are you then proposing that the use of population can make a town more productive dependant on the year? (Taking my 5 citizen Town as an example - both towns have the same buildings/tile improvements in them, but the Modern city can outproduce the Ancient city because it has 45,000 addtional population that it can allocate to those buildings) This will require a lot of reworking of the cost structure of all purchasable elements.

              The current CTP2 system actually can penalize a player if he specializes (for instance, assigning laborers in a mine-rich town can negate the benefit of the mines - something that I always found odd...)
              Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
              ...aisdhieort...dticcok...

              Comment


              • #8
                Re: Re: Modeling population

                Originally posted by hexagonian
                As usual, I enjoy reading Locutus' proposals just for the history report...
                Thanks Good to know at least one person appreciates it

                Question - Are you proposing maintaining the use of the numerical representation of citizens as it stands now, and then tweaking how that number translates into population based on the year? So a city with 5 citizens in the Ancient Age may have 5,000 people and a city with 5 citizens in the Modern age may have 50,000 people? (Sometimes, I have a hard time thinking in mathematical terms)
                No, 5 citizens will always represeent 5,000 people (or rather, 100,000 people with the formula I proposed), regardless of age.

                The difference in the proposed system will not be in time but in growth. E.g. using the formula p = 10,000*c + 2,000*c^2, it will take 12,000-28,000=16,000 people to grow a city from 1 citizen to 2 citizens, but it will take 1,092,000-1,000,000 = 92,000 people to grow from 20 citizens to 21 citizens (see table above). Currently this is always 10,000 people, regardless of city size.

                Not to mention that getting the AI to work with this kind of system is going to be a very tall order...(I would love to have some sort of population requirement for the construction of units though.)
                Indeed.

                A partial system is already in place for designating specialists, although from what I can read from your post, you want the use of buildings/tile improvements to come into play. (i.e. you can build a factory, but get nothing from it until you assign workers to it.)
                I'm not saying I necessarily want that, but yes, that what I was proposing for consideration. It would work a bit like ST:BotF, in case you know that game (though that game works with energy rather than people).

                And if that is the case, are you then proposing that the use of population can make a town more productive dependant on the year? (Taking my 5 citizen Town as an example - both towns have the same buildings/tile improvements in them, but the Modern city can outproduce the Ancient city because it has 45,000 addtional population that it can allocate to those buildings) This will require a lot of reworking of the cost structure of all purchasable elements.
                Obviously not, since population doesn't work the way you thought it did. In the current system, bigger cities would have a lot more people, but presumably also a lot more buildings to allocate people to. Such a system will undoubably still require a lot of balancing though.

                The current CTP2 system actually can penalize a player if he specializes (for instance, assigning laborers in a mine-rich town can negate the benefit of the mines - something that I always found odd...)
                Yes, it's not very intuitive, but IIRC Activision did it to help the AI (to prevent the human from creating super-production cities and super-science cities using specialisation and thus run away with the game). Maybe a different system here might be in order as well: one where specialists increase existing production output, but every specialist you add is less effective than the previous one (e.g. the first specialist would add +10% production, the second +9%, etc). But's basically a seperate issue from this (unless we decide to implement the complex population model, in that case the whole economic model will probably need to be revised).
                Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                Comment


                • #9
                  From what you've all been posting, i like the sound of the more realistic, but simple version - this should provide a bit extra, without disrupting the flow of play too much(if at all).
                  'The very basis of the liberal idea – the belief of individual freedom is what causes the chaos' - William Kristol, son of the founder of neo-conservitivism, talking about neo-con ideology and its agenda for you.info here. prove me wrong.

                  Bush's Republican=Neo-con for all intent and purpose. be afraid.

                  Comment


                  • #10
                    The simple unit model would be that every unit costs a certain amount of population to produce, just like it has a production cost.
                    Yes (that's what we do in Clash by the way).
                    Now you must also think of adjusting the way slaver units behave. Also think of disbanding units as a way to move population. This might be abused. Now what if you disband in an unsettled tile? Out of your territory (hint = what about settlers)?
                    Clash of Civilization team member
                    (a civ-like game whose goal is low micromanagement and good AI)
                    web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

                    Comment


                    • #11
                      I voted for something different only its not really different.
                      What i mean is i would like to see complex cities and complex units.
                      BUT (and you knew this was coming)
                      Only if there was an option to have the AI manage some cities i didnt want to bother with.
                      Like if i have a city in an important location i might want to micromanage.
                      But if its in the interrior perhaps i would just like to leave it on autopilot.
                      Allways vote banana, its high in potassium!

                      Comment


                      • #12
                        yes an autopilot that works of course :lol
                        "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
                        The BIG MC making ctp2 a much unsafer place.
                        Visit the big mc’s website

                        Comment


                        • #13
                          Originally posted by LDiCesare
                          Now you must also think of adjusting the way slaver units behave.
                          Agreed, I think this would be an excellent opportunity to revise the slavery system, to tone it down a little.

                          If the simple city population is implemented, we could make the Slaver units collect Slaves based on population rather than citizens. E.g. rather than 1 Slave Citizen, you would get 10,000 slaves (or whatever, can be tweaked). For small cities, this would make a huge difference, as in the current system and should usually lead to the city getting an additional citizen, but the bigger a city gets, the less difference it would make. E.g. if a size 7 city needs 40,000 people to grow to size 8 (as is the case with the formula p = 10,000*c + 2,000*c^2), it would take 4 slave captures (assuming 10,000 per capture) to make that city grow. So this way it would be much harder to create size 30+ super-cities by 2000 BC or whatever (in fact, at 10,000 pop/attempt it would take some 200 slaves to get a size10 city to size 30 )

                          If the simple unit system is implemented as well, one could tweak the amount of slave population you get from a battle as well: rather than a fixed amount, one could say that you get like 10% of the sum of the population of all enemy units combined. So if you defeat a single Warrior, which might have a population cost of e.g. 500, you get 50 slaves. If you defeat a stack of 12 legions (at e.g. 6,000 men per unit), you get 12*600=7,200 slaves. That would further make it less profitable to pick off loose barbarian and other units with a small stack with slaver (a typical human tactic).

                          Also think of disbanding units as a way to move population. This might be abused. Now what if you disband in an unsettled tile? Out of your territory (hint = what about settlers)?
                          I think this will have to be thought through carefully, but my first thought is that it should work the same way as with production: if you disband outside cities, you loose everything. If you disband inside a city, you get a (small) portion of your invested population back in that city. This would still moving pop possible, but at a high pop and production cost. Alternatively, we could just moving pop entirely impossible by not giving any pop back. The historic reasoning to justify not getting some or all pop back is that often in real history if armies were disbanded, the soldiers were given some private land somewhere and were allowed to retire. So they would no longer be part of any of a civ's economy.
                          Last edited by Locutus; March 28, 2004, 07:29.
                          Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                          Comment


                          • #14
                            The historic reasoning to justify not getting some or all pop back is that often in real history if armies were disbanded, the soldiers were given some private land somewhere and were allowed to retire. So they would no longer be part of any of a civ's economy.
                            Come to think of it, it might even be a possibility to consider to create some farms around a city where an army is disbanded (or just add some PW points).

                            tyrantpimp,

                            Personally, I would never trust any city to the AI. No matter how good it is, it never does quite what I want it to.
                            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                            Comment


                            • #15
                              Voted "Yes, a complex model for both cities and units", but id also like to turn it off if i wanted. I also hope the button-clicking is at a minimum, even if it means dropping/simplifying features.
                              Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                              CtP2 AE Wiki & Modding Reference
                              One way to compile the CtP2 Source Code.

                              Comment

                              Working...
                              X