Announcement

Collapse
No announcement yet.

Final (5.3) Tech Dynamics

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #76
    I have just finished reading a book by Gerry Weinberg and Don Gause (psychologists of programming) called "Are Your Lights On?"

    I fear that my lights are off. I have come home a day early (taking Friday off) so I would have three clear days to get the input utility done.

    And I left all the source code I had written behind.

    Of course what programming project doesn't have slippage...

    So I guess I will spend the next three days on other aspects of the system. For example, my XML code uses the the Apache xerces implementation. This is a jar file 1.49Mb long. It won't fit onto a floppy disk. On the other hand, we only use a small part of it, and the source code is available. So I will extract the required part of the source code and incorporate it in the Clash input utility.

    Which leads immediately to my next topic. Game save status, individual user configurations, and other aspects of the game could all be stored in XML format. I have tried to write the input and storage classes in a general way. Also, Java streams allow, in a very simple way, any files to be zipped. This makes them smaller (obviously) and also makes them somewhat less easily hacked. Alternatively I can quite easily write a triple DES encryption system to make them completely unhackable. This I see as a possible later addition.

    The question of Applications. Here is Richard's comment:
    quote:


    No, applications and technologies are very different things. Applications do not have helpers and they do not process RP's in any way. They do not have tech levels or knowledge associated with them. Their level depends entirely on the level of the technologies they are associated with. They only rise and fall when the associated technologies rise and fall. This is not at all like the effects of helper techs.


    and an earlier quote:
    quote:


    For individual Technologies:

    m = GrowthRateMultiplier
    c = UpkeepMultiplier
    default DR = RPDiminishingReturnsMultiplier
    Ts = StartLevel
    O = HelperLevelOffset
    h = HelperTechEffect
    I = ExternalGrowthRateMultiplier
    E = ExternalUpkeepMultiplier
    L = ApplicationLongevity


    The last entry appears to apply to Applications. However, I am not sure.

    Do applications have Requirements? If so, do the requirements have start values?

    How do the actual objects (units, buildings, whatever) interact with the corresponding application? Can the application be viewed as "permission to build"?

    As an aside, while I and E are in view, I do not think that one should program for futures. That is, if something isn't actually in the model, it should be left out, and added later if necessary. There is an extensive literature (starting with Kent Beck et al in the XP web site) all of which says the programming for something that might be used is counter-productive. I refer you to website at www.xprogramming.org. However, here is a quote from that website:
    quote:


    You’re NOT gonna need it!

    Often you will be building some class and you’ll hear yourself saying "We’re going to need...".

    Resist that impulse, every time. Always implement things when you actually need them, never when you just foresee that you need them. Here’s why:

    Your thoughts have gone off track. You’re thinking about what the class might be, rather than what it must be. You were on a mission when you started building that class. Keep on that mission rather than let yourself be distracted for even a moment.

    Your time is precious. Hone your sense of progress to focus on the real task, not just on banging out code.

    You might not need it after all. If that happens, the time you spend implementing the method will be wasted; the time everyone else spends reading it will be wasted; the space it takes up will be wasted.
    You find that you need a getter for some instance variable. Fine, write it. Don’t write the setter because "we’re going to need it". Don’t write getters for other instance variables because "we’re going to need them".

    The best way to implement code quickly is to implement less of it. The best way to have fewer bugs is to implement less code.

    You’re not gonna need it!



    Now, Civization Activities. This is starting to look more like an interface than an object, though, like all interfaces, they will have objects which implement the interface. One possibility is to use the Observer/Observed interface. If this is used, we then have a TecnologyActivity object which implements the CivilizationActivity interface.

    Must go now - the phone is needed.

    Cheers

    Comment


    • #77
      Sorry about that. That list you quoted was never meant to be a list of what should be put in the GUI. It was simply a listing of all the variables used. I only meant to make the distinction between variables that were needed once per system and ones that we needed a lot of.

      E and I will be important, but I just realized that I misplaced them. They would work a lot better if they were a part of the Civilization Activity class. They are both based on the society, and it was decided earlier that the different Civilization Activities would have different growth rates, based on the values of the society. So they would be used in a different set of equations.

      I have another idea that could help the system. I know that programmers absolutely hate this, and I'm sorry. But this is a small change and shouldn't take too much time.

      Currently, the helper tech effect is based on the difference between the helper tech level and the starting helper tech level. This means that if Physics level 70 is a requirement and Physics started at level 10 and it is now level 80, the new tech would instantly get 70 tech levels worth of help. That has been shown to have the potential to make problems.

      But what if the helper effect was beased on the difference between the requirement and the current level of the tech? That would mean that the new tech gets no help at the start, and in the above example it would only bel helped by the ten levels of Physics above the requirement. I think this would work better, and it is a lot closer to Mark's initial proposal for helper techs.

      Helper techs can now have a negative inpact, as is logical. A few quick spreadsheet tests have confirmed that a reasonable amount of tech loss occurs when the helper drops below the required level.

      I realize that the application system has not been clearly defined in one place. Let me attempt to fix that. But first, I'll organize the variable names better.

      -----

      This chart is an attempt at a complete list of the variables used by the system. Mark and LGJ, please review and check it for accuracy and throrughness.

      Black variables will be input in the GUI, and red ones are numbers from other sources that will be used in calculations.

      General Values (Once per System):

      default m = BaseGrowthRate
      default c = BaseUpkeep
      default W = BaseGlobalHelperEffect
      default DR = BaseRPDiminishingReturns
      MV = MultiplierVariable (typically 2)
      GV = GrowthVariable (typically 10)

      Technology Values (Once Per Tech):

      m = GrowthRateMultiplier
      c = UpkeepMultiplier
      DR = RPDiminishingReturnsMultiplier
      Ts = StartLevel

      (Set Helper Technologies)


      Tn = InitialTechLevel
      Tn+1 = FinalTechLevel
      H = TotalHelperEffect


      And the helper equation is now:

      RHL = h1*(HT1-Ts1+O1) + . . . + hx*(HTn-Tsn+Ox) (Variables defined below)

      TotalHelperEffect = MultiplierVariable^(RHL/BaseGlobalHelperEffect)

      For Helper Techs (Once for each of a technology's helper techs):

      h = HelperTechEffect
      O = HelperLevelOffset
      Ts = TechRequirement

      HT = CurrentValue


      For Applications (Once Per Application):

      L = ApplicationLongTermGrowth
      G = ApplicationShortTermGrowth
      F = ApplicationLossModifier

      E = ApplicationEffectiveness


      (Required Technologies)

      For Required Techs (Once for each of an application's required techs)"

      R = TechRequirement
      h = TechEffect

      T = CurrentValue


      E will be calculated for each application as follows:

      (For readability, I'll use the shortened names. Otherwise the equations would be much wider than a page.)

      RTL = h1*(T1 - R1) + . . . + hx*(Tx - Rx)

      E = RTL*G + (1+.1*(MV-1)*L) ^ (RTL/GV) when RTL is positive or zero.
      E = (GV+RTL)*F when RTL is negative.

      Whew. I hope all that was complete and accurate.

      Comment


      • #78
        Gary:

        I think that XML input and output are only really useful in the long-term for the specification files associated with things like technologies, economic goods, infrastructure, military units, and AI tendencies. Putting the whole save file for the game out as XML seems to me unnecessary, since the save file would then be prohibitively large. The game data itself will probably be several MB, and once you wrap that all in XML, well, the mind boggles...

        I like your XP quote. When you get a chance you should put it on the coding discussion page.

        Richard:

        I think you did a great job with this synopsis! The only thing I didn't like about the variables stuff was:

        Ts = TechRequirement
        That is confusing since Ts has another meaning...
        Can we use:
        Tr = TechRequirement? Just so there is no confusion between starting tech levels and tech requirement levels?

        I think your new helper tech formula is better than before... As I bet you thought I would but as I explained to you in an e-mail a few weeks ago, I still think your approach on the helper tech's still fundamentally is Not going to work, and fear you're going to have to go back and make tremendous changes at a later date. Since Gary and the others haven't seen my analysis of what is wrong with the system, I'm going to go ahead and post it here. One note here, I wrote this before Richard proposed the new helper tech formula. The quoted e-mail uses the old formula, but I believe the fundamental issues I'm bringing up are still relevant with the new formula, just slightly subdued. For that reason (and innate laziness ) I haven't edited the previous text to update the formula.

        Previous e-mail starts here...

        As an outgrowth of the work I'm doing on the technology model, I think I've identified a very serious problem with your helper tech expression. The problem occurred in the change that you made so that you can handle computers and such in the way you prefer. I believe the new expression (which I've copied below) doesn't give the right scaling behavior for helper techs as tech levels change from numbers like 10 to numbers like 100.

        THL = h1(T1-Ts1+O1) + . . . hn(Tn-Tsn+On)
        where T1 through Tn are helper technologies
        H = MV^(THL/2W)

        I think I can make my point most clearly by considering a technology that has no helpers, call it A, and a technology B that has a single helper. Because A has no helpers, that is equivalent to H = 1 whether you are at the low-tech end (10), or the high-tech (100). Now let's assume that A and B are supposed to *on average* grow at the same rate. (Obviously because B has a helper tech, depending on the helper tech you would expect it to either grow somewhat faster, or somewhat slower than A.) For simplicity I will assume that all starting tech levels and offsets are 0, that MV is 2, that h = 5 and that W is set so that A and B grow similarly at an overall tech level of 10. So we want H for B = 1. If we assume that when B and A are 10, B's helper is also at a level of 10, then W would have to be very large to have H be approximately 1. That's is not a very satisfactory solution, so I'll relax one of my assumptions, and say that we will change the offset to -10. I will follow your rule and have W=3h for 'safety'. But now at the very start of the game, when all techs might be around the level of 1, H = 2^(-9/3) = 1/8. So two techs that by construction are supposed to grow equally Can't over any reasonble range of techs with your model. When we get to tech = 100 then H = 2^(90/3) which is Vastly different from 1 that we have for tech A.

        In short, the Only way to make A and B behave similarly on average is to make W preposterously large, basically eliminating the helper function entirely. I really think this system is broken, and we're going to find other bizarre things like this. Before you spend lots of time putting in values I encourage you to test your spreadsheet over the broad ranges of tech values that will occur in the game.

        And the same problem occurs when you contrast techs with "low strength" helpers, meaning something like a single or two helpers that have low helper coefficients, with "high-strength" helpers. I'm not going to go through the whole presentation again, but it appears to me that unless we are willing to stick with the specification that Absolutely Every Technology Must have a set of helper technologies with roughly equal "strength" this system is fundamentally flawed.

        Old e-mail ends here...

        I'm not trying to be provocative or abusive, just trying to save what appears to me to be enormous amounts of potentially wasted effort.

        IMO we should go back to the old formula:
        THL = h1(T1-T+O1) + . . . hn(Tn-T+On), where T is the level of the tech that is being helped. For those who weren't here for the long, drawn out, previous discussion, what this the equation requires that all technologies increase levels at a roughly similar rate throughout the game. It doesn't mean there can't be fairly large imbalances, but a large imbalance would be a spread of 20 points or so between best and worst technology level. I completely realize this precludes your (Richard) doing technologies like computers as you wish. (Quick synopsis; computers could start at a level of say 10, even though most other techs are 60 at that stage of the game). I think we can easily handle your previous objections about how computers would work by simply making Computers an application with an effectiveness parameter that grows very rapidly as some Skill like "Computational Machines" grows above the 60, or whatever, level.

        I realize I haven't laid out my arguments in an airtight manner, or one that can be necessarily understood by everyone. But hopefully I've outlined enough of what I think the problems are, and the solutions might be, that we can figure out whether my ideas are all wet (in which case I'll apologize ) or are mostly correct.

        -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


        • #79
          Not to be picky, but just to be clear for anyone who wants to use this for making differnt scenerios, the Civilization Activities 'Health' should be renamed 'Health and Biology'...also we need to add 'Chemistry' and 'Eletronics' or whatever you want to call them....i looked over that list Rich and i couldn't find a place to put 1> Gunpowder (unless you want pure science because gunpowder was not oginally used for 'Military') and also modern electronic devices such as computers and other stuff except infrastucture which doesn't make sence. I think with that we can now cover all Real World stuff.
          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


          • #80
            quote:

            Ts = TechRequirement
            That is confusing since Ts has another meaning...
            Can we use:
            Tr = TechRequirement? Just so there is no confusion between starting tech levels and tech requirement levels?


            The cryptic names like Ts will probably be phased out soon anyway. They aren't very user-friendly, so we should probably switch to the programming names listed.

            ---

            Mark, your analysis was skewed by the number that you used. Typical HelperTechEffect (h) values will be in the range between .1 and .5 The value you used, 5, was 10 times larger than what will be used in the game, so that greatly exaggerated the effect of the helper tech.

            But on a more general note, I think that staying with this system would take a lot less effort then switching. There are a lot of simple things we can do to eliminate any potential imbalance.

            Look at these two technologies:

            A RP % Tn+1 THL
            45 0.17 44.87 0
            B RP % Tn+1 THL
            45 0.17 45.25 18

            They are exactly identical, except for the helper. Note that the total difference between the two results in this case is only a level of .38 Now look at what happens with a slightly different RP distribution:

            A RP % Tn+1
            45 0.2 45.00
            B RP % Tn+1
            45 0.14 45.05

            The difference is practically erased. This simple fix will scale up and down to different levels and RP inputs. The difference due to helper techs can be easily dealt with using slight changes in the distribution of RP's.

            So how do we arrange this change in RP's? The system already has a way: The ActivityAffectFactor (Z values) associated with Civilization Activities. Techs with a higher total of factors will get more RP's. So if we want techs to rise at the same rate, all we have to do is follow a simple design rule: If a tech has a lot of helpers, it should get less ActivityAffectFactors, and vice versa. That way, tech with fewer helpers get more RP's and tech with more helpers get less, so they advance equally.

            Of course, techs will not generally rise at the same rate anyway. With this system, they don't have to. They will probably rise at different rates, like they have throughout history. The science of cannons rose a lot more than the science of agriculture did in a similar amount of time. Knowledge of cannons doubled many times in a few hundred years, while the knowledge of agriculture only rose a small amount in that time. There are countless examples of this type of growth disparity. If all techs were supposed to be close to the same level throughout history, chaos would ensue. The tech levels would lose all meaning if Agriculture and cannon technology rose by the same amount from 1450 to 1750.

            I am quite sure that there is only one thing that can ruin this system. That would be the violation of the scaling rule that says that the amount of knowlegde is multiplied by MultiplierVariable every time the tech rises GrowthVariable levels. The smooth running of everything, all the applications and equations for growth, depends on that rule. Yes, it would be possible to work around this scaling rule, but doing so would take far more time and effort than a little alteration of ActivityAffectFactors and HelperTechEffect values.

            Comment


            • #81
              I'd have to disagree, LGJ. Chemistry and Electronics are not major civ activities. They are tools that let the civ do other things. Electronics would fall under categories like "Communications & Media" and "Research" Similarly, The Biology technology is associated with the "Health Care" and "Food" Civilization Activities. Chemistry, like many Tier 1 techs, is used for many things, so it will get RP's from many Civilization Activities and it will aid many Civilization Activities.

              Actually, there is a more current list that is based on the infraclasses. I had forgotten about that earlier.

              quote:


              Idea: All infraclasses should be tech tags. Since the technology is designed to reflect what people do, I can fix the tech model so that there is a tech tag for every infraclass this model has. This way, the tech model can generate exactly what the econ model wants. Each infraclass will then have an ideal tech level T and an actual tech level A.
              The connection helps the tech model as well. Investment in a certain infraclass would generate tagged RP's for that tech tag. These RP's are then distributed among the techs. This should be a relatively painless way to connect RP production to economic activity.

              So the current list of tech tags would be:

              Infraclasses:
              Food (All Agricultural research)*
              Consumed goods (Standard of Living?)
              Welfare (Standard of Living?)
              Education
              Research (Pure Science)
              Religion (and Philosophy)
              Housing
              Durable Goods (?)
              Health Care
              Water & Sewage
              Power & Heating
              Communications & Media
              Transportation
              Recreation & Luxuries
              Administration (Government and Politics)
              Financial Infrastructure (Cash Flow and Economics?)
              Nature Preservation (Disaster Prevention and Ecological Studies?)
              Military Infrastructure
              Military Units
              Kapital Investment (Production Technologies)

              *The names in parentheses are the previous names for the tech tags. In some cases I had to extend the infraclass definition a little to get them to match. A question mark means I'm not sure what the infraclass means or I'm not sure if the match is good, so please give feedback on this.

              Others:
              Exploration/Movement
              Diplomacy and Propaganda
              Prospecting and Extraction

              Comment


              • #82
                Hey Richard:

                Well I don't want to spend 20 hours going over this, so just a few points:

                You said way back when that your system would be easier to modify than a traditional civ2 system. It seems to me that with our scads of parameters that have to be finely tuned it is nothing of the sort. FE your stated proposal to tweak Z values until the system works means that adding even a single new tech can then require a lot of work to rebalance everything. When I add a tech that helps something else, I have to rebalance Z values for all the helpers with that same tag, or the balancing won't be correct (it appears to me). Adding three new techs could become a weekend project. This is just speculation at this point, but please keep it in mind.

                Also the Z values IMO should reflect Real Importance of the tag to the tech in question, not essentially arbitrary tweaking to keep the centrifugal tendencies of the system in check so it doesn't explode.

                But in truth, its your potentially wasted effort if the system as described doesn't work out, so I'll back off again so I can return to coding. Since my annoying people full-time on design issues is what lead the project to stall for quite a bit in the demo area .

                BTW Cannon should be an Application, at least in my view, so they can grow in effectiveness arbitrarily faster than Agriculture just like Computers...
                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


                • #83
                  We only have to tweak the values if we insist that the techs rise at a similar speed. Even so, these kinds of tweaks are nothing compared to what would be required if we insisted that all techs should be the same at all times. Also remember that the RP input is only one way to tweak the tech. There are many other ways to adjust how quickly it will rise. For exampl, we could assign diminishing returns to techs that have lots of helpers. Remember that in our tests, we almost always keep many things the same, thus hiding our ability to adjust the system.

                  I have tried to make a civ 2 scenario with a custom tech tree. That was harder than anything I have done with this system.

                  Tweaking the techs on the spreadsheet is a very easy and painless process. Maybe it would get more diffficult if all the techs were in different windows. So after the tech builder is done, we might want to write a "tech adjuster" that resembles the spreadsheet. It would take data from the tech builder and display the techs in a list format, where all the values could be fixed on one screen.

                  Comment


                  • #84
                    I will isolate all the technology formulae in such a way that they can be altered easily without affecting the overall program. In an extreme case the calculation classes could be read in as data, so you could have a menu of possible algebraic models to choose from.

                    On the other hand, the more parameters, the bigger job in tuning, as Mark has pointed out.

                    Cheers

                    Comment


                    • #85
                      With no instructions or help other than my problem solving skills and excess of free time, I have managed to upload the tech spreadsheets to my school VAX account and provide a working link to them in my website.

                      Comment


                      • #86
                        quote:

                        I'd have to disagree, LGJ. Chemistry and Electronics are not major civ activities. They are tools that let the civ do other things. Electronics would fall under categories like "Communications & Media" and "Research" Similarly, The Biology technology is associated with the "Health Care" and "Food" Civilization Activities. Chemistry, like many Tier 1 techs, is used for many things, so it will get RP's from many Civilization Activities and it will aid many Civilization Activities.
                        Actually, there is a more current list that is based on the infraclasses. I had forgotten about that earlier.

                        Well with what you've added i will yeild on chemistry and electronics and see how things go. As for health care and biology though, i cannot because Health Care doesn't include things like transgenetics, learning more about how to better harvest trees on tree farms, etc. Nor does ecology as it deals with interactions with the indivisuals, groups and the enviroment. Health care is dependant 100% on biology, but not the other way around.
                        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


                        • #87
                          quote:

                          things like transgenetics, learning more about how to better harvest trees on tree farms, etc.


                          That would be under the Food Activity. Besides, Transgenics would probably be a Tier 2 or 3 tech of its own, with Biology as a helper. This tech would be associated with Production Technologies as well as food and health care.

                          As for the ecology aspects, we have an Activity for that and Biology would certainly be associated with it.

                          Comment


                          • #88
                            A quote from Richard:

                            quote:


                            One possible source of confusion is that "Z values" were also sometimes called "tech tags." The Z value is the number that shows how much the tech is connected to a certain Civilization Activity. A Z value of 10 means that the tech is very important to that activity, so it will recieve a large share of RP's, and will have a big impact on other models that use the data from the Civilization Activity. Z values of 1 or 2 represent a small effect. If the tech does not relate to the Civilization Activity at all, the Z value is zero.

                            The Z value is what is defined in the GUI Tech Builder. The default would be zero, in which case the Civilization Activity is not listed in the editor. The tech tree creator would select from the available list of Civilization Activities and assign a Z value to it. Each tech would typically have 1 to 4 nonzero Z values, meaning that it affects one to four Civilization Activities.

                            A programmer's name for the "Z value" might be "ActivityAffectFactor."



                            Probably intended to be ActivityEffectFactor, where the "Factor" part doesn't add information. I would use ActivityEffect.

                            On the other hand, also quoting Richard:
                            quote:


                            Technology Values (Once Per Tech):

                            m = GrowthRateMultiplier
                            c = UpkeepMultiplier
                            DR = RPDiminishingReturnsMultiplier
                            Ts = StartLevel

                            (Set Helper Technologies)


                            Tn = InitialTechLevel
                            Tn+1 = FinalTechLevel
                            H = TotalHelperEffect


                            And the helper equation is now:

                            RHL = h1*(HT1-Ts1+O1) + . . . + hx*(HTn-Tsn+Ox) (Variables defined below)

                            TotalHelperEffect = MultiplierVariable^(RHL/BaseGlobalHelperEffect



                            There is no mention of Z values or activity effect factor here. Presumably it should be part of the technology data at read-in.

                            Is it intended that the Activities be hard-coded or read in? I recommend (as always) the latter.

                            Activities are, it seems, a list of types. There will need to be objects which actually do something. So one of the other models will create an instance of an activity, assigning RPs for example. Some mechanism will have to be put in place for the technology objects to be aware of these activities. I will think about it.

                            One of the most important requirements of OO programming is that every object must be created and have an owner, with destruction rights. This needs to be quite specific in the program design. I am not sure how Activities fit within this framework.

                            Turning now to Applications, shouldn't an Application have a name? Also, how does a particular Application get associated with, say, a unit or a building?

                            Am I right in assuming that Technologies have Helper techs, but no Required techs, but Applications are the other way round?

                            What is RTL? It does not seem to be on the extended name list.

                            It does seem that the only difference (apart from the context in which they are used) between helper and required techs is the existence of an offset in one of them. My inclination is to use a single class for both. Mark would be happy about that - helper techs would once again be stand-alone classes rather than inner classes.

                            Cheers

                            Comment


                            • #89
                              quote:

                              Originally posted by Gary
                              There is no mention of Z values or activity effect factor here. Presumably it should be part of the technology data at read-in.[q]

                              D'oh! I had a feeling I was missing something. Yes, they should be there.

                              [q]Is it intended that the Activities be hard-coded or read in? I recommend (as always) the latter.


                              Yes, read-in. For Demo 5, all activities will be associated with Infraclasses, as defined in the Economy model. As the investment machine spends resources on infraclasses, RP's will be generated and assigned to the corresponding Civilization Activity. Don't worry about how many RP's are generated per resource spent. I can change the BaseGrowthRate (default m) and BaseUpkeep (default c) values as needed.

                              The Activity methods will then distribute the RP's as follows:

                              quote:


                              A preliminary idea for distribution or RP’s would be to give each tech a percentage of the total RP spent as follows:

                              For every tech [associated with that Activity], raise 2 to the power of Z/2 and then subtract one. Call this the Y value.

                              Add up all of these values to find the X value.

                              Each tech gets a percentage of the total RP’s spent equal to Y / X.


                              This hasn't been discussed in detail yet, and is certainly open to new ideas. Note that I eliminated the part about changing the distribution based on techs that are falling behind. After thinking about this aspect of the distribution syatem, I have concluded that it would be too complex and potentially troublesome to add in right now. We can add it after we see how the system works normally. We might not even need it.

                              quote:

                              Activities are, it seems, a list of types. There will need to be objects which actually do something. So one of the other models will create an instance of an activity, assigning RPs for example. Some mechanism will have to be put in place for the technology objects to be aware of these activities. I will think about it.

                              One of the most important requirements of OO programming is that every object must be created and have an owner, with destruction rights. This needs to be quite specific in the program design. I am not sure how Activities fit within this framework.[q]

                              For now, the Economy model could be the other model that creates Activities and "owns" them. We will add other Activities later, but for Demo 5 the list of infraclasses above will do fine.

                              [q]Turning now to Applications, shouldn't an Application have a name? Also, how does a particular Application get associated with, say, a unit or a building?


                              An application is a unit or building. More specifically, it is the ability to build that thing and it tells how effective that thing will be. It is (correct me if I'm wrong, Mark) a class, and everything the civ produces with that name is an instance of that class. In addition to describing what the things do (their primary purpose), the Application classes will have the functionality that connects their actions to the tech model. Legion and Cathedral are examples of Applications. They become available when the civ reaches a certain level of technology. The Legion's battle power will vary as the levels of the associated techs vary. The cathedral's ability to make people happy will vary as the associated techs vary.

                              If you play Civ 2, you know that the Monotheism technology allows the construction of the Cathedral application. Then the Theology tech makes the cathedrals more effective, and the Communism tech makes them less effective. The tech model affected Cathedrals, even though "Cathedral" was certainly not a technology. It works the same way here. Applications actually "belong" to other models and not the technology model. The model never gives RP's to a Legion or a Cathedral, and those types of things will not directly affect the rest of the tech model at all. They are simply "by-products" of research.

                              quote:

                              Am I right in assuming that Technologies have Helper techs, but no Required techs, but Applications are the other way round?


                              Those are the names, yes, but note that a certain level of a helper technology might be required for a technology to exist, making that technology a requirement as well as a Helper..

                              quote:

                              What is RTL? It does not seem to be on the extended name list.


                              RTL is not a programming or game model concept at all. It, like RHL, is simply a way to make the equation look less messy and ugly. Those two things do not exist outside of those equations, and they are only in the equations for readability.

                              quote:

                              It does seem that the only difference (apart from the context in which they are used) between helper and required techs is the existence of an offset in one of them. My inclination is to use a single class for both. Mark would be happy about that - helper techs would once again be stand-alone classes rather than inner classes.


                              Sounds fine. If it makes your life easier, but only if it makes your life easier, you can go all the way and give Applications and technologies exactly the same data structure. Maybe they could be the same class, or inherit from the same class, whatever works and is easier. Then we can disable the application functionality in the "techs" and disable the tech functionality in the "applications" even though they are the same thing. Then, later, we might be able to reactivate that functionality for modpack purposes.

                              Comment


                              • #90
                                Originally posted by Gary
                                quote:


                                There is no mention of Z values or activity effect factor here. Presumably it should be part of the technology data at read-in.


                                and the reply:
                                quote:


                                D'oh! I had a feeling I was missing something. Yes, they should be there.


                                Each technology would then have a list of relevant activities, with the ActivityEffect.

                                It worries me that this system does not shut off technologies. When a civilization is researching interstellar space travel it will still be allocating research point to the development of the bow and arrow.

                                quote:


                                A preliminary idea for distribution or RP’s would be to give each tech a percentage of the total RP spent as follows:
                                For every tech [associated with that Activity], raise 2 to the power of Z/2 and then subtract one. Call this the Y value.

                                Add up all of these values to find the X value.

                                Each tech gets a percentage of the total RP’s spent equal to Y / X.



                                This system has problems if the Observer/Observable model is used. When the Observer (the entry in the TechnologySet table) gets a signal, it has no way of knowing how many other technologies are also getting the signal, so it cannot add up the values in this manner. The only way that I can think of to get around this problem is to have an Activity object holding a list of technologies, and the proportion to go to each. Then, when it signals to the Technology object, it can work out the correct percentages.

                                quote:


                                For now, the Economy model could be the other model that creates Activities and "owns" them. We will add other Activities later, but for Demo 5 the list of infraclasses above will do fine.



                                I will check the economy model for this aspect.

                                quote:


                                An application is a unit or building. More specifically, it is the ability to build that thing and it tells how effective that thing will be. It is (correct me if I'm wrong, Mark) a class, and everything the civ produces with that name is an instance of that class. In addition to describing what the things do (their primary purpose), the Application classes will have the functionality that connects their actions to the tech model. Legion and Cathedral are examples of Applications. They become available when the civ reaches a certain level of technology. The Legion's battle power will vary as the levels of the associated techs vary. The cathedral's ability to make people happy will vary as the associated techs vary.



                                The connection between the actual unit or building, and the tech hierarchy can be achieved in one of two ways:

                                1. Inheritance. Every "thing" which is an Application inherits from a base Activity class.
                                2. Containment. Every "thing" which is an Application contains an Activity object, as described above, with the required properties.

                                The second option is much the better one, since it is more reasonable to have a military unit inherit from another military unit. In addition, this option allows an Application to be influenced by more than one Activity, which can only add power to the game.

                                It will mean that other coders using the Application system will have to point their instances of objects at the correct Activity.

                                quote:


                                RTL is not a programming or game model concept at all. It, like RHL, is simply a way to make the equation look less messy and ugly. Those two things do not exist outside of those equations, and they are only in the equations for readability.



                                I now see that they are working variables. I think I might call them "Esmeralda" and "Clementine" in the code.

                                Cheers

                                Comment

                                Working...
                                X