How to simulate civilizations.

Mouthwash

Escaped Lunatic
Joined
Sep 26, 2011
Messages
9,368
Location
Hiding
About a year ago I came up with the most complete simulation game ever, inspired by this post. I typed it up, but slowly lost interest and forgot about it until recently. It's something that I think needed to be said, so I'm reposting it here:

I believe that politics can be simulated completely in a 3D setting, with a real, emergent civilization consisting of individuals. There would be a set population of humans in a generated world (as many as any computer could handle). Gameplay is divided between ‘God mode’ and control of a single person, which you are able to switch between at any point.

Individuals

There are five elements to every human being:

1. Physical state

Their diseases, injuries or scars, need for air or nourishment, level of exhaustion, strength and muscle mass, etc. If they are 6'2 or they have a harelip or are circumcised, it gets shown here. Simple genetic algorithms determine some things like appearance.

2. Mental state

Their primary mental state. Think of something along these lines:



The eight emotions (fear, surprise, sadness, disgust, anger, anticipation, joy, trust) are given straightforward triggers and bordering emotions can exist concurrently, as shown, to produce the higher emotions.

There would also be more normal, static personality traits like “patient” or “ambitious,” but that's not something I need to plan here.

3. Outlook

Their fundamental value. This decides the beliefs that they hold, how they respond to situations, what goals they have, and how they lean in the social scale. For example, someone who values material growth would seek the freedom to profit in their station, and reject patriarchal or communal ideas. Someone who values survival would consider only their own needs or those of their immediate family. Someone who seeks knowledge or meaning would probably join a cult or become a philosopher, and would tend to favor broad theories over practical ideas. Etc.

Emotional and physical triggers are the determining factor in outlook (a person who lives in constant fear for their life will value survival, but that gets less common the more peaceful and wealthy the society they live in). Outlooks can change in periods of transition or stress.

4. Ideas

Basically a tech tree. Every person has ideas; these are what constitute their knowledge. Furthermore, while certain ideas may have prerequisites to be invented, these may not apply to the idea being taught to one person by another. The average person’s ideas will shift over time as their society advances, and they may cease to learn earlier ones even if their own ideas were derived from them; most real-life people would not be able to rebuild a modern society from scratch even if they could fix computers or drive a truck.

Each idea has four levels of knowledge, with varying rules for transmission:

Level zero: This is knowing that the idea exists, but not knowing what it is. If primitive spearmen are fired at by cannon, they're likely to associate it with danger and noise, but they won't actually realize it works by exploding powder launching a projectile. This produces awe or fear, depending on the circumstance.

Level one: Having a basic understanding of an idea. Shouldn’t be too much use in most cases.

Level two: Being educated with an idea. Such a person, for instance, could grow corn and fix a broken staircase, but would not be able to maximize their crop yield or to build a staircase themselves.

Level three: Understanding an idea completely. These people could teach their ideas to others far more efficiently than level two, and almost all innovation would require this level.

How to invent an idea? If a person knows the prerequisite idea(s), than engaging in certain actions accumulate "points" which give a chance of inventing that idea. These actions need not be deliberate. A mathematician may sit down and systemically work out geometry, or an officer can think of a brilliant new tactic after being repulsed by the enemy. For most ideas the actions required are rather complex. To take our example of an officer inventing a tactic:

12 points from time spent skirmishing in battle
20 points from time spent studying skirmishing tactics
7 points from time spent giving orders
3 points from time spent socially interacting with soldiers
38 points because men under his influence killed others with javelins
20 points because men under his influence were killed by javelins
45 points from time spent training men with javelins
-74 points from time spent doing miscellaneous things
=
71
multiplied by a 1.20% bonus for his outlook/traits = 85.2
85.2 translates into a 8.52% chance of getting [insert throwing tactic idea here] this month.

That’s an extremely rough concept; the conditions could be made into anything imaginable. The officer still needs quite a bit of luck to actually invent the idea, since these modifiers only last the month, although I suppose there ought to be a small, permanent bonus for accumulating enough points.

Certain ideas have opposing counterparts. A person may ‘believe’ one idea over another competing idea. The outlook of a person decides which of them he takes as a belief.

Some concept art, with the numbers corresponding to levels of knowledge (I made it a year ago, and yes, I know that humanism shouldn't lead to divine right or Marxism; I don't recall my reasoning at the time):



As seen here, the person fully comprehends the idea of humanism (or whatever less vague equivalent you want to imagine) and has studied its various offshoot ideas. He accepts Marxism, which requires him to accept its parent ideas as well.

