Dateline 2010: the world-historical situation

In the twilight century of western civilisation, the US, the last resting place of western power, has as its primary purpose the containment of rising China. China has as its primary purpose to put the world 'back to rights'. It is playing a waiting game, and is anxious not to jump the gun.

Dark Age Watch (DAW on hold.)

Issue du jour 1: War with Iran--important to containing China but delayed over two years

Issue du jour 2: The world economy--unbalanced, interwoven, delusional--some predict its unravelling

Issue du jour 3: Somalia--leading the world into a dark age

Issue du jour 4: Pirates exploit the decline of international order

Friday, 22 February 2008

Experimentation with development

This program is for exploring some of the ideas in my last post. (Scroll down for explanation.)

(No program? See only a red X? You need to install the Java Runtime Environment (JRE). Click here.)

The above program allows you to investigate how scale and development depend on topography.

The idea is that you can create a land-mass with a particular shape and give it a certain population. This allows you to see how scale varies at different points of the land-mass. Higher scale results in greater development of technology, which permits a larger population and greater ease of movement. Since scale depends on population size and ease of movement, this creates a positive feedback. Having set up your land-mass and initial population, you can run a simulation to watch how things develop.

In the program, the world is divided into a grid of square regions. You create your land-mass by 'painting' different shapes (e.g. oval, rectangle) and different types of terrain (e.g. land, river) on the grid. Similarly, you 'paint' the population on the regions. You can add your own terrain types, and, for each terrain type, define the habitability (maximum population) and traversibility (ease of movement) as a function of technological level. Initially, all regions are set to 'ocean' (pale blue colour).

The traversibility of terrain depends on the technology of the source region. Suppose a region X has a given population. This population contributes to the scale of surrounding regions. To work out X's contribution to the scale at region Y, we have to take into account the difficulty of movement from X to Y, which means taking into account the traversibility of each region between X and Y. In performing this calculation, we use the technological level of X to determine all the traversibilities (i.e. not the local technological level of each region). Conversely, when working out Y's contribution to the scale at X, we use the technological level of Y to work out the traversibilities of the intervening regions. The idea behind this is that a region's ability to project itself depends on its own technology not on the technology of the receiving regions. E.g. America's ability to influence, say, Nigeria depends on American technology (internet, TV, airlines) not on Nigerian technology.

To familiarise yourself with the program, try the following (you may want to open a copy of this window so you can follow these instructions and view the program at the same time):

1. First, we need to activate the applet (program). Click anywhere in the program box to do this. The program has controls at the top, and a display area where you can set up land-masses by painting terrain onto the different regions.

2. To see the regions clearly, click on the check box labelled Grid (top right). You can move the display around by dragging with your mouse, and zoom in/out with your scroll wheel.

3. To create an island in the shape of a rectangle divided into 9 regions with terrain type 'land', do the following:
a. Click on the radio button labelled Rectangle (top left).
b. Click on the button labelled Paint (top centre).
c. Make sure the adjacent drop-down box says Land. If not, select it from the list.
d. Draw a 3x3 square in the middle of the display area by clicking and dragging the mouse. If you make a mistake, click the button Clear Terrain (top right) and try again.

4. To set up each region with an initial population of 100, do the following.
a. Edit the field labelled Population to read 100 instead of 1000 (left hand side of control panel).
b. Click the button labelled Populate All (left of control panel). Dots should appear on the square island. The size of the dot in each region represents the size of the population in that region. (If you want, you can add population to one region at a time, by clicking the Paint button next to the population field, then clicking on the relevant region.)

5. To see the status of a given region of the island, right click on it, and select Region Information from the popup menu. A dialog box will appear with the relevant information. 'Population' is self-explanatory. 'Potential' represents the potential scale generated by all the populations in surrounding regions; the potential generated by each population depends on its size, how far away it is, and the ease of movement between the two regions. 'Scale' is the potential scale multiplied by the population of the region in question; e.g. a large population in region B generates a large potential scale in region A, but, if there is nobody in region A, the actual scale of region A is zero. 'Technology' represents the technological and institutional sophistication of the region; this can reach a maximum level that is a function of the region's scale. 'Habitability' represents the maximum number of people the region can support, given its technological level. Finally, 'traversibility' represents the ease of movement across the given type of terrain. In this case, you should find that the region's population is 100, the habitability is 1000, the traversibility is 0.1, and everything else is 0. Click ok to get rid of the dialog box. If you check the other regions, you will find that they are the same.

