A Random World History Simulator Part 4 by jd4e

View this thread on steempeak.com
· @jd4e · (edited)
$25.62
A Random World History Simulator Part 4
For this part, let’s recap the basics discussed so far, and try and show some of the underlying levels to the simulation.

# A Random World History Simulator
* [Part 1](https://steemit.com/steemstem/@jd4e/a-random-world-history-simulator-part-1)
* [Part 2](https://steemit.com/steemstem/@jd4e/a-random-world-history-simulator-part-2)
* [Part 3]( https://steemit.com/steemstem/@jd4e/a-random-world-history-simulator-part-3)
* Part 4 (current)

## Let’s recap simtematically!

So, for anyone just joining us, or for whom some of the previous parts were a bit too wonky, I’ll try and recap point-by-point the basics of this simulation as covered in parts 1-3:

### Point 1:
Before the simulation proper starts, a climate and altitude map get loaded into the simulation from hand-made map files. These maps consist of 360x180 (= 64,800) tiles. (I made these myself, based on randomly generated maps, using fictional world mapping programs.)

### Point 2:
At the initialization of the simulation, a number of tiles are seeded with agriculture, based upon their climate data. Over the course of the simulation, agriculture spreads from these initial seed tiles to other tiles, dependent on climate.

Only tiles with agriculture are properly simulated. Non-agricultural tiles are considered to be uninhabited or inhabited by nomadic and/or hunter-gatherer societies. They are fundamentally static unless and until agriculture is spread to them.

### Point 3:
Each simulated tile has a string of ‘civilizational DNA’ of twenty ultra-social ‘genes’. These ultra-social genes are binary values, i.e. they can either be active (=1) or inactive (=0). Each step of the simulation (= 1 year), each gene has a random chance to mutate, i.e. change its state. The sum total of active ultra-social genes is the total ultra-sociality, aka civilization level, of that tile.

But, the mutation chance of de-activation is >>> the mutation chance of activation. In other words, the chance of randomly losing ultra-sociality is much higher than the chance of gaining it. (This reflects the hypothesis of the original model, that ‘domestically’ ultra-sociality is overall disadvantageous to a community which develops it.)

As a result, tiles in isolation will develop a mean total ultra-sociality of about 0~2, dependent on the exact mutation probabilities (which I’ve tinkered with over different iterations of the sim).

### Point 4:
The factor that drives the evolution of greater ultra-sociality is conflict between communities, i.e. inter-tile conflict. A tile’s ultra-sociality determines that tile’s military power, to be wielded against other tiles. Upon a successful attack, the attacking tile conquers the defeated tile, creating a multi-tile-polity, AND has a chance of overwriting all or part of the defeated tile’s ‘civilizational DNA’ with that of the attacker.

This exporting can result in a less civilized attacker lowering the civilizational level of a more civilized defender. But because the chance of victory is directly related to the civilization level, it is overall more likely for the more civilized tile to win, and thus more civilized ‘DNA’ is more likely to get exported than less civilized ‘DNA’.

This is the core evolutionary process that drives the development of high ultra-sociality.

### Point 5:
The primary constraint on this evolutionary process is the presence or absence of military technology. There is a set of fifty military technologies, which are also binary in that a tile can either have them or not have them. Whenever a tile attacks a neighboring tile, the attacking tile has a tiny chance of discovering a military technology. However, unlike ultra-sociality, a tile never loses military technology, and military technology simply spreads from tile to tile continually. How this spread works is that a tile with militarily less advanced neighbors simply has a ~20% chance each step to spread one of its military technologies to one of its neighbors which does not yet have said technology.

Military technology does NOT influence the military power of a tile, which is perhaps the most unintuitive aspect of this model. Military technology is instead understood as determining the decisiveness of a conflict, meaning what it affects is the chance that a victorious tile will overwrite the defeated tile’s ‘DNA’. This chance can go from as little as 5% with no military technologies, to 100% with all military technologies (dependent on the version of the sim).

It’s probably worth noting: though by itself unintuitive, because of the way military technology spreads, having it affect military power would be largely pointless. Tiles usually have the roughly the same military technology level as their neighbors, and when it comes to areas the advantage of militarily more advanced areas is already represented by such areas evolving a higher ultra-sociality.

In other words: what one would intuitively want ‘military technology’ to do is in fact already covered by ultra-sociality.

Altitude serves as a counter to military technology, where higher altitudes cancel out the effects of higher military technology. This is meant to represent the defensive advantages of mountainous terrain.

### Point 6:
Multi-tile-polities are primarily restrained by the Smax function (see part 3). This function gives polities a maximum size, and its calibration and implementation is designed so that multi-tile-polities will enter into semi-stable equilibriums. I.e., polities will grow to a certain size, and then stabilize at that size for a period of time, but will eventually collapse, either due to random chance or due to being conquered by a different multi-tile-polity.

Because the Smax function is based on the mean ultra-sociality of the tiles in any given area, polity size increases as ultra-sociality evolves.

### Conclusion:

Okay, that covers it. Now, let’s go back, once more, to the final Excel VBA video, and cover some things that happen there which reflect, or fail to reflect, how the simulation is supposed to work. In case you want to refresh your memory, or never watched it, here’s the video again:

https://youtu.be/G1Xi_TwWZMs?t=56

## Isle of Eternal Peace

One thing you may or may not have noticed, is that in this run of the sim there is something me and some of the friends I showed it to have nicknamed the “isle of eternal peace”.

![Isle of Eternal Peace.png](https://cdn.steemitimages.com/DQmb5s4A88C5RBALrWe36SjzuPhDRD4G2XD9scbY6Co9v8V/Isle%20of%20Eternal%20Peace.png)

For 3,500 years, the same polity rules this certainly blessed isle, and if that history is any indication it would continue to rule this isle for as long as I’d run the simulation.

Which, of course, is a level of stability well above what is supposed to be possible. So what happened here?

One factor is simply that, in this version of the sim I had not yet put in a lower bound to polity disintegration chance, which made it possible for a polity to last forever. But that is only a small part of the story, because the same lack of a lower bound applies to all the other polities in the simulation, yet it is only this one which achieves a 3,500 year reign of peace.

And the reason for this is made clearer of we look at the civilization map at the end of this simulation:

![Excel end culture map.png](https://cdn.steemitimages.com/DQmSYkKVAtfLqgRrNF9VmQcXCmfhxifGnMoQUdqV2d54KcH/Excel%20end%20culture%20map.png)

As you can see, our isle of eternal peace is also our isle of eternally uncivilized. Or, more generously, eternally low ultra-sociality as simulated by this simulation. (Because, technically, there could be all kinds of scientific and societal advancements unrelated to what this simulation counts as ultra-sociality.)

What’s causing this, and are they related? The answer is yes, of course, and if you’ve fully grasped the six points outlined above, you might be able to predict what I’m going to write next. (But no penalties if you didn't, there's a lot of moving parts to this simulation!)

The ‘problem’ of this island is, that it is completely disconnected from the continent. It is, in essence, a world in its own right. But, why does the main continent develop ultra-sociality, but not this little island?

The answer is conflict. As explained above, military technology is the main constraint on this evolutionary process. At low military technology, the chance of victorious tiles exporting their ‘DNA’ is so low, it barely counter-acts the natural tendency of ultra-social genes to mutate into de-activation. But military technologies are discovered in conflicts, and then spread from the tile of discovery outward. Because the chance of discovering new military technologies is really low (about 0.01% or less), a lot of conflict is required to develop all fifty military technologies. Since a tile only gets to attack once per step (= year), the number of tiles in an area is the primary determining factor for the military technology in that area, with the intensity of inter-tile conflict a secondary determiner.

For those of you familiar with *Guns, Germs, and Steel: The Fates of Human Societies*, this results in an (intentional) mimicking of some of the processes described in that famous work. A continually connected area of tiles functions as a connected community, in that a military technology discovered by any tile in the connected area will eventually, over time, spread to every other tile in said area. At the same time, the larger the area, the more inter-tile conflict takes place, and thus the larger the chance of military technologies getting discovered in the first place.

The result is that larger areas of more tiles will gain military technologies more rapidly, and thus develop ultra-sociality, i.e. civilization. Though with some delay, as it takes some time for the military technologies to be discovered and sufficiently diffuse through the entire area.

Meanwhile, really small areas, like the isle of eternal peace, are in danger of almost wholly stagnating. If the area is small enough that at the default mean ultra-sociality a single polity can grow large enough to to conquer the whole area, it may do so, and then further intra-tile conflict ceases. Meaning, no more military technologies are developed, and any chance of evolving more ultra-sociality ends.

I must admit though, I do feel that this process as it stands is a bit too absolute. I think it would be more historical and realistic if there were more peaceful avenues to civilizational advancement as well. But I’m still thinking about how to model that. So as it stands the model remains fundamentally conflict-centric, and you should understand it as simply not accounting for non-conflict factors or non-military dimensions of societal and technological advancement.

(I should add, for completeness sake. You may notice there are still dark, uncivilized, areas on the main continent as well. This has to do with altitude. As noted, higher altitude counteracts the effects of military technology, and certain areas are so high altitude that civilization cannot develop there.)

## There’s more to simulating than conflict!

While the core of the model remains conflict-driven, I have since early on been adding in the structure for accounting for other elements of history. One mechanic that is entirely my own and I’m somewhat proud of is the culture mechanic:

![03-WM-Culture3000-6000.gif](https://cdn.steemitimages.com/DQmWXNbhsvb6hF1F6wwKUQKkCRwSZQwc2zYpwVmPzUbFMmF/03-WM-Culture3000-6000.gif)

This is an old gif, as you may be able to tell. But what does it show?

This is an old idea of mine I’ve gotten from playing a lot of Paradox grand strategy games (Europa Universalis, Crusader Kings, Victoria, and so on). Culture in these games is always very rigid. Provinces have specific cultures, and these cultures are part of a specific culture group. I.e. a province can have Dutch culture, or German culture, and both are part of the Germanic culture group.

But, this really does not capture how culture actually works, least of all historically. If we just look at the above-mentioned Dutch and German culture, the idea of a distinct Dutch and German culture is very much a product of the emergence and survival of distinct Dutch and German nation-states. Historically, there was a fluid continuum, both linguistically and culturally, stretching from Amsterdam to Berlin, and from both to Vienna, and to many other places beyond. It was the influence of the state, particularly from the 19th century onward, that pulled people so that the inhabitants of the Netherlands became more culturally aligned with Amsterdam, and the inhabitants of Germany became more culturally aligned with Berlin, creating a specific Dutch-German cultural boundary. (And though there’s some nuances and exceptions, by and large it was a process of the political centers, the capital regions, pulling the national peripheries to be more like their culture, rather than the other way around.)

So, at one point, I came up with the idea that color, as RGB values, could present a really intuitive, organic, and easy to represent way of modeling the fluid nature of culture. This simulation at last gave me a place to test and implement this idea. So, how does this work?

Culture is treated as an RGB value, i.e. a color: the more similar the color, the more similar the culture. 

When a tile is initialized, i.e. when agriculture is seeded on or spread to that tile, it is given a starting culture. This starting culture is based on the longitude and latitude of the tile. This means that if all tiles are left at their starting culture, culture would be a smooth gradient across the civilized world.

But, of course, culture is not left alone. Instead, it changes over time via two processes:

1. Cultural drift makes it that an independent (capital) tile will randomly change its RGB values by +1 or -1 every couple of years.

2. When a capital is not independent, when it is a subject tile in a polity, its RGB values will drift towards that of its capital.

(Note that in the gif above, the blue color value is actually the civilizational value. This is something I later end up changing, but in these early gifs and videos only the red and green values function as per above.)

The result is what I feel very simply but nicely reflects the processes I described above. Overall, culture is a fluid continuum. Yet at the same time, areas that have been dominated by a particular capital, or by a set of capitals from a particular region, are more like those capitals’ colors, and this results in cultural boundaries. In the gif above, you can see this most clearly at the place where the western and eastern parts of the continents connect.

Because for much of the simulation these areas are disconnected, culture, i.e. color, averages out differently. When they at last connect, we see a clear cultural boundary in the color difference, which shifts and changes dependent on if the area is getting conquered by polity’s originating in the eastern or western half of the continent. (Remember, if this was purely the seeded map, it should be a smooth gradient from east to west, so all color boundaries are the result of polity-influenced cultural drift.)

## Show me the data!

This post is already quite long, so I’ll say some more on the third and final value later. But to briefly introduce it, behold the wealth map:

![WealthMap0251.png](https://cdn.steemitimages.com/DQmNLkjmLux26jiUp6qvQRb6DUWWwLFoFVZSTfikmSboxyr/WealthMap0251.png)

Wealth is a very simple metric. Its upper bound is the civilizational level of a tile, and the wealth value continually increases every step, but lowers if it gets conquered. This means the wealth map is a kind of heat map of conflict, with the caveat of also being dependent of civilization levels. Brighter areas are wealthier, darker areas poorer.

So, to end this part, I've got a video showing a run of the simulation with a 4-way split of Polities, Culture, Civilization, and Wealth at the end. I’ll link the video at the start of the 4-way split screen, but of course the full experience would be to watch the whole video, to best see how the rise and fall of polities influences the growth of civilization, the drift of culture, and the ebb and flow of wealth:

https://youtu.be/SBY-r2SRGro?t=571

Next: [The bigger they grow...](https://steemit.com/steemstem/@jd4e/a-random-world-history-simulator-part-5)
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 297 others
properties (23)
post_id80,645,303
authorjd4e
permlinka-random-world-history-simulator-part-4
categorysteemstem
json_metadata{"tags":["simulation","history","python","fantasy"],"image":["https:\/\/img.youtube.com\/vi\/G1Xi_TwWZMs\/0.jpg","https:\/\/cdn.steemitimages.com\/DQmb5s4A88C5RBALrWe36SjzuPhDRD4G2XD9scbY6Co9v8V\/Isle%20of%20Eternal%20Peace.png","https:\/\/cdn.steemitimages.com\/DQmSYkKVAtfLqgRrNF9VmQcXCmfhxifGnMoQUdqV2d54KcH\/Excel%20end%20culture%20map.png","https:\/\/cdn.steemitimages.com\/DQmWXNbhsvb6hF1F6wwKUQKkCRwSZQwc2zYpwVmPzUbFMmF\/03-WM-Culture3000-6000.gif","https:\/\/cdn.steemitimages.com\/DQmNLkjmLux26jiUp6qvQRb6DUWWwLFoFVZSTfikmSboxyr\/WealthMap0251.png","https:\/\/img.youtube.com\/vi\/SBY-r2SRGro\/0.jpg"],"links":["https:\/\/steemit.com\/steemstem\/@jd4e\/a-random-world-history-simulator-part-1","https:\/\/steemit.com\/steemstem\/@jd4e\/a-random-world-history-simulator-part-2","https:\/\/steemit.com\/steemstem\/@jd4e\/a-random-world-history-simulator-part-3","https:\/\/youtu.be\/G1Xi_TwWZMs?t=56","https:\/\/youtu.be\/SBY-r2SRGro?t=571","https:\/\/steemit.com\/steemstem\/@jd4e\/a-random-world-history-simulator-part-5"],"app":"steemit\/0.1","format":"markdown"}
created2019-10-06 17:29:33
last_update2019-10-25 15:45:21
depth0
children6
net_rshares72,974,816,767,648
last_payout2019-10-13 17:29:33
cashout_time1969-12-31 23:59:59
total_payout_value12.828 SBD
curator_payout_value12.795 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length16,509
author_reputation6,293,451,488,408
root_title"A Random World History Simulator Part 4"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (361)
@chappertron ·
2gkl040hr
Really wicked idea! Resteem!
👍  ,
properties (23)
post_id80,659,690
authorchappertron
permlink2gkl040hr
categorysteemstem
json_metadata{"tags":"steemstem","app":"steemstem"}
created2019-10-07 05:44:42
last_update2019-10-07 05:44:42
depth1
children1
net_rshares766,510,405
last_payout2019-10-14 05:44:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length28
author_reputation37,153,522,909,717
root_title"A Random World History Simulator Part 4"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (2)
@jd4e ·
Thanks, awesome! Glad you like it!
properties (22)
post_id80,668,257
authorjd4e
permlinkpz075i
categorysteemstem
json_metadata{"app":"steemit\/0.1"}
created2019-10-07 12:10:30
last_update2019-10-07 12:10:30
depth2
children0
net_rshares0
last_payout2019-10-14 12:10:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length34
author_reputation6,293,451,488,408
root_title"A Random World History Simulator Part 4"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@steemstem ·
re-jd4e-a-random-world-history-simulator-part-4-20191007t054606268z
<div class='text-justify'> <div class='pull-left'> <center> <br /> <img width='200' src='https://res.cloudinary.com/drrz8xekm/image/upload/v1553698283/weenlqbrqvvczjy6dayw.jpg'> </center>  <br/> </div> 

This post has been voted on by the **SteemSTEM curation team** and voting trail. It is elligible for support from @curie and @minnowbooster.<br /> 

If you appreciate the work we are doing, then consider supporting our witness [@stem.witness](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=stem.witness). Additional witness support to the [curie witness](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=curie) would be appreciated as well.<br /> 

For additional information please join us on the [SteemSTEM discord]( https://discord.gg/BPARaqn) and to get to know the rest of the community!<br />

Please consider using the <a href='https://www.steemstem.io'>steemstem.io</a> app and/or including @steemstem in the list of beneficiaries of this post. This could yield a stronger support from SteemSTEM.
properties (22)
post_id80,659,720
authorsteemstem
permlinkre-jd4e-a-random-world-history-simulator-part-4-20191007t054606268z
categorysteemstem
json_metadata{"app":"steemstem-bot"}
created2019-10-07 05:46:09
last_update2019-10-07 05:46:09
depth1
children0
net_rshares0
last_payout2019-10-14 05:46:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length1,050
author_reputation229,673,617,633,863
root_title"A Random World History Simulator Part 4"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@mathowl ·
6fjhvh0g0
So why is the *Island of eternal peace* not invaded by seaborn attacks from neighbouring countries?
👍  , , ,
properties (23)
post_id80,666,797
authormathowl
permlink6fjhvh0g0
categorysteemstem
json_metadata{"tags":"steemstem","app":"steemstem"}
created2019-10-07 11:06:18
last_update2019-10-07 11:06:18
depth1
children1
net_rshares57,493,549,547
last_payout2019-10-14 11:06:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length99
author_reputation26,709,555,875,589
root_title"A Random World History Simulator Part 4"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (4)
@jd4e ·
Ah, good question! I forgot to mention this explicitly anywhere.

Tiles are connected by horizontal and vertical adjacencies (no diagonals). Amphibious adjacency works by calculating horizontal+vertical paths through water tiles to other land tiles.

But this doesn't really work well for long distances. So I've limited the lengths of these naval paths to ~10 tiles.

The *Island of eternal peace* is more than ~10 tiles from any other landmass, thus it is completely isolated.

At some point I want to add in a system that allows contact across larger distances. But note that at this resolution, a distance of 10 tiles ≈ 1,000km. Which is more than the distance between almost all islands and island-continents on Earth and their respective mainlands. And I do want the sim to allow for situations such as the Eurasia<->Americas divide where you've got de facto unconnected civilizations evolving independently in different parts of the map.
properties (22)
post_id80,668,243
authorjd4e
permlinkpz074n
categorysteemstem
json_metadata{"app":"steemit\/0.1"}
created2019-10-07 12:10:00
last_update2019-10-07 12:10:00
depth2
children0
net_rshares0
last_payout2019-10-14 12:10:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length944
author_reputation6,293,451,488,408
root_title"A Random World History Simulator Part 4"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@steemitboard ·
Congratulations @jd4e! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

<table><tr><td><img src="https://steemitimages.com/60x70/http://steemitboard.com/@jd4e/payout.png?201910072010"></td><td>You received more than 100 as payout for your posts. Your next target is to reach a total payout of 250</td></tr>
</table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@jd4e) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=jd4e)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>



**Do not miss the last post from @steemitboard:**
<table><tr><td><a href="https://steemit.com/steemfest/@steemitboard/the-new-steemfest-badge-is-ready"><img src="https://steemitimages.com/64x128/https://cdn.steemitimages.com/DQmRUkELn2Fd13pWFkmWU2wBMMx39EBX5V3cHBEZ2d7f3Ve/image.png"></a></td><td><a href="https://steemit.com/steemfest/@steemitboard/the-new-steemfest-badge-is-ready">The new SteemFest⁴  badge is ready</a></td></tr></table>

###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
post_id80,679,964
authorsteemitboard
permlinksteemitboard-notify-jd4e-20191007t204759000z
categorysteemstem
json_metadata{"image":["https:\/\/steemitboard.com\/img\/notify.png"]}
created2019-10-07 20:48:00
last_update2019-10-07 20:48:00
depth1
children0
net_rshares0
last_payout2019-10-14 20:48:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length1,296
author_reputation38,705,954,145,809
root_title"A Random World History Simulator Part 4"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000