Announcement

Collapse
No announcement yet.

Coding the "Society Model"

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

  • #16
    My question is what does 1.0 stand for in each case?
    Which Love Hina Girl Are You?
    Mitsumi Otohime
    Oh dear! Are you even sure you answered the questions correctly?) Underneath your confused exterior, you hold fast to your certainties and seek to find the truth about the things you don't know. While you may not be brimming with confidence and energy, you are content with who you are and accepting of both your faults and the faults of others. But while those around you love you deep down, they may find your nonchalance somewhat infuriating. Try to put a bit more thought into what you are doing, and be more aware of your surroundings.

    Comment


    • #17
      Hi LGJ:

      Everything on a 0-100 scale on the interface is shown on a 0-1 scale here. 1.0 is the highest an attribute or level of power can be.
      Project Lead for The Clash of Civilizations
      A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
      Check it out at the Clash Web Site and Forum right here at Apolyton!

      Comment


      • #18
        How to handle where Player/ruler can set negotiated values

        [edit] Oops, it turns out Laurent proposed exactly this same thing earlier in the Government Model v. 3.1 thread. I will leave it here anyway so Rodrigo has a chance to respond, since he never approved or disapproved of it in the other thread.


        Rodrigo never specified exactly how we determine over which range the Player/ruler can set government policies. What happens is that all the Political Blocks negotiate with each other to determine policies. Then the player comes in at the end and can set the policies in a certain range around the PB-negotiated ones. This was done to eliminate the "Machiavellian ruler effect" in the previous model. (The effect was called that because the player frequently entered numbers they didn't actually want to happen to achieve the final effect that they did want.) In the new system the distance the govt policies can move from the PB ones is determined by the ruler power, but hasn't yet been specified. (See the Government Model Version 3.2 section VII under "The Negotiation" if you have no idea what I'm talking about.)

        I have come up with an easy way to determine how far the ruler can move the sliders. It is very simple. The ruler slider ranges should be determined as if the ruler were an ordinary PB, as in the old "Machievellian" system. The low end of the range is determined as if the Ruler set a value of 0 for the policy. And the high end as if they set 1 (scale is [0,1] although it will show as 0-100 in the interface). I am going to go ahead and code it that way for now, and if we need to change it later, we'll do it as necessary.
        Last edited by Mark_Everson; February 2, 2002, 13:51.
        Project Lead for The Clash of Civilizations
        A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
        Check it out at the Clash Web Site and Forum right here at Apolyton!

        Comment


        • #19
          Most everything needed for negotiations is in now. The most recent stuff is near the bottom of the screen dump. It shows what everyone excluding the ruler wants for all policies, and where this leaves the ruler room to set the values. This current example has a ruler power of 35%. But you can see that even with 35% there is a fair amount of influence the player can have. I am now tweaking the GUI to work with the new system. After that I need a little code to implement Yoav's median approach (aka 51%).

          I'm getting excited in case you can't tell...

          One thing I Am worried about is that it seems the player can consolidate power, and get it to 100% fairly rapidly with the current system. Maybe I don't understand something Rodrigo has in to prevent this... FE the player power is, in the example 35%, but the player can negotiate it as high as 61% in one cycle (Under "Highest Values Player can select" see Ruler: 0.61). After a few round of this (that might take 30 turns) you can go peacefully from a republic to a dictatorship. Of course the riots model could take care of that all by itself as jealous nobles threaten insurrection, etc. Rodrigo, am I missing something? If not I'm sure we can come up with a fix.


          Social/Government characteristics of civ -- Roman

          Ruler Profile ++++++++++++
          Ruler: Fabian
          Ruler Government Preferences
          Government Policies: ----------
          Political Block Power ------
          Labor: 0.0
          Warfare: 0.3
          Human: 0.05
          Ruler: 0.35
          Capital: 0.1
          Administrative: 0.0
          Ethics: 0.2
          Negotiated Policies --------------
          Tax Rate: 0.1
          Civil Rights: 0.3
          Ethnic Discrimination: 0.7
          Religious Descrimination: 0.5
          Slavery: 0.3
          Foreign Policy: 0.8
          Regime Policies --------------
          Private Property: 0.5
          Social Policies: 0.3

          Government Profile +++++++++++
          Government Policies: ----------
          Political Block Power ------
          Labor: 0.0
          Warfare: 0.3
          Human: 0.05
          Ruler: 0.35
          Capital: 0.1
          Administrative: 0.0
          Ethics: 0.2
          Negotiated Policies --------------
          Tax Rate: 0.1
          Civil Rights: 0.3
          Ethnic Discrimination: 0.7
          Religious Descrimination: 0.5
          Slavery: 0.3
          Foreign Policy: 0.5
          Regime Policies --------------
          Private Property: 0.5
          Social Policies: 0.5


          Main EG in Capital Characteristics: Ethnic Group: Roman
          Religion: Roman Paganism
          Cultural Attributes -- Roman *****
          Moral Code: *******
          Aggressiveness: 0.9
          Ethnic Tolerance: 0.6
          Religious Tolerance: 0.9
          Asceticism: 0.0
          Individualism: 0.6
          Basic Social Attributes: *******
          Traditionalism: 0.6
          Nationalism: 0.9
          Land Connection: 0.5
          Importance Of Religion: 0.5
          Corruption: 0.0
          Social Classes: *******
          Roman Aristocracy: Pop = 940, PCI = 5.0
          Roman Clergy: Pop = 1880, PCI = 5.0
          Roman Military: Pop = 1880, PCI = 5.0
          Roman Workers: Pop = 89300, PCI = 5.0


          Warrior Social Roles: Military
          Warfare: 1.0
          Human: 1.0

          Warrior effective pop in Warfare PB: 1880.0, Ethics PB: 0.0

          WarriorPrefs: Government Policies: ----------
          Political Block Power ------
          Labor: 0.0
          Warfare: 0.26
          Human: 0.07
          Ruler: 0.4
          Capital: 0.1
          Administrative: 0.0
          Ethics: 0.17
          Negotiated Policies --------------
          Tax Rate: 0.3035
          Civil Rights: 0.4333333
          Ethnic Discrimination: 0.39999998
          Religious Descrimination: 0.100000024
          Slavery: 0.39999998
          Foreign Policy: 0.91499996
          Regime Policies --------------
          Private Property: 0.14994529
          Social Policies: 0.031226136


          Regime support:
          Active Regimes and their Support by Military:
          Conservative Regime -- Support = 38.89571%
          Ruler's Regime -- Support = 38.89571%
          Despotism -- Support = 9.017558%
          Classical Republic -- Support = 13.191017%

          Political Blocks:

          Political Block Labor characteristics in civ Roman --

          Government Profile +++++++++++
          Government Policies: ----------
          Political Block Power ------
          Labor: 0.0
          Warfare: 0.26
          Human: 0.07
          Ruler: 0.4
          Capital: 0.11
          Administrative: 0.0
          Ethics: 0.17
          Negotiated Policies --------------
          Tax Rate: 0.25
          Civil Rights: 0.33333334
          Ethnic Discrimination: 0.39999998
          Religious Descrimination: 0.100000024
          Slavery: 0.39999998
          Foreign Policy: 0.90000004
          Regime Policies --------------
          Private Property: 0.1720893
          Social Policies: 0.033486843

          Political Block Warfare characteristics in civ Roman --

          Government Profile +++++++++++
          Government Policies: ----------
          Political Block Power ------
          Labor: 0.0
          Warfare: 0.26
          Human: 0.07
          Ruler: 0.4
          Capital: 0.1
          Administrative: 0.0
          Ethics: 0.17
          Negotiated Policies --------------
          Tax Rate: 0.3035
          Civil Rights: 0.4333333
          Ethnic Discrimination: 0.39999998
          Religious Descrimination: 0.100000024
          Slavery: 0.39999998
          Foreign Policy: 0.91499996
          Regime Policies --------------
          Private Property: 0.14994529
          Social Policies: 0.031226136

          Political Block Human characteristics in civ Roman --

          Government Profile +++++++++++
          Government Policies: ----------
          Political Block Power ------
          Labor: 0.0
          Warfare: 0.26
          Human: 0.07
          Ruler: 0.4
          Capital: 0.11
          Administrative: 0.0
          Ethics: 0.17
          Negotiated Policies --------------
          Tax Rate: 0.2506253
          Civil Rights: 0.33826667
          Ethnic Discrimination: 0.39999995
          Religious Descrimination: 0.100000024
          Slavery: 0.40119997
          Foreign Policy: 0.90299994
          Regime Policies --------------
          Private Property: 0.17216028
          Social Policies: 0.033435926

          Political Block Capital characteristics in civ Roman --

          Government Profile +++++++++++
          Government Policies: ----------
          Political Block Power ------
          Labor: 0.0
          Warfare: 0.26
          Human: 0.07
          Ruler: 0.4
          Capital: 0.11
          Administrative: 0.0
          Ethics: 0.17
          Negotiated Policies --------------
          Tax Rate: 0.20519999
          Civil Rights: 0.39333335
          Ethnic Discrimination: 0.39999998
          Religious Descrimination: 0.100000024
          Slavery: 0.39999998
          Foreign Policy: 0.90000004
          Regime Policies --------------
          Private Property: 0.1654557
          Social Policies: 0.031341933

          Political Block Administrative characteristics in civ Roman --

          Government Profile +++++++++++
          Government Policies: ----------
          Political Block Power ------
          Labor: 0.0
          Warfare: 0.0
          Human: 0.0
          Ruler: 0.0
          Capital: 0.0
          Administrative: 0.0
          Ethics: 0.0
          Negotiated Policies --------------
          Tax Rate: 0.0
          Civil Rights: 0.0
          Ethnic Discrimination: 0.0
          Religious Descrimination: 0.0
          Slavery: 0.0
          Foreign Policy: 0.0
          Regime Policies --------------
          Private Property: 0.0
          Social Policies: 0.0

          Political Block Ethics characteristics in civ Roman --

          Government Profile +++++++++++
          Government Policies: ----------
          Political Block Power ------
          Labor: 0.0
          Warfare: 0.26
          Human: 0.07
          Ruler: 0.39
          Capital: 0.11
          Administrative: 0.0
          Ethics: 0.17
          Negotiated Policies --------------
          Tax Rate: 0.25016668
          Civil Rights: 0.45000002
          Ethnic Discrimination: 0.39999998
          Religious Descrimination: 0.100000024
          Slavery: 0.45999998
          Foreign Policy: 1.035
          Regime Policies --------------
          Private Property: 0.20109946
          Social Policies: 0.034274347

          Aggregated Political Block Policies(everyone but ruler)
          Government Policies: ----------
          Political Block Power ------
          Labor: 0.0
          Warfare: 0.26
          Human: 0.07
          Ruler: 0.4
          Capital: 0.11
          Administrative: 0.0
          Ethics: 0.17
          Negotiated Policies --------------
          Tax Rate: 0.2678994
          Civil Rights: 0.42499486
          Ethnic Discrimination: 0.39999998
          Religious Descrimination: 0.10000002
          Slavery: 0.4185538
          Foreign Policy: 0.9486922
          Regime Policies --------------
          Private Property: 0.16978009
          Social Policies: 0.032351844

          Lowest Values Player can select
          Government Policies: ----------
          Political Block Power ------
          Labor: 0.0
          Warfare: 0.17
          Human: 0.04
          Ruler: 0.26
          Capital: 0.07
          Administrative: 0.0
          Ethics: 0.11
          Negotiated Policies --------------
          Tax Rate: 0.1741346
          Civil Rights: 0.27624664
          Ethnic Discrimination: 0.25999996
          Religious Descrimination: 0.065000005
          Slavery: 0.27205995
          Foreign Policy: 0.6166499
          Regime Policies --------------
          Private Property: 0.11035705
          Social Policies: 0.021028697

          Highest Values Player can select
          Government Policies: ----------
          Political Block Power ------
          Labor: 0.35
          Warfare: 0.52
          Human: 0.39
          Ruler: 0.61
          Capital: 0.42
          Administrative: 0.35
          Ethics: 0.46
          Negotiated Policies --------------
          Tax Rate: 0.5241346
          Civil Rights: 0.62624663
          Ethnic Discrimination: 0.60999995
          Religious Descrimination: 0.415
          Slavery: 0.62205994
          Foreign Policy: 0.9666499
          Regime Policies --------------
          Private Property: 0.46035704
          Social Policies: 0.3710287

          Active Regimes:

          Regime Conservative Regime : ________
          Political Block Power ------
          Labor: 0.0
          Warfare: 0.3
          Human: 0.05
          Ruler: 0.35
          Capital: 0.1
          Administrative: 0.0
          Ethics: 0.2
          Regime Policies --------------
          Private Property: 0.0
          Social Policies: 0.0

          Regime Despotism : ________
          Political Block Power ------
          Labor: 0.0
          Warfare: 0.0
          Human: 0.0
          Ruler: 1.0
          Capital: 0.0
          Administrative: 0.0
          Ethics: 0.0
          Regime Policies --------------
          Private Property: 0.2
          Social Policies: 0.2

          Regime Ruler's Regime : ________
          Political Block Power ------
          Labor: 0.0
          Warfare: 0.3
          Human: 0.05
          Ruler: 0.35
          Capital: 0.1
          Administrative: 0.0
          Ethics: 0.2
          Regime Policies --------------
          Private Property: 0.0
          Social Policies: 0.0

          Regime Classical Republic : ________
          Political Block Power ------
          Labor: 0.0
          Warfare: 0.2
          Human: 0.2
          Ruler: 0.3
          Capital: 0.2
          Administrative: 0.0
          Ethics: 0.1
          Regime Policies --------------
          Private Property: 1.0
          Social Policies: 0.1
          Project Lead for The Clash of Civilizations
          A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
          Check it out at the Clash Web Site and Forum right here at Apolyton!

          Comment


          • #20
            Mark, I think that all parties always want 100% power. With such figures, the ruler's choice only allows him to decrease his own power in favor of another faction, and conversely, a faction can only give part of its power.
            The negocitation model inhibits Machiavelic abuse by limiting the Polpower of the ruler, but if he can increase it, then Machiavel comes back in. So you can prevent the effect by having everyone ask for 100% power or not negociating the trait.
            I can't see how the median based system would handle this either.
            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


            • #21
              Hi Laurent:

              Your approach would work, but it would change the model a great deal, and pretty much eliminate any point in Regimes (which were called Ideologies). So although its A solution, I am hoping we can come up with something a bit less drastic.

              Of course as I said above, the riots model may keep things in check. But I don't think thats a good solution all by itself, since then the Player can move around these powers using the govt model, but they would have no real meaning because the society could explode with unintended consequences even for "legal" power changes. But maybe if statements as to expected effects popped up if the ruler power (or even another faction's) were increased it would be ok. Another one for playtesting.

              I am with you in that it's a serious design issue that needs a fix... I'm glad its about time for Rodrigo to get back . But in the interim, there's an idea I had a long time ago for how to limit power changes. It is from my old early govt model. It gives each political block a feeling for what thier power should be based on contributions to society. If they get less than what they percieve then they would be more likely to take adverse action per the Riots model. I'm putting it up here, since I don't think Rodrigo has much in the way of actual equations for the Riots model. Below is a substantial quote from that page. Note that many things have changed since in the models. I am Not proposing that we go back, but am just putting forth the "contribution to society" idea into the open air. Everything else about the examples, just ignore.

              If the formatting doesn't work, you can see this at the link above.

              [edit] Richard figured out how to get the tables not to have the ton of white space above them. I searched for about 10 min and couldn't find that post. If anyone can clue me in, I'd appreciate it. And I just figured out this should probably go in a different thread . But since its a big post that might get in the way in the Govt thread, I'll leave it here for now...


              Guiding Principles:

              • Any Class believes that its rightful share of the power in the governmentis derived from both cultural expectations (based largely upon long-termhistorical values) and the contributions of the class to the success orpower of the Civ.
              • Each Class knows its rightful share of the power within the governmentand compares this to its Actual share of power in the govt.
              • A class' contentment with the current govt. system is the difference betweenits actual power within the government and its rightful share
              • On a practical note, the player will not see these numbers.  Thisinformation will be delivered to the player in messages.  Examples:"the peasants feel over-taxed"...  "the nobles demand more power,and if you don't..."
              Cultural Expectations of power of different classes will be based upon
              some sort of moving average of the governmental power of the classes Over
              something like a 100-year or 70-year period.  I think this assumption
              is reasonable; people get used to the way things have "always been".

              Contributions of Classes to the Civ (Very sketchy right now...)

              • Principal  10 x change in Military+Labor+Religion contrib.s (see below)
              • Upper Cl.  1/2 x (Mil + Labor + Relig.)  [not change, currentvalues]
              • Military  Contributes by protection from ext. threats, and new conquests
              • Labor  Contributes by paying taxes and gets credit for econ. growth
              • Religious  Contrib. thru happiness and social welfare functions +taxes
              • Minorities / Dependents  Don't know yet (I will skip Minorities/Dependentsin the examples too)
              A few other Classes that probably should be included are:
              • merchants
              • slaves


              Notes on Contributions of Classes:

              Principal derives credit for how well things are going. this is most
              easily expressed by rates of change in mil, econ… success If the civ is
              doing well people tend to be willing to work with leader who is doing a
              good job.  Perhaps even taxes can be raised, etc.

              Upper Classes are "superlative" members of Mil, Labor and Relig. - they
              do well when the classes do.

              Contrib to Civ column of examples just uses made up numbers for illustration
              purposes.  Since change from last turn is used to figure Principal's
              contribution M, L, and R need two numbers.  One for contrib and one
              for change.  Write these like 20/1 where 20 is current and 1 is improvement
              since last turn.

              Expected Power is simply "normalized" to 100%.  For example if
              the Contributions + Cultural column sums to 200 you just divide each Number
              in Contrib. + Cultural by 2 (200/100), guaranteeing they will sum to 100.

              I have rounded some of the math in the examples…

               


              Example 1, a Reasonably stable govt. It has been this
              way a long time.



              ClassCulturallyContrib.Sum ofExpectedCurrentContent.
              Expectedto Civ.Cult.+Con.PowerPowerw/ Govt.
              Principal4015 (10x1.5)55304010
              Upper Cl.30255530300
              Military2020/+04020200
              Labor 1020/+1301510-5
              Religious010/+0.51050-5


              This govt is reasonably stable since discontent with the government
              is only

              present to a relatively small degree in two classes.  They might
              riot

              occasionally, but things are basically under control.  Note that
              if the principal

              tries to raise taxes, the dynamics will shift so that labor is unhappier
              (more

              contribution to society thru higher taxes)  If the tax also covered
              Religious

              institutions and the upper classes then the government would become

              significantly less stable.

               


              Example 2, Same as before, but taxes on Labor/ relig from
              20% to 30%



              ClassCulturallyContrib.Sum ofExpectedCurrentContent.
              Expectedto Civ.Cult.+Con.PowerPowerw/ Govt.
              Principal4015 (10x1.5)55254015
              Upper Cl.30326230300
              Military2020/+04019201
              Labor 1030/+1401910-9
              Religious015/+0.51570-7


              I think a number like -10 in the content should be the threshold for
              really

              serious problems.  The govt isn't quite there yet but there will
              clearly

              be a social disturbance and civil disobedience problem.  Another
              trouble for

              the government it that nobody other than the principal really Likes
              this

              situation.  The principal has no natural strong allies in preservation
              of the

              government, and two classes that are pretty pissed off.  The next
              time some-

              thing bad happens to drive down Ps Contrib there will be Big Trouble

               


              Example 3, About to Explode in Revolt, Govt out of sync
              with power



              ClassCulturallyContrib.Sum ofExpectedCurrentContent.
              Expectedto Civ.Cult.+Con.PowerPowerw/ Govt.
              Principal40-301044036
              Upper Cl.3055853630-6
              Military2040/-1602520-5
              Labor 1040/-1502110-11
              Religious030/-130140-14

              Things are going poorly, the economy is contracting, people have lost
              faith

              in the religion, and the military is somewhat bungling.  Note
              here that the M,

              L, and R classes are more productive in general than in examples 1
              & 2.

              Even a palace coup which would "reset" Principal's contrib. to +0 from
              -30

              would still leave a badly balanced government.  I don't know the
              exact shape

              of the revolution yet, I'm trying to model that now using some cute
              techniques.

              What do you think the new alignment might be that would produce a stable

              government?

              [edit to fix the tables, technique courtesy of Richard and Gary]

              Last edited by Mark_Everson; February 9, 2002, 20:45.
              Project Lead for The Clash of Civilizations
              A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
              Check it out at the Clash Web Site and Forum right here at Apolyton!

              Comment


              • #22
                This is a little peripheral, but I feel that it should be recorded somewhere. I am just hooking in the Adminstration structure (which is part of the government model) to the code. There are two design aspects that arose.

                The first is that every map square currently has a "MapSquareEconomy". Should it also have an Administration? The more I think about it, the more I think it should.

                The other issue is even more of a coding issue. In my original conception of the Administration object (discussed in Command and Control), I had the Administration having a direct link to the MapSquare (the physical terrain and all the physical things on it), and the MapSquare having a direct link the Administration, and similarly, the Administration having a direct link to the MapSquareEconomy and vice versa, with no direct link from MapSquare to MapSquareEconomy (a third link would lead to redundancy and a maintenance problem).

                However, on thinking about it, I feel that there is a sort of level of abstraction situation here, and that the MapSquare and the MapSquareEconomy should be linked, and the MapSquareEconomy and the Administration linked, in increasing order of distance from reality. So, if the Administration needs information about the MapSquare, it gets it through the MapSquareEconomy.

                Unless there are violent protests, I will do it the way I have outlined here.

                Cheers

                Comment


                • #23
                  Mark: I believe Richard's trick with the table was to leave out ALL line spaces in the text of the table itself - they are all printed out before the table, then more of them put in to format the table itself.

                  I am worried about an aspect of the social model. Please correct me if I am wrong.

                  Ethnic groups, and the social classes in them, are, I believe, specific to map squares, so identical ethnic group social classes in different squares are different entities. Is this correct?

                  If so, we have the following calculation.

                  The Earth has an inhabitable area of about 400,000,000 km2. This is equivalent to 40,000 map squares.

                  Suppose each square, on average, has 2 ethnic groups (most will have 1, some much more). This gives 80,000 ethnic groups.

                  Assume each ethnic group has five social classes. This gives 400,000 social classes.

                  Each social class is characterized by the degree to which it contributes to a social role, of which there are five. This gives 2,000,000 social role contributions.

                  A contribution to a social role will consist of a reference to the role and a number. 12 bytes is about right. So we have 24Mb.

                  24Mb of memory just to record ethnic groups?

                  In addition, each of these must be accessed each turn. At a guess, but with some knowledge of the code, I would say something like 10 minutes per turn on a reasonably fast machine.

                  Do we have a problem here, Houston?

                  Cheers

                  Comment


                  • #24
                    Hey Gary:

                    Your calculations are substantially correct. There is one big error in that you count the global surface as fully occupied. Once you remove water and inhospitable land its more like 5-10k squares. So your numbers should be derated by a factor of 5-10 roughly. But they are still abusively bad.

                    This goes back to when F_Smith said he would code everything. I tried to convince F_Smith of the problem, but he wanted to code Everything at the ultimate lowest level. Since he was taking over the coding, I went along... knowing that it would have to be fixed some day. The economy is just as bad, if done at the square level, in case you haven't figured it out already.

                    What we will need is a way to move all this stuff up to the provincial level for whole-world games. What the current approach does give is a way to make more-accurate small-map scenarios. I think we should start a thread discussing what the best approaches are for handling the values on a province-wide basis. The issue there is that we will need kludges on the square level to keep track of some details, or really bizarre things can happen. One example is... There are no BigHead EG members in my civ. One of my border provinces takes of a city square Full of BigHeads. Now my province is 10% BigHead. If the BHs take back their square, they won't get their people back unless we keep track of the EG population bookkeeping at the square level. There are even more confusing things in the econ area. So this needs to be considered carefully for the best ways to do it both for the social and econ models. And as I said above, if we can keep the square-level stuff as an alternative for 1000-square games, it would be good. I'll go with your judgement as to whether that can be done without making a 7-course spaghetti dinner out of the code.

                    When we start a dedicated discussion, I can reference the old talk about it. That includes my old plans for how to handle the province-wide stuff. We can take it from there. I do not think this is a fix-immediately issue. My guess would be we should address it seriously after demo 8. If you want to talk about this further now, I suggest you take your first post, and start a new thread about it. Then we can copy this stuff over, and have all the discussion in the same place, since this topic clearly extends beyond social model coding.
                    Project Lead for The Clash of Civilizations
                    A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
                    Check it out at the Clash Web Site and Forum right here at Apolyton!

                    Comment


                    • #25
                      Your calculations are substantially correct. There is one big error in that you count the global surface as fully occupied.
                      You are right, I had the correct figure in my preliminary calculations, and for some reason I went to the total figure for the post.

                      The problem will be hugely reduced if ethnic groups can have prototypes which specify the social classes they have. I cannot for the life of me see any game advantage in being able to specify a particular social class of a particular ethnic goup as having a greater base religious influence (that is, contribution to the social role, this is value that does not change during the game) than the same class of the same ethnic group in the next square.

                      As far as the next level of social factors, the opinions or feelings of these groups, they certainly should be aggregated over a province (or, actually, AministrationLevel2 - love that name).

                      I also think that an ethnic group's religion can be set at the provice level without impact on game playability or realism.

                      However, I think the population numbers need to be kept at a square level, so the BigHeads get their people back. If they want them.

                      Cheers
                      Last edited by Gary Thomas; February 9, 2002, 17:11.

                      Comment


                      • #26
                        Originally posted by Gary Thomas
                        actually, AministrationLevel2 - love that name
                        Please gag yourself with a sodden bureaucrat!

                        Your approach sounds fine, and I think the simplifications can even be broader. We can discuss details later...
                        Project Lead for The Clash of Civilizations
                        A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
                        Check it out at the Clash Web Site and Forum right here at Apolyton!

                        Comment


                        • #27
                          Suppose each square, on average, has 2 ethnic groups (most will have 1, some much more). This gives 80,000 ethnic groups.

                          Assume each ethnic group has five social classes. This gives 400,000 social classes.

                          Each social class is characterized by the degree to which it contributes to a social role, of which there are five. This gives 2,000,000 social role contributions.

                          A contribution to a social role will consist of a reference to the role and a number. 12 bytes is about right. So we have 24Mb.

                          24Mb of memory just to record ethnic groups?

                          In addition, each of these must be accessed each turn. At a guess, but with some knowledge of the code, I would say something like 10 minutes per turn on a reasonably fast machine.

                          Do we have a problem here, Houston?


                          Um, I don't think I understand the math here, then.


                          If pointers to EGs are stored at the lowest level, but you decide from a scenario-to-scenario basis what level to deal with EGs on, you math is radically far off.

                          For a full-world game, you should likely choose to only have one, two, or three EGs per province. All MapSquares in a province would simply point to the *same* EG. And you can even change that to all MapSquares in a civ pointing to the same EG. You can even use the architecture to point all mapsquares to just a single EG. The architecture allows the ultimate flexibility. For starting testing, I'd suggest just a few total, for the whole map. You can just have 3 or 4 EGs, for testing purposes. That'll simulate a typical 'Civ' or 'Alpha Centauri' type game, to begin with.

                          So for a full world game, you certainly wouldn't store individual EGs per mapsquare, just have several mapsquares point to a single EG, depending on the scenario requirements.

                          Same with econ, same with social groups, etc.

                          Am I missing something?

                          And this is architecture will be vital for implementing a really good RuleBase for the rules engine, won't it?

                          Comment


                          • #28
                            What we will need is a way to move all this stuff up to the provincial level for whole-world games.


                            Unless something has radically changed since I built the thing, that should be what you've got.

                            Comment


                            • #29
                              Hi Joe:

                              Thanks for the refresher, I had forgotten about us finally converging to using pointers at the square level. We argued about it for a month, you'd think I'd remember... although is was probably more than a year ago at this point. Its definitely Not as trivial as just having the pointer point to somewhere else though. There is an Awful lot of bookkeeping code that will need to be added, especially on the economy end, to make things turn out right. But the pointer-at-square level does seem to be the way to go to make the system flexible. The memory footprint would still be fairly large, but perhaps manageable.

                              Unless something has radically changed since I built the thing, that should be what you've got.
                              Now this comment I Don't understand. You did Absolutely everything at the square level. That was all there was in your code AFAIK.

                              Hope you're doing great.

                              Cya,

                              Mark
                              Project Lead for The Clash of Civilizations
                              A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
                              Check it out at the Clash Web Site and Forum right here at Apolyton!

                              Comment


                              • #30
                                Hi. Sorry I'm out of pocket so much. I'll just drop in once every few months to ask about something I probably misunderstood!

                                Ya'll are doing a great job, I don't mean this as criticism in any way. I just didn't understand this, so asked.

                                You did Absolutely everything at the square level.

                                There are pointers at the square level. And I don't understand, how can it require more code for 'bookkeeping'? How are you implementing an 'economy'? I was assuming that you have a 'rules engine' that runs the turn handling, and that one rule would get all the mapsquares and call an 'update' or some such method on the mapsquare, then all MapSquares would do their own calculations in one simple loop?

                                I thought you were doing:

                                Iterator it = getAllMapSquares();

                                while(it.hasNext())
                                {
                                MapSquare msq = (MapSquare)it.next();
                                msq.update();
                                }

                                That handles the entire economy turn. I'm sure that's how you're doing it, isn't it? If I'm mistaken (my memory really stinks, and I haven't looked at the code since last summer or so).

                                I don't think there would be any extra bookkeeping. In fact, doing it any other way will likely complicate things. Especially for the EG objects, as I mentioned, all you have to do is make one single EG and point all MapSquares to it. Then scale up as you want. One interesting option is starting the game with one EG, and then having it split over time, in different places, to some maximum. So you start with a small 'tribe' of humanity and then get diversity.

                                As far as memory, for 10,000 squares each pointer is 8k, so with the 2 EGs per square estimate you get 160k to hold the entire thing at the MapSquare level.

                                Other than that, you only have to define the individual EG objects, which you'll have to do anyway, however many you decide to have.

                                Comment

                                Working...
                                X