6. Now let's look at scale.
a. Click the button labelled Step. This performs one iteration of the simulation and results in the scale of each region being calculated as a function of the populations of surrounding regions.
b. Now click on different regions of the square island and view the Region Information again. Where is scale highest? Where is it lowest? Why is this? You should find that scale is highest in the centre, lowest at the four corners, and intermediate in the remaining regions. This reflects the fact that the central region is overall closest to the other regions, while the corner regions are overall furthest away.

7. Next let's simulate the growth of population and technology. The assumption is that population grows asymptotically towards the level set by the region's habitability, while technology grows asymptotically towards a level that is equal to the region's scale.
a. Select the checkboxes labelled Population and Technology. These variables will now be updated at each iteration of the model. (This feature means you can choose independently whether or not to simulate the growth of population and/or technology, making it possible to isolate one factor and see how it behaves.)
b. Click Step, then inspect the information for each region. You will find that the population of each region has grown by the same amount, but technology has grown to different extents depending on the scale of each region.
c. Let the simulation continue until the populations have just about reached the maximum habitability, which is currently 1000. Rather than repeatedly clicking the Step button, you can click the Run button to do this automatically. The slider to the right of the button controls the speed. Move the slider to the left for the simulation to run faster. (If the simulation seems to freeze, move the slider right to slow it down.)
d. When the centre region's population is say 999.99 (check the region information, as above), click the Run button (now labelled Pause) to pause the simulation. Check all the regions. You will find that the technology in each region is virtually equal to the region's scale, and is therefore highest in the centre, lowest at the corners. The actual values should be about 0.429 for the centre, 0.217 for the corners, and 0.317 elsewhere. If you click Run again, these values will change little, as population has pretty well reached its maximum everywhere.

8. The next thing to learn is how to set the traversibility and habitability for a given terrain type.
a. Make sure that Land is selected in the drop-down list and look at the table labelled Terrain Types. The first row should read Technology=0, Traversibility=0.1, Habitability=1000. This means that, for a technology level of 0 or above, the traversibility and habitability of 'land' have the values indicated.
b. Click in the second row of the table, in the column labelled Technology, and type 0.4. Then edit the values in the second row under Traversibility and Habitability to be 0.15 and 1000 respectively. This means that, for a technology level above 0.4, the traversibility of land is now 50 percent higher, 0.15 instead of 0.1. This represents the fact that a certain level of technology brings innovations like the road, horse-and-cart or motor-car, which allow people to get around more easily.
c. You can also change the colour assigned to a terrain type, by clicking on the coloured rectangle labelled Colour, and create a completely new type of terrain, by clicking on the button labelled New. We won't do either of these in this case.

9. Now let's see what difference it makes that a higher technology level produces a higher traversibility.
a. Step the simulation once then check the information for each region. You should find that the scale and technology level of the central region are the same as before, around 0.429. However, the scale of the four side regions should be found to be higher, around 0.356, while the technology level has also increased, to around 0.321. Similarly, the scale of the corner regions should have increased to around 0.235 and their technology level to around 0.219.
b. What is going on here? Well, the technology level of the central region is above 0.4, so for this region the traversibility of Land is higher than before, 0.15 instead of 0.1. This means its contribution to the scale of surrounding regions declines more slowly with distance, so their scale is higher than it was. However, the technology of other regions is below 0.4, and for them the traversibility of Land has not changed. Therefore their contributions to the scale of the central region are also unchanged. Overall, the scale of the central region remains the same, but the scale of all the surrounding regions has increased. (Note that a region does not contribute to its own scale.) This increase in scale of the surrounding regions means their technology is beginning to increase towards the level allowed by the new scale.
c. Click the Run button and allow the simulation to run for a while, then check the regions again. You should find that the situation has stabilised with the technologies of the surrounding regions at the new higher level corresponding to their scale.

