 |
|  |
 |
|
Mark_Everson
|
 |
Canton, MI
Jan 1970 time: 00:15
|
|
Hi All:
Just trying to catch up with this thread by commenting where it seems needed. I have done some checking of my statements in the code, and docs, but still some of what I say may be incorrect. Also much of this is not set in stone, but is just as things were envisaged to work based on Rodrigo's docs and F_Smith, my, and Gary's coding.
quote: Originally posted by LDiCesare
Note that when there are 2 ethnic groups in a square with the same ethnicity name are in theory possible in the code but would cause problems. I didn't check if this had any meaning. |
I haven't looked at the code, but this does seem like a potential bug source. Perhaps putting in a test when people are added to a square that the ethnicity name is unique. If it is not unique, a further test would see if the ethnicity objects are the same. If they aren't the same (the potential error condition) then we would either:
1. mandate a name change for the newer ethnicity, or
2. merge the ethnicities using weighted averages.
For now maybe just an entry in a social log file that such an "ethnicity name collision" has happened would be enough. Long term I favor solution #1. There should be a way to merge very similar EGs, as we've IIRC discussed before. That will cause mergers of any similar ethnicities when they get sufficiently close, even if they have different names.
quote: I wonder whether nationality should be shared as part of Ethnicity? |
I think nationality belongs in Ethnicity as it is now. That allows us to distinguish between two components of an assimilating EG. FE when the Romans take over Gaul there would first be only a Gallic population. If the Romans rule well and some Gauls come to like living under the Romans there will be generated a "Romanized Gaul" or some such Ethnicity for the EGs. At first the only difference between the two ethnicities will be that the Romanized ones have a nationality of Roman, whereas the others still view themselves as conquered Gauls and would like to again be part of a Gallic civilivization not under the rule of the Romans.
quote: Now there are these things: tendencies and culturalAttributes. I understand tendencies as it is explained as: "Eventual equilibrium position that CulturalAttributes will evolve to given current environment". But culturalattributes are not clear. It is said also in the code that " Different ethnic groups with the same ethnicity differ ONLY in their opinions." So I suppose that nationality, tendencies and culturalattrbutes are all 'opinions'.
If anyone can clarify these things for me, that would be greatly appreciated. It is normal that the code uses constructs like Ethnicity which allow to factor in certain concepts, so some differences with design documents are inevitable, but there are still things I'm not sure what they're supposed to do. |
CulturalAttributes describe behavior of people. Some uses of CA describe how an EG will actually behave in the game. Other types of CA are tendencies and prototypes.
tendencies are a CA toward which an EG is evolving (but is not necessarily there yet).
prototypes (culturalPrototype in Culture) is meant to be an "average" CA over a number of Ethnicities. The values are intended to be used to determine tension within the overall culture to determine when cultures split or reinvent themselves. A homogeneous Culture might span many provinces but in each case the EG CA is very similar to the Culture's CA. A heterogeneous culture will be one where EGs in different provinces have CAs that are very different from the prototype CA. Such a divergence would promote a name change and is how Goths become Ostrogoths and Visgoths, two independent Cultures.
That's all I have time for right now. Just one post covered! I'll get back to this discussion when I can.
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:15
|
|
I'll be moving the Nationality into the Ethnicity class instead of EG. The tendencies I will leave there, even though they are unused. The culturalAttributes of the EG are built from the prototype, so they can evolve separately afterwards, allowing for splits when the distance from the prototype is big enough, which sounds good.
I'm working on having the ruler panel work properly and allow modifications of the EDF/RDF so that players can avoid riots. When ruler panel and riots model are usable, I'll start checking EG evolution and will need tendencies at this time. As long as we don't know how tendencies are supposed to work, though, it's hard to know where they are supposed to be.
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:15
|
|
quote: General Infrastructure Destroyed: 0.007769048
Government Infrastructure Destroyed: 0.012948453
Production Reduced: 0.003884554 |
This is the output from the riots model, but it's really obscure to me. Mark, can you check how we could present this information in a better way? I think a percentage of the existing infrastructure/production would be a good indicator. 1% is easier to understand than the raw figures. I don't know where the reference value is in the square economy.
I'd still like someone to provide ideas about how much suppression troops provide, and other ways to reduce discontent. Right now, it looks like a no-brainer to say that you want to reduce the various discrimination factors. What are the ill effects of promoting a policy far from the public opinion?
|
|
|  |
 |