Sometimes beliefs develop that support each other mutually, and are transferred more or less wholesale between humans. These are doctrines. They mean that ideas which aren't really dependent on each other can occasionally be intertwined. For creating a doctrine, just imagine this something like this based off of ideas.

5. Awareness

A person's awareness of the physical world. As well as keeping track of active objects (such as other people, animals, storms, etc.) this takes the form of a 'map' for each person. Information is gathered about the world either through viewing it or through interacting with others. However, physical maps (which would require cartography-related ideas) are very important, since the maps in people's heads degrade if not constantly refreshed.

Politics

There are four main components which make up the political gameplay:

1. Societies

This game will attempt to emulate a social consciousness. Any person that is aware of another person has an attitude towards them. Actual interaction between people is not necessary for this; for instance, a king’s visage on a coin is enough to create an attitude towards him among his subjects. It is communication that creates societies, not anything abstract like 'culture' or 'religion.'

2. Groups

These are formed in societies that grow past a single extended family (they become better organized the longer they last). Their function is determined by consensus of their members and can be altered according to those members' priorities. They encompass everything from an warband to a school to a ruling aristocracy. Each one has its own wealth, whether by patronage or by their members' pockets, and they attract like-minded individuals through notoriety. However, the motives of their individual constituents will still exist; if the group's aims don’t remain cohesive it will fall into corruption, or dissolve outright.

3. Power gradients

This is how much physical power any person has. You could call it a kind of 'sphere of influence.' The offensive value depends on what sort of damage a person can do: size and strength boosts it, but not as much as having a weapon. Any individual’s power gradient extends across the whole of the map, but peters off exponentially in areas outside of their immediate location, depending on their ability to travel. Not many people will fight if they are under the influence of a larger power gradient; hence, this allows an organized group of soldiers can dominate a much larger population.

It is important to note that the values of gradients are entirely in the heads of people. A row of spearmen in formation, for instance, see charging horsemen as having a lower value than some scattered swordsmen would. Those same spearmen, not knowing of gunpowder, would assign a row of riflemen a very low score until they started firing. Scores can change even on an individual basis. A warrior that kills five others, or a line of chariots that smashes an enemy's formation will be assigned higher scores by their opponents than they normally would. I can imagine a very skilled general winning victories and gaining lots of momentum from this. As well as individual soldiers or armies, this boost can permanently alter how certain types of weapons are seen by an entire society, serving as an all-purpose corrective to the game's balance.

Applying a power gradient to groups or armies will be some combination of a single score, the scores of its various subgroups, and all its individuals. It's not something I can answer without actually making the game myself.

4. Laws

Groups create and enforce certain rules upon themselves and those they have influence over. This is a very non-emergent aspect of the game, with certain actions being canned and made contingent on ideas (property, customs, status, etc). They are still triggered through emergent pressures, though.

Economics

I also thought that every object in the game would be assigned a value by every person, so that someone who wanted a sword would value both currency and a blacksmith with swords for sale, and set prioritized goals to first acquire currency and then seek out a blacksmith. Looking back, this just seems insane. Dwarf Fortress gets along fine without a system like that, and it's hard enough to run as it is.

So that's it. Hopefully some game developer will browse these forums and get inspired?
 
There would also be more normal, static personality traits like “patient” or “ambitious,” but that's not something I need to plan here.
May I submit "humble"?
 
:goodjob:
 
Last edited:
Under the Individuals category I would say basically everything is already in Dwarf Fortress other than the Ideas tech tree which is in process of implementation with the new scholarly works and science systems. Also basically all of Societies, Groups, Power Gradients and Laws under politics are existant, but less flexible than what is proposed here.

I say this not to hype up DF (which is a game I love), but to warn how difficult it would be to implement these systems in a way that makes it feel they all matter and they are all interesting and easy to figure out without the massive unorganized info-dumps and obscurity requiring high levels of effort to find some fun in the game like DF has. And to make it feel like the complex systems behind many aspects of the game matter to the game experience, something Fortress mode in DF fails at in particular with many of the more obscure systems working behind the game.

On the economy, I feel like this is some kind of holy grail feature for complex sandbox style games. DF tried to implement it with the dwarven economy but this was later disabled, and I recently saw a forum post by Tarn Adams dreading the idea of trying to implement it again due to performance constraints.

I would love more games in this style though. Particularly something that's more in the Civ style of letting you play from the beginning and see the world evolve and influence it, which DF does not do at all, unless you put some extreme effort into progressing the world after activating it after world gen. While reading the Civ Eurocentrism thread currently going in the history forum I have been thinking of something like a more flexible "generic" randomly generated civ game, combined with a lot of stuff from this post, I think that would be a great civ-style game I would really want to play.

