|
Author
|
|
Topic: Final (5.3) Tech Dynamics |  |
|
Richard Bruns King NC, USA Nov 1999
|
 |
posted March 23, 2001 00:23
 |
 |
 |  |
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
 |
|
Mark_Everson Clash of Civilizations Project Lead Canton, MI, USA b.02-15-99
|
 |
posted March 23, 2001 07:30
  |
 |
 |  |
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... |
Richard Bruns King NC, USA Nov 1999
|
 |
posted March 23, 2001 09:26
 |
 |
 |  |
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. |
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted March 23, 2001 16:08
 |
 |
 |  |
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
|
Richard Bruns King NC, USA Nov 1999
|
 |
posted March 24, 2001 14:24
 |
 |
 |  |
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. |
Lord God Jinnai Prince Arnold, Mo 63010 Sep 1999
|
 |
posted March 26, 2001 10:33
  |
 |
 |  |
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. |
Richard Bruns King NC, USA Nov 1999
|
 |
posted March 26, 2001 14:12
 |
 |
 |  |
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. |
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted March 27, 2001 18:16
 |
 |
 |  |
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 |
Richard Bruns King NC, USA Nov 1999
|
 |
posted March 27, 2001 19:32
 |
 |
 |  |
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. |
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted March 27, 2001 20:22
 |
 |
 |  |
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
|
Richard Bruns King NC, USA Nov 1999
|
 |
posted March 27, 2001 21:28
 |
 |
 |  |
quote:
 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.
 |
The current tech tree is designed so that this is not a problem. The Bow is an Application, and the relevant technology would be "Ranged Weapons" among other things. A bow might come at Ranged Weapons level 10 and Woodworking level 15. A plasma rifle might come at Ranged Weapons level 150 and Particle Physics level 140. But some custom designed tech trees might require temination of some sort. I guess there could be a flag that simply stops advancement at a certain level, holds the level where it is, and cuts the tech out of the RP allocation. But if we are not careful, the players will aim for those points so they don't have to spend the RP on upkeep. quote:
 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.
 |
I assumed that was the plan all along. The Activity objects were meant to distribute the RP's using data they gathered from the other objects. quote:
 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.[q] I don't understand why there is a direct connection between Activities and Applications. Activities determine how RP's are distributed to Technologies. The Technologies turn those RP's into tech levels. The tech levels then determine application effectiveness. The only direct connection I can think of is that creating an Application using the Economy model will generate RP's that are assigned to an Activity, since each Application is created by devoting resources to an Infraclass. I don't know the proper programming terms very well, so please don't assume that I am telling you how to do something. I'm just trying to explain how we want the model we designed to work. If something I ask for is too difficult too implement, we can certainly make a few changes. [q]The second option is much the better one, since it is more reasonable to have a military unit inherit from another military unit.
 |
I don't understand this one. Does it mean that you want one unit to be a prerequisite for another in the tech tree? quote:
 In addition, this option allows an Application to be influenced by more than one Activity, which can only add power to the game.
 |
This already happens indirectly. Technologies are influenced by one or more Activities, and Applications are influenced by one or more Technologies. |
Richard Bruns King NC, USA Nov 1999
|
 |
posted March 27, 2001 21:37
 |
 |
 |  |
Oh, I think I see the problem now: quote:
 For every tech [associated with that Activity], raise ...
 |
quote:
 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...
 |
It seems to me that you thought I was asking you to run the equations in the Technology objects. I didn't mean that. This equation would be run in the Activity object. The equation generates the RP's for each tech, and then passes the RP number to each tech. And even if I wanted them to be run in Technologies, don't hesitate to ask for model changes if it causes problems like that. The thing I've tested and worked on most is the equations in the spreadsheet, everything else like the way data is passed around can change pretty easily if it causes a problem for programming. By the way, what is the TechnologySet table? |
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted March 27, 2001 21:38
 |
 |
 |  |
