Announcement

Collapse
No announcement yet.

Regions, Population and Improvements - model ver. 0.3

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

  • #31
    About storing the population, I was thinking that we could do it like this. We could have 1 short int variable for population. That would be 2 bytes per tile. Then, 3 highest order bits would store the magnitude of the number in powers of ten, and 13 lowest order bytes would make up the number. 2^13 = 8192 and 2^3 = 8, so we could get numbers from 1 to 8192 * 10^8 = 819,200,000,000 which should be enough for most purposes. This would be easily done with bitwise operators of c. The problem is, that we get only 4 significant numbers. Would it be enough for tile populations? With 0.07% population growth, we get about 5 people with population of 8192. This system would allow flexible changing of magnitude. Still, it would be difficult to keep track of really small populations, like 1000 people. The growth is simply too little to be significant. But perhaps if we separate birth and death rates? First some people are born, then some people die, and those combined would be the growth rate. This way the percentages would not be so small, and would be easier to keep track of.

    Of course another option is to use only 2 bits for the magnitude, so we could get numbers from 1 to 16384 * 10^4 = 163,840,000 which might be enough for tile populations. For region, civ and world populations we could use other systems.
    [This message has been edited by amjayee (edited March 20, 2001).]

    Comment


    • #32
      I am not sure what to do about the tile population deal. But with 1,000,000 tiles we propably can't have more than 2 bytes per tile. I think terrain should propably only fill 1 byte (if we are smart we can do this well).

      I think that perhabs we have to store some kind of social stats at a tile level. But how about this: we use "artificial regions" to do that. So when I conquor 20 tiles these twenty tiles will be stored as an artificial region, holding the relevant stats like nationalism and some economics. This means that no matter what region(s) I put them into this will not change. So this will help a whole lot of our defining regions problems. Obviously if I put 10 of the tiles in one region and 10 in another and treat them differently they will be seperated into two artificial regions. But they will stay independant.

      Of cause this will mean that there will be lots of real and artificial regions overlapping each other. But first off virtually all of them would be lots of tiles, and second when two regions have the same stats (including what region they belong to - this could happen) they would be merged.

      I know that with 1000 regions in a game there is likely to be 10,000 artificial regions. But if we can keep the stats below 1 k, and only transfer them when the player needs to know those stats (of cause this will mean that either all players are online simultaneously or that there is a server that is) it could be workable.

      It is not an easy thing to do. But it can be done, and it will solve the problems we are facing with dynamic regions plus be much, much better than storing everything at a tile level (something that is in fact impossible).

      Comments?

      ------------------
      I distrust those who pray; for they are putting their lives in the hands of strangers.

      GGS Website
      "It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
      - Hans Christian Andersen

      GGS Website

      Comment


      • #33
        Comments? I have a very juicy comment about the forum which swallowed my posts few days ago. It wouldnt be so bad if those werent some good posts

        In game terms.

        Kings of ancient world were stupid. They didnt know anything. They wanted to live their life (avg 45 years) in splendor. They wanted good food, wine and woman plus ocassional conquest to show who is the boss. They absolutely never had in mind fate of their empire in 300 hundred years.
        We do.

        In game, we should give players mechanisms to grow his population and expand both in numbers and territory. The speed of those expansions will fluctuate, to have less growth up to 1850 and an explosion since then.
        But we should not hardcode growth rates in. They should be dependable on food and tech and infrastructure level (which would be hard coded in). There is a significant difference.
        So if in early game a player got rich (say by trade favouring position such as bospor or flanders) and managed to grow/import lots of food, maintain high infrastructure level (sewers, aqueducts) and medical level (promote hygene or something) he should have a relatively high growth rating which may easily be historically innacurate for given time period.

        As for storing populations ... dont know a specially smart method. I still think we can ignore most small numbers, although growth rates may present a problem, because historical or not, they are relatively small.

        Comment


        • #34
          about the artificial regions ... well any region overlapping is a bad thing. This needs more work obviously

          Comment


          • #35
            We should try to finish this model sooner or later... population is one of the core features of the game along with turn order and terrain. I'll try to give some comments of my own and try to answer everybody's questions, hopefully this will free amjayee to think over the big issues.

            quote:

            Originally posted by S. Kroeze on 03-18-2001 05:14 PM
            I made a list of all data which -at least in my opinion- should be kept up at hex level in some way/somewhere, directly or indirectly:
            • terrain type
            • to which macroregion it belongs to: here could be stored information about climate of the region and its domesticable plants and/or animals
            • population size
            • the dominant nationality/ethnicity
            • the dominant religion
            • the prevailing production mode
              I would suggest ten different strategies: 1. hunting/gathering 2. pastoralism 3. hoe cultivation 4. plough cultivation and six 'mixed economies', i.e. combinations of 1 and 2, 1 and 3, etc; this would make transitions between them possible whether the population is sedentary or nomadic (of course pastoralists are always nomadic while plough cultivators are always sedentary)
            • whether the population consists of unorganized 'bands' or one organized 'tribe'
            • an indication of the degree of bellicosity of the natives: this could be simple: peaceful/warlike or in degree perhaps some indication of the tech level of those natives
            • improvements like irrigation, roads, mines, fortresses, cities etc; I agree with the Joker that the original list was too extenxive



            If I have understood everything correctly, there will be four levels to store information in:
            [list=1][*]Tiles[*]Populations[*]Regions[*]Nations (or civs, whatever you want to call them)[/list=a]

            Each level consists of several items in the previous level, thus forming a strict hierarchy. One region belongs to only one nation, one population belongs to only one region, one tile belongs to only one population. On the other hand, population may span several tiles, regions may ave several populations and nations may have several regions. There may be tiles and populations that aren't part of any civilization, these will be used to model nomadic tribes and "barbarians" which have no clear government structure. It should be noted that this model deals only with populations and thus leaves out uninhabited areas; that is the field of terrain model (once we can write down a proper one...).

            Anyway, to get on with S. Kroeze's list:

            Terrain type: I think there will be a map that has all this information. populations and other structures are built on top of it.

            Macroregion: I'm not quite sure what you mean by this, but I think that the lower levels need not know to which higher structure they belong to, only the higher ones need to know about their constituting parts. The end result is the same of course, perhaps I think too much like a programmer to bring this up .

            Domesticable plants/animals: This is a tricky one. One alternative would be to store the information on population level, because that way it would tie in nicely with production mode. But then again, this could restrict populations too much and not allow them to grow bigger in time. I would rather avoid a situation where in the endgame there are millions of small populations scattered around the globe. So, perhaps the domesticable animals could be kind of a derived property that is determined by the terrain type and the population's domestication ability (ok, that's a bad word, I mean the kind of "technology" that allows them to domesticate a certain species)?

            Population size: I think this should be done on tile level. More about this later.

            Dominant ethnicity/religion: Population level. Maybe there will also be information about other ethnicities and religions, for instance some rough percentages like "80& christians, 10% muslims, 10% jewish". Let's see how complicated it becomes.

            Production mode: I think there should be some sort of finer details about the occupations of people. As in ethnicity and religion, there could be several of different occupations (or livelyhoods... someone suggest a better word!) which would allow all sorts of combinations and transitions. We just have to make sure that hunting/gathering, herding, primitive cultivation and plough cultivation are made separate professions.

            Organized vs. unorganized: Everything within a civilization should be organized. That is, the organization is a direct result of a population being part of a region. All the populations that are not part of any region should be unorganized and though they do have some life of their own, their purpose in the game is more like a pool of people to conquer and they woudl provide an outside threat which is akin to natural forces.

            Bellicosity: How about making this dependent on the ethnicity so that it's easier to assimilate relatives than total strangers? Certainly, there will have to be some way to determine the attitudes of people in case of riots, wars, social friction and such, so maybe it is justified to put it in as a real property instead of just deriving it every time from all sorts of other variables. A good point.

            Improvements: I think there will be two kinds of improvements, those that are positioned in a specific map coordinate and will thus have a tile-based effect, and those that affect a larger area. The positioning of the information on the latter is not very clear at this point... if we put it in the population level, we risk mixing two very different aspect of the game (i.e. people and artificial constructs), if we use regional level then rearranging regions will pose a problem. I am not sure what is the best way of doing this.

            Any other suggestions?

            Okay, then something about the population increase and granularity.
            quote:

            Originally posted by S. Kroeze on 03-18-2001 05:14 PM
            My solution to this problem is to give the population size of a tile as a number of four figures (a,bcd), multiplied by a factor of 10: 10¹, 10², 10³ etc. I hope this could work without occupying too much memery.



            This is a good idea. As amjayee said, it is possible to store four significant numbers and four exponents in a reasonable space. However, I would rather not use almost arbitrary (to any non-programmer) numbers like 0-16384, but rather simply 0-9999. Now, if we have four possible multipliers (1, 10, 100, 1000) we get population sizes varying from 0 to about 10 million per each tile. I am not so sure if this will be enough when we get to the modern days. Nevertheless, this limitation can be solved in many ways:
            [list][*]Take out the multiplier 1, so the amount of people in any tile is always a multiple of 10 or more. This way we can have 100 million people per tile and the growth rate won't be that difficult to handle. I think.[*]Once the population reaches the 10 million limit, start using the 14-bit number in the computer memory up to 16384. The actual limit is thus 16 million.[*]Use only three significant numbers. I don't like this idea.[*]When the exponent is 3 and you reach 9999, switch to three digits and use the remaining info in the 14-bit number.

            Okay, maybe I should explain those more but since it hets kind of technical and I haven't probably thought about those myself very profoundly, suffice to say that two bytes will not be a problem in my opinion.

            quote:

            Originally posted by amjayee on 03-19-2001 06:03 AM
            About the tile properties, it gave me an idea; perhaps we should have geographic regions, that could store the areas that shares the same terrain properties? Perhaps also other system to store the areas with the same climate? This could help us to save the memory needed for the map.


            aaahh.. this would spell trouble. I don't think that the storage space will be such a big problem (heck, we'll soon be having computers with gigabytes of memory!) that we should try using some complicated compression schemes. Sure, when we want to save the map or send it through network, it is efficient to use some sort of compression, but inside the game I think this kind of constructs will make it quite complicated to program. Just my opinion.

            One more thing that no one seems to have brought up is that in the design doc thread we are contemplating using months as the basic time cycle and not year. Monthly growth rates are a lot smaller than annual growth rates, so we should indeed have enough details to calculate them properly.

            For instance, with four significant digits there is a minimum growth rate of 1/9999=0.01 per cent. Per month. I think this is enough, at least I wouldn't be interested in any smaller changes in my population. The annual changes will be just a series of monthly changes: people are born at pretty much constant rate, but during winters the child mortality (and mortality in general) is higher than in summertime. If we assume that birth rate is pretty much static, then we get annual birth rates a little more than 0.1 per cent. I wonder if that is realistic enough? At least in gameplay terms it should suffice.

            quote:

            Originally posted by The joker on 03-24-2001 01:37 PM
            But how about this: we use "artificial regions" to do that. So when I conquor 20 tiles these twenty tiles will be stored as an artificial region, holding the relevant stats like nationalism and some economics. This means that no matter what region(s) I put them into this will not change. So this will help a whole lot of our defining regions problems. Obviously if I put 10 of the tiles in one region and 10 in another and treat them differently they will be seperated into two artificial regions. But they will stay independant.


            Well, basicly populations already are "artificial regions" in that sense. Except that calling them "artificial" would be misleading, because they would be the real regions and the things we call regions are just governmental constructs that the player can define. But better not start arguing about the proper words.

            I have called this kind of regions "primitive regions", which I think is a better term. But for now, each population has one primitive region so we might as well think fo them as equivalent.

            Finally, I have to tell that I agree with VetLegion. We should find inspiration from history, but the actual game cannot imitate history because we have the advantage of hindsight on our side. The important thing is to identify the natural constraints that affect the properties of the civilization (e.g. how much resources are needed to support 1000 people) and try to include the mechanisms of populatin growth, economy and such.

            That's my two cents.

            Leland

            Comment


            • #36
              I agree with Vet's post. On some occations growth rates should be allowed to be more or less inaccurate for the given time period. As long as in the big picture they are not.


              Leland:

              Very intelligent post. I think your idea about populations is pretty much what I had in mind with artificial regions. However, populations is most likely a better word. So a population will be x amount of hexes, on which there are living y amount of people, 20% Danes, 30% Fins and 50% French, 90% of them being christian and 10% Muslims. Most likely a few economic stats will be included as well.

              If populations are used well we might be able to solve our problems defining and using dynamic regions.

              However, I still fear that perhabs the end result will be 1000s and 1000s of populations around the globe. Can we make sure that populations within a region all become assimilated and therefore turned into one population within a few hundred years? If so then the problems will most likely be solved.

              ------------------
              "I have an idea for a movie. It's about a killer robot driving instructor, that travels back in time for some reason."
              - Homer J. Simpson

              GGS Website
              "It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
              - Hans Christian Andersen

              GGS Website

              Comment


              • #37
                Hmmmm, on the subject of population. I think anyway we look at it it's gunna need 2 bytes per tile, and I don't think we need more than a 10 person accuracy, so why not this;

                if the value in the short int (2 bytes) <= 40,000 then that *10 is the population (so 10,000 = 100,000)

                if the value > 40,000 then it's a reference to a table with up to 20,000 entries (maybe linked list), each entry is 4 bytes for a bigger number.

                The idea is that big (400,000) tiles outside of a city would be very rare (shouldn't come close to 20,000 map wide).

                Cities would be stored independently of the map (maybe a pop value of 65,535 would indicate there is a city there).

                Just an idea, I'm sat in work, it may be completely insane
                "Wise Men Talk because they have something to say, fools talk because they have to say something" - Plato

                Comment


                • #38
                  Um, I neglected to describe the table the big tiles would reference to, it's simple really;

                  take 40,000 off the pop value, and * 4 to get our position on a table of bytes. See, simple
                  "Wise Men Talk because they have something to say, fools talk because they have to say something" - Plato

                  Comment


                  • #39
                    Hmmm, a really interesting idea.

                    But yes, it would work fine. It would almost halve the amount of space needed compared to storing 4 bytes for each tile, and we would get an accuracy of 10 people. Sounds good. But we'll see.

                    Comment


                    • #40
                      Well, I programmed this - and it appears to work, needs heavy testing before I trust it though.

                      I'm not so sure if 20k total sectors with >=400,000 total population is enough, what's everyone else think?

                      Obviously, though it doesn't include cities I don't think, so maybe it will be.
                      "Wise Men Talk because they have something to say, fools talk because they have to say something" - Plato

                      Comment


                      • #41
                        At the moment discussion has turned again to the relationship between tiles, regions and population data.
                        In my view, this thread is essential, because it centres on this very issue. That is my reason to bring it to light again.

                        I have always hoped that it would be possible to store numbers of population at hex level.
                        I am the first to admit I am no authority, to say the least.

                        When this would not be possible because of limited memory space, 'fixed' regions -however small- are inevitable, because we always need a smallest unit to store population data.

                        In another thread('The Return Of The City') I calculated, that:
                        • The current CivII has at most a map of 20,000 tiles; since it is clear most of you prefer a larger map I started my calculation with a map having 200,000 tiles
                        • Assuming your world would be earthlike, 70% of its surface would be ocean, leaving about 60,000 tiles of land
                        • When the game world would have earthlike dimensions, the average tile would represent a surface area of about 1,000 sq.mile = 2,599 km², having a diameter of roughly 50 km. This is almost exactly the size of Luxembourg. So present-day Denmark would have 17 tiles, the Netherlands 13 tiles, Finland 130 tiles and a really large country like China 3,692 tiles, Formosa/Taiwan excluded. I remember to have read somewhere that same figure of 50 km, so this reassures me!
                        • A realistic population figure for hunter-gatherers is one person per square mile, which would result in a population of 1,000 people on average per tile at the start of the game, before the development of agriculture and animal domestication, assuming the entire world would be populated, which is realistic


                        So with tiles having a surface area of about 1,000 sq.mile = 2,599 km² (Luxembourg), we would have about 60,000 tiles of land, assuming that the distribution between land and sea would be earth-like.

                        With about 60,000 land tiles, would it be possible to store numbers of population at hex level?
                        Last edited by S. Kroeze; May 14, 2002, 18:29.
                        Jews have the Torah, Zionists have a State

                        Comment


                        • #42
                          First, our problem is (at least my problem) that we have a hard time figuring out how population dynamics should work before adding any player meddling, i.e. how can a primitive tribal population be modelled realistically and reasonably efficiently. Storing a number of people per each tile should not be a problem... even if we have millions of tiles, and even if we count oceans and deserts. It's all the other info (religion, allegiance, bellicosity, technology/skills, education, wealth, health, ...) that makes it impossible to keep track of all the tiles independently. Therefore we need to lump the tiles together in larger clusters somehow, but the mechanics of how this should take place are beyond me.

                          In the end, we may have to fall back to fixed regions (or reduce the number of tiles... 60 000 populated tiles might be within reason, but then the world would either have to be a bit smaller than Earth or tiles a bit larger than 50km across), but I think this is not very realistic. What consitutes as a coherent region to a small middle-eastern tribe may be just a totally insignificant speck of land to an intercontinental empire. Not to mention that human activity can sometimes change "natural" borders... we can build tunnels through mountains, or roads to connect large areas into one. There are no such things as fixed regions in the real world, which is why I would not like it if we're forced to take this route.

                          At the moment, I am thinking that some sort of "pseudo-city" kind of stucture might be in order... that population is grouped around population centers and these centers can migrate like settlers in civ, and have varying areas of land (or population) which they represent. But there are still a lot unresolved issues, like how exactly would these pop centers form, move, and destruct. Perhaps another kind of approach is needed, and I just cannot see the forest from the trees.

                          Comment


                          • #43
                            i concur with you on the idea that urbanized cities should sprout up on their own, but i don't think the player should be able to "build his own", mainly because i see rural and urban areas as completely different "regions".

                            in real life there usally tend to be highly urbanized areas and highly rural ones. these areas usually form based on the ground conditions and varyign other factors, some of which are man-made factors. therefore a player could influence and not be god and decide which areas become urbanized and which remain farmland.

                            now it's just a matter of thinking which factors would play a crucial role in creating an agrigain economy and vica versa, tax rate? i don't really know
                            "I've lived too long with pain. I won't know who I am without it. We have to leave this place, I am almost happy here."
                            - Ender, from Ender's Game by Orson Scott Card

                            Comment


                            • #44
                              Maybe the player could speed up the urbanization process by ordering stuff that attracts people (harbors, military bases, railroads, etc) to be built, setting taxes that favour city-dwellers, provide jobs (like Pyramids in Egypt), start colonies, and that sort of things. However, none of this stuff should directly affect people, but rather alter the environment so that folks will settle in cities on their own accord... and if forced to do something against their will like colonizing Siberia they shouldn't be too happy about it. So basically we agree on this.

                              However, I do not see a need to distinguish between rural and urban regions, not in the fundamental level. It would just complicate things. But then again, I am open to ideas... I do have a sketchy model in my head but it really needs to be worked out a little bit before I'll dare write it down. Hope to see as many of you as possible in sunday's meeting.

                              EDIT: S. Kroeze, you wouldn't happen to know how large did pre-historic chiefdoms (or whatever was the form of society just before the rise of cities) grow, both in terms of population and the area a one chief could effectively control...?
                              Last edited by Leland; May 18, 2002, 16:39.

                              Comment


                              • #45
                                Originally posted by Leland
                                However, I do not see a need to distinguish between rural and urban regions, not in the fundamental level. It would just complicate things.
                                well, i don't really believe you should provide a clear distinction between rural and urban areas, but i believe that the areas should "lump" together, all the urban areas in a region in small masses, rather than an entire region being a city.
                                "I've lived too long with pain. I won't know who I am without it. We have to leave this place, I am almost happy here."
                                - Ender, from Ender's Game by Orson Scott Card

                                Comment

                                Working...
                                X