A combination of DF, Mount and Blade, and Civ with even more of a real world historical sandbox feel implemented in a good way would be such a cool concept, but I am uncertain that it is really possible without some billionaire funding a passion project or something.
 
Under the Individuals category I would say basically everything is already in Dwarf Fortress other than the Ideas tech tree which is in process of implementation with the new scholarly works and science systems. Also basically all of Societies, Groups, Power Gradients and Laws under politics are existant, but less flexible than what is proposed here.

Everything other than power gradients I can kind of imagine being in DF. I've played it at a very amateur level and I've read stories, and nowhere have I heard of anything remotely similar to them. Power gradients are my mechanic to give characters a real tactical intelligence without coding an impossible AI.

I say this not to hype up DF (which is a game I love), but to warn how difficult it would be to implement these systems in a way that makes it feel they all matter and they are all interesting and easy to figure out without the massive unorganized info-dumps and obscurity requiring high levels of effort to find some fun in the game like DF has. And to make it feel like the complex systems behind many aspects of the game matter to the game experience, something Fortress mode in DF fails at in particular with many of the more obscure systems working behind the game.

The problem with DF is that its priorities are way off. It tries to simulate absolutely everything, but my strategy is to place mechanics before details. If you had a tree of twelve ideas, three outlooks, nothing for groups to do but fight and keep order, and no laws, it should still create interesting and fun gameplay despite falling completely short of realism. I don't see how that meshes with, for example, having dwarves perform individual dance-steps.

On the economy, I feel like this is some kind of holy grail feature for complex sandbox style games. DF tried to implement it with the dwarven economy but this was later disabled, and I recently saw a forum post by Tarn Adams dreading the idea of trying to implement it again due to performance constraints.

When was this? I'd love to hear about that.

I would love more games in this style though. Particularly something that's more in the Civ style of letting you play from the beginning and see the world evolve and influence it, which DF does not do at all, unless you put some extreme effort into progressing the world after activating it after world gen.

I have a dream about running this game on a 1:1 size planet Earth, placing a few people in East Africa, and seeing how closely the results parallel history. It would take five supercomputers together to reach the Iron Age, most likely.

A combination of DF, Mount and Blade, and Civ with even more of a real world historical sandbox feel implemented in a good way would be such a cool concept, but I am uncertain that it is really possible without some billionaire funding a passion project or something.

So while we're talking about billionaires, it could maybe be passed off as an educational project and get public funding?
 
EDIT: I guess this is your Dwarf Fortress research thesis.
 
EDIT: I guess this is your Dwarf Fortress research thesis.

Edit? You didn't say anything interesting before?

I'm really disappointed in this forum. Not all of my threads have been successes, but how could people on a Civilization forum not drool at the thought of this, regardless of plausibility?
 
