are there files/models already done that i can study? if not i will extract all demands from people from this pretty huge thread and make up something. I still think it has to be simple, cause it should run every turn and speed is often a concern when using java. Maybe later it would be nice to make that kingdom micromanagement model.
Announcement
Collapse
No announcement yet.
Population and Demographics
Collapse
X
-
quote:
Originally posted by 4VAlien on 04-11-2001 06:28 PMare there files/models already done that i can study?
There is virtually no code yet for the population model if that's what you mean. Right now there is only trivial code relating to it in MapSquarePopulationTurnHandler in the controller package of the code I sent you.
Right now all it does is use a very simple algorithm that relates population growth to just food per capita. So the food the people save to eat during the econ phase is saved and consumed during the population phase. Population growth or decline is a direct result. Obviously all the stuff about true nutrition, health care etc. is not done yet.
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
-
PAIN.. i've tried to compile this thread into THE answer but that ain't easy :-(. I think we should at least have 3 cohorts, namely young, working and old. This is only for the reproduction races. I think manufacturing races should have to build certain industrial structures to build themselves, this will cost a some economic power, but then again every produced "person" is directly capable of doing work/military service so if we balance carefully it would be a nice addition to the gameplay. The most difficult is the derived creation. Their growth should be related to others races death. And i have still no idea about the transition from cohort to cohort, what kind of formula shoud be used there?
I think that the population model should be run at province level, but i still don't know how large a province is.
things i certainly want to use are:
-growth is somehow related to food production
-of course there's the disease model {duhh}
to code is to live -4VAlien-
Comment
-
i accidentally posted before i was finished..
-i think we should run the model at province level but i don't know how complicated the other models are so i will have a look at that. i don't want the population model to be extremely light or heavy in comparison to the other models. (hey.. i'm repeating myself, sorry)
-the derived/production races don't need an % workforce cause i think they'll only create usable persons.
-the reproduction race would have a varieting % workforce, but i think we can relate that directly to the social model.
-to save memory/speed i think we can work out the classes only for provinces, cause generally in a certain area the differences between the squares will be pretty small.
questions remaining:
-what other elements affect growth? i think there are lots of variables but i don't know all the clash options so i think you will come up with some.
to code is to live -4VAlien-
Comment
-
additions:
-i think it's not fair to implement gender, cause the reproduction race would then become extremly vulnerable compared to the other races
-recruiting military troops should be taken into account. The people recruited should be removed from the population, and be added again when the unit disbands.
-Because the military provides their own supply's there would be no relation to the land the came from.
-This influences growth but i think we can calculate without using gender. The population part of the province could contain a value that is made higher when man/women are not equally removed and would slowly stabilize back.
-This value could also be used to recalculate the %-age of workforce. (if only this world had always been 100% emancipated this model would've been a lot easier)to code is to live -4VAlien-
Comment
-
Hi 4VAlien:
Thanks for getting this area going again!
I think you should do the architecture on a map square level. I think F_Smith's comments long ago that we should push data storage down to the lowest possible level is correct here. For now, to make life easier, I think you should do the entire pop model calculations at the map square level also. The economic model is at the square level for now, and it uses at least 20x as much processing power as pop is likely to. So you might as well do it the easy way. If we need to agregate up later it should not be difficult with good design. For now we are following the rule: "Don't optimize prematurely". You can see further ideas about the extreme programming (XP) philosophy we're following in the coding discussion thread if you're interested.
I won't say anything about non-human population because there are so many things I need to spend time on before considering that... So I won't comment, but reserve the right to criticize later . Hopefully Richard, who put them in, can discuss that with you.
"-to save memory/speed i think we can work out the classes only for provinces, cause generally in a certain area the differences between the squares will be pretty small."
Probably correct, but why don't you try it at the square level first for simplicity as I outlined above.
"-recruiting military troops should be taken into account. The people recruited should be removed from the population, and be added again when the unit disbands. "
Agree!
I agree with much of what you say. I will wait for Richard to give you some of the further details you're looking for, because he's much more familiar with the model. If there are any big problems you need info on fast, just let me know, and I'll do my best to come up with something.
Thanks again for taking this on!
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
-
ok i will go for square based calculation and humans only, but i would like to have some assitance in modeling the classes , cause i also have to deal with the ethnic groups etc.. which i don't completely understand yetto code is to live -4VAlien-
Comment
-
Personally I'd say just hold off on the classes and ethnic groups for now. If you want, you could put placeholders in. The reason I'm suggesting you not do those yet is that Gary is going to hook up the govt/social code this weekend (I hope! ) and so he will then know about the architecture of that stuff. Gary is a pro java coder, and can help in figuring out the right archtiecture to use with the population model. I could make guesses, but they wouldn't be well-informed guesses.
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
-
One comment about age: If you cut down into young/old/working, how do you consider the lengthening of life? People currently work till they are around 60 year old, but they used to be old much earlier in the Middle Ages, because of disease, eating, crippling... Will it be simple to change the working/old proportion based on social/tech progress? Another question about young: If they study more, they start working later, so the same question goes: how do you map this to the social/tech?Clash of Civilization team member
(a civ-like game whose goal is low micromanagement and good AI)
web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)
Comment
-
quote:
Personally I'd say just hold off on the classes and ethnic groups for now. If you want, you could put placeholders in. The reason I'm suggesting you not do those yet is that Gary is going to hook up the govt/social code this weekend (I hope! ) and so he will then know about the architecture of that stuff. Gary is a pro java coder, and can help in figuring out the right archtiecture to use with the population model. I could make guesses, but they wouldn't be well-informed guesses.
Um, yeah.
I am a pro Java programmer. Architect even.
Unfortunately, one of the things I always do (otherwise I would lose my job) is to provide comprehensive test routines for EVERY class I write. For the tech model, I will provide:
1. The tech model
2. The GUI for it
3. The underlying classes
4. Test classes for all of this
This will almost certainly be available over the Easter weekend.
The govt/social model, if I am to do it, will be to the same standard. I do not expect either to have any bugs or require any patches. Hey! that's the way I survive. I also code very fast, around 200 lines of tested code per day. I do have a lot of trouble lowering my standards. Actually I don't lower my standards at all! People who use my classes (which do a lot of nice things in the GUI area) never have to worry that they do not work.
From my inspection of the govt/social model they are well defined, and the tech infrastructure will exactly fit. I REALLY hope to start on them tomorrow. But life ain't always kindly.
Right now (8pm Easter Friday) I am finishing the test methods for a class called NamedObjectList which, with its associate classes NamedObject, NamedObjectIterator and NamedObjectRenderer, allow the JList methods to immediately implement any reference to things like the list of Technologies, Applications, Activities, Religions, EthnicGroups, GovernmentIdeologies, or anything else that can be read from an XML file. The XML file stuff is all written and working with test routines.
Anything I write is delivered with the test routines. If anyone makes additions or modifications, they can run the test routines and immediately see that the modifications work (or don't, as the case may be). In my view this is a critically important part of XProgramming (see the XP website).
Sorry for the rant, but this is where I am coming from, and it is better in the long run. So far I have spent around 300 hours on the tech stuff, mostly on providing a good infrastructure.
Mark: what I am doing now is designed to fit the govt/social system into the same paradigm as the tech model. I still expect to send you the tech stuff, complete, this weekend. The govt/social I will try for this weekend, but can't guarantee. I am also negotiating with my ISP to provide a CVS repository for all the code. This will mean that any coder can check out the most up to date code at any time, or check in their latest version. Keep your fingers crossed.
As far as the population model is concerned, one of the odd things I have done in my life is to publish a paper on population projections (Thomas, 1970) using "characteristic functions". This has always been one of my interests. So maybe, when I get finished with the coding for the tech and govt/social model, I can help with the model. Around Thursday, with luck.
Cheers
[This message has been edited by Gary Thomas (edited April 13, 2001).]
Comment
-
Laurent:
I think the age for the cohort boundaries should just slide as the society changes. On educating the young, I think that will work out ok with the present econ system. Education costs work (services) both for the educators and the educated. So if your young are being highly educated, they are of necessity not doing any other type of labor.
Gary:
My point was that soon you'd have probably enough experience with the architecture surrounding classes and ethnic groups that you could be able to help as an advisor in specing the population model architecture. You'll undoubtedly be there long before you completly wrap up the social model.
Thanks for the overview. A lot of your post could IMO be usefully crossposted to the coding discussion. Your approach description is valuable as it is, and of course the list facilitators you mention should be known to the other programmers, who don't check all the threads.
We could even start a soapbox thread for you to tell us non-pros how it should be done when you see something that doesn't work.
[This message has been edited by Mark_Everson (edited April 13, 2001).]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
-
quote:
I think we should at least have 3 cohorts, namely young, working and old.
I of course would prefer a cohort for every five years, but if that is not possible this seems like a good compromise.
quote:
The most difficult is the derived creation. Their growth should be related to others races death. And i have still no idea about the transition from cohort to cohort, what kind of formula shoud be used there?
Have you ever read the Conqueror's Trilogy by Timothy Zahn? The Elders in those books are an example of a derived race. One was created every time a member of the Zhirrzh race died. A more typical example would be cyborgs. Depending on the technology, some percent of people who die can be turned into this race. We'd simply assume one cohort for this race, since presumably they wouldn't age. The Birth() method simply takes the number of Human deaths and multiplies that by some fraction that depends on the tech level. But Mark is right, we don't have to wory about that yet. It certainly isn't a vital feature.
quote:
-the derived/production races don't need an % workforce cause i think they'll only create usable persons.
Not necessarily. Some cyborgs might be rich people who pay for teh procedure to stay alive but don't or can't do work. I don't think we should limit functionality. The code would presumably exist already for the normal races.
The only real difference between the types of races is the Birth() method. I think they should have the same functionality otherwise.
quote:
-i think it's not fair to implement gender, cause the reproduction race would then become extremly vulnerable compared to the other races
The other races won't be a problem in the normal game, they are only for sci-fi extensions. I don't think we should reduce normal game functionality just for the possible expansions. The proper functioning of normal races (Humans) is more imporant for the game than the other extra races.
Besides, that vulnerability would be probably make a good, challenging scenario.
quote:
The population part of the province could contain a value that is made higher when man/women are not equally removed and would slowly stabilize back.
I think it would make more sense to simply track the genders seperately. That would probably create less bugs and be more flexible in the long run.
Comment
-
after reading the info at the following link
http://www.krellinst.org/~winther/Ai...ion/index.html
i made up some code that gives a nice model of population. I tried to make my model match the graphs of population in america as much as possible. It currently matches for about 350 years !!! (1650-2000)I tested scalability and at 15x the calculation was 12% off the original. I'm afraid the difference will be larger over a longer period, and will have a look at that. I'm still thinking about the cohorts...to code is to live -4VAlien-
Comment
-
Alien4V:
I'm glad to hear you're making progress! But we can't say much until we know what exactly Is the model you coded? There are several different things on that page. US population growth was and is heavily influenced by immigration. Is that included?
[This message has been edited by Mark_Everson (edited April 13, 2001).]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
Comment