Richard: Sorry, my post had errors - my boss showed up as I was typing, and I panicked and sent the post. By the time I got back to edit it you had answered!Here is what I meant to say: 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 Application class which contains the requirements, etc. 2. Containment. Every "thing" which is an Application contains an ApplicationSpecification object, as 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 a number of Applications to have the same relationship to the tech structure, by using the same ApplicationSpecification object. It will mean that other coders using the Application system will have to point their instances of objects at the correct ApplicationSpecification, which must be created by them, and registered with the tech structure as observable. I hope this makes more sense. Cheers |
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted March 27, 2001 21:57
 |
 |
 |  |
I really should give up this doing my posting from work. Unfortunately, my home email connection is 100 miles away, and I don't get to it until Friday. In the meantime, I have no telephone connection in my hotel room, and the cyber cafe around the corner is ridiculously expensive. My post crossed your further comment! What time of day is it where you are? It is 3pm Wednesday her. The TechnologySet is specific to whatever entity has technologies. It may be a civilization, or a province or (heaven forbid) a map square. There is nothing in the technology coding that prevents any combination to be used. The TechnologySet has a level value for each technology, for the particular entity (civilization, etc), and a link to the relevant Technology. The Technologies themselves are unchanging, and the same for all civilizations. The TechnologySet is required, because the calculation of tech rises has to be able to access the helper tech levels. The TechnologySet will probably have its name changed to TechnologyLevels. It is actually a hash map, with: Technology object as the key Level and NewLevel as data (float) The process is: 1. Work through the TechnologySet, tech by tech 2. Pick up the Level for the tech 3. Look up the Technology object and get the help list, and the parameters 4. Look up each of the helpers in the TechnologySet and get the levels 5. Perform the calculations 6. Store the result in NewLevel Then, when all have been calculated, 7. Work through the TechnologySet, tech by tech 8. Set the Level to NewLevel Cheers |
Richard Bruns King NC, USA Nov 1999
|
 |
posted March 28, 2001 11:22
 |
 |
 |  |
quote:
 Originally posted by Gary Thomas on 03-27-2001 09:57 PM What time of day is it where you are? It is 3pm Wednesday her.
 |
Ah yes, the wonders of global connectivity. I am relaxing after classes while you are posting from work tomorrow. By the way, here's how you can deal with unexpected boss visits: 1) Find some arcane portion of your company's webpage, or an industry webpage. 2) Copy that html file to your hard drive. 3) Put a bookmark to the hard drive file in the Favorites folder. 4) Memorize the keyboard shortcuts to that page from the Favorites folder. You can type the shortcut really fact, and it will load up almost instantly. In less than a second, you can go from posting at Apolyton to stydying Section II-A-3 of your company's Programming Standards Manual. Then you can simply click "Back" and everything will be as it was. The TechnologySet/TechnologyLevels sounds good. There has been talk of giving one of these to every ethnic group, so we can experiment with that. quote:
 The process is:1. Work through the TechnologySet, tech by tech 2. Pick up the Level for the tech 3. Look up the Technology object and get the help list, and the parameters 4. Look up each of the helpers in the TechnologySet and get the levels 5. Perform the calculations 6. Store the result in NewLevel
 |
Sounds good for now. In future versions we will have equations for tech diffusion due to trade, conquest, and migration. That would happen between stwp 5 and 6. Out of curiosity, are you the same Gary Thomas who posts in the Warlords Battlecry forums? |
Mark_Everson Clash of Civilizations Project Lead Canton, MI, USA b.02-15-99
|
 |
posted March 28, 2001 12:55
  |
 |
 |  |
Hi Gents, just a few miscellaneous comments.Agree strongly with both of you that Everything possible should be read in from ini files and tunable (at their potential peril ) by playtesters. quote:
 For Demo 5, all activities will be associated with Infraclasses, as defined in the Economy model.
 |
