From previous questions, I made a nice mass of land, which was enriched up until the drawing of precise coastlines.

But all that nice lands looks a bit empty. In my world, I want to make it alive, and one of the first step, to complete my map is to draw the borders and define the countries.

Is there any alternative, to rewriting the whole of history from prehistoric migrations up until the time where the story takes place?

For a given country, I could follow the steps indicated in this question. But if I have a whole continent available?

Note:

This is part of a series of questions that tries to break down the process of creating a world from initial creation of the landmass through to erosion, weather patterns, biomes and every other related topics. Please restrict answers to this specific topic rather than branching on into other areas as other subjects will be covered by other questions.

These questions all assume an earth-like spherical world in orbit in the habitable band.

$\begingroup$I actually watched that video some time ago. But that's exactly my point. It is not trivial to make those distinctions. And just using rivers and mountains aren't enough.$\endgroup$
– bilbo_pingouinAug 31 '15 at 20:24

2

$\begingroup$But do you need that level of detail? Granted, the last examples are spectacular but affect a tiny percent of the world borders and population; and do not appear in anything else than very detailed maps. I think just a few landlocked countries and enclaves and exclaves should do.$\endgroup$
– SJuan76Aug 31 '15 at 20:45

2

$\begingroup$Let me also just point out that sometimes longitude and latitude are used to form borders. Note the border between Northeast Alaska and Canada, for instance. Other examples include Papua New Guinea's west border, the western US/Mexico border, the western US/Canada border, Libya, Egypt, Sudan, Namibia, Guatemala, and others. This is by no means an exhaustive list, nor a particularly common occurrence, but it may be worth adding a few instances of on your map.$\endgroup$
– DanAug 31 '15 at 23:33

1

$\begingroup$We didn't always use latitude and longitude to navigate, which pre-dates using them to define borders. Maybe your culture uses circles or points at certain places in the world with radial lines coming off at all angles? The possibilities are endless!$\endgroup$
– CJ DennisSep 1 '15 at 8:34

12 Answers
12

National borders will follow rivers, mountain ranges, large forests, inland lakes and deserts.

Mountain ranges, deserts and large forests will all form buffer zones between nations since these biomes are not well suited to (human) habitation. So you may have two major nations separated by a mountain range, but a minor nations inhabiting the mountains themselves (like the Himalayas).

So think of major nations separated by buffer nations with the latter inhabiting buffer zones featuring more challenging habitability.

Challenging habitability need not mean its impossible or very difficult to live, merely that the population there will be smaller and have to have special skills to live there.

Once these factors have been taken into account, we need to add a second level of fine detail that is based on your worldbuilding the historical linguistics of your world. Decide how ancient peoples in your world migrated, and thus determine the patchwork of distinct language zones in your world. You can then draw more national borders that are based on language that will serve to create border lines in areas that do not feature natural obstacles.

To see an excellent example of such an imagined history of migration you could do much worse than look at Tolkien's work on the three ages of middle earth - here (http://tolkiengateway.net/wiki/Middle-earth). It covers the creation of elves, men, hobbits and dwarves, and if you scour that site above you will find descriptions of the various migration patterns and how that generated the nations in middle earth at the time of the Lord of the Rings.

With specific regard to dutch, it evolved along with various other germanic languages from Low Franconian, which was the language of the Franks.

$\begingroup$This was my starting point, but it isn't necessarily enough. Look at Europe. The Netherlands aren't really bordered by large rivers, mountains, and so on. Germany was split into numerous small territories all practically intependent. And the border between Germany and France follow the Rhine, but only up until one point, and not all the way to the Netherlands. So yes those parameters are certainly important to take into account. But what then?$\endgroup$
– bilbo_pingouinSep 1 '15 at 12:17

$\begingroup$+1 excellent answer. Just want to add that the precise, draw-exact-lines-on-the-map concept of boundaries is very modern, both due to the ability to make and to care about such precise measurements. If there wasn't a clear natural boundary or a reason to care exactly where the boundary was, it could be fuzzy -- claimed by both countries, but without the claim being enforced by either.$\endgroup$
– LindaJeanneSep 1 '15 at 14:08