|
Mark_Everson
|
 |
Canton, MI
Jan 1970 time: 00:15
|
|
Hi Laurent:
Those values are the fraction destroyed or whatever. The .0077... means about 1% of the general infrastructure (farms, mines, etc.) were lost in the rioting.
I'll try to look into the troop suppression. I could swear that I already had that in there. Either Gary switched it off, or I'm just plain mistaken. I will try to get back to you soon on this.
Last edited by Mark_Everson on 06-12-2003 at 01:06
|
|
|  |
 |
|
Mark_Everson
|
 |
Canton, MI
Jan 1970 time: 00:15
|
|
Well, I have searched far and wide for the values that I once used for military unit suppression of riots. I think I wasted my time. Here is the old code:
code: float suppression;
CombatData combatData
= Units.getCombatData(location.getControllingCiv(), location);
float strength = combatData.getAttackStrength();
suppression = strength/2000f +(strength > 10? 0.05f: 0);
I am embarassed the old approach was that Stupid! It doesn't include the size of the population to be controlled at all.
After some thought, what I think is best is to have the suppression be related to both the military strength of units present, and also their manpower. The logic is that military power that is useful in fighting organized enemy units is not always that valuable against rioters.
My first shot at a value (which should be on the RDF/EDF scale of [0,1] ) is something like:
suppression = (military manpower) * 10 / square population + sqrt (A*strength/pop) / (B).
The first term says that if the military manpower is 10% of the local population that they can suppress just about any rioting. The second term says as strength of the military unit grows, capability to suppress increases, but only as the square root. I don't know what the right size for A and B are. My notion is that A should be set so that for the most primitive militia A*strength/ (unit manpower) = 1 or so. B should be set so that the whole second term never gets vastly above 1 for practical situations unless there is a large military presence. (Again the aim is that 10% military can control most population, but it may take less with better weapons.)
On the subject of promoting a policy far from public opinion. . . I think it should create riots similar to EDF/RDF ones. In a vector representation of all relevant policies, if the angle between the vectors is small, there should be no contribution to the Policy Riots. If the vectors are far off, it could approach 1. Then similar code to the EDF/RDF riots could be used. Hope this helps.
Last edited by Mark_Everson on 06-12-2003 at 02:47
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:15
|
|
This sounds good, but shouldn't there be a factor linked to the government? A government that oppresses population would have different suppression figures than one which only meddles when riots occur.
Something like having more suppression with a big number of troops if you have an oppression policy, but less with few troops because people hate the soldiers/militians and would like to get rid of them? Or this policy would increase suppression effectiveness but increase discontent?
|
|
|  |
 |
|
roquijad
|
|
Santiago
Nov 1999 time: 05:15
|
|
Hi all,
As Mark said earlier, I think part of the confusing things mentioned comes from the fact that several coders have been involved in trying to bring this model to life. And, of course, each one has "translated" my original design with his own approach.
Laurent: I have deep problems understanding the object oriented coding philosophy, so I can't help much in that part. But if you have specific question about the model design, just shoot.
So far, reading quickly the posts from late november, all I have to say is:
1) The nationality, which basically is nothing but a label, should be seen as a characteristic of the EG. The nationality is the tribe/nation the people of the EG feel they belong to.
2) I assume the first step, the one you're in now Laurent, is coding the basic structure for govt+social+riots models. You probably want to define the classes and all that OO stuff, and code equations later. With the very little knowledge on OO I have, a bit of intuition and basing on some things FSmith and other have said in the past, I wrote a document called something like "Coding the Society Model" where I suggest the general structure needed for govt+social+riot. There's a version of it at http://cullivan.com/coc/models/codi...l_structure.htm. I can't remember now if that's the last version. I can't see now if I have a newer version because I have all my clash info on other computer. Can you check, Mark, if you have a document like that? I remember sending you the latest I had some time ago.
3) Tendency Values are the values of future cultural characteristics. The model computes what cultural values the EG should take in the long run and store them as "tendency values", so next turns are used mostly to adjust current values, slowly, toward the tendency values.
|
|
|  |
 |
