Kattegat – A Game Theory Problem inspired by Medieval Warfare
The intricate plot of the Netflix series “Vikings: Valhalla” prompted me to analyse the tactics employed by its main characters, and frame an interesting game theory problem based on medieval warfare.
This article was first published on The Scholastic Estuary — the departmental magazine of the Dept. of Information Technology, Jadavpur University.
Let’s head to WW2 Europe to get some context …
When the young mathematician Alan Turing decoded the Enigma cipher used by the German High Command for top secret military communications during the Second World War, it was a huge achievement for the cryptographers working at Bletchley Park. However, even with the ability to crack every German message and know of their plans in advance, the British were faced with a rather interesting dilemma.
If they acted on every message they decoded and started sinking German U-boats, their enemy would soon realise the Enigma is compromised and change the machinery immediately, thereby not only nullifying the purpose of breaking the cipher but also risking the inability to crack the next cipher that would be deployed. And if they did not act on any message, there was no point in breaking the cipher after all.
Therefore, they had to choose when to take action such that the impact of these actions, whether defensive re-routing of convoys through safer locations or offensive attacks on enemy ships, would be large enough to turn the tide of the war in favour of the Allies, but too small for the enemy to doubt their communication machinery, in other words, maximizing attacks on enemy locations while minimizing chances of discovery.
In modern policy making, applications of game theory have become so widespread, that one of my friends recently commented that “the answer to life, the universe and everything” is not Douglas Adams’ 42, but Game Theory. From the omnipresent campaign strategizing of everyday electoral politics to the more refined and pragmatic game planning of geopolitics, from economic forecasting to military deployments, game theory powered by statistical models and advanced computer simulations plays its part in every significant domain.
Okay, back to Vikings: Valhalla
No, this article isn’t going to be all theory. Instead, I’ll describe a unique problem that I thought of while watching the Netflix series “Vikings: Valhalla”. As a proponent of learning history by watching historically accurate movies, serials and documentaries, I found this series particularly interesting as a dramatic portrayal of the Second Viking Invasion of Anglo-Saxon England. The problem I thought of is based on a sub-plot from this series, the invasion of Kattegat by its two enemies who should now be allies, or should they?
“While in theory there is no difference between theory and practice, in practice there is practically no similarity between practice and theory.”
Imagine you time-travelled to 11th century Europe to test the applicability of modern mathematics and game theory in medieval warfare strategy. Somewhere on the Norwegian coast is a very prosperous town called Kattegat, ruled by a powerful chief, Hakon, the Earl of Kattegat. Being a major trading port, Kattegat is prone to invasions by sea as well as land, and Earl Hakon has raised an army of 400 soldiers to defend the town. Before trying to analyse the impending crisis in the problem stated ahead, one should revisit a few aspects of medieval warfare and how we will quantify their impact while solving the problem.
“What we learn from history is that no one learns from history” ― Otto von Bismarck
Rules of the Game
Outcomes of battles were dominated by physical strength and numbers on the battlefield were a decisive factor. Quantity played such an important role that its effect on the likeliness of victory or defeat further influenced the results of a battle. For a simplified understanding let us assume that if equal numbers fight on both sides, then the battle ends with nobody alive on either side.
Furthermore, if one side has more soldiers than the other, the quantitatively superior side ends with the difference in the number of soldiers plus fifty, provided it does not exceed the original strength. This is due to the high morale. Since commanders rallied their forces with promises of victory and glory, emotion and morale also played their part. This means if the inferior force has strength less than 50, the superior force leaves with no casualty.
An army can split forces among multiple fronts, and several armies can join forces to fight as a unified front as well. Dividing and regrouping form the centrepiece of battle strategy. As in any battle, having the element of surprise is always a great advantage. The aforementioned rules are valid only if the combatants are expecting each other. When attacking from behind, the attacking side has a 2:1 edge over their opponent, instead of the usual 1:1 ratio. In case of an inferior force choosing to attack by surprise, no side gets the advantage of high morale.
“All courses of action are risky, so prudence is not in avoiding danger, but calculating risk and acting decisively.” ― Niccolò Machiavelli
Now, let’s focus on the geography of the coastal town. Kattegat is guarded by impenetrable hills to the north and the south, which makes the western coastline and the eastern land border the only two fronts. Farther to the east of the land border is a vast grassland and the enemy camp of Earl Kare, a madman who plans to invade Kattegat to exact some old revenge. It is important to note that Kare is thus incapable of pragmatic thought (makes this problem a bit easier and more solvable as it will now involve only 2 variables instead of 3).
Kare lacks the numbers to conquer Kattegat. With just 300 soldiers, he needs a wartime ally on his side. The ambitious Earl Olaf, who wishes to one day become the King of Norway, now believes he can begin his journey by capturing Kattegat. However, he too has 300 soldiers, and has landed on the plains to the south of the southern hills of Kattegat. From here, he can sail to Kattegat’s coastal border as well as march to Kare’s camp and then to Kattegat’s eastern wall.
“It is the unemotional, reserved, calm, detached warrior who wins, not the hothead seeking vengeance and not the ambitious seeker of fortune.” ― Sun Tzu

