Yes, I think I have heard the Romans were quite sick people in the beginning of the first millennia. That also was the case with Egyptians at the peak of their power. So it might be true that diseases play an important role in the rise and fall of empires. Many of these things are quite easy to model.
Announcement
Collapse
No announcement yet.
Disease Model Programming
Collapse
X
-
Ramo:
Yeah, I've read GGS (the book) too.
I think with Heardie's disease model (with slight adjustments, such as adding resistance to effect mortality and population per hex to effect infectousness, it should be possible to handle a scenario where a disease is just constantly in a hex.
------------------
Vote Gore. For the sake of people, not god.
GGS Website"It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
- Hans Christian Andersen
GGS Website
Comment
-
http://members.xoom.com/acchiron/disease.zip
This filel contains teh better disiease model, which is now much more user friendly
Comment
-
Cool demo, Heardie! But one thing: It crashes if you ask for the stats for HIV. Otherwise it's great.
But now for something completely different:
I have been thinking a lot about disease and population lately, and I think we should start working on excactly how to implement diseases in the game (and on the map in particular).
I think we should consider whether to have diseases modeled at a province or at a hex level. The latter is more realistic, and it has some very clear advantages. But on the other hand it has some large disadvantages. These are mainly the calculations required by the computer. There must be a lot of diseases in the game - possibly over 50 - to get it to work properly, and not just have diseases be an unfortunate random event. Diseases must be a completely integrated part of the game, and should have an important role right from the start to the end. And if each hex has 10 diseases on it, with 10 age groups and 1,000,000 hexes this will require 100,000,000 calculations each turn! I don't know if this is too much, but it sure seems like it. And it is not like it has a huge effect on gameplay that diseases and mortality is calculated on every hex.
Therefore I am thinking about what to do to reduce this.
I agree that handling diseases on a province level is pretty much unacceptable, since it means too much inaccuracy.
So what do we do?
I have been thinking about doing it something like this:
First diseases are handled hex by hex, but not including age groups. It would be done simply via Heardie's formula (although I have a few comments and suggestions for it, which I will post later on - first I think we should settle this). Then the total mortalities of all hexes in a region is found, and this gives a mortality percentage for the province. This is then put into some formula that depends on the medical tech level (and maybe a few other things), and this creates a mortality for each age group. The amount of dead people is now calculated in each age group, and the total amount is found. This, however, doesn't have to be the same as the amount found before, cause if there is more old people than there "should" be in the province then the amount will be higher. Finally the new mortality rate is divided with the old mortality rate, and this number is multiplied with the mortality in each hex, to find the actual mortality of each hex, and the new pop in each of them.
So, is this system any good? it should reduce calculations required drastically, and it includes both hex mortality and age group mortality. The downside of it is, that the age mortality is now only a "pro forma" mortality, since it only depends on total mortality and tech level, and is not calculated by it self.
And it might very well be really dificult to calculate the age group mortalities at different tech levels and make the result into a function that can be handled by a computer. But we have to do that anyway, so that shouldn't be an issue here.
So, is this any good?
(NOTE: Now that I think of it I am clear that this should in stead be in the pop model thread, but I'm just posting it here anyway)
------------------
"It would sharpen you up and make you ready for a bit of the old ultra-violence."
- A Clockwork Orange
GGS Website"It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
- Hans Christian Andersen
GGS Website
Comment
-
Hmm... Weird. But it doesn't really matter. What is important is, that we can have a disease model that works, not whether some demo crashes.
------------------
"It would sharpen you up and make you ready for a bit of the old ultra-violence."
- A Clockwork Orange
GGS Website"It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
- Hans Christian Andersen
GGS Website
Comment
-
Just a question it is pretty nice to know when thinking out functions for the game:
How many (simple) calculations is a modern computer capable of do per second?
------------------
"In America, first we take the sugar, then we take the power, then we take the women!"
- Homer J. Simpson
GGS Website"It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
- Hans Christian Andersen
GGS Website
Comment
-
The computer's speed is measured in clock cycles, as you know all. 700 MHz means 700,000,000 clock cycles per second. On each clock cycle, it is possible to perform one simple macnine-languge instruction, but usually several clock cycles are needed. What this means with C language intructions, it depends. But anyway, I think the machines of today can make at least some 100,000,000 simple mathematical calculations per second. I think your concern is how long it will take to perform the calculations our models need. That's also my concern. I think we should at some point, when the models are ready, estimate how large situations they would need to handle, and then test how long it would take to make that amount of cycles.
Comment
-
Thanks. So basically we shouldn't worry too much about having too many calculations? Anyway, if we can have econ stuff take 1 second and have pop things take 1 second, then things wouldn't really take too long.
------------------
"In America, first we take the sugar, then we take the power, then we take the women."
- Homer J. Simpson
GGS Website"It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
- Hans Christian Andersen
GGS Website
Comment
-
Well, I think memory usage will be a bigger problem than cpu usage, yes. I'm sure we can optimize the algorithms to make the response times sensible. About the speed of performance, the largest load will come from AI, but that we can fight by letting AI think during th human player's turn. 1 second might be good guess in average world for economy, don't know yet. Hopefully it will not be much longer. What do you think would be a sensible response-time when you hit end turn? 10 seconds maximum in all situations? I mean, there will be thousands of turns, so...
About memory; map will be quite a monster in hogging it. But we can handle that by reducing map size, if needed. And graphics in general will require quite much memory. But I'm sure we will handle that when that time comes.
[This message has been edited by amjayee (edited November 17, 2000).]
Comment
-
So we have to store all game informations in the RAM?
Then I supposted you're right. We decided to have map hexes be 50 kms across, right?
This means each hex has an area of some 1400 sq kms, and that means a little over 1,000,000 hexes on an earth map. We should keep the possibility to choose the size of a hex, and then have all other variables (unit movement, disease spread etc) be adjusted.
I don't know about the hex properties, but we will propably need 2 bytes or so for the terrain. But what are we going to do about pop in each hex? It should be possible to have pops of several million in each hex, and that would mean about 3 bytes to handle population. That would mean 5 MBs for the map alone, though. Is this too much?
Then comes all the province and civ data, but since the amount of provinces and civs is pretty limited this shouldn't be much of a problem.
And I agree, about 10 seconds per turn seems reasonable. But if the AI does it thing simultaneously with the player then maybe we wont even need that much.
------------------
"In America, first we take the sugar, then we take the power, then we take the women."
- Homer J. Simpson
GGS Website"It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
- Hans Christian Andersen
GGS Website
Comment
-
About map size; tile properties take 2 bytes. If we use unsigned long for population, we get some 4.3 billion people, which should be enough, and it would take four bytes (one dword). Diseases and such would rise that figure somewhat, I hope we can have less than 10 bytes all in all. And yes, the map will take the most memory, so we don't need to worry about the other things as much. Populations and regions will take quite much space, but since there will be only couple of hundred of them at maximum, that's not a problem, at least compared to the map.
Map drawing info will take much more space, but I hope I can make a system, where this info is stored only for the visible map area, which should decrease the amount.
I don't like much having a varying tile radius. But we will see. We perhaps should find out the reasonable map size and then decide the tile radius based on that.
Comment
-
I hope that doesn't mean we're limiting the world population to 4.3 billion...
I think that since we're going to take the game to at least as far as the current tech level of today's world which houses more than 6 billion, and we're taking that further... I think IF we put a limit on world population it should be upwards of 25-30 billion, that would be assuming we are limited to this world. I see no reason to limit population to even that, especially if we're going to be colonizing other worlds...
------------------
How will you make it if you never even try?
-Macy GrayHe's spreading funk throughout the nations
And for you he will play
Electronic Super-Soul vibrations
He's come to save the day
- Lenny Kravitz
Comment
-
No, I was talking about tile population.
Well, perhaps we will have to create some custom system to store 3-byte integers, for one tile 4 billion just might be too much.
With that, if we have 1,000,000 tiles we could have 4,200,000,000,000,000 people in the whole world! Well, of course not every tile would have that many people, and some of them would be ocean. But seriously, with 3 bytes, we get about 16 million per tile. For region, civ and world population we will also need special storage types so we will not reach the upper limit very easily. With 5 byte integers, we can have numbers up to about 1,100,000,000,000 which should prove enough even for the population of the whole Universe!
[This message has been edited by amjayee (edited November 21, 2000).]
Comment
-
Isn't it possible to to have more than 3 and less than 4 bytes for hex pop?
Having 4 would be a waste of space, but 3 might be too little, especcially in sci fi scenarios with huge cities. So why not 3 bytes and 2 bit = 26 bit? That would give us 64 mio people per hex, which should be enough.
------------------
"In America, first we take the sugar, then we take the power, then we take the women."
- Homer J. Simpson
GGS Website"It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
- Hans Christian Andersen
GGS Website
Comment
Comment