|
roquijad
|
|
Santiago
Nov 1999 time: 05:15
|
|
Yes. Please send them, Mark.
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:15
|
|
Hi Rodrigo,
Don't worry about the OO stuff. Most of my difficulties probably come from teh interpretations of the model by several coders, and, more so, by the fact they didn't finish what was started, so I've had to figure out what was the intended way of doing things...
I didn't find the equations to get the 'tendencies'. That's not urgent, though, because the model should already work statically before it changes with time (i.e. I should have the riots moel working before working on something else).
I've made it so the riots seem to work (not sure about uprising of armies), and some of the actions the player does in the Ruler panel affect the model (EDF works - for some reason, religious discrimination factor doesn't seem to change yet).
If you've better ideas than what I proposed about discontent caused by setting EDF lower than what the population wants, then I'm happy to code that. I've still to see whose opinion must be taken into account to check for discontent. Probably the preferred ethnicity would riot if the EDF is too low.
|
|
|  |
 |
|
roquijad
|
|
Santiago
Nov 1999 time: 05:15
|
|
Hi Laurent,
The equations for tendency values are in the document called "social model 3 technical". I understand you have that doc, but if you don't, give me your mail and I'll send it to you.
It seems I never finished the technical document (equations) for the riots model, but probably I have a half-finished document I can send you. Since I don't seem to have finished that, I'm a little intrigued about the equations you're using for EDF...... Are you using the equations from the "intolerant church scenario"?
I think the "intolerant church scenario" is too complex for a first step (I don't know why it looked fine to me as a starter back then!). Several things were also simplified in that scenario, but in such a way, that I'm affraid it's gonna be a pain in the a** later to build the rest of the model based on that scenario.
I'd propose this: you code the structure of the whole thing (no equations), based in general in the "coding the society model structure" document (with the changes you believe are needed), and I provide you a much simpler, wisely-simplified scenario (that is, a small group of equations to code, plus the needed values for relevant variables). What do you think?
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:15
|
|
Rodrigo, I can't find the document... You can send it at laurent.di.cesare@wanadoo.fr .
Right now what I use for EDF is what was lareday coded when I took the code. So I don't know what lay behind.
The equation for riots now is:
PAF = 0.5f*(RDF+EDF);
probability = 0.8f * PAF - suppression;
I coded something to provide suppression by troops along the lines of what Mark proposed. RDF and EDF are set by the Ruler in the ruler panel.
I don't know where the original equation comes from.
The structure of the code is mostly here. The problem of coding a structure without equations is that I may end up coding something which is not used, which makes for bloated code (lots of unused stuff noone remembers why they are here and what they do).
|
|
|  |
 |
|
roquijad
|
|
Santiago
Nov 1999 time: 05:15
|
|
Laurent: In the package Mark sent you, you should find equations for social and govt models, but not for riots model. I checked my other PC and the document with riots model equations was nearly finished. Give a couple of days and I'll send a finished version.
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:15
|
|
Here's a small progress report:
I've managed to implement a not-omnipotent ruler. So the negociated policies thing is working. I must update the ruler user interface to show the result of what choices you take. Right now everything is static, so no tendencies or changing with time. I'll add that after, when the static stuff is working. IT might be worth delivering the static model before I start on the dynamic one.
I think I'll try to put most of the equations in the xml files so that it will be easy to tweak the figures. Many equation have figures like 22 or 8 which you probably worked a lot on in order to simulate, but if they don't work as intended, it will be easier to change it in the xml files than to have me recompile everything.
I'm still fighting with the existing code to find out what's totally unused, what's coded but in accordance with the current model etc.
The ruler panel needs some work, and the UI in general because it's totally heterogeneous and somewhat bugged. So I'll not be in the equations soon, but I hope I'll be able to make some progress next week.
|
|
|  |
 |
|
yellowdaddy
|
 |
Saoir-Ebhor, Sasainn a tuath, Rialtas Aontach
Apr 2003 time: 05:15
|
|
Where do things stand on the (token) languages front?
(I remember some of the coders being indifferent to them, but some of the others and potential players being more keen...)
Can we have a poll on languages?
Last edited by yellowdaddy on 25-01-2004 at 01:02
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:15
|
|
Rodrigo, I downloaded the doc, but didn't look much into it today (I'm a bit sick this week end and the rest of the week quite busy with RL... okay, and playing nethack too). Right now, the social model scenario I made is over a short period of time. Looking at the model a bit more, I think it's a mistake. Science is a quite important part of the model in the sense it drives evolution of several parameters. I haven't coded the evolution over time of the various parties desired policies, but that should probably be in the scenario, as there are two ways to lower ethnic discontent: By using the government panel (saying you want no ethnic/religious discrimination) and, indirectly, by researching new applications which will help mentalities evolve.
About languages, that's not for the immediate future as I'm coding very slowly right now.
|
|
|  |
 |