It is quite common that borders go along natural features like rivers or mountains (also called "natural borders"). Basically it's a line that naturally is hard to cross. Therefore it's also harder to conquer land beyond that border than if there's no natural border to begin with. Also, if the border is negotiated, those landmarks are easily recognized, and therefore may prevent future disagreement about the position of the border.

$\begingroup$That depends a lot of the technology at hand, though. If you look at older European borders, you will find that e.g. lakes are not borders, but rather in the middle of nations, as that is where it's possible to travel and transport, whereas areas with only forests are difficult to get through, and are often border areas.$\endgroup$
– leoSep 1 '15 at 8:43

You need to do these before you really get started, you have some done but I am listing everything for future user reference.

You need a map

This map should be geographical down to a regional level (local specifics/peculiarities can and should wait, create them as needed)

Include major bodies of water, rivers, biomes, mountains etc. This should be the satellite image from orbit level of detail.

You need a history

Drawing political borders is obviously impossible to do without having some idea of what came before now whenever now happens to be in the story.

Like the map this doesn't need to be the nitty gritty. Think of the level of detail you get in elementary education. Egypt, Greek City States, Roman Empire, Byzantium, Medieval, Renaissance...etc etc etc. This should be the broad sweeps of history. Rough out where on the map these major nations/empires covered and overlapped.

Setting the now

Determine a time period. Pick a socio-technical point in time (or create your own, medieval twitter!...ahem anyway) for your now to exist.

Technology level helps define the shape of borders. As mentioned in other posts you are, for example, not going to have longitudinal borders during the Roman Empire...and if they could you know the Romans would, everyone knows the Romans loved math.

How much 'open' space is there in your world. For the vast majority of human history much of the world was not part of any political entity, if you're working in the past keep that in mind.

Get to it

Step 1: So between your time period and geographical map you can start plotting obvious places for civilization to start. We all know (or do now) that the earliest civilizations on planet Earth started along rivers. Regular access to fresh, clean water makes life a whole lot easier. You don't need to name these civs or anything like that (though it may be fun to come back and do it later).

Step 2: Apply the rough brushes of history you outlined in the preparation steps (you did do the preparation steps right?).

Step 3: Once you arrive at now, stop. If things look a little too planned out at this point that's perfect. Right where we should be.

Step 4: Fine tune your map.

Review major historical events, people disasters (wars, migrations, famines etc) and modify the map appropriately. While you are doing this write down why the changes makes sense while you are doing this, you will never remember why later. This can cause strange squiggles across what looks like an obvious border, or set the border at a certain landmark, for example mountains or a river, or a particular city.

This helps give your map more depth.

Always keep in mind that borders are fluid and on a planetary scale they change constantly.

Political boundaries are geography plus populations plus as many other things as you want to add.

Draw a map of your continent/world/galaxy/universe. Fill in details like terrain, biomes, topography, geology, vulcanology, resources, etc...whatever details you want to include in your story.

Make a list of the people's you want to have in your world. Perhaps the benevolent Empire (heh, when are empires ever benevolent?) or a nation of marauding wanderers. Figure out which groups are stronger than the others and why they are stronger. Maybe one group has a mobility advantage while another has a great economy.

Place your weakest nations/tribes/groups first and give them the largest possible area that seems reasonable for their size. Don't worry, they won't hold this much territory for long.

Now drop in your stronger nations. They will naturally push back on the weaker nations, shrinking their territory. Pushback will extend until a natural barrier is reached such as rivers, oceans, or mountain ranges. You may lose a weaker nation or two. Make adjustments to their strengths till they can hold at least a little territory.

Go back and make some weird boundaries that can't be explained by one nation being stronger than the other. These small boundary changes give you, the author, an opportunity to inject some political back-history. Point Roberts on the boundary between Canada and the USA is an example of this kind of political boundary making. Europe is famous for these kinds of boundary shifts.

