Excursions
Published in

Excursions

Hadrian’s Wall, England.

The Geometry of Empire 1: Protecting Your Borders

How many border forts does an ancient city state need to secure it borders? This is the basic problem we’ll tackle in a series of articles, at the intersection of mathematics and game design. We will keep the math mostly to abstract thinking and geometry. We’ll start simple today, and examine more elaborate scenarios as we go on.

Let’s get defending!

The Situation

Let’s assume a circular territory, where one defender (blue) must respond to one attacker (red). The invader appears at the border. The defender moves to intercept him as quickly as possible.

One defender’s path to reach an attacker

In this basic setup, the defender must travel the length of the empire to protect it, and we can imagine a lot of damage happening during the wait. This prompts the defender think about some alternate strategies: he could divide his forces, and spread them out around his empire. But where? This is the question we’ll tackle today. (We’ll address how many defenders to have later.)

Many defenders

Simplify

On a uniform, circular territory, we can greatly simplify the question of placement. Each unit can best defend the area around it, and all the units are equivalent, so they should defend equivalent portions of the territory. We can therefore divide the territory into equal sectors, and assign one defender to each. For example, if there are four units, each defends a quarter.

An attack can occur from anywhere, so we should try to minimize the distance to all points on the edge. There’s no reason to deviate from the center line: that would favor one side more than another, and open a hole for an attacker.

Attacks can occur anywhere

Possibilities

Where should we be on the mid-line? Let’s begin be considering the extremes.

If the defender is located at the origin of the territory (left image) all possible attack sites on the edge are equidistant — but also as far away as possible. If the defender is instead located at the edge itself, on the midline (right), it can immediately intercept attacks at that one point, but must travel to the rest of the edge; and the corner of the sector becomes the most distance target.

Extreme positions on the midline

This starts to give us an idea about how hard it is to defend different parts of the edge — with the corners and center point deserving special attention.

The Limiting Factor

In fact, our two extreme cases above tell us what we can’t do. While we can choose to defend the center point very well — to the detriment of everything else — we can’t actually do the reverse. At no position (on the midline) is the defender closer to the corners than to the center. Here is a random position to illustrate:

The corner is always farthest

No matter where on the midline we are, the corners will always be our weak spot. Therefore, we should pick a position to defend them as best we can. Since both corners are equally important, that position must be midway between them:

The best defensive position

No other position is closer to both corners than this. It will best protect us from a savvy attacker who targets either corner, and will also protect us (even better) from any other attack.

(You may say: but to best defend the corners, we should have two attackers. That would mean a greater division of the territory, into smaller segments; again with each defender needing to be positioned. But the question of how many segments to have is a valid one — which we’ll address in a later piece.)

Geometrically Determine the Best Point

Exactly how far out is our ideal defensive position from the center of the territory? To find out, we can sketch it in a more familiar geometric way:

We know the angle alpha, which is 360 divided by number of segments, then divided by two again — in this example 45 degrees. If we treat the territory as the unit circle, length AC is 1. Since the central point is a right angle (the proof is left to the reader), we can use a trigonometry identity to find AD:

cos alpha = AD / ACAC = 1
AD = cos alpha

In our example, this yields ~0.71, meaning our defenders should be 71% of the way out from the center. This percentage increases rapidly as the number of segments/defenders rises from 1, and then slows to asymptotically approach 100%.

Ideal defender position

Here is what that looks like from a bird’s eye view of the territory:

Example territory divisions with ideal defender placement

How Far to Intercept?

Any savvy attacker will choose to strike at the corner of sectors. The defender must travel the distance CD which we can get from:

sin alpha = CD/ ACAC = 1
CD = sin alpha

Which in this example is also 71% of the territory’s radius. It’s still high, but much better than the 100% required when the defender lives at the center of the territory.

Best defender position versus worst intercept distance

(Note that our example, with four sectors, is the only case in which the intercept distance perfectly matches the ideal placement, at ~71%.)

Next time: What happens when the attacker doesn’t sit at the border but instead moves to invade the center of the empire?

--

--

--

Casual mathematical explorations of games, history, and science fiction

Recommended from Medium

Drinking and Dialogue in Afterparty

CSC November Update #1

Destiny 2’s raid rotations finally get a release date with a few extra incentives.

The Essential Switch Ports: Red Faction: Guerrilla Re-Mars-Tered

DTS Sound Unbound Review

Are Gaming NFT’s Doomed to Fail?

Is It Worth It?: Apple Arcade

Five Great Games That Sound Better With Headphones

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jasper McChesney

Jasper McChesney

Data, graphics, games. So You Need to Learn R.

More from Medium

Palomares — American Nuclear Bombs Fall on Spain

Four people standing on the USS Petrel, with the thermonuclear bomb which was found in the Mediterranean Sea 80 days after the Palomares nuclear accident.

Douglas Hofstadter’s Gödel Sentence (G) is Both a Theorem and Not a Theorem

Are these badly behaving scientists an example of good collaborators?

A man pretending to kick a woman in the back while she stands near the edge of a cliff.