|
wombat42
|
|
Even though I've been very much for languages all along, I recognize that the crew has a lot to code right now, so it can wait a while. It is inevitable unless you want the Inca battling the Koreans on some randomly generated world in 5000 BC, but it can wait.
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:15
|
|
I've mostly finished coding the ethnic discrimination riots (beware ethnic discrimination - it can spawn a LOT of units if you control many unhappy provinces). I started coding the 'bad policy feeling' one, and have a few questions.
How do different riot causes stack?
If 3 social classes have a riotting chancd of 20%, do I sum these to get 60%, or do I roll 20% three times?
Also, it seems weird that 'bad policy feeling' and 'ethnic discrimination feeling' would both be computed based on social classes. So right now Ethnic Discrimination is based on ethnic groups as a whole, while Bad Policy is trying to be based on social classes (I must just put the social classes proportion in). But maybe I should instead add the probabilities of both events together in order to check what happens?
Last, I couldn't find a term in the probability of showing discontent based on the proportion of the population. It seems likely that a population will try to shout more if its population is more important? At least for ethnic discrimination.
A related point: The effects of revolts should vary based on the riotting social class. Kapital would probably be better off corrupting the economy than going to the streets with weapons, particularly if their numbers are low?
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:15
|
|
I'll be answering my own questions since noone seems to want to do it:
quote:
How do different riot causes stack?
If 3 social classes have a riotting chancd of 20%, do I sum these to get 60%, or do I roll 20% three times?
|
The model says there's an addition of all PAFs, with a weighted factor, to compute the probability. So it's a sum and was written in the model. So long for me.
quote:
So right now Ethnic Discrimination is based on ethnic groups as a whole, while Bad Policy is trying to be based on social classes (I must just put the social classes proportion in). But maybe I should instead add the probabilities of both events together in order to check what happens?
|
Here I came to discover that there's a difference between and the model and the code. A rather big one. PAFs should be added to compute events, while the code computes PAFs inside the events, which means the addition of PAFs should be done outside. Since I haven't coded many events yet, it's no big deal, particularly since the ethnic discontent spawns units different from other events (civ based on EG).
The other points remain open.
An additional question:
I'd like to have the Bad Policies Feeling coded, but to that end I need to have each social class' prefered policy somewhere. So I'm busy coding that. When done, I think I'll have enough of a govt/riot model coded for it to be released.
|
|
|  |
All times are GMT. The time now is 05:15. Apolyton Time is 00:15. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|