Make a few adjustments to the boundaries to account for resource allocation on the map. Stronger nations will have more resources available to them or very strong trade routes to get those resources.

Designate capital cities as meets your needs. Often capitals are centrally located but not always (ex. Moscow or Washington D.C.).

Discussion

Using this method we can retrospectively see why the Mongols gained so much territory as they had a huge mobility advantage over their peers.

Every extra "layer" of information added to the map will increase the richness of your world but at the expense of complexity. Add as many layers as you can manage then stop. Just adding terrain, resources and population to your map will be enough for a very rich world.

Introduction and assumptions

Borders clearly aren’t static; they change over years, decades and centuries as countries grow, shrink, and are born and die. As time passes, they may become vague or disputed. Therefore, I’d argue that you do need to create a somewhat detailed history of a region to properly map out where its borders are at a certain time. However, it should be relatively easy to get a decent idea of where a country’s borders lie when it is first formed, assuming certain conditions hold.

I’m going to suggest a way to build a country’s borders from the ground up, starting from a small city-state society with medieval or pre-medieval technology. I want to make a few key assumptions:

Power is somewhat centrally located, preferably in a city or military fortification. This is the most secure part of the state, and it is easier to control land closer to this location than land farther away.

Territory is contiguous; you should be able to travel from any one point to another via land while remaining in the country.

The technology is sufficiently limited such that the above assumptions hold. While naval power may be possible, air travel is not. This should hold for the sort of society we’re talking about, assuming there aren’t significant magical powers.

Neighboring states have relatively similar strengths. I’ll address scenarios where this isn’t true more at the end.

I’ll hypothesize that the original borders of a city-state, according to what I discussed above, can be approximated by creating a Voronoi diagram. Essentially, given a set of $n$ points (cities) in some two-dimensional space, a Voronoi diagram divides that space up into $n$ regions. The region $r_i$ contains all the points closer to point (city) $c_i$. The lines of the diagrams can be interpreted as the borders of these regions. Here’s an example:

Voronoi diagrams have already been used to model the borders of countries and states; see specifically the work of Jason Davies (images copyrighted, by the way). There are certainly many differences from real-life borders (although in certain parts, like North Africa, things seem to work), but again, this is only a first approximation.

However, I’d like to deal with a much simpler case, where $n=3$. $n=1$ is obviously trivial, and $n=2$ yields precisely one border - namely, the perpendicular bisector of the line segment connecting the two cities. However, $n=3$ is a little more interesting, although it is certainly simple to solve. All we need to do is find the one vertex where all three borders coincide.

There are several ways in which we can do this, knowing the locations of three cities and assuming that each one is the center of its own city-state. We could use one of the above algorithms, if we really wanted, but those can be time-consuming to implement. Alternatively, we could use the fact that any Voronoi vertex is the center of a circle containing three points, and therefore, given three points, we could find the center of that circle. However, I’d like to use what I think is the simplest option: Determine perpendicular bisectors of segments connecting any two cities, and find the point where they intersect.

Some assumptions (well, just one, for now):

The three points are not collinear. If they are, then the borders are just parallel lines, and there is no central vertex.

Mathematics

Let’s have a set $C$ of three cities, $(c_1(x_1,y_1),c_2(x_2,y_2),c_3(x_3,y_3))$. We choose to find the segments connecting $c_1$ and $c_2$ ($\bar{s_{12}}$) and $c_2$ and $c_3$ ($\bar{s_{13}}$). Given that the $\bar{s_{ij}}$ is the set of points equidistant to both $c_i$ and $c_j$, we can set
$$\sqrt{(x-x_i)^2+(y-y_i)^2}=\sqrt{(x-x_j)^2+(y-y_j)^2}\tag{1}$$
Simplifying eventually yields the equation
$$y=\frac{x_j-x_i}{y_i-y_j}x+\frac{x_i^2+y_i^2-x_j^2-y_j^2}{2(y_i-y_j)}\tag{2}$$
Clearly, this blows up if $y_i=y_j$, but if that’s the case, then the border simply has the equation $$x=\frac{1}{2}(x_j-x_i)$$
which is simple enough.