10. Now we will allow technology to increase habitability as well. This will create the situation where the technology of all regions goes above 0.4.
a. Pause the simulation. Go back to the Terrain Types table, and change the habitability in the second row to 1500. This represents the fact that a higher technology level produces innovations like farming tools, which allow more people to survive on the same area of land.
b. Step the simulation and check the region information. You should find that things are much the same as before, but the population of the central region has increased slightly, to move towards the new, higher habitability.
c. Continue stepping the simulation and keep a careful eye on the scale of all the regions. You should find that their scale is increasing. The growing population of the central region is making a growing contribution to the potential scale of its neighbours, and hence to their actual scale. The potential scale of the central region remains the same, since the neighbouring populations are unchanged, but its actual scale is increasing in line with the increased population. And as scale increases in each region, technology level follows.
d. Run the simulation for a while, until it reaches a new steady state. Check the state of the various regions. You should find that the technology level of the central region is now around 1.480, while that of the side regions is around 1.101 and that of the corner regions is around 0.773. You should also find that the population of all regions is around 1500.
e. What has happened? Well, the growing population of the central region increased the scale of the surrounding regions, until eventually the side regions broke through the 0.4 barrier. This increased their traversibility and habitability so they made a much greater contribution to the scale of the central region, and its technology grew accordingly. Both they and the central regions also increased the scale of the corner regions to the point at which they too broke through the 0.4 barrier, further enhancing the scale and technology of the other regions. The result was a great increase in technology and population all round.

You should now know the way the program works, and be able to experiment on your own. Some final points to note are:
a. Rather than drawing a rectangle, you can draw an ellipse, line or single cell. Lines have to be drawn from left to right. (Yes, my program is a bit rough, but it does the job, I hope.)
b. If you want to explore the effects of a coastline, it can be tedious to paint the coast manually (changing regions from land to coast). The Outline button can do this for you automatically.
c. The Verbose checkbox causes the grid to be displayed zoomed in, with the details of each region written in. This is convenient if you want to follow the changing numerical values. On the verbose display, P=population, T=technology (maximum possible technology shown in brackets), t=traversibility (at T=0), h=habitability, p=potential scale, s=scale. The pair of numbers at the top of each cell are its co-ordinates (column, row).
d. Each iteration of the simulation involves 3 sub-steps: calculating scale, technology, and population in that order. There is also a sub-step for calculating migration, but this is currently not modelled and does nothing. You can perform one sub-step at a time by clicking the Sub-step button. The next sub-step to be performed is shown in the box to the left of the button.

I will finish with some technical details of the model. In the next post, I will discuss how the above program can be used to illustrate the relative historical roles of Egypt and Rome.

Technical details...

The model involves 3 calculations--scale, technology and population--and a set of constants.

(1) Scale calculation

I take each region (square) in turn and calculate its contribution to the potential scale of all the other regions. Firstly, I set the potential of each region to zero. For each region, the algorithm is then as follows:

a. Call the source region the region now being processed.
b. Set working_potential of the source region to be equal to its population.
c. Set the current region to be the source region.
d. Let current_potential be the working_potential of the current region. Consider each region to north, south, east and west of the current region, in turn, as the target region. If the target region has already had its working_potential set during processing of this particular source region, do nothing (this occurs if potential has been propagated to it by another route, and stops potential being propagated back the way it came). Otherwise, calculate propagated_potential as current_potential x traversibility / (traversibility_threshold + traversibility), where traversibility is the traversibility of the terrain type of the target region given the technology value of the source region (note, not the current region or target region). If propagated_potential exceeds a fixed threshold_potential, set the working_potential of the target region to be equal to propagated_potential.
e. Consider each region whose working_potential was set at the last step, in turn, as the current region, and go back to step d.
f. Once there are no more regions whose working_potential has been set but not propagated to its neighbours, add the working_potential of each region, except the source region, to its potential. Set all working_potentials back to zero.

The above is repeated, taking each region in turn as the source region. The result is a total potential for each region. The scale of each region is then calculated as simply the product of its potential and its population.

(2) Technology calculation

For each region, I calculate delta_technology from the formula, delta_technology = time_step x technology_growth_rate x (technology_constant x scale^technology_exponent - technology). Here, scale^technology_exponent means 'scale raised to the power of technology_exponent'.

The new technology of each region is then calculated as technology + delta_technology.

(3) Population calculation

For each region, I calculate delta_population from the formula, delta_population = time_step x population_growth_rate x population x (habitability - population). In this formula, habitability is the habitability of the region's terrain type given the region's current technology.

The new population of each region is then calculated as population + delta_population.

(4) Constants

I used the following values for the various constants introduced above:

traversibility_threshold = 1
threshold_potential = 10-6
time_step = 0.1
technology_growth_rate = 1
technology_constant = 1
technology_exponent = 1
population_growth_rate = 0.0001