Clash Social Model.
I. Abstract :
The Clash social model is designed to represent the behaviour of the people in the Clash world. It embeds the racial, nationalist, religious and political characteristics of the people.
This model provides :
- some informations for the other models ;
- People's behaviour in response to the events.
II. General architecture :
The social model architecture is based on the provinces ; each province province holds people, who are grouped into agents. The agents have unique characteristics which define their behaviours.
An agent groups people in the same province who have the same religion, race and nationality. The characteristics of an agent are based on its primary characteristics, which are chosen by the player at the beginning of the game or generated (for non player civs) by the computer. Then, these characteristics may be modified by the events, the religion of the agent, its behaviours … And by various elements of the game such as migrations.
Each agent in each province is an independant entity, which means that it may evolve independently from the other agents. However, many interactions between agents are possible, which may alter the characteristics of the interacting agents.
The agents may take actions in response to events. An event is a kind of message, which is used to tell the agents what happens in the world ; if an agent is concerned by an event, he may take an action.
There are two kinds of events : global events and local events.
Local events are localized in a province, so only agents from this province may take an action in response to it ;
Global agent concern the whole civ (eventually the whole world) and any agent in the civ may be concerned and take an action.
Each event has a category, which may be race, nationality, religion or class. Each time agents answer to an event in a given province or at the global level, agents are grouped in " meta agents ", by race, nationality, class or religion depending on the category of the event.
The classes are those defined by H in its government model, they dont need to be doubled in this model. Each agent has a repartition table that gives the number of people of this agent in each class.
The main problem with this model is the CPU load, which may be very high. That's why many mechanics have been introduced in this model to simplify the computings.
III. Elements of the model :
The main elements of this model are the agents. As has been said before, an agent groups people who share the same nationality, race and religion.
III.1. Nationality :
The nationality is a very simple object, that gives the name of the civilization an agent belongs to.
III.2. Physical characteristics :
physical characteristics are represented by two figures.
These characteristics are used to compute a " distance " between two races.
III.3. Religion :
The religions are mainly used to alter the attributes of the agents in a way such as it can represent the influence of religions on the people's background culture. Also, like the races and nationalities, it is a political element of the game. There are many kinds of religions, ranging from the most primitive to the most modern. Religions in Clash are designed to represent any kind of religion. Religion's attributes are these :
- familial shape;
- individualism;
- sectarism/tolerance;
- superstition;
- Importance of Books;
- Law tables;
- sky awareness;
- nature awareness;
- Human sacrifices ;
- God's Evilness.
A primitive religion would have a high superstition level and low Books level.
Sky and nature awareness are mainly linked to primitive religions, so their effect becomes neutral with religions having high Books level and low superstition levels.
These attributes will be used to make the agent's attributes evolve with time, they will also be used to modify the outputs of other models (for example : high Importance of Books means cultures with this religion are spirit oriented, so they have intersest in cultural techs such as philosophy ; a culture with a religion with high human sacrifice level would be very agressive with its neighbours …)
Religions are geographically based (they are born in a localized place), and they spred through the world via the mechanism of conversions (more on this later).
III.4. Agents :
Agents are defined as having a religion, a race and a nationality. Moreover, agents have attributes which represent their " culture " :
- nationalism;
- provincialism;
- agressivness;
- authority acceptance;
- social rigidity;
- traditionnalism;
- technical education;
- philosophical education.
These attributes are directly used to compute behaviours ; they are also used to modify other models of the game (example : high agressivness would modify how people fight in a war).
The attributes of an agent depend on the beginning settings of the player as well as the religion he chose.
Then these attributes will evolve in time through the effect of religions, through mixing of people and cultures, through the effects of the events and the actions the agent takes in response to them …
III.5. Events :
Events are used to carry informations to the agents on what's happening in their province, their civ or even the world.
Events have a category, which may be race, nationality, religion or class. The category of an event indicates which agents are concerned, and how they will be grouped to respond to it. For example, in the case of an event of race category (for example racist war), all the agents having one of the races involved will try to respond to the event. Actually, every agent of one of the race will be grouped in a " metaagent ", their characteristics will be rounded using the demographic size of the agents, then the action will be computized for the metaagent. This mechanism is intended to lower CPU usage for these calculations.
Each event describes how agents may react to it through a decision tree. When an event arrives, the agents that may respond to it go through the decision tree, every node being an equation which gives the direction of the next node or leaf. Each leaf is a decision, so when an agent has gone through the whole tree, the leaf it has reached gives the action it will take (which may be no action).
Global events have another method, which is used to decide which province will treat this event as global, and which province will treat it as local : for certain kind of global messages, some province will be more involved than others, so their reaction may differ from the others. Lets take the example of a war event. For most of the provinces, this event will be treated as global because their effect are very similar ; but for some provinces, mainly the provinces which are on the front line, this event will have stronger effects (the people will feel more uinsafe than in the provinces that are awau from the front line). So in the case of a war event, the event will be treated as local by the provinces that are on the front line, and it will be treated as local by the other provinces.
When an event is treated as global, the behaviour are computed at the civ level, using rounded characteristics of the agents in the provinces that treat this event as local. The actions are eventually taken in each province, and genereted in each province, but they are computed only once. This is also intended to release some CPU usage.
III.6. Sub models :
There are currently three sub-models in the social model :
- demographic submodel, which gives the natural evolution of population through reproduction ;
- migration sub-model, which generates the " natural " (non-forced) migration flows in the Clash world ;
- mixing sub-model, which defines how races mix and fusion ;
- religious conversion sub-model.
III.6.1. Demographics
The demographic sub-model is based on equations using many parameters, such as the familial shape, the life expectancy, the death-at-birth rate … to give the evolution of the population each turn (which may be positive or negative).
(I have already given some equations for this model, I will include them in this document as soon as I retrieve them)
III.6.2. Migrations
The migration sub-model gives figures concerning the non-forced migration in the World of Clash. Non-forced migration is the migration flows that are not the result of an event (for exemple, a war between civ A and civ B event may result in the migration of people with the A nationality living in the B civ, or some orders coming from the ruler may result in massiv, forced displacement of people …)
This natural migration has mainly economic causes : the difference of life confort between province A and province B may push some citizens in province B to leave for province A. Also, some provinces may look safier, which may also push people to migrate. Other factors may come into account, like the distance between the original province and the new one given the comm/transport tech level, also the " fame " of a province may come into account (the capital province has a great fame, like some provinces with special structure, " wonders ", see below) …
All this combined in an equation will give each province a rating. By comparing the ratings of a province with others, this model will give a migration ratio each turn.
When a new group of people arrives in a province after a migration, there may be several cases :
1. the migration occurs inside the same civ :
- there is a matching agent for the arriving group (same religion, nationality and race) : the arriving group is integrated to this agent, and the attributes of both groups are meaned, using weights reflecting the size of each agent. This system will allow the convergence of the agents inside neighbouring provinces within time, through the mechanism of natural migration only. There may be another mechanism for helping provinces convergence, through the trade exchanges.
- There is no matching agent in the province : a new agent is created for holding the arriving group. It is then treated as any other agent in this province.
2. the migration occurs between two different civs :
In this case, the arriving group does have a differing nationality. Two cases may occur :
- there are already people from this nationality in the new province : the arriving group is integrated to a matching agent (if there is none, a new agent is created);
- there is no one with the nationality of the arriving group, a new agent is created.
In both cases, there are special rules for handling nationalities.
- There may be laws/decrees concerning the nationalities ; for example, every new arrivant immediatly acquires the nationality ; or no foreigner may acquire the nationality, never.
- If there is no law, there is a natural integration of the arriving foreigners, which takes time. Every turn a given amount (in %) of a nationality is given the hosting nationality. This % may vary depending on the people in the province of the hosting nationality, depending on the relations between the nationalities, depending on the nationalism of the agent that will be integrated … When an agent is given the host nationality, it is becomes a standard agent and may be integrated into a matching agent following the same rules as for inside-civ migration.
The case of the migration with agents of different races is covered in the mixing sub-model.
The religious conversion sub-model deals with the cohabitation of different religions inside a province.
III.6.3. Mixing
The mixing submodel deals with the mixing between people of different races.
One problem with mixing races, is that if we dont care we could build a system where the number of sub-races would become quickly unhandlable.
That's why we must have special rules to prevent an explsosion of the number of races (and then agents) when different races begin to meet each other.
Mixing will occur as soon as groups of population belonging to different races live in the same province (side note : an army looting a province is considered as " living " in this province for the purpose of mixing). When mixing occurs, there are two cases :
- the two races are not very different ;
- the two races are very different.
The " difference " between races is the distance defined in III.2.
- In the first case, no new race will be created to hold the subrace resulting in the mixing of race A and B. Actually, to represent their mixing, races A and B will converge through the time until their attributes are the same. At this point, all matching agents will fusion. This mechanics allows to represent the mixing of resembling races without crezating any sub-race. The convergence rate will depend on the relation of both races and on the size of the smallest race.
- In the second case, a sub-race will be created ; which will be the " mean " race between races A and B. Each turn this race will increase in size, while the sizes of races A and B will equally decrease (not inculding natural demographic evolution covered by the sub-model). The rate of size evolution will depend on the relation between A and B, and on the size of the smallest race. As soon as the sub-race AB exists, it will be considered as a " not so different race " for races A and B, and thus A and B will concerge towards AB, so at a long term A and B will converge. The rules for concergence between A and AB and between B and AB are the same as in the first case. Race AB is only allowed to mix with A and B. There is no mixing between AB and a C race, or between AB and a DC subrace, also there may be mixing between A and C, B and D, A and D…
III.6.4. Religious conversions :
The religious conversion sub-model deals with conversions that are not ordered directly by the ruler, be it through its own conversion (like Clovis) or through forced conversion (like conquistadors).
This natural conversion comes from evangeslists activists, volontarist conversion …
Natural conversion may occur in a province when two groups of different religion are present. In this case, a conversion rate is calculated, based on the political strength and demographic size of the RCs, based on the sectarism of the given religions …
Through the mechanism of migration and through trade exchanges, religions may spread from province to province, then from civ to civ.
Note : religions are always born in a given province.
Note 2 : it is more easy for a modern religion (high Books) to achieve conversions over a primitive religion for agents having at least a moderate level of philo education. The higher the philo education, the easier the conversion.
IV. Events and actions :
As has been said before, any action taken by an agent is the result of an event. Each event object holds all the data and all the methods necessary to process it.
In many cases, events will be triggered by player actions. For example, taking a Law or a Decree will trigger an event, so that the agents may react to this political decision.
In other cases, events will be triggered by the AI : an opposing civ declaring war to you will trigger a war event.
At last, in some cases events will be triggered by the models of the game. For example, the government model may trigger an event to indicate that discontent level has reached an unsustainable point in a given province.
Events can be local or global.
Each global event has a method to which provinces will treat the event as global, and which ones will treat it as local. For example, when the player takes a decree prohibiting a given religion, each province with agents with this religion will treat the event as local, and he others, which dont hold any agent with this religion, will treat it as global.
When an event is treated as global, the model uses attributes that a wheighed mean of every agents in every province in the civilization, even those that treat the event as local. This allows to calculate the mean only once evry turn.
As I've described it before, each event has a decision tree, which allows an agent to choose the action it takes to respond to this event.
Each tree consists of nodes, which link the branches of the tree between them, and of leafs, which are the end of the branches. When an agent goes through a decision tree, it resolves an equation or an algorithm at every node, which will tell him what is the next brach to go. When the agent has gone though every node it reaches a leaf. This leaf will tell what action the agent takes.
The equations - or algorithms - at the nodes use some attributes of the agent, and some elements of the context.
The context is a set of datas that describe the environment of the agent. Each province has a context. Context datas for a province are :
- some economical datas coming from the economic model ;
- some political datas coming from the government model ;
- a mood indicator (are the people happy or not) for every race, nationality and religion;
- a security feeling indicator (do the people feel safe in this province) for every race, nationality and religion;
- some datas concerning the health and hygiena in the province ;
- the race, religion, and nationality of the governor of the province (this is a new element I propose to add, which will allow to assess the political power of every race, nationality and religion throughout the civ. This data may be very interesting to use in some decision trees).
For global events, a civ-wide context is created.
Here is an example of an event, with all the datas associated :
This is a war event between two different nationalities with similar races.
The category of the event is nationalities, since this is not a religion nor a race war.
The algorithm for deciding which province will treat the event as local is : every province that is adjacent to the enemy civ treats the event as local.
The decision tree is the following for the nationality A (the nationality of this civ) :
Node root : Three branches may be taken from this node :
- nationalistic action branch ;
- migration action branch ;
- no action branch.
The first branch is taken if there are bad relations between A and B nationalities and if A is not in minority vs. B ;
The second branch is taken if there is a low security indicator, which may result from the province being on the front line, or the nationality A is in minority ;
The no action branch (which is a leaf) is taken if no other branch is taken.
Node nationalistic : Two branches may be taken from this node :
- violent actions
- non-violent actions
the branch taken here mainly depends on the relations between A and B, the relative demographic power of A and B, the agressivness of A, the nationality of the ruler of the governor. Each of these branches are leaves.
Migration leaf : this branch is a leaf.
After a leaf has been reached, a intensity is calcultated for the action. In the case of migrations, the intensity would give the proportion of people who leave ; in the case of violent actions, it gives the number of people killed, etc …
Then we would have a quite similar tree for the B nationality agents (those of the enely civ). This tree of course is a bit different. I wont detail it, you got the idea.
When decisions are taken in the provinces that are on the front line, they are directly created. When action are taken in provinces that treat the event as global, they are then implemented in each civ (in this example, if the action taken at the global level is migration of citizens of civ B, with a given rate, then this rate is applied in each province that hosts citizens of civ B).
When such an event occurs, that concerns two adverse groups of agents, one of the groups acts first (in this case nationality A) and the other group reacts after this, taking into account the actions of the first group (in this case, if group A takes nationalistic, violent actions, then group B will be more prone to migrate).
Beside triggering actions from the agents, events tend to mdify the context in the provinces they occur. For example, in case of a war event, the safe feeling indicator in the provinces on the front line will be lowered to reflect the fact that the war may endanger the people who are near the future battles.
When an action is taken, it is implemented, which means that the concerned models calculate the results of the events. Back to our war example ; if the action taken is nationalistic violences, then a part of the people with nationality B may die, which is handled by the demographic sub-model ; then if B citizens migrate, the social model takes care of implementing this migration.
In some cases, action taken may trigger an event. If, in our last example, a group of citizens A migrate in a province where no agent has the same religion, then it may trigger an event in the province they arrive that signals that people in this province are discovering a new religion. Thi event will be proceced next turn in this province.
However, in many cases, the reaction to an action will be immediatly processed by the adverse group of agents (like our example on the nationalistic, violent actions taken by group A, to which group A responded by migrating). This prevents an explosion of the number of events generated and processed each turn.
In terms of implementation, the events are treated between two turns.
There is one last point to solve, regarding actions and events : the governor AI charged with micro-managing the province for the player/ruler. IMO they must have some high-level orders regarding how they will treat troubles in their province. For example, there may be a slider indicating the level of violence they are allowed to use, or in the contrary the amount of financial efforts they may make to quiet the people. Then, there may be another decision tree, embedded in the event, allowing the governor to take appropriate decisions when events/actions occur in its province. Or there may be another system …
As I said before, each time an event arrives, it has a category which may be race, religion, nationality or class. In the first three cases, we group the agents in the province (or at the global level) by race, religion or nationality, we build a " metaagent " with attributes that are a wheigted mean of the attributes of the agents of that category, then we calculate the reaction. When the category is class, we use a table in the province giving the demographic repariton of the population in classes, then we create the metaagents and calculate their reactions. In this case, the decision of an event of class category must integer in its node equations some parameters concerning the political power of that class as well as the pro/anti status.
V. Evolution of the attributes :
The attributes of the agents do evolvle in time, through two mechanisms :
- the religion of an agent will modify its attributes slowly, making them tend to the " values " of this religion. For example, a high Books level will help the philo education attribute to increase ; a high human sacrifice value will mean a high agressivness level ,etc…
- each time an action is taken by an agent, some of its attributes will move, with a very simple rule : when an attribute is used to take a decision in a decision tree, it may wether help the action to be taken, or prevent it to be taken. For each action that is taken, every parameter that favored it is increased, and every parameter that prevented it is lowered. This particular mechanism allows to, in a way, record the history of a people. For example, when a population becomes used to revolt successively when it dislikes actions of its ruler, it will tend to revolt more easily each time. Inversely, when a population becomes used to see its revolts punished in the blood, it will learn to avoid revolting and thus become more obeying to its ruler (its authority acceptance and socila rigidity attributes would increase, preventing it to take other actions versus the ruler. Of course, in such a case their discontent and anti status would increase, probably meaning that they will reach a point where they will indeaed revolt, but in a very very violent manner).
Mark had a remark on this point : he stated that this could lead to uncontrolled rise of a given attribute (the more an agent takes an action, the more the linked attribute will increase, and the more the agent will take this action again, increasing again this attribute …. )
My answer was :
- what I have written lacks precision : the way an attribute evolves does not only depend on the action taken, but also on the respinse that was given. For example, when an agent revolts, if the revolt is accepted by the authority then its authority and social rigidity attributes will be lowered, increasing the probability that a revolt action will be taken the next time. If, to the contrary, the revolt is punished in the blood, those attributes will be enhanced, lowering the probability that the same action will be taken next time.
- Thanks to this system, the evolution of the attributes actually depend on the ruler/player. If u're a bad ruler, and actually let the people do what they want and get what they want each time they reclaim it, there is no reason they dont keep on reclaiming things. U're the ruler, all that is up to you…
VI. Link with the other models :
The social model has many links with the other models, in input and in output.
In input, the social model uses some parameters of other models to create the context of the provinces. It uses the economic model to build the economic context of a province ; it may use the military model to calculate the safe feeling indicator …
Also, in some cases other models will trigger events to be processed by the social model (for example the government model that maytrigger an event to indicate that the anti-satus of a class is so high that an action may be taken …).
In the other way, the social model outputs datas for other models.
- Military model : when a war is declared, the social model will give some paramters concerning how the war is seen by the people. This parameter may be used to modify the attributes of the army. For example, in a war with the heir enemy who is hated, the people may be really willing to crush the enemy, so they will be both very motivated and very violent. In the contrary, in a war that is not understood nor accepted by the people, there may be a high desertion rate, and the army may be undermotivated, meaning more troubles for the general on the battlefield.
- Tech model : some parameters may be used to alter the output of the tech model. For example ; a high value in religious superstition would mean that tech researches concerning natural sciences would be more difficult, or slower ; a civ with a religion with high Book level would more easily research technologies linked to culture, philosophy, literacy … A civ with a high agressivness would tend to focus on weapons, etc …
- Economic model : some actions taken by the agents have huge effects on the economic model. For example, when people take an action of revolt in a province, then a part of the production of the province is halted cause people cease working ; also, some economic infrastructures may be looted … Moreover, the attributes of the agents of a province may have effects on the economic model output. One intersting effect concernes the tech education level. When, for example, a civ acquires a modern technology, like for example some kind of industrialization, through diplomacy or natural spreading of the techs, its agents may not be ready to implmenent this tech effectively if they are not technically educated enough. Thus, the tech eduation level must be high enough for the plants to produce their nominal output. In our example, if a relatively primitiv civ acquires indutrialization, then it wont be able to produce high outputs from its plants as long as the tech education level is not high enough.
- Diplomatic model : the relations between the people of two civs may have an effect on the high level, diplomatic relations of those civs. Lets admit that u have some foreign immigrants in your civ, and that your citizens are both violent and nationalist. Then there is a great chance that the relations between your people and the immigrants are quite bad, meaning for example that there are some nationalistic exactions in your civ versus those imigrants. Then, when you will conduct diplomatic negociations with the ruler of the civ these immigrants come from, there is a huge chance that the ruler of the other civ will be anger with the fact that his citizens are badly treated in your civ. The negociation will then be harder.
(I have to divide the post into two because its too long ...)
[This message has been edited by manurein (edited September 11, 1999).]
I. Abstract :
The Clash social model is designed to represent the behaviour of the people in the Clash world. It embeds the racial, nationalist, religious and political characteristics of the people.
This model provides :
- some informations for the other models ;
- People's behaviour in response to the events.
II. General architecture :
The social model architecture is based on the provinces ; each province province holds people, who are grouped into agents. The agents have unique characteristics which define their behaviours.
An agent groups people in the same province who have the same religion, race and nationality. The characteristics of an agent are based on its primary characteristics, which are chosen by the player at the beginning of the game or generated (for non player civs) by the computer. Then, these characteristics may be modified by the events, the religion of the agent, its behaviours … And by various elements of the game such as migrations.
Each agent in each province is an independant entity, which means that it may evolve independently from the other agents. However, many interactions between agents are possible, which may alter the characteristics of the interacting agents.
The agents may take actions in response to events. An event is a kind of message, which is used to tell the agents what happens in the world ; if an agent is concerned by an event, he may take an action.
There are two kinds of events : global events and local events.
Local events are localized in a province, so only agents from this province may take an action in response to it ;
Global agent concern the whole civ (eventually the whole world) and any agent in the civ may be concerned and take an action.
Each event has a category, which may be race, nationality, religion or class. Each time agents answer to an event in a given province or at the global level, agents are grouped in " meta agents ", by race, nationality, class or religion depending on the category of the event.
The classes are those defined by H in its government model, they dont need to be doubled in this model. Each agent has a repartition table that gives the number of people of this agent in each class.
The main problem with this model is the CPU load, which may be very high. That's why many mechanics have been introduced in this model to simplify the computings.
III. Elements of the model :
The main elements of this model are the agents. As has been said before, an agent groups people who share the same nationality, race and religion.
III.1. Nationality :
The nationality is a very simple object, that gives the name of the civilization an agent belongs to.
III.2. Physical characteristics :
physical characteristics are represented by two figures.
These characteristics are used to compute a " distance " between two races.
III.3. Religion :
The religions are mainly used to alter the attributes of the agents in a way such as it can represent the influence of religions on the people's background culture. Also, like the races and nationalities, it is a political element of the game. There are many kinds of religions, ranging from the most primitive to the most modern. Religions in Clash are designed to represent any kind of religion. Religion's attributes are these :
- familial shape;
- individualism;
- sectarism/tolerance;
- superstition;
- Importance of Books;
- Law tables;
- sky awareness;
- nature awareness;
- Human sacrifices ;
- God's Evilness.
A primitive religion would have a high superstition level and low Books level.
Sky and nature awareness are mainly linked to primitive religions, so their effect becomes neutral with religions having high Books level and low superstition levels.
These attributes will be used to make the agent's attributes evolve with time, they will also be used to modify the outputs of other models (for example : high Importance of Books means cultures with this religion are spirit oriented, so they have intersest in cultural techs such as philosophy ; a culture with a religion with high human sacrifice level would be very agressive with its neighbours …)
Religions are geographically based (they are born in a localized place), and they spred through the world via the mechanism of conversions (more on this later).
III.4. Agents :
Agents are defined as having a religion, a race and a nationality. Moreover, agents have attributes which represent their " culture " :
- nationalism;
- provincialism;
- agressivness;
- authority acceptance;
- social rigidity;
- traditionnalism;
- technical education;
- philosophical education.
These attributes are directly used to compute behaviours ; they are also used to modify other models of the game (example : high agressivness would modify how people fight in a war).
The attributes of an agent depend on the beginning settings of the player as well as the religion he chose.
Then these attributes will evolve in time through the effect of religions, through mixing of people and cultures, through the effects of the events and the actions the agent takes in response to them …
III.5. Events :
Events are used to carry informations to the agents on what's happening in their province, their civ or even the world.
Events have a category, which may be race, nationality, religion or class. The category of an event indicates which agents are concerned, and how they will be grouped to respond to it. For example, in the case of an event of race category (for example racist war), all the agents having one of the races involved will try to respond to the event. Actually, every agent of one of the race will be grouped in a " metaagent ", their characteristics will be rounded using the demographic size of the agents, then the action will be computized for the metaagent. This mechanism is intended to lower CPU usage for these calculations.
Each event describes how agents may react to it through a decision tree. When an event arrives, the agents that may respond to it go through the decision tree, every node being an equation which gives the direction of the next node or leaf. Each leaf is a decision, so when an agent has gone through the whole tree, the leaf it has reached gives the action it will take (which may be no action).
Global events have another method, which is used to decide which province will treat this event as global, and which province will treat it as local : for certain kind of global messages, some province will be more involved than others, so their reaction may differ from the others. Lets take the example of a war event. For most of the provinces, this event will be treated as global because their effect are very similar ; but for some provinces, mainly the provinces which are on the front line, this event will have stronger effects (the people will feel more uinsafe than in the provinces that are awau from the front line). So in the case of a war event, the event will be treated as local by the provinces that are on the front line, and it will be treated as local by the other provinces.
When an event is treated as global, the behaviour are computed at the civ level, using rounded characteristics of the agents in the provinces that treat this event as local. The actions are eventually taken in each province, and genereted in each province, but they are computed only once. This is also intended to release some CPU usage.
III.6. Sub models :
There are currently three sub-models in the social model :
- demographic submodel, which gives the natural evolution of population through reproduction ;
- migration sub-model, which generates the " natural " (non-forced) migration flows in the Clash world ;
- mixing sub-model, which defines how races mix and fusion ;
- religious conversion sub-model.
III.6.1. Demographics
The demographic sub-model is based on equations using many parameters, such as the familial shape, the life expectancy, the death-at-birth rate … to give the evolution of the population each turn (which may be positive or negative).
(I have already given some equations for this model, I will include them in this document as soon as I retrieve them)
III.6.2. Migrations
The migration sub-model gives figures concerning the non-forced migration in the World of Clash. Non-forced migration is the migration flows that are not the result of an event (for exemple, a war between civ A and civ B event may result in the migration of people with the A nationality living in the B civ, or some orders coming from the ruler may result in massiv, forced displacement of people …)
This natural migration has mainly economic causes : the difference of life confort between province A and province B may push some citizens in province B to leave for province A. Also, some provinces may look safier, which may also push people to migrate. Other factors may come into account, like the distance between the original province and the new one given the comm/transport tech level, also the " fame " of a province may come into account (the capital province has a great fame, like some provinces with special structure, " wonders ", see below) …
All this combined in an equation will give each province a rating. By comparing the ratings of a province with others, this model will give a migration ratio each turn.
When a new group of people arrives in a province after a migration, there may be several cases :
1. the migration occurs inside the same civ :
- there is a matching agent for the arriving group (same religion, nationality and race) : the arriving group is integrated to this agent, and the attributes of both groups are meaned, using weights reflecting the size of each agent. This system will allow the convergence of the agents inside neighbouring provinces within time, through the mechanism of natural migration only. There may be another mechanism for helping provinces convergence, through the trade exchanges.
- There is no matching agent in the province : a new agent is created for holding the arriving group. It is then treated as any other agent in this province.
2. the migration occurs between two different civs :
In this case, the arriving group does have a differing nationality. Two cases may occur :
- there are already people from this nationality in the new province : the arriving group is integrated to a matching agent (if there is none, a new agent is created);
- there is no one with the nationality of the arriving group, a new agent is created.
In both cases, there are special rules for handling nationalities.
- There may be laws/decrees concerning the nationalities ; for example, every new arrivant immediatly acquires the nationality ; or no foreigner may acquire the nationality, never.
- If there is no law, there is a natural integration of the arriving foreigners, which takes time. Every turn a given amount (in %) of a nationality is given the hosting nationality. This % may vary depending on the people in the province of the hosting nationality, depending on the relations between the nationalities, depending on the nationalism of the agent that will be integrated … When an agent is given the host nationality, it is becomes a standard agent and may be integrated into a matching agent following the same rules as for inside-civ migration.
The case of the migration with agents of different races is covered in the mixing sub-model.
The religious conversion sub-model deals with the cohabitation of different religions inside a province.
III.6.3. Mixing
The mixing submodel deals with the mixing between people of different races.
One problem with mixing races, is that if we dont care we could build a system where the number of sub-races would become quickly unhandlable.
That's why we must have special rules to prevent an explsosion of the number of races (and then agents) when different races begin to meet each other.
Mixing will occur as soon as groups of population belonging to different races live in the same province (side note : an army looting a province is considered as " living " in this province for the purpose of mixing). When mixing occurs, there are two cases :
- the two races are not very different ;
- the two races are very different.
The " difference " between races is the distance defined in III.2.
- In the first case, no new race will be created to hold the subrace resulting in the mixing of race A and B. Actually, to represent their mixing, races A and B will converge through the time until their attributes are the same. At this point, all matching agents will fusion. This mechanics allows to represent the mixing of resembling races without crezating any sub-race. The convergence rate will depend on the relation of both races and on the size of the smallest race.
- In the second case, a sub-race will be created ; which will be the " mean " race between races A and B. Each turn this race will increase in size, while the sizes of races A and B will equally decrease (not inculding natural demographic evolution covered by the sub-model). The rate of size evolution will depend on the relation between A and B, and on the size of the smallest race. As soon as the sub-race AB exists, it will be considered as a " not so different race " for races A and B, and thus A and B will concerge towards AB, so at a long term A and B will converge. The rules for concergence between A and AB and between B and AB are the same as in the first case. Race AB is only allowed to mix with A and B. There is no mixing between AB and a C race, or between AB and a DC subrace, also there may be mixing between A and C, B and D, A and D…
III.6.4. Religious conversions :
The religious conversion sub-model deals with conversions that are not ordered directly by the ruler, be it through its own conversion (like Clovis) or through forced conversion (like conquistadors).
This natural conversion comes from evangeslists activists, volontarist conversion …
Natural conversion may occur in a province when two groups of different religion are present. In this case, a conversion rate is calculated, based on the political strength and demographic size of the RCs, based on the sectarism of the given religions …
Through the mechanism of migration and through trade exchanges, religions may spread from province to province, then from civ to civ.
Note : religions are always born in a given province.
Note 2 : it is more easy for a modern religion (high Books) to achieve conversions over a primitive religion for agents having at least a moderate level of philo education. The higher the philo education, the easier the conversion.
IV. Events and actions :
As has been said before, any action taken by an agent is the result of an event. Each event object holds all the data and all the methods necessary to process it.
In many cases, events will be triggered by player actions. For example, taking a Law or a Decree will trigger an event, so that the agents may react to this political decision.
In other cases, events will be triggered by the AI : an opposing civ declaring war to you will trigger a war event.
At last, in some cases events will be triggered by the models of the game. For example, the government model may trigger an event to indicate that discontent level has reached an unsustainable point in a given province.
Events can be local or global.
Each global event has a method to which provinces will treat the event as global, and which ones will treat it as local. For example, when the player takes a decree prohibiting a given religion, each province with agents with this religion will treat the event as local, and he others, which dont hold any agent with this religion, will treat it as global.
When an event is treated as global, the model uses attributes that a wheighed mean of every agents in every province in the civilization, even those that treat the event as local. This allows to calculate the mean only once evry turn.
As I've described it before, each event has a decision tree, which allows an agent to choose the action it takes to respond to this event.
Each tree consists of nodes, which link the branches of the tree between them, and of leafs, which are the end of the branches. When an agent goes through a decision tree, it resolves an equation or an algorithm at every node, which will tell him what is the next brach to go. When the agent has gone though every node it reaches a leaf. This leaf will tell what action the agent takes.
The equations - or algorithms - at the nodes use some attributes of the agent, and some elements of the context.
The context is a set of datas that describe the environment of the agent. Each province has a context. Context datas for a province are :
- some economical datas coming from the economic model ;
- some political datas coming from the government model ;
- a mood indicator (are the people happy or not) for every race, nationality and religion;
- a security feeling indicator (do the people feel safe in this province) for every race, nationality and religion;
- some datas concerning the health and hygiena in the province ;
- the race, religion, and nationality of the governor of the province (this is a new element I propose to add, which will allow to assess the political power of every race, nationality and religion throughout the civ. This data may be very interesting to use in some decision trees).
For global events, a civ-wide context is created.
Here is an example of an event, with all the datas associated :
This is a war event between two different nationalities with similar races.
The category of the event is nationalities, since this is not a religion nor a race war.
The algorithm for deciding which province will treat the event as local is : every province that is adjacent to the enemy civ treats the event as local.
The decision tree is the following for the nationality A (the nationality of this civ) :
Node root : Three branches may be taken from this node :
- nationalistic action branch ;
- migration action branch ;
- no action branch.
The first branch is taken if there are bad relations between A and B nationalities and if A is not in minority vs. B ;
The second branch is taken if there is a low security indicator, which may result from the province being on the front line, or the nationality A is in minority ;
The no action branch (which is a leaf) is taken if no other branch is taken.
Node nationalistic : Two branches may be taken from this node :
- violent actions
- non-violent actions
the branch taken here mainly depends on the relations between A and B, the relative demographic power of A and B, the agressivness of A, the nationality of the ruler of the governor. Each of these branches are leaves.
Migration leaf : this branch is a leaf.
After a leaf has been reached, a intensity is calcultated for the action. In the case of migrations, the intensity would give the proportion of people who leave ; in the case of violent actions, it gives the number of people killed, etc …
Then we would have a quite similar tree for the B nationality agents (those of the enely civ). This tree of course is a bit different. I wont detail it, you got the idea.
When decisions are taken in the provinces that are on the front line, they are directly created. When action are taken in provinces that treat the event as global, they are then implemented in each civ (in this example, if the action taken at the global level is migration of citizens of civ B, with a given rate, then this rate is applied in each province that hosts citizens of civ B).
When such an event occurs, that concerns two adverse groups of agents, one of the groups acts first (in this case nationality A) and the other group reacts after this, taking into account the actions of the first group (in this case, if group A takes nationalistic, violent actions, then group B will be more prone to migrate).
Beside triggering actions from the agents, events tend to mdify the context in the provinces they occur. For example, in case of a war event, the safe feeling indicator in the provinces on the front line will be lowered to reflect the fact that the war may endanger the people who are near the future battles.
When an action is taken, it is implemented, which means that the concerned models calculate the results of the events. Back to our war example ; if the action taken is nationalistic violences, then a part of the people with nationality B may die, which is handled by the demographic sub-model ; then if B citizens migrate, the social model takes care of implementing this migration.
In some cases, action taken may trigger an event. If, in our last example, a group of citizens A migrate in a province where no agent has the same religion, then it may trigger an event in the province they arrive that signals that people in this province are discovering a new religion. Thi event will be proceced next turn in this province.
However, in many cases, the reaction to an action will be immediatly processed by the adverse group of agents (like our example on the nationalistic, violent actions taken by group A, to which group A responded by migrating). This prevents an explosion of the number of events generated and processed each turn.
In terms of implementation, the events are treated between two turns.
There is one last point to solve, regarding actions and events : the governor AI charged with micro-managing the province for the player/ruler. IMO they must have some high-level orders regarding how they will treat troubles in their province. For example, there may be a slider indicating the level of violence they are allowed to use, or in the contrary the amount of financial efforts they may make to quiet the people. Then, there may be another decision tree, embedded in the event, allowing the governor to take appropriate decisions when events/actions occur in its province. Or there may be another system …
As I said before, each time an event arrives, it has a category which may be race, religion, nationality or class. In the first three cases, we group the agents in the province (or at the global level) by race, religion or nationality, we build a " metaagent " with attributes that are a wheigted mean of the attributes of the agents of that category, then we calculate the reaction. When the category is class, we use a table in the province giving the demographic repariton of the population in classes, then we create the metaagents and calculate their reactions. In this case, the decision of an event of class category must integer in its node equations some parameters concerning the political power of that class as well as the pro/anti status.
V. Evolution of the attributes :
The attributes of the agents do evolvle in time, through two mechanisms :
- the religion of an agent will modify its attributes slowly, making them tend to the " values " of this religion. For example, a high Books level will help the philo education attribute to increase ; a high human sacrifice value will mean a high agressivness level ,etc…
- each time an action is taken by an agent, some of its attributes will move, with a very simple rule : when an attribute is used to take a decision in a decision tree, it may wether help the action to be taken, or prevent it to be taken. For each action that is taken, every parameter that favored it is increased, and every parameter that prevented it is lowered. This particular mechanism allows to, in a way, record the history of a people. For example, when a population becomes used to revolt successively when it dislikes actions of its ruler, it will tend to revolt more easily each time. Inversely, when a population becomes used to see its revolts punished in the blood, it will learn to avoid revolting and thus become more obeying to its ruler (its authority acceptance and socila rigidity attributes would increase, preventing it to take other actions versus the ruler. Of course, in such a case their discontent and anti status would increase, probably meaning that they will reach a point where they will indeaed revolt, but in a very very violent manner).
Mark had a remark on this point : he stated that this could lead to uncontrolled rise of a given attribute (the more an agent takes an action, the more the linked attribute will increase, and the more the agent will take this action again, increasing again this attribute …. )
My answer was :
- what I have written lacks precision : the way an attribute evolves does not only depend on the action taken, but also on the respinse that was given. For example, when an agent revolts, if the revolt is accepted by the authority then its authority and social rigidity attributes will be lowered, increasing the probability that a revolt action will be taken the next time. If, to the contrary, the revolt is punished in the blood, those attributes will be enhanced, lowering the probability that the same action will be taken next time.
- Thanks to this system, the evolution of the attributes actually depend on the ruler/player. If u're a bad ruler, and actually let the people do what they want and get what they want each time they reclaim it, there is no reason they dont keep on reclaiming things. U're the ruler, all that is up to you…
VI. Link with the other models :
The social model has many links with the other models, in input and in output.
In input, the social model uses some parameters of other models to create the context of the provinces. It uses the economic model to build the economic context of a province ; it may use the military model to calculate the safe feeling indicator …
Also, in some cases other models will trigger events to be processed by the social model (for example the government model that maytrigger an event to indicate that the anti-satus of a class is so high that an action may be taken …).
In the other way, the social model outputs datas for other models.
- Military model : when a war is declared, the social model will give some paramters concerning how the war is seen by the people. This parameter may be used to modify the attributes of the army. For example, in a war with the heir enemy who is hated, the people may be really willing to crush the enemy, so they will be both very motivated and very violent. In the contrary, in a war that is not understood nor accepted by the people, there may be a high desertion rate, and the army may be undermotivated, meaning more troubles for the general on the battlefield.
- Tech model : some parameters may be used to alter the output of the tech model. For example ; a high value in religious superstition would mean that tech researches concerning natural sciences would be more difficult, or slower ; a civ with a religion with high Book level would more easily research technologies linked to culture, philosophy, literacy … A civ with a high agressivness would tend to focus on weapons, etc …
- Economic model : some actions taken by the agents have huge effects on the economic model. For example, when people take an action of revolt in a province, then a part of the production of the province is halted cause people cease working ; also, some economic infrastructures may be looted … Moreover, the attributes of the agents of a province may have effects on the economic model output. One intersting effect concernes the tech education level. When, for example, a civ acquires a modern technology, like for example some kind of industrialization, through diplomacy or natural spreading of the techs, its agents may not be ready to implmenent this tech effectively if they are not technically educated enough. Thus, the tech eduation level must be high enough for the plants to produce their nominal output. In our example, if a relatively primitiv civ acquires indutrialization, then it wont be able to produce high outputs from its plants as long as the tech education level is not high enough.
- Diplomatic model : the relations between the people of two civs may have an effect on the high level, diplomatic relations of those civs. Lets admit that u have some foreign immigrants in your civ, and that your citizens are both violent and nationalist. Then there is a great chance that the relations between your people and the immigrants are quite bad, meaning for example that there are some nationalistic exactions in your civ versus those imigrants. Then, when you will conduct diplomatic negociations with the ruler of the civ these immigrants come from, there is a huge chance that the ruler of the other civ will be anger with the fact that his citizens are badly treated in your civ. The negociation will then be harder.
(I have to divide the post into two because its too long ...)
[This message has been edited by manurein (edited September 11, 1999).]
Comment