We do the above for all three sets of points. To find the vertex, we simply find the point where all three lines intersect, which is simple, as we can do it for any two of the lines.

Code

I wrote a program to do this in Python 3. To simplify things a bit, I’ve assumed that no two cities have the same $y$-coordinate, as that produces a line with infinite slope in $\text{(2)}$. If, for some reason, your setup includes a case like that, simply rotate the coordinate system a little so that all three points have different $y$-coordinates.

Approximation 2: Terrain.

Voronoi cells are, I think, a decent approximation. However, they completely ignore the landscape and terrain of the area. For instance, if an edge lies in the middle of a valley surrounded by two high mountain ranges, it seems possible that the border may shift to one of those ranges, as they’re easier to defend. The same thing goes for rivers, cliffs, etc.

I’ll assume that the following objects would cause borders to shift:

Rivers

Mountains

Canyons

Large bodies of water

I think these objects have been sufficiently justified as limitations (see celtschk ‘s answer).

Mathematics

Most of these can be approximated with curves of essentially negligible thickness (lakes and oceans aside). Therefore, let’s say that any landform $L$ can be represented as a curve parameterized by a variable $t$:
$$\mathbf{L}=\mathbf{x}_L(t)=(x_L(t),y_L(t)),\quad t_0\leq t\leq t_f$$
We can also represent a section of border $B$ as another parameterized curve, given by a parameter $s$:
$$\mathbf{B}=\mathbf{x}_B(s)=(x_B(s),y_B(s)),\quad s_0\leq s\leq s_f$$
The challenge, then, is to come up with some iterative algorithm that maps $\mathbf{B}_{n}$ to $\mathbf{B}_{n+1}$. There are probably many options out there. I chose one of the following form:

Divide $\mathbf{B}_n$ into $N$ points $\{p_{1,n},p_{2,n},\cdots,p_{N,n}\}$.
For each $p_{i,n}(x_p,y_p)$, calculate the distance to all points on $\mathbf{L}$ and choose the point on $\mathbf{L}$ that is closest, $l_{i,n}(x_l,y_l)$.
Move $p_{i,n}$ accordingly. I played around with things and decided on a certain formula:
$$dx=\frac{x_l-x_p}{1+a\cdot\text{dist}(p_{i,n},l_{i,n})},\quad dy=\frac{y_l-y_p}{1+a\cdot\text{dist}(p_{i,n},l_{i,n})}$$
$$x_{p,n+1}=x_{p,n}+dx,\quad y_{p,n+1}=y_{p,n}+dy$$
where $a$ is some scale factor and $\text{dist}(\mathbf{a},\mathbf{b})$ is the distance between two points $\mathbf{a}$ and $\mathbf{b}$.

This can be done as many times as possible. I’ve found that in many cases, even one iteration can be enough.

Code

Here’s my implementation of the above, again written in Python 3. I’ve chosen $a=0.3$:

It uses the following parameterizations:
$$\mathbf{L}=(\sqrt{t},te^{-t}),\quad0\leq t\leq49,\quad\mathbf{B}_n=(s,s/4),\quad0\leq s\leq7$$
Here’s the result:

The new border hugs the river near the left, then shifts roughly halfway between the old border and the new border. More iterations might be desirable, but there’s currently something of a balance.

The formula for $dx$ and $dy$ could use some improvement, but even though it’s imperfect right now, I do think it’s functional. It can be adapted for multiple perturbing objects (i.e. multiple rivers, mountains, etc.) by calculating all the $dx$s and $dy$s, summing them, and then moving the border, not accounting for one landform at a time. You can vary the scale factor if you want, both in general and for specific landmasses. I haven’t yet played around to see how this could affect things.

Where do we go from here?

The borders of countries still don’t quite match up with these approximations. I’d argue that part of that is because of modern technology. However, a great deal is due to history. Those mountains over there are supposedly uncrossable . . . until a feud between rival kingdoms necessitates a battle, which ends with one king triumphant, ruler of both. Or maybe that river was considered a fairly good border, until holy relics were found on the other side and suddenly the head priest really wants the site inside the country.