Question 1
Initially, both Olaf and Kare plan to join forces and invade Kattegat from the east. This is quite simple as Hakon is also expecting a combined land attack. How sound is this plan mathematically?
Solution: Olaf + Kare (300+300=600) will face off against Hakon (400) and conquer Kattegat with 600-400+50=250 troops left, 125 on each side. With equal strengths, their only option now is to share the territory.
Question 2
Olaf suggests that Kare should attack the land wall while he invades by sea, hence surrounding Kattegat from both sides. This makes sense as it will catch the western half of Hakon’s forces by surprise while the other half fights the expected land invasion from the east. Is this plan more feasible than the first for Kare and Olaf?
Solution: On the eastern front, Kare (300) will fight half of Hakon’s forces (200) and have 300-200+50=150 troops left. On the western front, Olaf will land with 300 troops, make their way through Kattegat to the eastern wall, catch Hakon’s remaining forces (200) by surprise and win with 300-200*0.5+50=250 troops left. If Olaf and Kare come to terms, they can still share Kattegat and have 150+250=400 troops. Since both of them have more than 125 of the previous strategy, this plan is more feasible than (1) for Olaf and Kare.
Question 3
Is this plan more feasible than the first for Kare or Olaf? Remember that Olaf is highly ambitious and may have future plans.
Solution: It is often said, an enemy’s enemy is a friend only as long as the common enemy exists. With 250 troops, Olaf can now fight Kare for total control and still be left with 250-150+50=150 troops. Whether it’s better than (2) or not depends on whether Olaf prioritizes strength (150<250) or control (entire Kattegat).
Question 4
Olaf understands very well that Kare’s thirst for revenge blinds him and limits his foresight. Also, the real motive behind the idea of attacking from two sides may be spoiled by some of Kare’s less emotional commanders. Is there a way Olaf can stick to Kare’s suggestion of a combined land attack and yet win a total victory, perhaps an even better victory than his previous plan?
Solution: Olaf can always go ahead with Kare’s initial suggestion and not move any troops to the coast, only to delay his troops on D-Day. If Kare’s 300 soldiers are not backed by Olaf’s 300, he will be defeated by Kattegat’s forces. Olaf’s 300 troops can then attack a weakened Kattegat with 400-300+50=150 troops, and win with 300-150+50=200 soldiers left. This is still better than (1) and (3), and Olaf also gets full control.
Question 5
If Olaf has really decided to carry out this sinister plot, should he still invade from the east? Is there a way he can fake a defeat and catch the opponent by surprise?
Solution: If Olaf chooses to delay his attack, he can instead retreat from the eastern front giving Hakon’s forces a misleading idea that Olaf has given up, and then go around and invade from the coast. This will give him a comparatively inexpensive total victory with 300-150*0.5+50=275 troops left. This is better than 125+Half (1), 250+Half (2), 150+Full (3) and 200+Full (4).
Question 6
With Olaf’s resources and moles planted in the courts of his rivals, can he find an even better strategy? His other eyes and ears have informed him of a traitor in his own ranks, one of his men who passes information to Earl Hakon. Can Olaf trick Kattegat into playing a wrong move? What should be his next move?
Solution: This is where it gets a bit tricky. If Olaf knows who’s is leaking information to Hakon and he doesn’t know that Olaf knows about this, then Olaf can “plan” a coastal attack together with Kare’s land attack, and then delay his troops. Once this “plan” gets leaked, Kattegat will be prompted to split forces between east and west. If Olaf joins forces with Kare and invades from the east, they will win with 600-200+50=450 troops left, and then catch the coastal 200 by surprise and win again with 450-200+50=300 (150 each) troops left. Thus, the wrong plan strategy in itself is not so good for Olaf after all as he has only 150 troops and only half-control.
Question 7
Olaf’s tactic seems to have worked just as planned. He knows Kattegat has split forces between the two fronts. Does he have a better next move?
Solution: Considering Olaf’s trick worked, he may still wish to re-evaluate whether he should help Kare. Now if Olaf delays his troops, Kare (300) will defeat Kattegat’s eastern forces (200). With the remaining 300-200+50=150, he will catch the western 200, who are expecting a coastal attack, by surprise and win with 150-200*0.5=50 troops left. Olaf can now take an already defeated Kattegat by defeating Kare’s 50 and still have 300-50+50=300 troops left. This mixed strategy is certainly better than (1), (2), (3), (4), (5) and (6).
Interestingly, we observe that if Olaf calculates all possible options and follows his best strategy, he can take Kattegat completely at absolutely no cost.
“Victorious warriors win first and then go to war, while defeated warriors go to war first and then seek to win.” ― Sun Tzu
The Battle of Nesjar (1016 CE), on which the siege of Kattegat and this problem is based, started an era of political instability in Norway which led to more wars among Norwegian, Swedish, English and Danish forces in Helgea (1026 CE), Boknafjorden (1028 CE) and Stiklestad (1030 CE), and neither Hakon nor Kare or Olaf survived through all of them.
Conflicts can always be resolved through peaceful means like dialogue, negotiation and diplomacy, for “peace is not absence of conflict; it is the ability to handle conflict by peaceful means.”