Um, for demo 5 there is no tech model... won't even likely be hooked into the game for now, although we could maybe demo some things. What you say is true for demo 6, with the inclusion of military unit effectiveness to the economy you mentioned. At least that is my take on how the staging of such things should work. However with F_Smith's real life attack, and me taking over the stuff he was doing for d5 its possible things will go slowly for me, and tech will be much further along than I anticipate. quote:
 The TechnologySet/TechnologyLevels sounds good. There has been talk of giving one of these to every ethnic group, so we can experiment with that.
 |
Although that may be the preferred long-term solution, perhaps for simplicity in the first tests we should just hook up TechLevels to Civilization. Lord knows the playtesting for the model, and interpreting what's happening and why, is going to be tough enough with tech even at the civ level. So that's my vote anyway. We could have a TechUser interface and Civ would be the first thing that implements it. |
Lord God Jinnai Prince Arnold, Mo 63010 Sep 1999
|
 |
posted March 28, 2001 13:01
  |
 |
 |  |
Actually i still think we should remember to define the difference between TenchLevel and PotentialTechLevel, where the former is the actual level in a given area and the latter is the maxium possible if the economy and whatnot could support it would be.Also another thing to be aware of for later is that superior applications will not always replace older ones right away. |
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted March 28, 2001 14:21
 |
 |
 |  |
Back at work, 7am Thursday - boss not here yet! quote:

Out of curiosity, are you the same Gary Thomas who posts in the Warlords Battlecry forums?
 |
I confess, I am.As a result of the extended discussions about tech details, I have sort of accidentally almost finished coding the whole tech model. The main thing I have to do now is finish the user interface for the editor, and get it debugged. From Mark: quote:

We could have a TechUser interface and Civ would be the first thing that implements it.
 |
I had just a few moments ago decided that the connection to the tech area would best be achieved through an interface, and will implement it in that form.I am having conceptual difficulties with using the Observer/Observable system to communicate with tech. For example, when building applications, presumably a player will be presented with a list of buildable applications for a civilization (or whatever). When the list is constructed, for each possible application the code will need to check whether the application is buildable. My TechnologicalInterface has a call:
code:
public boolean isBuildable(String name)
where name is the name of the application. This should be called for each application. This does seem a simpler method than a rather contrived use of Observer.Cheers Gary
|
Richard Bruns King NC, USA Nov 1999
|
 |
posted March 28, 2001 18:29
 |
 |
 |  |
quote:
 Um, for demo 5 there is no tech model...
 |
Um, why not? I thought we always planned for one. The economy model is in there, with all the infraclasses we need to generate the RP's. I undestand why the effects of Civilization Activities need to wait, but the only interaction we really need for now is have it turn applications on and change their effectiveness. That will be enough to show technological growth, which I think would be a good thing for the demo at this point.LGJ, I think that is one of those things in the "worry about later" category. In the first impplementation of the tech model, the actual and ideal tech levels will simply be the same thing. |
Mark_Everson Clash of Civilizations Project Lead Canton, MI, USA b.02-15-99
|
 |
posted March 28, 2001 19:31
  |
 |
 |  |
Hi Richard:Technology was always planned to be included in the old demo 5 plan. That was before F. Smith said he could rebuild the whole code from scratch and do a better job... So the current demo 5 plan is significantly scaled back from the last one due to the complete refactoring of the code. Right now I frankly just want to get Something out because it's way overdue. However, if Tech is ready by the time we are actually set to launch it, then I'd love to include Tech. I just don't want to promise anything now. |
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted March 28, 2001 23:03
 |
 |
 |  |
The tech editor is about 90% complete. The tech part itself is done all but the RP expressions and the interface with other parts of the game. The expressions have been delayed because it takes a little while to change the algebraic variables in Mark's code to the descriptive ones. The helper stuff algebra is all done, for RPs and for applications. I have to figure out exactly how activities are coded, and how the rest of the system interacts with tech. The "isBuildable" for applications is done. Most of the GUI is done and tested: I have to add helper panels for techs and apps, and the parameters for apps. I have to add activities to the GUI (pretty simple!). The read/write to XML is done (though I haven't reworked Xerces yet) but needs to be tested. I go home tomorrow morning. This time I will not forget to take the source code. Should be complete and usable by Sunday or Monday. Cheers
|
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted March 29, 2001 13:30
 |
 |
 |  |
