The Rebalanced Rules Behind Our AI

July 5, 2026 · The Viking Chess team

There is no such thing as “the” rules of Hnefatafl

Here is the awkward truth behind every Tafl set ever sold: no complete medieval ruleset survived. The game faded out as chess spread through northern Europe, and nobody wrote the rules down while it was alive — we cover that story in how the Vikings actually played. The closest thing to a primary source is Linnaeus’s 18th-century notes on Tablut, the Sámi variant, recorded in Latin — and the influential English translation of those notes garbled key details, which shaped (and skewed) reconstructions for generations.

So every modern ruleset is a reconstruction, and the reconstructions have a famous problem: many of them are lopsided. Depending on which choices you make — how the king is captured, where he escapes, who moves first — one side can dominate. Modern Tafl communities have responded with rebalanced rulesets that adjust these levers, add repetition rules, give the attackers an encirclement win, and generally engineer the fairer game the sagas never specified.

When we built our engine we had to pick one exact ruleset, because an engine cannot be vague. This article is the full disclosure: every rule our AI plays, what our own data says about the balance, and — honestly — what we haven’t implemented yet.

The exact rules our engine plays

Boards and armies. Three variants, one family:

  • Brandubh — 7×7, a king and 4 defenders against 8 attackers (full rules)
  • Tablut — 9×9, a king and 8 defenders against 16 attackers (full rules)
  • Hnefatafl — 11×11, a king and 12 defenders against 24 attackers (full rules)

In each, the king starts on the central throne with his defenders around him and the attackers in four groups on the edges — a 2:1 siege from move one.

The attackers move first. The besieging side gets the initiative, the standard convention in modern rulesets and a deliberate nudge in the attackers’ favour.

Movement. Every piece — king included — moves like a rook: any number of empty squares horizontally or vertically. No diagonals, no jumping. Only the king may stop on the throne or on a corner square.

Custodial capture. You capture by flanking: move so an enemy piece is sandwiched between two of yours along a row or column. Only your move springs the trap — a piece may safely move into the gap between two enemies without being captured. One move can capture several pieces at once.

Hostile squares. The four corners, and the throne when it stands empty, act as capture “anvils”: your piece plus a corner (or the empty throne) can sandwich an enemy just like two of your pieces would.

Capturing the king. The king is not taken by a simple sandwich. He falls only when attackers occupy all four orthogonal sides — with the throne counting as one hostile wall if he stands beside it. The board edge does not count as a wall: a king on the edge cannot be captured in place, because one of his four sides is off the board.

Winning. The defenders win the moment the king reaches any of the four corner squares — in all three variants, including Tablut, where the classic recorded rules used an edge escape (corner escape is the harsher modern choice, and another lever pulled toward the attackers). The attackers win by capturing the king. And there are no stalemate draws: a side with no legal move on its turn loses, the Fetlar-style rule that guarantees a boxed-in army doesn’t earn a half point for suffocating.

Tablut (9×9) — the throne and the four corners are the special squares: hostile for captures, corners the king's only exits

Notice how many of those choices lean toward the attackers: they move first, the throne turns hostile the moment the king steps off it, the king needs a full four-wall cage but loses everything if he’s caught, and he must reach a corner rather than any edge square.

So is it balanced? Here’s our own data

We didn’t want to hand-wave this, so we measured it: we simulated 100,500 games across the three variants, in both random and engine-vs-engine play, from a seeded, reproducible run. The table below is rendered from the raw output:

VariantPlay Defenders winAttackers win Decisive gamesNo resultAvg length
Brandubh Random 99.4% 0.6% 32,735 265 119 moves
Brandubh Skilled (AI) 98.2% 1.8% 500 0 30 moves
Tablut Random 97.9% 2.1% 24,757 8,243 220 moves
Tablut Skilled (AI) 98.8% 1.2% 500 0 26 moves
Hnefatafl Random 96.5% 3.5% 11,015 21,985 265 moves
Hnefatafl Skilled (AI) 72.3% 27.7% 184 316 301 moves

The honest reading: even with every attacker-friendly lever pulled, the defenders still dominate. They win 99.4% of decided random Brandubh games and 98.2% of skilled ones; 97.9% and 98.8% in Tablut. Only in skilled 11×11 Hnefatafl do the attackers become genuinely competitive, taking 27.7% of decided games — and there, most games (316 of 500) hit our 400-ply cap with no result at all. The escape geometry — one fast king, four corners, an army that can’t guard them all — outweighs the material and the rule tweaks combined. The historical suspicion that classic Tafl is defender-favoured isn’t just folklore; in our implementation it shows up in six figures of games.

What we don’t implement (yet)

Full transparency requires the other half of the list. Two rules that modern rebalanced rulesets rely on are not in our engine today:

  • A repetition rule. Nothing forbids shuffling the same pieces back and forth forever.
  • An encirclement win. Attackers who surround the entire defending force don’t win by that fact alone; they still have to cage the king.

These two absences are exactly why engine self-play can cycle. With no repetition rule, a defended fortress and a patient blockade can orbit each other indefinitely — in a pure deterministic self-play run, every single one of our 500 Hnefatafl engine games was still undecided at the 400-ply cap, which is why the published simulation injects occasional random exploration moves. The methodology section of the win-rates article tells that story in full.

Both rules are on our list, and when they land we’ll re-run the full simulation and publish the before/after. If adding them moves the Hnefatafl numbers meaningfully, you’ll read it here first.

Why publish this at all?

Because an AI opponent is only meaningful if you know what game it’s playing. “Our engine plays Hnefatafl” is nearly information-free given how much reconstructions vary; the list above is the actual contract. If you win, you won this game; if our data says the defenders are favoured, it’s under these rules — reproducible down to the random seed.

Play the exact same rules

Everything above is precisely what you face in the browser: play Viking Chess against our engine, or start with the per-variant rules pages if you want the diagrams first. If you’d rather see what these rules do over 100,500 games before picking a side, the win-rate analysis has the receipts — and if you’re new to the family entirely, Hnefatafl vs chess is the five-minute orientation.

Play Viking Chess free →