At this point, I’d say that James’ answer becomes invaluable. In the end, it is the people of your world who shape it, often more than you, the god-like figure outside it. You can control that history, of course, but those events can and will change the world. All my suggestions are are simply slightly more detailed slates with which to start building countries. After that, it’s up to you.

Rivers can sometimes be used to mark borders (the Rio Grande being one of the famous ones). However, it's almost always the case that the border would be there regardless, and they simply adjusted it to fit the river so it would provide them both with a bit of defense, and spare each country the trouble of constantly having to cross it.

Here's a map of medieval Europe:

There are few things to keep in mind looking at this:

1) Most powerful nations are based around a river, not divided by one. London, Paris, and Rome all have major rivers flowing through them. This provides a major artery of trade, as well as fertile cropland to feed a large population. Over time, the tribes and cities that expand to form kingdoms tend to be ones with large populations. Therefore, most of your kingdoms will have a fertile heartland containing most of the population and usually the capitol. This core territory will then likely hold dominion over a more rugged hinterland with a much smaller population.

When two of these kingdoms collide, the border usually changes quite often as they fight each other. Usually the line will settle down somewhere in between the two, usually across rugged or less hospitable land that neither one is that interested in fighting for. If one side was in the midst of conquering, say, a fertile valley, they wouldn't agree to stop and draw a new border until they'd taken the whole thing.

The best example of this is Medieval Scotland. The vast majority of Scotland's population lives in the fertile area around Edinburgh, while the Highlands and islands are only lightly populated. In the population map below, notice now the main farming and trading area is packed with people, and formed the core of a kingdom that then expanded outwards. Note that this is a modern map, and the medieval numbers were likely a bit more balanced, albeit with the same general pattern.

2) The map is filled with dependent kingdoms. This was also true in Ancient Roman times. Looking at a map of the Roman Empire makes it seem like one big state, but in reality there were lots of dependent kingdoms within it, who had control over internal affairs, but deferred to Rome in everything else. On the Medieval Europe map above, Bohemia, Croatia, and Moravia fall into this category, along with many others. You may or may not want to include this in your setting, but it was a common historical occurrence. These dependent states often existed on the frontiers of their parent empires, contained a distinct ethnic group, and were used as buffer zones against hostile empires. Late-Medieval Croatia fell into this category. They were ruled by the Austro-Hungarian Empire, but held a lot of autonomy, and were used primarily as a buffer against the Ottoman Empire. These borders will often be very defensible, going along rivers and surrounding rugged of mountainous terrain, as these small dependencies would not be able to hold vulnerable, fertile lands against the encroachment of larger forces.

3) City States are common in areas with large coastlines and rugged terrain. City states simply rule one large city and the surrounding countryside. These states focus largely on trade and rarely build empires in their immediate neighborhood, instead conquering overseas possessions to expand their trade network. The Greeks used this system in the Classical Age, and the Italians had it for most of the Middle Ages. If your world has a rugged/coastal area with rich trade connections, I suspect it would be full of smaller city states, with small (and somewhat unimportant) borders.

4) Undefined Borders are common in vast uninhabited areas. Nobody (except Muammar Qaddafi) cares where a border is drawn across an uninhabited desert. Notice in the Medieval Europe map, how the Eastern European principalities of Kiev, etc, have borders that just sort of fade out into the Steppes. This is common in sparsely populated kingdoms sharing borders with undefined tribal groups. Since the nomadic horsemen will be crossing the border regardless, and the state doesn't have the will or ability to police it, there isn't so much a border as a general understanding that "the stuff over there belongs to them". This also goes for desert borders. Lots of maps of Ancient Egypt show their empire extending out into the Sahara, but it wasn't like you would run into Ancient Egyptian Border Patrol out there. Rather, there was just an understanding that Egypt ruled the Nile Valley, and anybody that came too close would be in trouble. You can draw a defined line for these types of borders, but just know that the reality on the ground would be much more fluid.