Couldn't sleep last night, so: quote:

I have to figure out exactly how activities are coded, and how the rest of the system interacts with tech.
 |
Done quote:

I have to add helper panels for techs and apps, and the parameters for apps.
 |
Done quote:

I have to add activities to the GUI (pretty simple!).
 |
Done One thing I have to do is add "Remove" buttons to all the options. Not a big job. Cheers
|
Mark_Everson Clash of Civilizations Project Lead Canton, MI, USA b.02-15-99
|
 |
posted March 29, 2001 13:52
  |
 |
 |  |
Gary:Excellent Progress , though I'm sorry to hear about the not being able to sleep thing... quote:

I have to figure out exactly how activities are coded, and how the rest of the system interacts with tech.Done
 |
Can you fill us in on how you plan to have it work exactly? That's because there may be things going on in other models you're not aware of, and so its possible your approach will be incomplete etc. I don't anticipate that, but better safe than sorry... |
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted March 29, 2001 17:11
 |
 |
 |  |
quote:

Can you fill us in on how you plan to have it work exactly? That's because there may be things going on in other models you're not aware of, and so its possible your approach will be incomplete etc. I don't anticipate that, but better safe than sorry...
 |
I agree. I will post some possible options over the weekend.Depending on the response I can do it in various ways. However, the Observer/Observable option does not seem to be very appropriate. I have to go now, but will post something when I get home in a few hours. Cheers
|
Mark_Everson Clash of Civilizations Project Lead Canton, MI, USA b.02-15-99
|
 |
posted March 29, 2001 19:43
  |
 |
 |  |
Hi Gary, sounds like a plan! BTW I sent you an email last week to the Dawn address and never heard anything. I've just sent you a followup, and would like to hear your response when you get a chance to check out my proposal.Things actually are looking better for doing tech in d5 if practical, since there's a lot more interface work than I was planning on that I need to do before release . Bad for me, But good for Tech! |
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted April 04, 2001 15:39
 |
 |
 |  |