Well apart from it seeming unfeasible, at least from my limited knowledge of development (I would think you'd run into performance bottlenecks quite quickly and debugging would sound nightmarish), what would be the actual game here? It just seems like a simulation, which is fine on its own but not really something it would be enjoyable to play. In fact, considering all the interlocking facets and number of status conditions of each citizen, I could only see this running as a simulation in some dedicated computing facility.
 
Well apart from it seeming unfeasible, at least from my limited knowledge of development (I would think you'd run into performance bottlenecks quite quickly and debugging would sound nightmarish), what would be the actual game here? It just seems like a simulation, which is fine on its own but not really something it would be enjoyable to play.

Why in the world not? Didn't you read the post I linked to? You could play as the leader of a warband, conquer some land and declare yourself king. All the while, you'd have only the same abilities that a real-life king would have had, and the same access to information. Or you could just play as a soldier or explorer. I can't imagine how it wouldn't be enjoyable.

In fact, considering all the interlocking facets and number of status conditions of each citizen, I could only see this running as a simulation in some dedicated computing facility.

I don't think so. The physical state of the people isn't really the point of the simulator, so it could be dumbed down however much you pleased. You could slow down the rate that (nonessential) emotions change arbitrarily, and I don't think that some tech trees or maps are going to slow things down too much. I could be wrong about that, though. :dunno:

My utterly incompetent guesstimate would be that a good computer would be able to run 1,000-5,000 people on a map.

Maybe it wouldn't even have to run everything at once. I had a thought that for things like battles or other heavy computing stuff you could designate an 'arena' that no one could pass and outside of which time would freeze. Then, when it was finished, everything inside the arena would pause while the rest of the world ran at normal speed for the same amount of time.
 
Why in the world not? Didn't you read the post I linked to? You could play as the leader of a warband, conquer some land and declare yourself king. All the while, you'd have only the same abilities that a real-life king would have had, and the same access to information. Or you could just play as a soldier or explorer. I can't imagine how it wouldn't be enjoyable.

You mentioned only God mode and a single person. It really would only work with such persons though. I can't imagine being a farmer or a blacksmith that captivating to play unless a dev spent a lot of time detailing each profession and imbuing it with rpg-lite elements. There is also a lot of boring daily functions people need to do, how much do you abstract, how much do you wave away for practicality and how much do you keep for realism? That's a lot to do.

I don't think so. The physical state of the people isn't really the point of the simulator, so it could be dumbed down however much you pleased. You could slow down the rate that (nonessential) emotions change arbitrarily, and I don't think that some tech trees or maps are going to slow things down too much. I could be wrong about that, though. :dunno:

My utterly incompetent guesstimate would be that a good computer would be able to run 1,000-5,000 people on a map.

Maybe it wouldn't even have to run everything at once. I had a thought that for things like battles or other heavy computing stuff you could designate an 'arena' that no one could pass and outside of which time would freeze. Then, when it was finished, everything inside the arena would pause while the rest of the world ran at normal speed for the same amount of time.

If the physical state of people isn't the point what is? Otherwise you write a bunch of scripts that interact in a fairly predictable manner. (developers are barely competent at that, see: Bethesda). Declaring yourself king for example has to have an effect that each citizen would process differently. I think 3D is an unnecessary complication, because for it to be enjoyable you'd have to work a lot of depth in it in terms of gameplay and mechanics for particular action you feel like doing. Screwing around with the problems of 3D working reliably and not glitching immersion breaking badly would divert too much time and it doesn't really bring too much to the table.

Maybe a wholly dedicated computing server for the environment, with another dedicated solely for AI similar to how ArmA can do. This would entail a lot of resources to run reliably, not to mention a top notch team if you were really gunning for 3D. I think this might be doable in 10-15 years with a lot of manpower and money. But then again what isn't?
 
You mentioned only God mode and a single person. It really would only work with such persons though. I can't imagine being a farmer or a blacksmith that captivating to play unless a dev spent a lot of time detailing each profession and imbuing it with rpg-lite elements.

'Farmer or blacksmith' ain't the same thing as 'soldier or explorer.' Those are the examples I gave of interesting gameplay.

There is also a lot of boring daily functions people need to do, how much do you abstract, how much do you wave away for practicality and how much do you keep for realism? That's a lot to do.

Get rid of everything not needed to produce realistic political outcomes. I don't imagine most daily functions should be represented at all.

If the physical state of people isn't the point what is?

What are you talking about? Describing someone's injuries or health is just added realism. They can be toned down to simple hunger, thirst, health, and energy bars. Or even just a health and hunger bar.

Declaring yourself king for example has to have an effect that each citizen would process differently.

Yes, but it shouldn't be a very complicated event for most peasants- it's not like whoever happens to be king makes a difference to them, typically.

I think 3D is an unnecessary complication, because for it to be enjoyable you'd have to work a lot of depth in it in terms of gameplay and mechanics for particular action you feel like doing. Screwing around with the problems of 3D working reliably and not glitching immersion breaking badly would divert too much time and it doesn't really bring too much to the table.

https://www.wired.com/2014/07/dwarf-fortress-3d/
 
Everything other than power gradients I can kind of imagine being in DF. I've played it at a very amateur level and I've read stories, and nowhere have I heard of anything remotely similar to them. Power gradients are my mechanic to give characters a real tactical intelligence without coding an impossible AI.
Yeah, I may be a bit generous to DF to say it has the power gradients feature. I was thinking of how in sites in adventure mode you can ask AI's how strong the power of the leading group is, if there are other groups vying for leadership and so on, and if they would join you in an uprising based on various values of strength and power.

There is also something similar to calculate results of battles happening in the world, but probably very simplified compared to this. Also this is mainly because world level battles for the most part don't actually happen in game but are sort of calculated on the side.

A lot of these features have only started gaining prominence and focus over the recent updates after world activation was implemented. And to really get a feel of how they work you need to use external utilities like LegendsViewer which basically makes a wikipedia of information on your world which exposes a lot of information you can't really see normally.

The problem with DF is that its priorities are way off. It tries to simulate absolutely everything, but my strategy is to place mechanics before details. If you had a tree of twelve ideas, three outlooks, nothing for groups to do but fight and keep order, and no laws, it should still create interesting and fun gameplay despite falling completely short of realism. I don't see how that meshes with, for example, having dwarves perform individual dance-steps.
You are probably right on this. I really wish some devs experienced in programming and balancing this kind of simulation tried something like this. It doesn't need to be a decades long project with ASCII graphics when not simulating every block of material, every artwork, every action, and so on. Also an actual budget and full dev-team would probably be good.

When was this? I'd love to hear about that.
Back in the .40d version. After you got a Baron to your fortress, rather than being the communal rule of the dwarves taking whatever they want from stockpiles, dwarves would gain salaries (only a flat rate income was implemented) and run shops. You could mint coins that would then pile up everywhere in your fortress, or the dwarves would try to run a sort of barter economy. It was all horribly broken, especially its effects on the wider world and the trade routes. Very lacking wiki page on it.

I have a dream about running this game on a 1:1 size planet Earth, placing a few people in East Africa, and seeing how closely the results parallel history. It would take five supercomputers together to reach the Iron Age, most likely.
:drool:
 
I haven't played Dwarf Fortress, but re 3d there is indeed a reason why DF is NOT 3d, and nor would the same thing work as 3d. It would not run at all if any object on screen gets to be polygons + skin instead of ascii or simple 2d graphics.



Re starting work on a DF-clone, or tied, it likely is too late for that, cause such projects appear to be niche. Minecraft has been mentioned as a "DF-clone", but that one clearly changed path and is by now a very distinct game, about building monuments to vanity on this pristine world :)
 
Get rid of everything not needed to produce realistic political outcomes. I don't imagine most daily functions should be represented at all.

What are you talking about? Describing someone's injuries or health is just added realism. It can be toned down to simple hunger, thirst, health, and energy bars. Or even just a health and hunger bar.

Yes, but it shouldn't be a very complicated event for the masses- it's not like whoever happens to be king makes a difference to them, typically.

https://www.wired.com/2014/07/dwarf-fortress-3d/

Well it doesn't make sense to me, to go all this trouble of simulating mental states, political opinions, spheres of influence, power dynamics and then hacking it off like that. The masses need to feel lifelike. They need therefore the basics, food, health and conditions, shelter, opportunity of boning, enjoyment, alcohol, drugs and all the other small factors that make people content or discontent. Political awareness of public figures that come or go needs to be a thing IMO. Like in Rome.

Ah, that is not really 3D in the sense I figured you were talking about. That kind might actually be workable. What I figure would be interesting is to have a server deal with the environment, another one that would handle the AI and real life players would fill positions in the court of whatever political system you were simulating and jockey for position.
 
Well it doesn't make sense to me, to go all this trouble of simulating mental states, political opinions, spheres of influence, power dynamics and then hacking it off like that. The masses need to feel lifelike.

Why?

They need therefore the basics, food, health and conditions, shelter, opportunity of boning, enjoyment, alcohol, drugs and all the other small factors that make people content or discontent.

Sure, but things like games or drugs can have very canned effects. For instance, drinking beer should only raise someone's 'thirst' bar and give them a simple modifier for intoxication that alters his mood and slows him down.

Political awareness of public figures that come or go needs to be a thing IMO. Like in Rome.

In a feudal society I think that most peasants would be much more aware of who their local lords were. A republican style of government is typically going to be local. Like, on a city-by-city basis.

Ah, that is not really 3D in the sense I figured you were talking about. That kind might actually be workable. What I figure would be interesting is to have a server deal with the environment, another one that would handle the AI and real life players would fill positions in the court of whatever political system you were simulating and jockey for position.

I mean, I want a Mount and Blade level of freedom, but I'm not going to assume that's necessary for the game to work.
 
Why?

Sure, but things like games or drugs can have very canned effects. For instance, drinking beer should only raise someone's 'thirst' bar and give them a simple modifier for intoxication that alters his mood and slows him down.

It also raises socialization, proliferates ideas and rumors, pushes down other worries (or raises others) and keeps peasants occupied so they might be more tolerant of a players decision to wage an unpopular war for prestige reasons. Also babies.

In a feudal society I think that most peasants would be much more aware of who their local lords were. A republican style of government is typically going to be local. Like, on a city-by-city basis.

Well a city or a capital city+region is what you could reasonably achieve I think. Random events, abstracted political surroundings and other citizens that migrate in and out. The mood and ideas of the citizens/peasants in the capital region is what would flow outwards to the kingdom/empire to be calculated more roughly and broadly.
 
It also raises socialization, proliferates ideas and rumors, pushes down other worries (or raises others) and keeps peasants occupied so they might be more tolerant of a players decision to wage an unpopular war for prestige reasons. Also babies.

I don't agree that most of this behavior needs to be represented, and the emotion wheel should determine anything that should.
 
As an ex-programmer I can only think, the code will be bloody long. Would take years to develop properly.
 
What do you think would be the biggest challenges?
 
Top Bottom