5) Disorganized Tribal Groups rule the frontier. In the Medieval Europe map, notice the Cumans, Uzes, and Vlachs in the South East, and the Prussians, Selonians, etc, in the North East. In sparsely populated areas, especially those inhabited by nomads, Kingdoms don't really exist. Instead the area is divided among tribes, clans, and other small entities. On maps these are generally marked together as a single ethnic group (like the Cumans), but are not given a color or borders. Instead, the other borders end, and the white area has the names of said ethnic groups, with the location indicating roughly where they were, and the size of the word often indicating the size of each. So, pre-Genghis Khan, the area north of China would be a blank area with the word Mongols written there, along with a few other nomadic groups. Historically, these groups would often unite and conquer their sedentary neighbors, forming new kingdoms who would be conquered in turn a few hundred years later. The Parthian Empire is a good example of this, as a nomadic horse nation who settled down and was later conquered by the Sassanids, another nomadic horse nation (who were then conquered by Arabs, who were then conquered by Mongols, who were then conquered by Afghans, etc).

Look for every place that has something that would make people
settle there. Minimum would be food and water. Any useful features
and resources add bonuses. If the land is recently settled, start
at one edge. Otherwise figure that people have been over most of
the land (except for areas that you don't want them to be).

Make circles (use light pencil). Once you have the settlements,
judge based on how much food and resources they have, how big their
influence will be (a compass or a pencil on a string will work).

Since circles are unrealistic, adjust them for the terrain. If
travel is hard, pull it in some and if travel is easy let it out
some. Also, if there are natural features (river, cliff, forest
edge, desert edge, etc.) near the edge, the edge usually conforms to
the natural feature.

Overlaps are zones of conflict. The border will generally be within
that zone of conflict (often following a natural feature).

Assimilation. If one settlement is completely or mostly within the area of
influence, decide if it has already been assimilated into the larger
power or not. If it has been assimilated, extend the powers
influence in that direction by the strength of the assimilated
power. If it has not been assimilated, pull the border back in that
area. On the first pass, most will be assimilated.

Decide which borders might be peaceful and which will have conflict.
Neighbors with different resources may be more peaceful toward each
other and have trading relationships. Neighbors with similar
resources are more likely to come into conflict since they gain less
through trade.

Adjust for trade or conflict. Widen the borders of powers that have
trade agreements and narrow the borders of powers that are in
conflict. Repeat 4 through 7 as needed. Some powers may be assimilated and some new zones of conflict may occur. If a border shrinks to "free" a smaller settlement, decide if it breaks away (if not, leave a connection to the larger unit).

Fine tune as needed or desired.

Back Story. Create as much history describing how things got to the present time
as you wish. There are likely many great plot hooks in the evolving
map.

As others have noted, national borders tend to run along coastlines, rivers, and mountain ranges. But there are plenty of exceptions, especially when no convenient river or mountain range was available in the general vicinity of where two nations bumped against each other.

Sure, you could write a history of the world up to this point to explain how your borders came to be. But is that necessary? If in a story a writer says, "Bob was tall and had red hair", he normally doesn't find it necessary to trace Bob's genetic history back to Noah to explain exactly how he came by this traits.

If for some reason you need an unusual national border in your story -- if say, country A is on the west side of the ocean and also control a tiny strip on the east side of the ocean, and country B is then east of that strip -- you might need a couple of sentences of explanation of how that came to be. But if the history isn't relevant to the story, even that probably isn't necessary.

If I'm reading a story set in a ficitonal world, or in some part of the world where I'm not familiar with the geography, I don't recall ever wondering, "Hey, wait a minute! How come the border between Foobar and Plughland runs through the Fwacbar Valley? Didn't the author say that there's a river near here? Why isn't the river the border? What's the history behind that?" Unless the story is about geography and politics, I doubt such a question would even come to the mind of 99.9% of readers.

Borders are a tricky subject. Though most will end due to natural terrain, like rivers or mountains, most borders are set by expanding kingdoms, only stopping when they meet resistance from another expanding kingdom. Because of this, there's no real formula per se.

However, you don't have to write prehistoric histories. Make one kingdom and have fun with. Think about who their enemies are. What do they produce? Maybe they trade with a neighbouring city. Before you know it, you'll have a flourishing kingdom before you. Good luck!

Although rivers are mentioned frequently here, the reason we humans have them as borders is due to transportation of goods, both to a political region and from it.

Most USA citizens do not realize that our States had shooting wars, with people killed, over rights to the water sources and waterways for transporting goods, for irrigation and drinking water. The same goes for natural oceanside ports (or those on big lakes). Water wars (literally wars) are the primary reason our map has weird bumps and extensions, water access, for both consumption and travel, is critical. Barges are far and away the cheapest form of transportation for goods; far, far cheaper than rail, trucks or horse drawn wagons.

Unless a region has a lot of natural lakes, it probably can't grow very much on rainfall alone. Not for agriculture or city life.

Find your glaciers or heavy lakes being replenished by rainfall, Trace your rivers through the valleys, rank each river based on how much "good land" it provides access to, how many other rivers it can join (it's network connections), whether it reaches a coast line. You can probably find the "good harbors" based on some surrounding landscape criteria (and how many rivers can reach it).

The highest-ranking rivers are borders; those are the ones people fought to keep some other political faction (country, state, whatever) from owning entirely. If those borders produce a country too large, sub-divide it using the highest-ranking river that passes through it, and do that recursively.

One alternative to generating the entire story, is generate stuff using Markov Chains based at current year heightmap/border earth data.

First you get an earth height map that has countries borders.

If the pixel of the height map is ocean/border you change its color to A, if its ocean/international land, you change its color B, if its ocean/country land you change its type to C, if its not-ocean/border you change it's color to color D, and if its not-ocean/international land you change to E and if its non-ocean/country land you change to F.

Some program will then get this modified heightmap and analyze it creating an probability table: The chance of some tile X being border, "international land" or "country land", based at what specific tile type their 8 neighbors are and based too the tile itself you are generating is ocean or non ocean.

With that info in your hand, the world map generator program will get a random tile and discover if it is "country land", "international land" or border based at their 8 neighbor tiles and his own type. After find this tile type it will go for the next one and generate it, and then go for the next one, and next one..... until it generate the entire map.

Some important things to make sure this works:

1-You must always generate the not-generated tile with most amount of already generated neighbor tiles, if you don't do that, the world will have some patterns based at how you generated it, as some example generating left to right starting from the first line, create something with an X pattern.

2-The markov chain data must be based at ALL 8 neighbors and must be influenced by the direction of the neighbor tile too.

2.1- An example, If at the top of the ocean tile you are generating there is a ocean/border tile, at the bottom of this tile you are generating there is a ocean/border tile too and you didn't generated the other 6 neighbor tiles but they are all ocean. The "question the program will ask" is something like this: "Assuming this tile is a ocean, the top and bottom tile is ocean/border, and all others are ocean tiles, what is the chance of this tile being a border, what is the chance of this tile being 'international land' and what is the chance of this tile being 'country land'? " Then the program will select its tile type (border, country or international) at random weighted by those probabilities.

2.2-If you don't use this method, most of the time you will have a map that is made entirely out of international area, or made entirely of country area.

3-Points 1 and 2 are based at discoveries I found while trying to map makov chain map. You will find some markov chain map generator ideas at internet that assume the markov chain wont work at generating maps (x pattern or whateaver) because they didnt discovered what caused their problems as assumed the use of markov chain itself was the problem.

$\begingroup$Hi ELMO. Welcome to Worldbuilding SE. It sounds interesting, but could you detail a bit how the tools work? We usually like to have answers a bit more than a link. So that people can evaluate without clicking the link. Links can be modified or disappear and the content of your answer lose its value.$\endgroup$
– bilbo_pingouinSep 1 '15 at 10:31