Coding for the technology model and its editor is all but complete. I have had some problems coding the technology level change as a function of helpers and RPs. The formulae do not seem to be all that stable and have not been summarized recently. It is taking time to get a coherent picture.The I and E parameters seem to be floating around - I don't know what to do with them. In passing, the symbol E is used for at least three different things in the model. The final provisional draft definitive idea for the technology interface is: code:
/** * Title: TechnologyActivity * Description: Technology specific aspects of activities * Copyright 2001, the Clash of Civilizations Development Group * * @author Gary Thomas and Mark Everson * @version 0.1, Date: March 27, 2001 *//** * The general interface for all connections to the technology model. * * The calls are grouped according to their context. *
* Definition: * owner or Technology owner: * any entity (civilization, province, map square, city, scientific genius * character - the Einstein effect) that has a technology level profile. * The system keeps a list of owners, and they can interact. *
* In addition to this interface there are three static calls: *
* Create a new Technology object for a new technology owner * TechnologyInterface Technology.newInstance(String owner) *
* Find a Technology object for a technology owner * TechnologyInterface Technology.getInstance(String owner) *
* Update the technology levels for all owners * void Technology.update() */ public interface TechnologyInterface {
//---------------------- Affecting the interface itself ------------------- /** * Remove this technology. * * This does not destroy the interface object, it just removes the owner * from the owner's list. To get rid of the object, set it o null. */ public void remove();
//---------------------------- Other Technology --------------------------- /** * Clone this technology (the owner has split into two parts). * * The new interface will be a copy of the old one, with all the same * levels * @param newOwner the owner's name for the new interface */ public TechnologyInterface copy(String newOwner);
/** * Merge this technology (two owners have merged) * * Note that this does not remove the (now) redundant owner. * @param merging the name of the other owner */ public void merge(String merging);
//-------------------------- Technology levels ---------------------------- /** * Get the level of a particular technology for this civilization * * @param name name of the technology * @return the technology level for this technology */ public float getLevel(String name);
/** * Set the level of a particular technology for this civilization * * @param name name of the technology * @param level the technology level to be set */ public void setLevel(String name, float level);
//----------------------------- Applications ------------------------------ /** * Application, method to determine whether an application is buildable * * @param name name of the application * @return true if the application can be built */ public boolean isBuildable(String name);
/** * Application, get the effect of an application from its name * @param name name of the application * @return the effect of technology on the application */ public float getEffect(String name); //-------------------------- Research effects ---------------------------- /** * Set the research effect related to an activity * * @param activityData the activity data */ public void addToResearch(String name, float value);
//--------------------------- Diffusion ----------------------------------- /** * Set diffusion from neighbour * @param neighbour name of neighbour * @param effect the effect (0.0 - 1.0) of the diffusion */ public void setDiffusionFrom(String neighbour, float effect); /** * Set diffusion from neighbour * @param neighbour TechnologyInterface of neighbour * @param effect the effect (0.0 - 1.0) of the diffusion */ public void setDiffusionFrom(TechnologyInterface neighbour, float effect); }
To use this: 1. For each technology owner, get an interface: TechnologyInterface parisTech = Technology.newInstance("Paris"); If you need to find an existing interface, use: TechnologyInterface londonTech = Technology.getInstance("London") 2. To get rid of an interface (when London burns, for example), use londonInterface.remove(); 3. If Paris splits into two different communes with the same tech levels, use TechnologyInterface newParisTech = parisTech.copy("New Paris"); 4. Then, when they reunite: parisTech.merge("New Paris"); newParisTech.remove(); 5. To get the tech level for a particular technology, use float londonBottlers = londonTech.getLevel("Bottle washing theory"); 6. To set the tech level for a particular technology, use londonTech.setLevel("Bottle washing theory", 87.43); 7. For applications, to see if London can build an automatic washing machine, use londonTech.isBuildable("Automatic washing machine"); 8. To get the effectiveness of said application, use float washerbility = londonTech.getEffect("Automatic washing machine"); 9. To add some research to an activity, use addToResearch("Cleanliness", 32.2); 10. To update all the technology levels in the game at the end of a turn, use Technology.update() I have also added a couple of diffusion knoledge methods which I will discuss later: public void setDiffusionFrom(String neighbour, float effect); public void setDiffusionFrom(TechnologyInterface neighbour, float effect); That's enough for one post. Cheers
|
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted April 04, 2001 16:57
 |
 |
 |  |
I tried to post this a few moments ago but it got lost. 2nd attempt.A quote from Richard: 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 is a strange transormation: 2Z/2 Would it not be better to just store the proportions? Easier to code, and more importantly, easier to understand. Cheers
|
Richard Bruns King NC, USA Nov 1999
|
 |
posted April 04, 2001 17:22
 |
 |
 |  |
I and E have been dropped out of the picture for now.What were the other two uses of E? Yes, we can certainly eliminate the 2Z/2. As I said, that was simply a rough draft of an idea. The ActivityEffect can simply be stored as a number. These numbers would typically be between 1 and 64. The RP distribution would then be based on a proportion. Example: A CivilizationActivity, Infrastructure, has the following techs with ActivityEffect numbers (Tier 3 techs omitted for brevity): Architecture, 50 Civil Engineering, 60 Construction, 30 Roads, 35 Masonry and Cement, 20 Mapping and Surveying, 20 Mechanical Engineering, 10 Architecture would then get 50/225, or 22.2%, of the RP's generated by investment in the Infrastructure infraclass. Hmm, would it be easier to have the techs store a percentage? So Architecture would be assigned 20% Infrastructure. The designer would then have to make sure that the percentages added up to 100%, but it might be a more intuitive way to assign the values.
At a glance, your plan looks good, but I haven't taken time to go over it well. I wish I has known about the ,sup. tags earlier. That would have made the equations look a lot better. Where can I go to get an overview of useful html code? |
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted April 04, 2001 18:51
 |
 |
 |  |
The companion to <sup> is <sub>There is a very useful O'Reilly book: HTML Pocket Reference. This has everything you need, it is small and cheap. Here is a random sample of some other stuff from one of my JavaDoc comments in another project: "The model is:
yr = f(xr, q) + er(q)
the dependence on q being implicit. The index r indicates the rth sample, r = 1, n. Bold face indicates a vector.
For brevity these are represented by:
yr = fr + er
Let
M = Srer2 and the function to be minimized (using maximum likelihood) is
F = -½ n log M "I hope it comes out right! For the percentage weightings, the editor program will take any numbers and scale them before saving. If you then edit the Activity you will get the scaled values which can then be adjusted. Cheers
|
Mark_Everson Clash of Civilizations Project Lead Canton, MI, USA b.02-15-99
|
 |
posted April 04, 2001 19:10
  |
 |
 |  |
Excellent stuff Gary! And those HTML codes are gonna come in handy too..."Bottle washing theory" - LOL  One thing you need: addToResearch(String name, float value) needs to also support adding RPs directly to a tech, a opposed to an activity. That is for the case where Roosevelt says, Here's $2B (1942 dollars), go find out how to build an atomic bomb. Or the modern US govt says use $X for basic Physics research. If you can already do this, then its just the doc that needs to be updated.
[This message has been edited by Mark_Everson (edited April 04, 2001).] |
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted April 04, 2001 21:23
 |
 |
 |  |
From Mark: quote:

One thing you need:addToResearch(String name, float value) needs to also support adding RPs directly to a tech, a opposed to an activity. That is for the case where Roosevelt says, Here's $2B (1942 dollars), go find out how to build an atomic bomb. Or the modern US govt says use $X for basic Physics research. If you can already do this, then its just the doc that needs to be updated.
 |
One way of achieving this is to create the appropriate Activity for each such transfer, with a single technology as the recipient. Doing it this way has the advantage of using a single mechanism. After all, spending on basic research (such as bottlewashing) is an activity. Also, in spite of the goverment's efforts there might be some spill-over into another type of research, which the activity system can reflect. On the other hand, if the idea is that any technology can have research applied, then the program could be easily modified to allow a technology name as well as an activity name. Cheers
|
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted April 05, 2001 16:43
 |
 |
 |  |
It is some time since the research formulae have been summarized, and there have been some changes. Here is the equation as it is currently implemented in the code:
| yt | the technology level at time t |
| m | growth rate (the product of the base growth rate and the specific technology modifier) |
| c | upkeep (product of base upkeep and the specific technology upkeep) |
| s | The level of a technology when it is first discovered |
| H | This variable is the total influence of all helper technologies. |
| yit | the level of the ith helper technology at time t |
| hi | the effect of the ith helper technology |
| di | the offset for the ith helper technology |
| W | adjustment variable |
| R | diminishing returns factor (product of base diminishing returns and the specific technology modifier) |
| r | research points available |
| G | adjustment variable for exponent |
| M | base of exponentiation |
then H = 2Sihi (yit + di - yt)/W Let V1 = rm - c M(yt - s)/G If V1 < 0 then let V2 = V1
otherwise let VM = HV1R G log(M(yt - s)/G + V2) Now yt+1 = ---------------------- + s log M Is this right? Sorry about the funny font sizes! Cheers [This message has been edited by Gary Thomas (edited April 05, 2001).] [This message has been edited by Gary Thomas (edited April 05, 2001).]
|
Richard Bruns King NC, USA Nov 1999
|
 |
posted April 05, 2001 17:14
 |
 |
 |  |
quote:

H = 2Sihi (yit + di - yt)/W
 |
Should be: H = MSihi (yit + di - yt)/W quote:

Let V1 = rm - c M(yt - s)/G If V1 < 0 then let V2 = V1otherwise let VM = HV1R
 |
Should simply be: VM = rRmH - c M(yt - s)/G You were using an outdated plan. Sorry. quote:
 The formulae do not seem to be all that stable and have not been summarized recently.
 |
I knew that they were unstable, and I changed them before. I mentioned the changes in this post, but did not explain them fully. The proper equations were in the spreadsheet and the spreadsheet instrictions, but I must have forgotten to post them.My test of the system will be to plug exactly the same numbers into the spreadsheet and the Java code. The results will hopefully be the same. You can get the tech spreadsheets at My website or the Clash website in the tech section. [This message has been edited by Richard Bruns (edited April 05, 2001).] |
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted April 07, 2001 20:08
 |
 |
 |  |
It turned out that the code, which is a modification of Mark's original code, had the right equations. I just got the wrong ones when I was trying to summarize it. quote:

You can get the tech spreadsheets at My website or the Clash website in the tech section.
 |
Getting equations from a spreadsheet is unbelievably tedious and error prone. Going from the correct equations is much better.The code, as far as the model goes, is now complete and I am working on the test harness. There are, however, gaps in the model, or perhaps in my understanding of it. There are various mentions of "when the technology is first discovered" or "the starting level for the technology". There is nothing in the equations to indicate how this works. From an earlier comment that general technologies ("missile weapons") cover the whole gamut from throwing a rock to throwing an ICBM, I rather thought that all technology owners start with all technologies, at however primitive a level. Is this so? If not, what is the triggering mechanism? In the main Clash menu, the description of the tech model starts with a differential equation. I suspect the equation is wrong - it bears a close resemblance to a generalized logistic (and the text suggests that a logistic is intended), but for a logistic, the "RP" (x) term should be "tech level" (y). I haven't checked whether the equations reflect the solution of the differential equation. There is, presumably, some theoretical basis for the equation, otherwise why include a strange term like 1/(log 2) or 1/(log M)? Cheers
|
Richard Bruns King NC, USA Nov 1999
|
 |
posted April 08, 2001 19:10
 |
 |
 |  |
Yes, there are some technologies that only appear olater in the game. The Helper Technologies for a certain tech determine when that tech will be discovered. quote:
 For Helper Techs (Once for each of a technology's helper techs): ... Tr = TechRequirement
 |
When all of the helper techs have reached Tr, the technology comes into existence at a level of Ts. The differential equation in the main write-up is horribly outdated. Pay it no heed. I should probably submit a comprehensive updated description for the webpage. |
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted April 08, 2001 23:44
 |
 |
 |  |
I will implement that for the first coding release for ClashD5I am about halfway through the unit testing of the code. Should be available by Easter, complete, documented, and working. At that point I would like to clarify all the issues relating to the model. There are quite a few parameters whose use seems a bit dubious, or at least unclear to me. I would like to be able to include in the JavaDoc system an exact specification of what the code does. Just as an example, what possible reason is there for any technology to start at a value other than zero? The editor will allow editing of TechnologyData, ApplicationData and ActivityData. In this context all of these relate to their impact on technology only. It will be quite simple to add other aspects of these objects, or to add other objects such as EthnicGroupData, MajorReligionData, or whatever. Cheers [This message has been edited by Gary Thomas (edited April 08, 2001).]
|
Richard Bruns King NC, USA Nov 1999
|
 |
posted April 09, 2001 09:28
 |
 |
 |  |
The tech system is defined so that a tech level of 100 represents the highest publicly known implementation of a certain technology as of January 1, 2000. Yes, it's quite arbitrary, but we needed a concrete baseline. This definition, combined with the rule that 10 levels equals double the knowledge or skill, means that the technology will often have to start at a fairly high level.Consider Genetic Engineering as a Tier 3 technology. We look at what it could do in 2000 and then trace backwards to what it could do when it first started. WE aren't measuring raw data accumulated, we are looking at the practical use of the skill. I'd estimate that this process is about sixteen times as effective and does sixteen times as much as when they first developed it. So if it was at level 100 in 2000, then it would have to start at level 60 in 1980. |
Gary Thomas Chieftain New Zealand Mar 2001
|
 |
posted April 10, 2001 15:31
 |
 |
 |  |
quote:

The tech system is defined so that a tech level of 100 represents the highest publicly known implementation of a certain technology as of January 1, 2000. Yes, it's quite arbitrary, but we needed a concrete baseline. This definition, combined with the rule that 10 levels equals double the knowledge or skill, means that the technology will often have to start at a fairly high level.
 |
I am afraid that I do not think that this is a very good idea. A new technology (nanotechnology, for example) which is embryonic at 2000 would still get a 100 rating. By the year 2100 it will be something like level 20000. My personal preference would be to define a "mature level" for a technology, and set that to 100, regardless of the year at which it was achieved. I am uncertain in other areas. Assuming that "the internal combustion engine" would not be an application, but rather an applied technology (it is certainly not a unit), the history of the internal combustion engine, under this system, effectively, has gone from something like 90 to 100 in a hundred years. In fact most specific technologies of this kind do not improve very greatly. There are, of course some exceptions - electronics and its spin-offs are obvious examples. Since the "doubling" is utterly subjective, it is actually just adding another parameter without, as far as I can see, any practical contribution to the game's playability or realism. The growth rate factor already adjusts for scale. Cheers
|
Richard Bruns King NC, USA Nov 1999
|
 |
posted April 10, 2001 22:22
 |
 |
 |  |
quote:
 Since the "doubling" is utterly subjective, it is actually just adding another parameter without, as far as I can see, any practical contribution to the game's playability or realism. The growth rate factor already adjusts for scale.
 |
I don't understand. The doubling is not subjective at all. It is central to the operation of the whole system. The effect on applications and as helper techs depends on the scaling rule where 10 levels is double the ability. quote:
 A new technology (nanotechnology, for example) which is embryonic at 2000 would still get a 100 rating. By the year 2100 it will be something like level 20000
 |
Remember that the tech level is a logarithmic scale. 110 is twice as good as 100. Sending the tech to a level of 200 means that its effectiveness has been multiplied by 210, or 1024. That is an enormous change in power and usefulness. The internal combustion engine has become quite a lot more effective. Compare the difference between a model T and the best modern car available. The speed, range, efficiency, and load carrying capacity have been multiplied by at least eight, putting that tech at a start of about 70. Besides, I don't see anything wrong with starting a tech at level 90. If skill only doubles in the time period, that seems a reasonable thing to do. I have tried to make a system that would make it easy to create an accurate tech tree. By referencing the modern world instead of some arbitrary value, I can know exactly what a tech level means. I know instantly that "60" means 1/16th as good as what we have today. There is no question about what the number represents. Since I will probably be the one entering all the numbers, this is very important. If I have to invent some arbitrary ideal level for every tech, then it will take me a lot longer and be very hard to debug. How does anyone else know what I mean by the 'mature level' for genetic engineering? How can I describe that to the person who makes a military unit? If there isn't any good, clear standard, then nobody will know what a tech level means. Remember that the numbers in the core model do not have to be the ones seen by the player. They are for internal game mechanics. Most of the time, the interface will have no numbers at all. The numbers only matter if someone is micromanaging and shooting for a particular application, and then all we have to say is "Raise your Chemistry tech by 8.2 levels to get Gunpowder." They don't need to see the actual levels at all. |
Lord God Jinnai Prince Arnold, Mo 63010 Sep 1999
|
 |
posted April 11, 2001 13:18
  |
 |
 |  |
I still perfer having all technologies start at 1 and not ness. Reach 100 for December 31, 2000. The main reason is because certain technogies didn't appear until certain other ones were at a specific level. The problem with the 100 mark is that some technologies have increased more than that amount within the past several thousand years. You can't have it both ways, either one or the other.As for inputting the numbers i'll help alot also. | |